summaryrefslogtreecommitdiff
path: root/themes/blowfish/layouts/partials/footer.html
blob: 1f8fc5fc00acec871a96e68cf3a8a15940187ee7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<footer id="site-footer" class="py-10 print:hidden">
  {{/* Footer menu */}}
  {{ if .Site.Params.footer.showMenu | default true }}
    {{ if .Site.Menus.footer }}
    <nav class="flex flex-row pb-4 text-base font-medium text-neutral-500 dark:text-neutral-400">
      <ul class="flex flex-col list-none sm:flex-row">
        {{ range .Site.Menus.footer }}
        <li class="flex mb-1 ltr:text-right rtl:text-left sm:mb-0 ltr:sm:mr-7 ltr:sm:last:mr-0 rtl:sm:ml-7 rtl:sm:last:ml-0">
          <a class="decoration-primary-500 hover:underline hover:decoration-2 hover:underline-offset-2 flex items-center" href="{{ .URL }}"
            title="{{ .Title }}">
            {{ if .Pre }}
            <span {{ if and .Pre .Name}} class="mr-1" {{ end }}>
                {{ partial "icon.html" .Pre }}
            </span>
            {{ end }}
            {{ .Name | markdownify | emojify }}
          </a>
        </li>
        {{ end }}
      </ul>
    </nav>
    {{ end }}
  {{ end }}
  <div class="flex items-center justify-between">

    {{/* Copyright */}}
    {{ if .Site.Params.footer.showCopyright | default true }}
    <p class="text-sm text-neutral-500 dark:text-neutral-400">
      {{- with replace .Site.Params.copyright "{ year }" now.Year  }}
      {{ . | emojify | markdownify }}
      {{- else }}
      &copy;
      {{ now.Format "2006" }}
      {{ .Site.Author.name | markdownify | emojify }}
      {{- end }}
    </p>
    {{ end }}

    {{/* Theme attribution */}}
    {{ if .Site.Params.footer.showThemeAttribution | default true }}
    <p class="text-xs text-neutral-500 dark:text-neutral-400">
      {{ $hugo := printf `<a class="hover:underline hover:decoration-primary-400 hover:text-primary-500"
        href="https://gohugo.io/" target="_blank" rel="noopener noreferrer">Hugo</a>`
      }}
      {{ $blowfish := printf `<a class="hover:underline hover:decoration-primary-400 hover:text-primary-500"
        href="https://blowfish.page/" target="_blank" rel="noopener noreferrer">Blowfish</a>` }}
      {{ i18n "footer.powered_by" (dict "Hugo" $hugo "Theme" $blowfish) | safeHTML }}
    </p>
    {{ end }}

  </div>
  <script>
    {{ if not .Site.Params.disableImageZoom | default true }}
    mediumZoom(document.querySelectorAll("img:not(.nozoom)"), {
      margin: 24,
      background: 'rgba(0,0,0,0.5)',
      scrollOffset: 0,
    })
    {{ end }}
  </script>
  {{ $jsProcess := resources.Get "js/process.js" }}
  {{ $jsProcess = $jsProcess | resources.Minify | resources.Fingerprint "sha512" }}
  <script type="text/javascript" src="{{ $jsProcess.RelPermalink }}" integrity="{{ $jsProcess.Data.Integrity }}"></script>
  {{/* Extend footer - eg. for extra scripts, etc. */}}
  {{ if templates.Exists "partials/extend-footer.html" }}
  {{ partialCached "extend-footer.html" . }}
  {{ end }}
</footer>