site_footer.html 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. <p class="powered-by">
  23. {{ with site.Copyright }}{{ replace . "{year}" now.Year | markdownify}}{{ end }}
  24. </p>
  25. {{/* Display copyright license. */}}
  26. {{ partial "site_footer_license" . }}
  27. <p class="powered-by">
  28. {{ $is_sponsor := site.Params.i_am_a_sponsor | default false }}
  29. {{ $hide_published_with_footer := site.Params.power_ups.hide_published_with | default true }}
  30. {{ if not (and $is_sponsor $hide_published_with_footer) }}
  31. {{ $default := "Published with {wowchemy} — the free, {repo_link}open source{/repo_link} website builder that empowers creators." }}
  32. {{ $i18n_published_with := i18n "published_with" | default $default }}
  33. {{ if not (findRE "{wowchemy}" $i18n_published_with) }}
  34. {{ warnf "Please attribute Wowchemy using `{wowchemy}` in the `published_with` text." }}
  35. {{ $i18n_published_with = $default }}
  36. {{ end }}
  37. {{ $i18n_published_with = replace $i18n_published_with "{wowchemy}" "<a href=\"https://wowchemy.com/?utm_campaign=poweredby\" target=\"_blank\" rel=\"noopener\">Wowchemy</a>" | safeHTML }}
  38. {{ $i18n_published_with = replace $i18n_published_with "{repo_link}" "<a href=\"https://github.com/wowchemy/wowchemy-hugo-modules\" target=\"_blank\" rel=\"noopener\">" | safeHTML }}
  39. {{ $i18n_published_with = replace $i18n_published_with "{/repo_link}" "</a>" | safeHTML }}
  40. {{ $i18n_published_with | markdownify | emojify }}
  41. {{ end }}
  42. </p>
  43. </footer>