mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-11-25 20:11:37 +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 -->
|
||||
{{ if .caption }}
|
||||
{{- if or (or .title .caption) .attr -}}
|
||||
<figure>
|
||||
{{ end }}
|
||||
|
||||
@ -90,7 +90,19 @@
|
||||
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
{{ if .caption }}
|
||||
<figcaption>{{ .page.RenderString .caption }}</figcaption>
|
||||
</figure>
|
||||
{{- if or (or .title .caption) .attr -}}
|
||||
<figcaption>
|
||||
{{ 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 }}
|
Loading…
Reference in New Issue
Block a user