{{- if ne .Site.Params.footer.enable false -}}
  <footer class="footer">
    <div class="footer-container">
      {{- /* TODO Custom Content deprecated */ -}}
      {{- with .Site.Params.footer.custom -}}
        <div class="footer-line custom">
          {{- safeHTML . -}}
        </div>
      {{- end -}}
      {{- /* Custom Content */ -}}
      {{- partial (.Scratch.Get "customFilePath").footer . -}}

      {{- /* Hugo and FixIt */ -}}
      {{- if ne .Site.Params.footer.hugo false -}}
        <div class="footer-line powered">
          {{- $hugo := printf `<a href="https://gohugo.io/" target="_blank" rel="external nofollow noopener noreferrer" title="Hugo %v">Hugo</a>` hugo.Version -}}
          {{- $theme := printf `<a href="https://github.com/hugo-fixit/FixIt" target="_blank" rel="external" title="FixIt %v"><img class="fixit-icon" src="%v" alt="FixIt logo" />&nbsp;FixIt</a>`
            (.Scratch.Get "version")
            (resources.Get "fixit.svg" | minify).RelPermalink
          -}}
          {{- dict "Hugo" $hugo "Theme" $theme | T "poweredBySome" | safeHTML }}
        </div>
      {{- end -}}

      {{- if .Site.Params.footer.copyright | or .Site.Params.footer.author | or .Site.Params.footer.license -}}
        <div class="footer-line copyright" itemscope itemtype="http://schema.org/CreativeWork">
          {{- /* Copyright year */ -}}
          {{- if ne .Site.Params.footer.copyright false -}}
            {{ dict "Class" "fa-regular fa-copyright fa-fw" | partial "plugin/icon.html" }}
            {{ 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 -}}

          {{- /* Author */ -}}
          {{- if ne .Site.Params.footer.author false -}}
            <span class="author" itemprop="copyrightHolder">
              {{ partial "plugin/link.html" (dict "Destination" ($.Site.Author.link | default .Site.Home.RelPermalink) "Content" .Site.Author.name) -}}
            </span>
          {{- end -}}

          {{- /* License */ -}}
          {{- with .Site.Params.footer.license -}}
            <span class="license footer-divider">{{ . | safeHTML }}</span>
          {{- end -}}
        </div>
      {{- end -}}

      {{- if .Site.Params.footer.siteTime | or .Site.Params.footer.wordCount -}}
        <div class="footer-line statistics">
          {{- if .Site.Params.footer.siteTime -}}
            <span class="site-time" title='{{ T "siteRunning" }}'>
              {{- dict "Class" "fa-solid fa-heartbeat fa-fw animate-icon" | partial "plugin/icon.html" -}}&nbsp;
              {{- printf `<span class="run-times">%v</span>` (T "siteRunning") | safeHTML -}}
            </span>
          {{- end -}}
        </div>
      {{- end -}}

      {{- /* 不蒜子 */ -}}
      {{- if eq .Site.Params.ibruce.enable true -}}
        {{- $loading := dict "Class" "fa-solid fa-spinner fa-spin fa-fw" | partial "plugin/icon.html" -}}
        <div class="footer-line ibruce">
          <span id="busuanzi_container_site_uv" title='{{ T "siteUV" }}'>
            {{- dict "Class" "fa-regular fa-user fa-fw" | partial "plugin/icon.html" -}}&nbsp;<span id="busuanzi_value_site_uv">{{ $loading }}</span>{{- /* NO_SPACING */ -}}
          </span>
          {{- /* NO_SPACING */ -}}
          <span id="busuanzi_container_site_pv" class="footer-divider" title='{{ T "sitePV" }}'>
            {{- dict "Class" "fa-regular fa-eye fa-fw" | partial "plugin/icon.html" -}}&nbsp;<span id="busuanzi_value_site_pv">{{ $loading }}</span>{{- /* NO_SPACING */ -}}
          </span>
        </div>
      {{- end -}}
      
      {{- if .Site.Params.footer.gov | or .Site.Params.footer.icp -}}
        <div class="footer-line beian">
          {{- /* GOV */ -}}
          {{- with .Site.Params.footer.gov -}}
            <span class="gov">{{ . | safeHTML }}</span>
          {{- end -}}

          {{- /* ICP */ -}}
          {{- with .Site.Params.footer.icp -}}
            <span class="icp footer-divider">{{ . | safeHTML }}</span>
          {{- end -}}
        </div>
      {{- end -}}
    </div>
  </footer>
{{- end -}}
