From fb88b9224a5be3617736fc67eb2a56515412c25b Mon Sep 17 00:00:00 2001 From: Oscar Najera <hi@oscarnajera.com> Date: Thu, 7 Sep 2023 15:12:57 +0200 Subject: footer with creative commons license --- layouts/partials/footer.html | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) (limited to 'layouts') diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 77a7276..e0d47b1 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,5 +1,34 @@ <footer class="bg-black w-100 pa3 tc near-white"> - {{ with .Site.GetPage "footer.md" }} - {{ .Content }} + + +{{ if in (slice "by" "by-nd" "by-sa" "by-nc" "by-nc-nd" "by-nc-sa") .Site.Params.license }} +<a rel="license" href="http://creativecommons.org/licenses/{{ .Site.Params.license }}/4.0/"> +<img alt="Creative Commons License" src="https://i.creativecommons.org/l/{{ .Site.Params.license }}/4.0/88x31.png"/> +</a><br/> +<span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">{{ .Site.Title }}</span> +by + +{{ with .Site.Author.homepage }} +<a xmlns:cc="http://creativecommons.org/ns#" href="{{ . }}" property="cc:attributionName" rel="cc:attributionURL"> +{{ $.Site.Author.name }} +</a> +{{ else }} +{{ $.Site.Author.name }} +{{ end }} + +is licensed under a +<a rel="license" href="http://creativecommons.org/licenses/{{ .Site.Params.license }}/4.0/"> +Creative Commons +{{ with .Site.Params.license }} + Attribution{{ if in . "by-nc" }}-NonCommercial{{ end }}{{ if in . "-nd" }}-NoDerivatives + {{ else if in . "-sa" }}-ShareAlike {{ end }} +{{ end }} + +4.0 International License</a> +{{ end }} + +{{ with .Site.GetPage "footer.md" }} + {{ .Content }} +{{ end }} </footer> -- cgit v1.2.3