site_footer.html 2.4 KB

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