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

@ -37,22 +37,26 @@
<!-- Rendering -->
<p class="attr">
{{- with $attr_link -}}
<a href="{{ . }}" target="_blank" rel="noopener">
{{- with $attr_link -}}
<a href="{{ . }}" target="_blank" rel="noopener">
{{- end -}}
{{- $attr | safeHTML -}}
{{- if $attr_link -}}
</a>
{{- end -}}
{{- if $attr_licence }} (
{{- $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 | safeHTML -}}
{{- if $attr_link -}}
{{- $attr_licence -}}
{{- with $attr_licence_link -}}
</a>
{{- end -}}
{{- if $attr_licence }} (
{{- with ( index .sc.Site.Data.licences $attr_licence ) -}}
<a href="{{ . }}" target="_blank" rel="noopener">
{{- end -}}
{{- $attr_licence -}}
{{- with ( index .sc.Site.Data.licences $attr_licence ) -}}
</a>
{{- end -}}
)
{{- end -}}
)
{{- end -}}
<p>