busuanzi moved to footer, header image property added,
This commit is contained in:
		
							parent
							
								
									1bb6f5b875
								
							
						
					
					
						commit
						33c69331d5
					
				
							
								
								
									
										36
									
								
								README.md
								
								
								
								
							
							
						
						
									
										36
									
								
								README.md
								
								
								
								
							|  | @ -593,32 +593,31 @@ You may want to change home page header. There are 4 options which is slider, im | ||||||
| --- | --- | ||||||
| header: | header: | ||||||
|   - type: text |   - type: text | ||||||
|     height: 235 |     height: 200 | ||||||
|     paddingX: 50 |     paddingX: 50 | ||||||
|     paddingY: 0 |     paddingY: 0 | ||||||
|     align: left |     align: center | ||||||
|     title: |     title: | ||||||
|       - header title1 |       - HUGO | ||||||
|       - header title2 |  | ||||||
|     subtitle: |     subtitle: | ||||||
|       - header subtitle1 |       - The world’s fastest framework for building websites | ||||||
|       - header subtitle2 |  | ||||||
|     titleFontSize: 44 |     titleFontSize: 44 | ||||||
|     subtitleFontSize: 16 |     subtitleFontSize: 16 | ||||||
|     spaceBetweenTitleSubtitle: 20 |     spaceBetweenTitleSubtitle: 20 | ||||||
|    |    | ||||||
|   - type: img |   - type: img | ||||||
|     image: images/header/background.png |     imageSrc: images/header/background.jpg # your image file path: root/static/images/header/background.jpg | ||||||
|  |     imageSize: cover # auto|length|cover|contain|initial|inherit | ||||||
|  |     imageRepeat: no-repeat # repeat|repeat-x|repeat-y|no-repeat|initial|inherit | ||||||
|  |     imagePosition: center # x% y%| xpos ypos| left top| center bottom| ... | ||||||
|     height: 235 |     height: 235 | ||||||
|     paddingX: 50 |     paddingX: 50 | ||||||
|     paddingY: 0 |     paddingY: 0 | ||||||
|     align: center |     align: center | ||||||
|     title: |     title: | ||||||
|       - header title1 |       - | ||||||
|       - header title2 |  | ||||||
|     subtitle: |     subtitle: | ||||||
|       - header subtitle1 |       - | ||||||
|       - header subtitle2 |  | ||||||
|     titleFontSize: 44 |     titleFontSize: 44 | ||||||
|     subtitleFontSize: 16 |     subtitleFontSize: 16 | ||||||
|     spaceBetweenTitleSubtitle: 20 |     spaceBetweenTitleSubtitle: 20 | ||||||
|  | @ -629,7 +628,10 @@ header: | ||||||
|       - paddingX: 50 |       - paddingX: 50 | ||||||
|         paddingY: 0 |         paddingY: 0 | ||||||
|         align: left |         align: left | ||||||
|         image: images/header/background.png |         imageSrc: images/header/background.jpg | ||||||
|  |         imageSize: cover | ||||||
|  |         imageRepeat: no-repeat | ||||||
|  |         imagePosition: center | ||||||
|         title: |         title: | ||||||
|           - header title1 |           - header title1 | ||||||
|         subtitle: |         subtitle: | ||||||
|  | @ -641,7 +643,10 @@ header: | ||||||
|       - paddingX: 50 |       - paddingX: 50 | ||||||
|         paddingY: 0 |         paddingY: 0 | ||||||
|         align: center |         align: center | ||||||
|         image: images/header/background.png |         imageSrc: images/header/background.jpg | ||||||
|  |         imageSize: cover | ||||||
|  |         imageRepeat: no-repeat | ||||||
|  |         imagePosition: center | ||||||
|         title: |         title: | ||||||
|           - header title2 |           - header title2 | ||||||
|         subtitle: |         subtitle: | ||||||
|  | @ -653,7 +658,10 @@ header: | ||||||
|       - paddingX: 50 |       - paddingX: 50 | ||||||
|         paddingY: 0 |         paddingY: 0 | ||||||
|         align: right |         align: right | ||||||
|         image: images/header/background.png |         imageSrc: images/header/background.jpg | ||||||
|  |         imageSize: cover | ||||||
|  |         imageRepeat: no-repeat | ||||||
|  |         imagePosition: center | ||||||
|         title: |         title: | ||||||
|           - header title3 |           - header title3 | ||||||
|         subtitle: |         subtitle: | ||||||
|  |  | ||||||
|  | @ -1,5 +1,6 @@ | ||||||
| .busuanzi { | .busuanzi { | ||||||
|   @include flexbox(); |   @include flexbox(); | ||||||
|  |   width: 250px; | ||||||
| 
 | 
 | ||||||
|   &__item { |   &__item { | ||||||
|     padding: 0.125rem; |     padding: 0.125rem; | ||||||
|  | @ -10,13 +11,14 @@ | ||||||
|     @include flex-grow(1); |     @include flex-grow(1); | ||||||
| 
 | 
 | ||||||
|     &--label { |     &--label { | ||||||
|       font-size: 14px; |       font-size: 12.8px; | ||||||
|       padding: .125rem 0; |       padding: .125rem 0; | ||||||
|       font-family: $title-font; |       font-family: $title-font; | ||||||
|  |       font-style: italic; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     &--number { |     &--number { | ||||||
|       font-size: 20px; |       font-size: 16.8px; | ||||||
|       font-weight: bold; |       font-weight: bold; | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  | @ -8,17 +8,6 @@ | ||||||
|     font-family: $title-font; |     font-family: $title-font; | ||||||
|     font-weight: 900; |     font-weight: 900; | ||||||
|   } |   } | ||||||
| 
 |  | ||||||
|   &__image { |  | ||||||
|     background-image: url("../images/header/background.jpg"), |  | ||||||
|     url("../images/header/background.png"); |  | ||||||
|     width: 100%; |  | ||||||
|     height: 235px; |  | ||||||
|     background-size: cover; |  | ||||||
|     background-repeat: no-repeat; |  | ||||||
|     position: relative; |  | ||||||
|     margin-bottom: 0.5rem; |  | ||||||
|   } |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .site-header { | .site-header { | ||||||
|  |  | ||||||
|  | @ -31,6 +31,7 @@ $content-font: {{ .Site.Data.font.content_font }}; | ||||||
| @import 'layout/navigation'; | @import 'layout/navigation'; | ||||||
| @import 'layout/grid'; | @import 'layout/grid'; | ||||||
| @import 'layout/header'; | @import 'layout/header'; | ||||||
|  | @import 'layout/body'; | ||||||
| @import 'layout/footer'; | @import 'layout/footer'; | ||||||
| @import 'layout/sidebar'; | @import 'layout/sidebar'; | ||||||
| 
 | 
 | ||||||
|  | @ -59,7 +60,6 @@ $content-font: {{ .Site.Data.font.content_font }}; | ||||||
| @import 'pages/404'; | @import 'pages/404'; | ||||||
| @import 'pages/about'; | @import 'pages/about'; | ||||||
| @import 'pages/archive'; | @import 'pages/archive'; | ||||||
| @import 'pages/body'; |  | ||||||
| @import 'pages/gallery'; | @import 'pages/gallery'; | ||||||
| @import 'pages/list'; | @import 'pages/list'; | ||||||
| @import 'pages/single'; | @import 'pages/single'; | ||||||
|  |  | ||||||
|  | @ -120,6 +120,5 @@ commento = false | ||||||
|   enable = false |   enable = false | ||||||
|   alipay = ""  |   alipay = ""  | ||||||
|   wechat = "" |   wechat = "" | ||||||
|   bitcoin = "" |  | ||||||
|   paypal = "" |   paypal = "" | ||||||
|   patreon = "" |   patreon = "" | ||||||
|  | @ -14,17 +14,18 @@ header: | ||||||
|     spaceBetweenTitleSubtitle: 20 |     spaceBetweenTitleSubtitle: 20 | ||||||
|    |    | ||||||
|   - type: img |   - type: img | ||||||
|     image: images/header/background.jpg |     imageSrc: images/header/background.jpg | ||||||
|  |     imageSize: cover | ||||||
|  |     imageRepeat: no-repeat | ||||||
|  |     imagePosition: center | ||||||
|     height: 235 |     height: 235 | ||||||
|     paddingX: 50 |     paddingX: 50 | ||||||
|     paddingY: 0 |     paddingY: 0 | ||||||
|     align: center |     align: center | ||||||
|     title: |     title: | ||||||
|       - header title1 |       - | ||||||
|       - header title2 |  | ||||||
|     subtitle: |     subtitle: | ||||||
|       - header subtitle1 |       - | ||||||
|       - header subtitle2 |  | ||||||
|     titleFontSize: 44 |     titleFontSize: 44 | ||||||
|     subtitleFontSize: 16 |     subtitleFontSize: 16 | ||||||
|     spaceBetweenTitleSubtitle: 20 |     spaceBetweenTitleSubtitle: 20 | ||||||
|  | @ -35,7 +36,10 @@ header: | ||||||
|       - paddingX: 50 |       - paddingX: 50 | ||||||
|         paddingY: 0 |         paddingY: 0 | ||||||
|         align: left |         align: left | ||||||
|         image: images/header/background.jpg |         imageSrc: images/header/background.jpg | ||||||
|  |         imageSize: cover | ||||||
|  |         imageRepeat: no-repeat | ||||||
|  |         imagePosition: center | ||||||
|         title: |         title: | ||||||
|           - header title1 |           - header title1 | ||||||
|         subtitle: |         subtitle: | ||||||
|  | @ -47,7 +51,10 @@ header: | ||||||
|       - paddingX: 50 |       - paddingX: 50 | ||||||
|         paddingY: 0 |         paddingY: 0 | ||||||
|         align: center |         align: center | ||||||
|         image: images/header/background.jpg |         imageSrc: images/header/background.jpg | ||||||
|  |         imageSize: cover | ||||||
|  |         imageRepeat: no-repeat | ||||||
|  |         imagePosition: center | ||||||
|         title: |         title: | ||||||
|           - header title2 |           - header title2 | ||||||
|         subtitle: |         subtitle: | ||||||
|  | @ -59,7 +66,10 @@ header: | ||||||
|       - paddingX: 50 |       - paddingX: 50 | ||||||
|         paddingY: 0 |         paddingY: 0 | ||||||
|         align: right |         align: right | ||||||
|         image: images/header/background.jpg |         imageSrc: images/header/background.jpg | ||||||
|  |         imageSize: cover | ||||||
|  |         imageRepeat: no-repeat | ||||||
|  |         imagePosition: center | ||||||
|         title: |         title: | ||||||
|           - header title3 |           - header title3 | ||||||
|         subtitle: |         subtitle: | ||||||
|  |  | ||||||
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							|  | @ -19,12 +19,14 @@ | ||||||
|             if (localTheme) { |             if (localTheme) { | ||||||
|                 document.getElementById('root').className = `theme__${localTheme}`; |                 document.getElementById('root').className = `theme__${localTheme}`; | ||||||
|             } |             } | ||||||
|     </script> |     </script>     | ||||||
|     <div id="body"> |     <div id="body"> | ||||||
|  |         {{ partial "body/custom-wrapper" . }} | ||||||
|         <div class="container wrapper"> |         <div class="container wrapper"> | ||||||
|             {{ partial "navbar/site-nav" . }} |             {{ partial "navbar/site-nav" . }} | ||||||
|             {{ partial "header/site-header" . }} |             {{ partial "header/site-header" . }} | ||||||
|             {{ block "main" . }}{{ end }} |             {{ block "main" . }}{{ end }} | ||||||
|  |             {{ partial "body/custom-body" . }} | ||||||
|             {{ partial "footer/site-footer" . }} |             {{ partial "footer/site-footer" . }} | ||||||
|         </div>     |         </div>     | ||||||
|     </div>     |     </div>     | ||||||
|  |  | ||||||
|  | @ -0,0 +1 @@ | ||||||
|  | <!-- override this file --> | ||||||
|  | @ -15,14 +15,6 @@ | ||||||
|           {{ partial (print "svgs/donation/" $name ".svg") (dict "width" 22 "height" 22) }} |           {{ partial (print "svgs/donation/" $name ".svg") (dict "width" 22 "height" 22) }} | ||||||
|           {{ $name }} |           {{ $name }} | ||||||
|         </a> |         </a> | ||||||
|       {{ else if in $name "bitcoin" }} |  | ||||||
|         <div class="donation__item donation__dropup"> |  | ||||||
|           {{ partial (print "svgs/donation/" $name ".svg") (dict "width" 22 "height" 22) }} |  | ||||||
|           {{ $name }} |  | ||||||
|           <div class="donation__dropup--content"> |  | ||||||
|             {{ $path }} |  | ||||||
|           </div> |  | ||||||
|         </div> |  | ||||||
|       {{ else }} |       {{ else }} | ||||||
|         <div class="donation__item donation__dropup"> |         <div class="donation__item donation__dropup"> | ||||||
|           {{ partial (print "svgs/donation/" $name ".svg") (dict "width" 22 "height" 22) }} |           {{ partial (print "svgs/donation/" $name ".svg") (dict "width" 22 "height" 22) }} | ||||||
|  |  | ||||||
|  | @ -20,5 +20,4 @@ | ||||||
|     {{ end }} |     {{ end }} | ||||||
| 
 | 
 | ||||||
|   </div> |   </div> | ||||||
|   <hr class="hr-fade sidebar-hr" /> |  | ||||||
| {{ end }} | {{ end }} | ||||||
|  | @ -6,6 +6,8 @@ | ||||||
| 
 | 
 | ||||||
|     {{ if $.Param "showPoweredBy" }} |     {{ if $.Param "showPoweredBy" }} | ||||||
|     <div class="footer__poweredby"> |     <div class="footer__poweredby"> | ||||||
|  |     {{ partial "footer/site-counter" . }} | ||||||
|  | 
 | ||||||
|         {{ if $.Site.Copyright }}         |         {{ if $.Site.Copyright }}         | ||||||
|             <p class="caption"> |             <p class="caption"> | ||||||
|                 {{ with $.Site.Copyright }}{{ replace . "{year}" now.Year | markdownify}}{{ end }} |                 {{ with $.Site.Copyright }}{{ replace . "{year}" now.Year | markdownify}}{{ end }} | ||||||
|  |  | ||||||
|  | @ -0,0 +1 @@ | ||||||
|  | <!-- override this file --> | ||||||
|  | @ -1,9 +1,10 @@ | ||||||
| {{ if $.Params.header }}   | {{ if $.Params.header }}   | ||||||
|   {{ range $.Params.header }} |   {{ range $.Params.header }} | ||||||
|     {{ if eq .type "img" }} |     {{ if eq .type "img" }} | ||||||
|     <div class="site-header site-header__align-{{ .align }}" style="background-image: url('{{ .image | relURL }}'); width: 100%; height: {{ .height }}px; padding: {{ .paddingY }}px {{ .paddingX }}px;"> |     <div class="site-header site-header__align-{{ .align }}" style="background-image: url('{{ .imageSrc | relURL }}'); background-size: {{ .imageSize }}; | ||||||
|  |     background-repeat: {{ .imageRepeat }}; background-position: {{ .imagePosition }}; width: 100%; height: {{ .height }}px; padding: {{ .paddingY }}px {{ .paddingX }}px;"> | ||||||
|       {{ $header := . }} |       {{ $header := . }} | ||||||
|       {{ if .title }}             |       {{ if .title }} | ||||||
|         {{ range .title }} |         {{ range .title }} | ||||||
|         <div class="site-header__title" style="font-size: {{ $header.titleFontSize }}px;"> |         <div class="site-header__title" style="font-size: {{ $header.titleFontSize }}px;"> | ||||||
|           {{ . }} |           {{ . }} | ||||||
|  |  | ||||||
|  | @ -5,7 +5,8 @@ | ||||||
|     {{ if eq .type "slide" }} |     {{ if eq .type "slide" }} | ||||||
|       {{ $height := .height }} |       {{ $height := .height }} | ||||||
|       {{ range .slide }} |       {{ range .slide }} | ||||||
|         <div class="swiper-slide site-header site-header__align-{{ .align }}" style="background-image: url('{{.image | relURL }}'); height: {{ $height }}px;"> |         <div class="swiper-slide site-header site-header__align-{{ .align }}" style="background-image: url('{{ .imageSrc | relURL }}'); background-size: {{ .imageSize }}; | ||||||
|  |     background-repeat: {{ .imageRepeat }}; background-position: {{ .imagePosition }}; height: {{ $height }}px;"> | ||||||
|           {{ $header := . }} |           {{ $header := . }} | ||||||
|           {{ if .title }}             |           {{ if .title }}             | ||||||
|             {{ range .title }} |             {{ range .title }} | ||||||
|  |  | ||||||
|  | @ -1,8 +1,7 @@ | ||||||
| {{ if $.Param "enableSidebar" }} | {{ if $.Param "enableSidebar" }} | ||||||
| <div class="sidebar">     | <div class="sidebar">     | ||||||
|     {{ partial "search/site-search" . }} |     {{ partial "search/site-search" . }} | ||||||
|     {{ partial "sidebar/site-bio" . }} |     {{ partial "sidebar/site-bio" . }}     | ||||||
|     {{ partial "sidebar/site-counter" . }} |  | ||||||
|     {{ partial "sidebar/custom-home" . }} |     {{ partial "sidebar/custom-home" . }} | ||||||
| 
 | 
 | ||||||
|     {{ range (and (where .Site.Sections "Type" "!=" "about") (where .Site.Sections "Type" "!=" "archive")) }} |     {{ range (and (where .Site.Sections "Type" "!=" "about") (where .Site.Sections "Type" "!=" "archive")) }} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	 zzossig
						zzossig