mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-11-29 05:46:56 +01:00
Image partial: add support for attribution, title parameters
This commit is contained in:
parent
d005f1e798
commit
248629e1d4
@ -1,5 +1,5 @@
|
|||||||
<!-- prettier-ignore -->
|
<!-- prettier-ignore -->
|
||||||
{{ if .caption }}
|
{{- if or (or .title .caption) .attr -}}
|
||||||
<figure>
|
<figure>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
@ -90,7 +90,19 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- prettier-ignore -->
|
<!-- prettier-ignore -->
|
||||||
{{ if .caption }}
|
{{- if or (or .title .caption) .attr -}}
|
||||||
<figcaption>{{ .page.RenderString .caption }}</figcaption>
|
<figcaption>
|
||||||
</figure>
|
{{ with .title -}}
|
||||||
|
{{ . }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- if or .caption .attr -}}<p>
|
||||||
|
{{- .caption | markdownify -}}
|
||||||
|
{{- with .attrlink }}
|
||||||
|
<a href="{{ . }}">
|
||||||
|
{{- end -}}
|
||||||
|
{{- .attr | markdownify -}}
|
||||||
|
{{- if .attrlink }}</a>{{ end }}</p>
|
||||||
|
{{- end }}
|
||||||
|
</figcaption>
|
||||||
|
</figure>
|
||||||
{{ end }}
|
{{ end }}
|
Loading…
Reference in New Issue
Block a user