refactor: resource attribution
This commit is contained in:
parent
1a61aeade0
commit
24bfa733ba
12 changed files with 169 additions and 99 deletions
|
@ -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 -}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue