2022-04-03 03:51:52 +00:00
|
|
|
<footer class="py-10 print:hidden">
|
2021-10-19 04:45:11 +00:00
|
|
|
{{/* Footer menu */}}
|
|
|
|
{{ if .Site.Menus.footer }}
|
2021-12-21 02:22:45 +00:00
|
|
|
<nav class="pb-4 text-base font-medium text-neutral-500 dark:text-neutral-400">
|
2023-04-05 00:50:15 +00:00
|
|
|
<ul class="flex list-none flex-col sm:flex-row">
|
2021-10-19 04:45:11 +00:00
|
|
|
{{ range .Site.Menus.footer }}
|
2023-04-05 00:50:15 +00:00
|
|
|
<li class="group mb-1 ltr:text-right rtl:text-left sm:mb-0 sm:me-7 sm:last:me-0">
|
2023-01-16 03:21:03 +00:00
|
|
|
{{ if eq .Params.action "search" }}
|
2023-01-17 01:58:04 +00:00
|
|
|
{{ $.Scratch.Add "searchCount" 1 }}
|
2023-01-16 03:21:03 +00:00
|
|
|
{{ if $.Site.Params.enableSearch | default false }}
|
|
|
|
<button
|
2023-01-17 01:58:04 +00:00
|
|
|
id="search-button-{{ $.Scratch.Get "searchCount" }}"
|
2023-01-16 03:21:03 +00:00
|
|
|
title="{{ .Title | default (i18n "search.open_button_title") }}"
|
|
|
|
>
|
|
|
|
{{ with .Params.icon }}
|
|
|
|
<span
|
2023-04-05 00:50:15 +00:00
|
|
|
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600"
|
2023-01-16 03:21:03 +00:00
|
|
|
>
|
2023-06-01 11:09:31 +00:00
|
|
|
{{- partial "icon.html" . -}}
|
2023-01-16 03:21:03 +00:00
|
|
|
</span>
|
2023-06-01 11:09:31 +00:00
|
|
|
{{- end -}}{{- if .Params.showName | default true -}}
|
2023-01-16 03:21:03 +00:00
|
|
|
<span
|
|
|
|
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
|
|
|
>{{ .Name | markdownify | emojify }}</span
|
|
|
|
>
|
|
|
|
{{ end }}
|
|
|
|
</button>
|
|
|
|
{{ end }}
|
2023-01-17 01:58:04 +00:00
|
|
|
{{ else if eq .Params.action "appearance" }}
|
|
|
|
{{ $.Scratch.Add "switchCount" 1 }}
|
|
|
|
<button
|
|
|
|
id="appearance-switcher-{{ $.Scratch.Get "switchCount" }}"
|
|
|
|
type="button"
|
|
|
|
aria-label="appearance switcher"
|
|
|
|
>
|
|
|
|
<span
|
2023-04-05 00:50:15 +00:00
|
|
|
class="group-dark:hover:text-primary-400 inline transition-colors group-hover:text-primary-600 dark:hidden"
|
2023-01-17 01:58:04 +00:00
|
|
|
title="{{ i18n "footer.dark_appearance" }}"
|
|
|
|
>
|
|
|
|
{{ partial "icon.html" "moon" }}
|
|
|
|
</span>
|
|
|
|
<span
|
2023-04-05 00:50:15 +00:00
|
|
|
class="group-dark:hover:text-primary-400 hidden transition-colors group-hover:text-primary-600 dark:inline"
|
2023-01-17 01:58:04 +00:00
|
|
|
title="{{ i18n "footer.light_appearance" }}"
|
|
|
|
>
|
|
|
|
{{ partial "icon.html" "sun" }}
|
|
|
|
</span>
|
|
|
|
</button>
|
2023-01-16 03:21:03 +00:00
|
|
|
{{ else }}
|
|
|
|
<a
|
|
|
|
href="{{ .URL }}"
|
|
|
|
title="{{ .Title }}"
|
|
|
|
{{ with .Params.target }}target="{{ . }}"{{ end }}
|
|
|
|
>{{ with .Params.icon }}
|
|
|
|
<span
|
2023-04-05 00:50:15 +00:00
|
|
|
class="group-dark:hover:text-primary-400 transition-colors group-hover:text-primary-600"
|
2023-01-16 03:21:03 +00:00
|
|
|
>
|
2023-06-01 11:09:31 +00:00
|
|
|
{{- partial "icon.html" . -}}
|
2023-01-16 03:21:03 +00:00
|
|
|
</span>
|
2023-06-01 11:09:31 +00:00
|
|
|
{{- end -}}{{- if .Params.showName | default true -}}
|
2023-01-16 03:21:03 +00:00
|
|
|
<span
|
|
|
|
class="decoration-primary-500 group-hover:underline group-hover:decoration-2 group-hover:underline-offset-2"
|
|
|
|
>{{ .Name | markdownify | emojify }}</span
|
|
|
|
>
|
|
|
|
{{ end }}</a
|
|
|
|
>
|
|
|
|
{{ end }}
|
2021-10-19 04:45:11 +00:00
|
|
|
</li>
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
{{ end }}
|
2022-06-25 02:42:02 +00:00
|
|
|
<div class="flex items-center justify-between">
|
2021-10-29 00:15:00 +00:00
|
|
|
<div>
|
|
|
|
{{/* Copyright */}}
|
2022-06-27 00:30:07 +00:00
|
|
|
{{ if .Site.Params.footer.showCopyright | default true }}
|
2022-06-25 02:42:02 +00:00
|
|
|
<p class="text-sm text-neutral-500 dark:text-neutral-400">
|
2023-06-04 00:26:15 +00:00
|
|
|
{{- with site.Copyright }}
|
2022-06-25 02:42:02 +00:00
|
|
|
{{ . | emojify | markdownify }}
|
|
|
|
{{- else }}
|
|
|
|
©
|
|
|
|
{{ now.Format "2006" }}
|
|
|
|
{{ .Site.Author.name | markdownify | emojify }}
|
|
|
|
{{- end }}
|
|
|
|
</p>
|
|
|
|
{{ end }}
|
2021-10-29 00:15:00 +00:00
|
|
|
{{/* Theme attribution */}}
|
2022-06-27 00:30:07 +00:00
|
|
|
{{ if .Site.Params.footer.showThemeAttribution | default true }}
|
2022-01-12 01:20:04 +00:00
|
|
|
<p class="text-xs text-neutral-500 dark:text-neutral-400">
|
2021-12-24 23:53:46 +00:00
|
|
|
{{ $hugo := printf `<a class="hover:underline hover:decoration-primary-400 hover:text-primary-500"
|
2022-01-18 06:26:46 +00:00
|
|
|
href="https://gohugo.io/" target="_blank" rel="noopener noreferrer">Hugo</a>`
|
|
|
|
}}
|
2021-12-24 23:53:46 +00:00
|
|
|
{{ $congo := printf `<a class="hover:underline hover:decoration-primary-400 hover:text-primary-500" href="https://git.io/hugo-congo" target="_blank" rel="noopener noreferrer">Congo</a>` }}
|
2021-10-29 00:15:00 +00:00
|
|
|
{{ i18n "footer.powered_by" (dict "Hugo" $hugo "Congo" $congo) | safeHTML }}
|
|
|
|
</p>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
2023-01-17 01:58:04 +00:00
|
|
|
{{/* Appearance switcher */}}
|
2022-06-27 00:30:07 +00:00
|
|
|
{{ if .Site.Params.footer.showAppearanceSwitcher | default false }}
|
2022-01-18 23:25:48 +00:00
|
|
|
<div
|
2022-08-18 06:13:30 +00:00
|
|
|
class="{{ if .Site.Params.footer.showScrollToTop | default true -}}
|
2023-04-05 00:50:15 +00:00
|
|
|
me-14
|
2022-08-18 06:13:30 +00:00
|
|
|
{{- end }} cursor-pointer text-sm text-neutral-700 hover:text-primary-600 dark:text-neutral dark:hover:text-primary-400"
|
2022-01-18 23:25:48 +00:00
|
|
|
>
|
2023-01-17 01:58:04 +00:00
|
|
|
<button id="appearance-switcher-0" type="button" aria-label="appearance switcher">
|
2022-08-18 06:13:30 +00:00
|
|
|
<div
|
2023-04-05 00:50:15 +00:00
|
|
|
class="flex h-12 w-12 items-center justify-center dark:hidden"
|
2022-08-18 06:13:30 +00:00
|
|
|
title="{{ i18n "footer.dark_appearance" }}"
|
|
|
|
>
|
|
|
|
{{ partial "icon.html" "moon" }}
|
|
|
|
</div>
|
|
|
|
<div
|
2023-04-05 00:50:15 +00:00
|
|
|
class="hidden h-12 w-12 items-center justify-center dark:flex"
|
2022-08-18 06:13:30 +00:00
|
|
|
title="{{ i18n "footer.light_appearance" }}"
|
|
|
|
>
|
|
|
|
{{ partial "icon.html" "sun" }}
|
|
|
|
</div>
|
2021-10-29 01:07:21 +00:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
2021-10-29 00:15:00 +00:00
|
|
|
</div>
|
2021-08-14 00:47:33 +00:00
|
|
|
{{/* Extend footer - eg. for extra scripts, etc. */}}
|
|
|
|
{{ if templates.Exists "partials/extend-footer.html" }}
|
2022-11-22 00:03:28 +00:00
|
|
|
{{ partial "extend-footer.html" . }}
|
2021-08-14 00:47:33 +00:00
|
|
|
{{ end }}
|
2021-08-11 05:28:33 +00:00
|
|
|
</footer>
|