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:
|
||||
- type: text
|
||||
height: 235
|
||||
height: 200
|
||||
paddingX: 50
|
||||
paddingY: 0
|
||||
align: left
|
||||
align: center
|
||||
title:
|
||||
- header title1
|
||||
- header title2
|
||||
- HUGO
|
||||
subtitle:
|
||||
- header subtitle1
|
||||
- header subtitle2
|
||||
- The world’s fastest framework for building websites
|
||||
titleFontSize: 44
|
||||
subtitleFontSize: 16
|
||||
spaceBetweenTitleSubtitle: 20
|
||||
|
||||
- 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
|
||||
paddingX: 50
|
||||
paddingY: 0
|
||||
align: center
|
||||
title:
|
||||
- header title1
|
||||
- header title2
|
||||
-
|
||||
subtitle:
|
||||
- header subtitle1
|
||||
- header subtitle2
|
||||
-
|
||||
titleFontSize: 44
|
||||
subtitleFontSize: 16
|
||||
spaceBetweenTitleSubtitle: 20
|
||||
|
@ -629,7 +628,10 @@ header:
|
|||
- paddingX: 50
|
||||
paddingY: 0
|
||||
align: left
|
||||
image: images/header/background.png
|
||||
imageSrc: images/header/background.jpg
|
||||
imageSize: cover
|
||||
imageRepeat: no-repeat
|
||||
imagePosition: center
|
||||
title:
|
||||
- header title1
|
||||
subtitle:
|
||||
|
@ -641,7 +643,10 @@ header:
|
|||
- paddingX: 50
|
||||
paddingY: 0
|
||||
align: center
|
||||
image: images/header/background.png
|
||||
imageSrc: images/header/background.jpg
|
||||
imageSize: cover
|
||||
imageRepeat: no-repeat
|
||||
imagePosition: center
|
||||
title:
|
||||
- header title2
|
||||
subtitle:
|
||||
|
@ -653,7 +658,10 @@ header:
|
|||
- paddingX: 50
|
||||
paddingY: 0
|
||||
align: right
|
||||
image: images/header/background.png
|
||||
imageSrc: images/header/background.jpg
|
||||
imageSize: cover
|
||||
imageRepeat: no-repeat
|
||||
imagePosition: center
|
||||
title:
|
||||
- header title3
|
||||
subtitle:
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
.busuanzi {
|
||||
@include flexbox();
|
||||
width: 250px;
|
||||
|
||||
&__item {
|
||||
padding: 0.125rem;
|
||||
|
@ -10,13 +11,14 @@
|
|||
@include flex-grow(1);
|
||||
|
||||
&--label {
|
||||
font-size: 14px;
|
||||
font-size: 12.8px;
|
||||
padding: .125rem 0;
|
||||
font-family: $title-font;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
&--number {
|
||||
font-size: 20px;
|
||||
font-size: 16.8px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,17 +8,6 @@
|
|||
font-family: $title-font;
|
||||
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 {
|
||||
|
|
|
@ -31,6 +31,7 @@ $content-font: {{ .Site.Data.font.content_font }};
|
|||
@import 'layout/navigation';
|
||||
@import 'layout/grid';
|
||||
@import 'layout/header';
|
||||
@import 'layout/body';
|
||||
@import 'layout/footer';
|
||||
@import 'layout/sidebar';
|
||||
|
||||
|
@ -59,7 +60,6 @@ $content-font: {{ .Site.Data.font.content_font }};
|
|||
@import 'pages/404';
|
||||
@import 'pages/about';
|
||||
@import 'pages/archive';
|
||||
@import 'pages/body';
|
||||
@import 'pages/gallery';
|
||||
@import 'pages/list';
|
||||
@import 'pages/single';
|
||||
|
|
|
@ -120,6 +120,5 @@ commento = false
|
|||
enable = false
|
||||
alipay = ""
|
||||
wechat = ""
|
||||
bitcoin = ""
|
||||
paypal = ""
|
||||
patreon = ""
|
|
@ -14,17 +14,18 @@ header:
|
|||
spaceBetweenTitleSubtitle: 20
|
||||
|
||||
- type: img
|
||||
image: images/header/background.jpg
|
||||
imageSrc: images/header/background.jpg
|
||||
imageSize: cover
|
||||
imageRepeat: no-repeat
|
||||
imagePosition: center
|
||||
height: 235
|
||||
paddingX: 50
|
||||
paddingY: 0
|
||||
align: center
|
||||
title:
|
||||
- header title1
|
||||
- header title2
|
||||
-
|
||||
subtitle:
|
||||
- header subtitle1
|
||||
- header subtitle2
|
||||
-
|
||||
titleFontSize: 44
|
||||
subtitleFontSize: 16
|
||||
spaceBetweenTitleSubtitle: 20
|
||||
|
@ -35,7 +36,10 @@ header:
|
|||
- paddingX: 50
|
||||
paddingY: 0
|
||||
align: left
|
||||
image: images/header/background.jpg
|
||||
imageSrc: images/header/background.jpg
|
||||
imageSize: cover
|
||||
imageRepeat: no-repeat
|
||||
imagePosition: center
|
||||
title:
|
||||
- header title1
|
||||
subtitle:
|
||||
|
@ -47,7 +51,10 @@ header:
|
|||
- paddingX: 50
|
||||
paddingY: 0
|
||||
align: center
|
||||
image: images/header/background.jpg
|
||||
imageSrc: images/header/background.jpg
|
||||
imageSize: cover
|
||||
imageRepeat: no-repeat
|
||||
imagePosition: center
|
||||
title:
|
||||
- header title2
|
||||
subtitle:
|
||||
|
@ -59,7 +66,10 @@ header:
|
|||
- paddingX: 50
|
||||
paddingY: 0
|
||||
align: right
|
||||
image: images/header/background.jpg
|
||||
imageSrc: images/header/background.jpg
|
||||
imageSize: cover
|
||||
imageRepeat: no-repeat
|
||||
imagePosition: center
|
||||
title:
|
||||
- header title3
|
||||
subtitle:
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -21,10 +21,12 @@
|
|||
}
|
||||
</script>
|
||||
<div id="body">
|
||||
{{ partial "body/custom-wrapper" . }}
|
||||
<div class="container wrapper">
|
||||
{{ partial "navbar/site-nav" . }}
|
||||
{{ partial "header/site-header" . }}
|
||||
{{ block "main" . }}{{ end }}
|
||||
{{ partial "body/custom-body" . }}
|
||||
{{ partial "footer/site-footer" . }}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<!-- override this file -->
|
|
@ -15,14 +15,6 @@
|
|||
{{ partial (print "svgs/donation/" $name ".svg") (dict "width" 22 "height" 22) }}
|
||||
{{ $name }}
|
||||
</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 }}
|
||||
<div class="donation__item donation__dropup">
|
||||
{{ partial (print "svgs/donation/" $name ".svg") (dict "width" 22 "height" 22) }}
|
||||
|
|
|
@ -20,5 +20,4 @@
|
|||
{{ end }}
|
||||
|
||||
</div>
|
||||
<hr class="hr-fade sidebar-hr" />
|
||||
{{ end }}
|
|
@ -6,6 +6,8 @@
|
|||
|
||||
{{ if $.Param "showPoweredBy" }}
|
||||
<div class="footer__poweredby">
|
||||
{{ partial "footer/site-counter" . }}
|
||||
|
||||
{{ if $.Site.Copyright }}
|
||||
<p class="caption">
|
||||
{{ with $.Site.Copyright }}{{ replace . "{year}" now.Year | markdownify}}{{ end }}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<!-- override this file -->
|
|
@ -1,7 +1,8 @@
|
|||
{{ if $.Params.header }}
|
||||
{{ range $.Params.header }}
|
||||
{{ 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 := . }}
|
||||
{{ if .title }}
|
||||
{{ range .title }}
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
{{ if eq .type "slide" }}
|
||||
{{ $height := .height }}
|
||||
{{ 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 := . }}
|
||||
{{ if .title }}
|
||||
{{ range .title }}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<div class="sidebar">
|
||||
{{ partial "search/site-search" . }}
|
||||
{{ partial "sidebar/site-bio" . }}
|
||||
{{ partial "sidebar/site-counter" . }}
|
||||
{{ partial "sidebar/custom-home" . }}
|
||||
|
||||
{{ range (and (where .Site.Sections "Type" "!=" "about") (where .Site.Sections "Type" "!=" "archive")) }}
|
||||
|
|
Loading…
Reference in New Issue