site_footer.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <footer class="site-footer">
  2. {{ if .IsTranslated | and site.Params.footer.show_translations }}
  3. <div class="powered-by d-flex flex-wrap pb-2 justify-content-center">
  4. <div class="p-2 font-weight-bold"><i class="fas fa-globe pr-1" aria-hidden="true"></i>{{ i18n "languages" }}:</div>
  5. <div class="p-2">{{ index site.Data.i18n.languages .Lang }}</div>
  6. {{ range .Translations }}
  7. <div class="p-2"><a href="{{ .Permalink }}">{{ index site.Data.i18n.languages .Lang }}</a></div>
  8. {{ end }}
  9. </div>
  10. {{ end }}
  11. {{ if or (site.GetPage "/terms.md") (site.GetPage "/privacy.md") }}
  12. <p class="powered-by">
  13. {{ with site.GetPage "/privacy.md" }}
  14. {{ printf "<a href=\"%s\">%s</a>" .RelPermalink .Title | safeHTML }}
  15. {{ end }}
  16. {{ with site.GetPage "/terms.md" }}
  17. {{ if site.GetPage "/privacy.md" }} &middot; {{ end }}
  18. {{ printf "<a href=\"%s\">%s</a>" .RelPermalink .Title | safeHTML }}
  19. {{ end }}
  20. </p>
  21. {{ end }}
  22. {{ with site.Copyright }}
  23. <p class="powered-by">
  24. {{ replace . "{year}" now.Year | markdownify }}
  25. </p>
  26. {{ end }}
  27. {{/* Display copyright license. */}}
  28. {{ partial "site_footer_license" . }}
  29. <p class="powered-by">
  30. {{ $is_sponsor := site.Params.i_am_a_sponsor | default false }}
  31. {{ $hide_published_with_footer := site.Params.power_ups.hide_published_with | default true }}
  32. {{ if not (and $is_sponsor $hide_published_with_footer) }}
  33. {{ $default := "Published with {wowchemy} — the free, {repo_link}open source{/repo_link} website builder that empowers creators." }}
  34. {{ $i18n_published_with := i18n "published_with" | default $default }}
  35. {{ if not (findRE "{wowchemy}" $i18n_published_with) }}
  36. {{ warnf "Please attribute Wowchemy using `{wowchemy}` in the `published_with` text." }}
  37. {{ $i18n_published_with = $default }}
  38. {{ end }}
  39. {{ $i18n_published_with = replace $i18n_published_with "{wowchemy}" "<a href=\"https://wowchemy.com/?utm_campaign=poweredby\" target=\"_blank\" rel=\"noopener\">Wowchemy</a>" | safeHTML }}
  40. {{ $i18n_published_with = replace $i18n_published_with "{repo_link}" "<a href=\"https://github.com/wowchemy/wowchemy-hugo-modules\" target=\"_blank\" rel=\"noopener\">" | safeHTML }}
  41. {{ $i18n_published_with = replace $i18n_published_with "{/repo_link}" "</a>" | safeHTML }}
  42. {{ $i18n_published_with | markdownify | emojify }}
  43. {{ end }}
  44. </p>
  45. </footer>