|
1 | 1 | <footer class="site-footer">
|
2 | 2 |
|
3 |
| - {{ partial "hooks/footer" . }} |
| 3 | + {{ partial "functions/get_hook" (dict "hook" "footer-start" "context" .) }} |
4 | 4 |
|
5 |
| - {{ if .IsTranslated | and site.Params.footer.show_translations }} |
6 |
| - <div class="powered-by d-flex flex-wrap pb-2 justify-content-center"> |
7 |
| - <div class="p-2 font-weight-bold"><i class="fas fa-globe pr-1" aria-hidden="true"></i>{{ i18n "languages" }}:</div> |
8 |
| - <div class="p-2">{{ index site.Data.i18n.languages .Lang }}</div> |
9 |
| - {{ range .Translations }} |
10 |
| - <div class="p-2"><a href="{{ .Permalink }}">{{ index site.Data.i18n.languages .Lang }}</a></div> |
11 |
| - {{ end }} |
12 |
| - </div> |
13 |
| - {{ end }} |
14 |
| - |
15 |
| - {{ if or (site.GetPage "/terms.md") (site.GetPage "/privacy.md") }} |
16 |
| - <p class="powered-by"> |
17 |
| - {{ with site.GetPage "/privacy.md" }} |
18 |
| - {{ printf "<a href=\"%s\">%s</a>" .RelPermalink .Title | safeHTML }} |
19 |
| - {{ end }} |
20 |
| - {{ with site.GetPage "/terms.md" }} |
21 |
| - {{ if site.GetPage "/privacy.md" }} · {{ end }} |
22 |
| - {{ printf "<a href=\"%s\">%s</a>" .RelPermalink .Title | safeHTML }} |
23 |
| - {{ end }} |
24 |
| - </p> |
| 5 | + {{/* Load footer block */}} |
| 6 | + {{ $footer_section_name := site.Params.footer.block | default "minimal" }} |
| 7 | + {{ $footer_section_path := printf "components/footers/%s.html" $footer_section_name }} |
| 8 | + {{ if not (templates.Exists (printf "partials/%s" $footer_section_path)) }} |
| 9 | + {{ errorf "Check your `params.yaml`. Cannot find footer block at `layouts/partials/%s`" $footer_section_path }} |
25 | 10 | {{ end }}
|
26 |
| - |
27 |
| - {{ with site.Params.footer.text }} |
28 |
| - <p class="powered-by"> |
29 |
| - {{ . | markdownify | emojify }} |
30 |
| - </p> |
31 |
| - {{ end }} |
32 |
| - |
33 |
| - {{/* Display copyright license. */}} |
34 |
| - {{ partial "site_footer_license" . }} |
| 11 | + {{ partial $footer_section_path . }} |
35 | 12 |
|
36 | 13 | <p>
|
37 | 14 | <!-- AddThis Smart Layers BEGIN -->
|
|
82 | 59 | <div id="clustrmaps-widget"></div><script type='text/javascript' id='clustrmaps' src='//cdn.clustrmaps.com/map_v2.js?cl=ffffff&w=300&t=m&d=Zo-deincaJGsqhqjIWsujtdoNOMJsnnZLefKmxDKVv8&co=124b73&cmo=dd53ff&cmn=4ec724'></script>
|
83 | 60 | </center>
|
84 | 61 | </p>
|
| 62 | + |
85 | 63 |
|
86 | 64 | <p class="powered-by">
|
87 | 65 | {{ $is_sponsor := site.Params.i_am_a_sponsor | default false }}
|
|
96 | 74 | {{ $i18n_published_with = replace $i18n_published_with "{wowchemy}" "<a href=\"https://wowchemy.com/?utm_campaign=poweredby\" target=\"_blank\" rel=\"noopener\">Wowchemy</a>" | safeHTML }}
|
97 | 75 | {{ $i18n_published_with = replace $i18n_published_with "{repo_link}" "<a href=\"https://github.com/wowchemy/wowchemy-hugo-themes\" target=\"_blank\" rel=\"noopener\">" | safeHTML }}
|
98 | 76 | {{ $i18n_published_with = replace $i18n_published_with "{/repo_link}" "</a>" | safeHTML }}
|
99 |
| - {{ $i18n_published_with | markdownify | emojify }} |
| 77 | + {{ $i18n_published_with | replaceRE "{year}" now.Year | markdownify | emojify | safeHTML }} |
100 | 78 | {{ end }}
|
101 | 79 | </p>
|
102 | 80 | </footer>
|
0 commit comments