add licenses

This commit is contained in:
Ben Goldsworthy 2025-06-04 17:36:21 +02:00
parent 3e1f9420bf
commit 6a0b330132
No known key found for this signature in database
2 changed files with 24 additions and 15 deletions

View file

@ -3,8 +3,13 @@
"CC BY 2.0": "https://creativecommons.org/licenses/by/2.0/",
"CC BY-SA 2.0": "https://creativecommons.org/licenses/by-sa/2.0/",
"CC BY-NC 2.0": "https://creativecommons.org/licenses/by-nc/2.0/",
"CC BY-SA 2.5": "https://creativecommons.org/licenses/by-sa/2.5/",
"CC BY-SA 3.0": "https://creativecommons.org/licenses/by-sa/3.0/",
"CC BY-SA 4.0": "https://creativecommons.org/licenses/by-sa/4.0/",
"CC BY-NC 4.0": "https://creativecommons.org/licenses/by-nc/4.0/",
"CC BY-NC-ND 4.0": "https://creativecommons.org/licenses/by-nc-nd/4.0/",
"OGLv3.0": "https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/",
"Pexels License": "https://www.pexels.com/license/",
"Pixabay Content License": "https://pixabay.com/service/license-summary/",
"Unsplash License": "https://unsplash.com/license"
}

View file

@ -46,11 +46,15 @@
{{- end -}}
{{- if $attr_licence }} (
{{- with ( index .sc.Site.Data.licences $attr_licence ) -}}
<a href="{{ . }}" target="_blank" rel="noopener">
{{- $attr_licence_link := partialCached "util/get_licence_link.html" ( dict "licences_data" .sc.Site.Data.licences "licence" $attr_licence "licence_link" $attr_licence_link ) $attr_licence $attr_licence_link -}}
{{- with $attr_licence_link -}}
<a href="{{- . -}}" target="_blank" rel="noopener">
{{- end -}}
{{- $attr_licence -}}
{{- with ( index .sc.Site.Data.licences $attr_licence ) -}}
{{- with $attr_licence_link -}}
</a>
{{- end -}}
)