refactor: resource attribution
This commit is contained in:
parent
1a61aeade0
commit
24bfa733ba
12 changed files with 169 additions and 99 deletions
|
@ -54,13 +54,14 @@
|
|||
|
||||
{{- if .Get "link" }}</a>{{ end -}}
|
||||
|
||||
{{- if or ( .Get "caption" ) ( .Get "title" ) ( $src.Params.attr ) -}}
|
||||
{{- if or ( .Get "caption" ) ( .Get "title" ) -}}
|
||||
<figcaption class="figure__caption{{ if not ( or ( .Get "caption" ) ( .Get "title" ) ) }} figure__caption--no-height{{ end }}">
|
||||
{{- if .Params.attrlink -}}<a class="figcaption__attrlink" href="{{ .Params.attrlink }}">{{- end -}}
|
||||
{{- if .Params.attr -}}<p class="figcaption__attr">{{ .Params.attr | safeHTML }}{{ with .Params.attrlicence }} <span class="figcaption__licence">{{ . | safeHTML }}</span>{{ end }}</p>{{- end -}}
|
||||
{{- if .Params.attrlink -}}</a>{{- end -}}
|
||||
{{- with .Get "title" -}}<h4 class="figcaption__title">{{ . | markdownify | safeHTML }}</h4>{{- end -}}
|
||||
{{- with .Get "caption" -}}<p class="figcaption__caption">{{ . | markdownify | safeHTML }}</p>{{- end -}}
|
||||
</figcaption>
|
||||
{{- end -}}
|
||||
|
||||
{{- if $src.Params -}}
|
||||
{{- partial "media/attr.html" ( dict "pc" . "sc" $ "params" $src.Params ) -}}
|
||||
{{- end -}}
|
||||
</figure>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue