refactor: resource attribution

This commit is contained in:
Ben Goldsworthy 2025-05-14 17:29:46 +02:00
parent 1a61aeade0
commit 24bfa733ba
No known key found for this signature in database
12 changed files with 169 additions and 99 deletions

View file

@ -29,7 +29,7 @@
{{- end -}}
<!-- Rendering -->
<div>
<div class="picture__wrapper">
{{- if .Get "link" -}}
{{- if $linkedResource -}}
<a href="{{- $linkedResource.RelPermalink -}}"{{- with .Get "rel" }} rel="{{- . -}}"{{- end -}}>
@ -37,13 +37,15 @@
<a href="{{- .Get "link" -}}">
{{- end -}}
{{- end -}}
{{- partial "media/picture.html" $src -}}
{{- if .Get "link" -}}
</a>
{{- end -}}
{{- if $src.Params -}}
{{- partial "media/attr.html" ( dict "pc" . "sc" $ "params" $src.Params ) -}}
{{- end -}}
{{- with ( .Get "caption" ) -}}
<div class="figure__caption"><p class="figcaption__caption">{{ . | safeHTML }}</p></div>
{{- end -}}