Skip to content

Commit

Permalink
feat: new param displayFooterInHome
Browse files Browse the repository at this point in the history
  • Loading branch information
reuixiy committed Mar 4, 2020
1 parent 44b352e commit 075c8d2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
5 changes: 2 additions & 3 deletions config-examples/en-us/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1179,9 +1179,8 @@ uglyURLs = false
# Footer

enableFooter = true
# Note: homepage layout `poetry`,
# `footage`, and 404 page have
# no footer

displayFooterInHome = true

displayCopyrightSymbol = true

Expand Down
5 changes: 3 additions & 2 deletions config-examples/zh-cn/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1146,8 +1146,9 @@ uglyURLs = false

# 是否开启
enableFooter = true
# 说明:「诗意人生」和「视频片段」首页布局
# 的首页没有页脚

# 是否在首页显示
displayFooterInHome = true

# 是否显示版权符号(©)
displayCopyrightSymbol = true
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- $Deliver := . -}}
{{ if and .Site.Params.enableFooter (not (and .IsHome (in (slice "poetry" "footage") .Site.Params.homeLayout))) }}
{{ if or (and .IsHome .Site.Params.displayFooterInHome) (and (not .IsHome) .Site.Params.enableFooter) }}
<footer id="footer" class="footer">
<div class="footer-inner">
{{- if .Site.Params.displayCopyrightSymbol -}}
Expand Down Expand Up @@ -87,4 +87,4 @@
{{ partial "custom/footer.html" . }}
</div>
</footer>
{{ end }}
{{ end }}

0 comments on commit 075c8d2

Please sign in to comment.