Merge pull request #1189 from Weaxs/footer-pre

footer menu supports "pre" icon parameter
This commit is contained in:
Nuno Coração 2024-01-24 21:39:19 +00:00 committed by GitHub
commit 4825539121
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,8 +6,15 @@
<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" href="{{ .URL }}"
title="{{ .Title }}">{{ .Name | markdownify | emojify }}</a>
<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>