👷 Add page footer content.
This commit is contained in:
parent
f56f229bd7
commit
ce6daa22b8
@ -265,14 +265,14 @@ params:
|
||||
|
||||
footer:
|
||||
# Specify the year when the site was setup. If not defined, current year will be used.
|
||||
#since: 2021
|
||||
since: 2010
|
||||
|
||||
# Icon between year and copyright info.
|
||||
icon:
|
||||
# Icon name in Font Awesome. See: https://fontawesome.com/icons
|
||||
name: fa fa-heart
|
||||
# If you want to animate the icon, set it to true.
|
||||
animated: false
|
||||
animated: true
|
||||
# Change the color of icon, using Hex Code.
|
||||
color: "#ff0000"
|
||||
|
||||
@ -285,13 +285,13 @@ params:
|
||||
# Beian ICP and gongan information for Chinese users. See: https://beian.miit.gov.cn, http://www.beian.gov.cn
|
||||
beian:
|
||||
enable: false
|
||||
icp:
|
||||
icp: 粤ICP备18047355-1号
|
||||
# The digit in the num of gongan beian.
|
||||
gongan_id:
|
||||
#gongan_id:
|
||||
# The full num of gongan beian.
|
||||
gongan_num:
|
||||
gonganNum: 11010102001808
|
||||
# The icon for gongan beian. See: http://www.beian.gov.cn/portal/download
|
||||
gongan_icon_url:
|
||||
#gongan_icon_url:
|
||||
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
@ -784,7 +784,7 @@ params:
|
||||
visitorsIcon: fa fa-user
|
||||
views: true
|
||||
viewsIcon: fa fa-eye
|
||||
postViews: true
|
||||
postViews: false
|
||||
postViewsIcon: far fa-eye
|
||||
|
||||
|
||||
|
@ -53,5 +53,10 @@ PostTag:
|
||||
PostReadMore:
|
||||
other: "阅读全文"
|
||||
|
||||
UserVistorsLabel:
|
||||
other: 总访客量
|
||||
PageViewsLabel:
|
||||
other: 总访问量
|
||||
|
||||
FooterPowerby:
|
||||
other: "由 %s 强力驱动"
|
@ -46,7 +46,7 @@
|
||||
</main>
|
||||
<footer class="footer">
|
||||
<div class="footer-inner">
|
||||
{{- partial "footer" . }}
|
||||
{{- partial "footer" (dict "P" $P "Page" .Page "Scratch" .Scratch) }}
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
@ -0,0 +1,91 @@
|
||||
{{- $ft := .P.footer }}
|
||||
{{- if $ft.beian.enable }}
|
||||
{{- with $ft.beian }}
|
||||
<div class="beian">
|
||||
<a href="https://beian.miit.gov.cn" target="_blank">{{ .icp }}</a>
|
||||
<img src="/imgs/gongan.png" alt="京公网安备">
|
||||
<a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode={{ .gonganNum }}" target="_blank">京公网安备 {{ .gonganNum }}号</a>
|
||||
</div>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
<div class="copyright">
|
||||
©
|
||||
<span itemprop="copyrightYear">
|
||||
{{- $year := now.Year }}
|
||||
{{- if isset $ft "since" }}
|
||||
{{- if gt $year $ft.since }}
|
||||
{{ $ft.since }} - {{ $year }}
|
||||
{{- else }}
|
||||
{{ $year }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{ $year }}
|
||||
{{- end }}
|
||||
</span>
|
||||
<span class="with-love">
|
||||
<i class="{{ $ft.icon.name }}"></i>
|
||||
</span>
|
||||
<span class="author" itemprop="copyrightHolder">{{ default $ft.copyright .P.author }}</span>
|
||||
</div>
|
||||
{{/*
|
||||
<!--
|
||||
{{- if config.symbols_count_time.total_symbols or config.symbols_count_time.total_time }}
|
||||
<div class="wordcount">
|
||||
{{- if config.symbols_count_time.total_symbols }}
|
||||
<span class="post-meta-item">
|
||||
<span class="post-meta-item-icon">
|
||||
<i class="fa fa-chart-line"></i>
|
||||
</span>
|
||||
{{- if .P.symbols_count_time.item_text_total }}
|
||||
<span>{{ __('symbols_count_time.count_total') + __('symbol.colon') }}</span>
|
||||
{{- end }}
|
||||
<span title="{{ __('symbols_count_time.count_total') }}">{{ symbolsCountTotal(site) }}</span>
|
||||
</span>
|
||||
{{- end }}
|
||||
{{- if config.symbols_count_time.total_time }}
|
||||
<span class="post-meta-item">
|
||||
<span class="post-meta-item-icon">
|
||||
<i class="fa fa-coffee"></i>
|
||||
</span>
|
||||
{{- if .P.symbols_count_time.item_text_total }}
|
||||
<span>{{ __('symbols_count_time.time_total') }} ≈</span>
|
||||
{{- end }}
|
||||
<span title="{{ __('symbols_count_time.time_total') }}">{{ symbolsTimeTotal(site, config.symbols_count_time.awl, config.symbols_count_time.wpm, __('symbols_count_time.time_minutes')) }}</span>
|
||||
</span>
|
||||
{{- end }}
|
||||
</div>
|
||||
{{- end }}
|
||||
-->
|
||||
*/}}
|
||||
{{- if .P.busuanzi.enable }}
|
||||
{{ with .P.busuanzi }}
|
||||
<div class="busuanzi-count">
|
||||
{{- if .visitors }}
|
||||
<span class="post-meta-item" id="busuanzi_container_site_uv" title="{{ T "UserVistorsLabel" }}">
|
||||
<span class="post-meta-item-icon">
|
||||
<i class="{{ .visitorsIcon }}"></i>
|
||||
</span>
|
||||
<span class="site-uv" >
|
||||
<span id="busuanzi_value_site_uv"></span>
|
||||
</span>
|
||||
</span>
|
||||
{{- end }}
|
||||
{{- if .views }}
|
||||
<span class="post-meta-item" id="busuanzi_container_site_pv" title="{{ T "PageViewsLabel" }}">
|
||||
<span class="post-meta-item-icon">
|
||||
<i class="{{ .viewsIcon }}"></i>
|
||||
</span>
|
||||
<span class="site-pv">
|
||||
<span id="busuanzi_value_site_pv"></span>
|
||||
</span>
|
||||
</span>
|
||||
{{- end }}
|
||||
</div>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if $ft.powered }}
|
||||
<div class="powered-by">
|
||||
{{ $pb := printf "<a href='https://gohugo.io' target='_blank'>Hugo</a> & <a href='https://github.com/hugo-next' target='_blank'>NexT.%s</a>" .P.scheme }}
|
||||
{{- printf (T "FooterPowerby") $pb | safeHTML }}
|
||||
</div>
|
||||
{{- end }}
|
Loading…
Reference in New Issue
Block a user