mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-13 10:15:22 +00:00
feat(footer): add social icons and nav links to default minimal footer
This commit is contained in:
1 parent
ab44db81d7
commit
00147612cd
2 files changed
+25
-10
No files matched your search
@@ -12,16 +12,31 @@
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ if or (site.GetPage "/terms.md") (site.GetPage "/privacy.md") }}
|
||||
<p class="text-center">
|
||||
{{ with site.GetPage "/privacy.md" }}
|
||||
{{ printf "<a href=\"%s\">%s</a>" .RelPermalink .Title | safeHTML }}
|
||||
{{/* Footer nav links - single level */}}
|
||||
{{ $menu := .Site.Menus.footer }}
|
||||
{{ with $menu }}
|
||||
<nav class="flex flex-wrap justify-center gap-x-8 gap-y-2 py-4">
|
||||
{{ range $index, $menuItem := . }}
|
||||
<a href="{{ $menuItem.URL | relLangURL }}"
|
||||
class="text-base font-medium text-gray-500 hover:text-primary-600 dark:text-gray-300 dark:hover:text-primary-300"
|
||||
{{ if findRE `^http` $menuItem.URL }}
|
||||
target="_blank" rel="noopener"
|
||||
{{ end }}
|
||||
>
|
||||
{{ $menuItem.Name }}
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ with site.GetPage "/terms.md" }}
|
||||
{{ if site.GetPage "/privacy.md" }} · {{ end }}
|
||||
{{ printf "<a href=\"%s\">%s</a>" .RelPermalink .Title | safeHTML }}
|
||||
{{ end }}
|
||||
</p>
|
||||
</nav>
|
||||
{{ end }}
|
||||
|
||||
{{/* Social links */}}
|
||||
{{- $show_social := site.Params.hugoblox.footer.show_social | default true -}}
|
||||
{{ if $show_social }}
|
||||
{{ with site.Params.hugoblox.identity.social.links }}
|
||||
<div class="flex justify-center py-4 text-xl">
|
||||
{{ partial "social_links" (dict "Params" (dict "profiles" .)) }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ with site.Params.hugoblox.footer.text }}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
{{ $target = "target=\"_blank\" rel=\"noopener\" rel=\"me noopener noreferrer\"" }}
|
||||
{{ end }}
|
||||
<a
|
||||
class="pr-2 transition-transform hover:scale-125 hover:text-primary-700 dark:hover:text-primary-400"
|
||||
class="pr-4 transition-transform hover:scale-125 hover:text-primary-700 dark:hover:text-primary-400"
|
||||
style="will-change:transform;"
|
||||
href="{{ $link | safeURL }}"
|
||||
{{ $target | safeHTMLAttr }}
|
||||
|
||||
Reference in new issue
Block a user