|
26 | 26 | {{ $tid = $hugoblox_data.template.id | default "" }} |
27 | 27 | {{ end }} |
28 | 28 | {{ end }} |
29 | | - |
30 | | - {{/* Per-site variant selection */}} |
31 | | - {{- $brandOptions := slice "Hugo Blox" "Hugo Blox Builder" "Hugo Blox — Open Source" -}} |
32 | | - {{- $ctaWhenTemplate := slice "Duplicate this template →" "Clone this template →" "Build yours →" "Create yours →" "Build your site →" "Create your site →" -}} |
33 | | - {{- $ctaNoTemplate := slice "Start free →" "Build yours →" "Create yours →" "Build your site →" "Create your site →" -}} |
34 | 29 |
|
35 | 30 | {{- $seed := .Site.BaseURL -}} |
36 | 31 | {{- $h := md5 $seed -}} |
|
63 | 58 | {{- $ctaHref = printf "%s&ref=%s" $ctaHref $ref -}} |
64 | 59 | {{- end -}} |
65 | 60 |
|
66 | | - <p class="powered-by text-center text-sm opacity-80 py-1"> |
67 | | - {{ $published_with := "Made with {hugoblox}." }} |
68 | | - {{ $i18n_published_with := i18n "published_with" | default $published_with }} |
69 | | - {{ $defaultEnText := "Build yours →" }} |
70 | | - {{ $i18n_ctaText := i18n "poweredby_button" | default $ctaText }} |
71 | | - {{ if eq $i18n_ctaText $defaultEnText }} |
72 | | - {{ $i18n_ctaText = $ctaText }} |
73 | | - {{ end }} |
74 | | - {{ if not (findRE "{hugoblox}" $i18n_published_with) }} |
75 | | - {{ warnf "Please attribute Hugo Blox using `{hugoblox}` in the i18n `published_with` text or sponsor with All Access to remove attribution." }} |
76 | | - {{ $i18n_published_with = $published_with }} |
77 | | - {{ end }} |
78 | | - {{ $i18n_published_with = replace $i18n_published_with "{hugoblox}" (printf "<a class=\"underline hover:opacity-100\" href=\"%s\" target=\"_blank\" rel=\"noopener\" data-hbx=\"poweredby_brand\">%s</a>" $brandHref $brandText) | safeHTML }} |
79 | | - {{ $i18n_published_with = replace $i18n_published_with "{repo_link}" "<a href=\"https://github.com/HugoBlox/hugo-blox-builder\" target=\"_blank\" rel=\"noopener\">" | safeHTML }} |
80 | | - {{ $i18n_published_with = replace $i18n_published_with "{/repo_link}" "</a>" | safeHTML }} |
81 | | - {{ $i18n_published_with | safeHTML }} |
82 | | - <a class="inline-flex items-center rounded px-2 py-0.5 border border-current ms-2 text-xs hover:opacity-100" |
83 | | - href="{{ $ctaHref }}" target="_blank" rel="noopener" data-hbx="poweredby_cta">{{ $i18n_ctaText }}</a> |
84 | | - </p> |
85 | 61 | {{- end -}} |
86 | 62 |
|
87 | 63 | </footer> |
0 commit comments