Better footer customization
This commit is contained in:
parent
c52c91ab51
commit
db10e62c04
2 changed files with 13 additions and 8 deletions
|
@ -93,8 +93,12 @@ disableHugoGeneratorInject = false
|
||||||
# Custom footer
|
# Custom footer
|
||||||
# If you want, you can easily override the default footer with your own content.
|
# If you want, you can easily override the default footer with your own content.
|
||||||
#
|
#
|
||||||
# footerLeft = "Powered by <a href=\"http://gohugo.io\">Hugo</a>"
|
[params.footer]
|
||||||
# footerRight = "Made with ❤ by <a href=\"https://github.com/rhazdon\">Djordje Atlialp</a>"
|
rss = false
|
||||||
|
copyright = false
|
||||||
|
author = false
|
||||||
|
lowerText = ["Powered by <a href=\"http://gohugo.io\">Hugo</a>",
|
||||||
|
"Made with ❤ by <a href=\"https://github.com/rhazdon\">Djordje Atlialp</a>"]
|
||||||
|
|
||||||
# Colors for favicons
|
# Colors for favicons
|
||||||
#
|
#
|
||||||
|
|
|
@ -2,15 +2,16 @@
|
||||||
<div class="footer__inner">
|
<div class="footer__inner">
|
||||||
<div class="footer__content">
|
<div class="footer__content">
|
||||||
<span>© {{ now.Format "2006" }}</span>
|
<span>© {{ now.Format "2006" }}</span>
|
||||||
{{ if .Site.Author.name }}<span><a href="{{ .Site.BaseURL }}">{{ .Site.Author.name }}</a></span>{{ end }}
|
{{ if .Site.Params.footer.author }}<span><a href="{{ .Site.BaseURL }}">{{ .Site.Author.name }}</a></span>{{ end }}
|
||||||
{{ if .Site.Copyright }}<span>{{ .Site.Copyright| safeHTML }}</span>{{ end }}
|
{{ if .Site.Params.footer.copyright }}<span>{{ .Site.Copyright| safeHTML }}</span>{{ end }}
|
||||||
{{- with (not (in (.Site.Language.Get "disableKinds") "RSS")) }}<span><a href="{{ "posts/index.xml" | absLangURL }}" target="_blank" title="rss"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-rss"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg></a></span>{{ end }}
|
{{ if .Site.Params.footer.rss }}<span><a href="{{ "posts/index.xml" | absLangURL }}" target="_blank" title="rss"><svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-rss"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg></a></span>{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{with .Site.Params.footer.lowerText}}
|
||||||
<div class="footer__inner">
|
<div class="footer__inner">
|
||||||
<div class="footer__content">
|
<div class="footer__content">
|
||||||
<span>{{ .Site.Params.footerLeft | default "Powered by <a href=\"http://gohugo.io\">Hugo</a>" | safeHTML }}</span>
|
{{ range . }}<span>{{ . | safeHTML}}</span>{{ end }}
|
||||||
<span>{{ .Site.Params.footerRight | default "Made with ❤ by <a href=\"https://github.com/rhazdon\">Djordje Atlialp</a>" | safeHTML }}</span>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
{{ end }}
|
||||||
</footer>
|
</footer>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue