diff options
author | Dillon <dillonzq@outlook.com> | 2020-04-21 17:55:06 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-21 17:55:06 +0300 |
commit | f14301c395ffd63ef72625bf8bfe887fa211d013 (patch) | |
tree | 367e8f5a699a0b1df5d142f0ae259c9d6dd9de3f /layouts/partials/footer.html | |
parent | 8a0e61085cfc2f2d1a342697c73b10cbc1d27a68 (diff) |
feat: improve configuration (#245)
* feat: improve configuration
* fix: fix partials/footer.html error
Diffstat (limited to 'layouts/partials/footer.html')
-rw-r--r-- | layouts/partials/footer.html | 77 |
1 files changed, 44 insertions, 33 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 51d80e2..e66c7c1 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,39 +1,50 @@ -{{- $scratch := .Scratch.Get "scratch" -}} - -<footer class="footer"> - <div class="copyright"> - {{- /* Hugo and LoveIt */ -}} - <div class="copyright-line"> - {{- $hugo := printf `<a href="https://gohugo.io/" target="_blank" rel="noopener noreffer" title="Hugo %s">Hugo</a>` hugo.Version -}} - {{- printf (T "poweredBySome") $hugo | safeHTML }} | {{ T "theme" }} - <a href="https://github.com/dillonzq/LoveIt" target="_blank" rel="noopener noreffer" title="LoveIt {{ $scratch.Get "version" }}"><i class="far fa-heart fa-fw"></i> LoveIt</a> - </div> - - <div class="copyright-line"> - {{- /* Copyright year */ -}} - <i class="far fa-copyright fa-fw"></i> - {{- with .Site.Params.footer.since -}} - <span itemprop="copyrightYear"> - {{- if lt . now.Year }}{{ . }} - {{ end }}{{ now.Year -}} - </span> - {{- else -}} - <span itemprop="copyrightYear">{{ now.Year }}</span> +{{- if ne .Site.Params.footer.enable false -}} + <footer class="footer"> + <div class="footer-container"> + {{- /* Custom Content */ -}} + {{- with .Site.Params.footer.custom -}} + <div class="footer-line"> + {{- safeHTML . -}} + </div> {{- end -}} - {{- /* Author */ -}} - {{- with .Site.Author.name -}} - <span class="author" itemprop="copyrightHolder"> <a href="{{ $.Site.Author.link | default (relLangURL `/`) }}" target="_blank">{{ . }}</a></span> + {{- /* Hugo and LoveIt */ -}} + {{- if ne .Site.Params.footer.hugo false -}} + <div class="footer-line"> + {{- $hugo := printf `<a href="https://gohugo.io/" target="_blank" rel="noopener noreffer" title="Hugo %s">Hugo</a>` hugo.Version -}} + {{- printf (T "poweredBySome") $hugo | safeHTML }} | {{ T "theme" }} - <a href="https://github.com/dillonzq/LoveIt" target="_blank" rel="noopener noreffer" title="LoveIt {{ .Scratch.Get `version` }}"><i class="far fa-heart fa-fw"></i> LoveIt</a> + </div> {{- end -}} - {{- /* License */ -}} - {{- with .Site.Params.footer.license -}} - | <span class="license">{{ . | safeHTML }}</span> - {{- end -}} + <div class="footer-line"> + {{- /* Copyright year */ -}} + {{- if ne .Site.Params.footer.copyright false -}} + <i class="far fa-copyright fa-fw"></i> + {{- with .Site.Params.footer.since -}} + <span itemprop="copyrightYear"> + {{- if lt . now.Year }}{{ . }} - {{ end }}{{ now.Year -}} + </span> + {{- else -}} + <span itemprop="copyrightYear">{{ now.Year }}</span> + {{- end -}} + {{- end -}} - {{- /* ICP */ -}} - {{- with .Site.Params.footer.icp -}} - <span class="icp-splitter"> | </span><br class="icp-br"/> - <span class="icp">{{ . | safeHTML }}</span> - {{- end -}} + {{- /* Author */ -}} + {{- if ne .Site.Params.footer.author false -}} + <span class="author" itemprop="copyrightHolder"> <a href="{{ $.Site.Author.link | default (relLangURL `/`) }}" target="_blank">{{ .Site.Author.name }}</a></span> + {{- end -}} + + {{- /* License */ -}} + {{- with .Site.Params.footer.license -}} + | <span class="license">{{ . | safeHTML }}</span> + {{- end -}} + + {{- /* ICP */ -}} + {{- with .Site.Params.footer.icp -}} + <span class="icp-splitter"> | </span><br class="icp-br"/> + <span class="icp">{{ . | safeHTML }}</span> + {{- end -}} + </div> </div> - </div> -</footer> + </footer> +{{- end -}} |