Only show footer section for copyright and PoweredBy if they are enabled

This commit is contained in:
Attila Greguss 2024-12-18 10:37:49 +00:00
parent aa557df8aa
commit 13e11d59d2

View File

@ -29,14 +29,16 @@
> >
{{ partial "custom/footer.html" . }} {{ partial "custom/footer.html" . }}
</div> </div>
<div {{- if or (.Site.Params.footer.displayPoweredBy | default true) .Site.Params.footer.displayCopyright}}
class="{{ $footerWidth }} hx-mx-auto hx-flex hx-justify-center hx-py-12 hx-pl-[max(env(safe-area-inset-left),1.5rem)] hx-pr-[max(env(safe-area-inset-right),1.5rem)] hx-text-gray-600 dark:hx-text-gray-400 md:hx-justify-start" <div
> class="{{ $footerWidth }} hx-mx-auto hx-flex hx-justify-center hx-py-12 hx-pl-[max(env(safe-area-inset-left),1.5rem)] hx-pr-[max(env(safe-area-inset-right),1.5rem)] hx-text-gray-600 dark:hx-text-gray-400 md:hx-justify-start"
<div class="hx-flex hx-w-full hx-flex-col hx-items-center sm:hx-items-start hx-gap-6"> >
{{- if (.Site.Params.footer.displayPoweredBy | default true) }}<div class="hx-font-semibold">{{ template "theme-credit" $poweredBy }}</div>{{ end }} <div class="hx-flex hx-w-full hx-flex-col hx-items-center sm:hx-items-start hx-gap-6">
{{- if .Site.Params.footer.displayCopyright }}<div class="hx-text-xs">{{ $copyright | markdownify }}</div>{{ end }} {{- if (.Site.Params.footer.displayPoweredBy | default true) }}<div class="hx-font-semibold">{{ template "theme-credit" $poweredBy }}</div>{{ end }}
{{- if .Site.Params.footer.displayCopyright }}<div class="hx-text-xs">{{ $copyright | markdownify }}</div>{{ end }}
</div>
</div> </div>
</div> {{- end -}}
</footer> </footer>
{{- define "theme-credit" -}} {{- define "theme-credit" -}}