mirror of
https://github.com/thegeeklab/hugo-geekdoc.git
synced 2024-11-25 22:30:40 +00:00
fix: fix rendering of nested img shortcodes (#142)
* fix: fix rendering of nested img shortcodes * fix whitespaces
This commit is contained in:
parent
b3f6ad3ca0
commit
51742a4030
@ -17,22 +17,13 @@
|
|||||||
<figure class="gdoc-markdown__figure">
|
<figure class="gdoc-markdown__figure">
|
||||||
<a class="gdoc-markdown__link--raw" href="{{ .RelPermalink }}">
|
<a class="gdoc-markdown__link--raw" href="{{ .RelPermalink }}">
|
||||||
<picture>
|
<picture>
|
||||||
<source
|
<source {{ with $customSize }}srcset="{{ index $size $customSize }}"{{ else }}srcset="{{ $size.small }} 600w, {{ $size.medium }} 1200w" sizes="100vw"{{ end }} />
|
||||||
{{ with $customSize }}
|
<img {{ if $lazyLoad }}loading="lazy" {{ end }}src="{{ $size.large }}" alt="{{ $caption }}" />
|
||||||
srcset="{{ index $size $customSize }}"
|
|
||||||
{{ else }}
|
|
||||||
srcset="{{ $size.small }} 600w,
|
|
||||||
{{ $size.medium }} 1200w"
|
|
||||||
sizes="100vw"
|
|
||||||
{{ end }} />
|
|
||||||
<img
|
|
||||||
{{ if $lazyLoad }}loading="lazy"{{ end }}
|
|
||||||
src="{{ $size.large }}" alt="{{ $caption }}" />
|
|
||||||
</picture>
|
</picture>
|
||||||
</a>
|
</a>
|
||||||
{{ with $caption }}
|
{{ with $caption -}}
|
||||||
<figcaption>{{ . }}{{ with $source.Params.credits }} ({{ . | $.Page.RenderString }}){{ end }}</figcaption>
|
<figcaption>{{ . }}{{ with $source.Params.credits }} ({{ . | $.Page.RenderString }}){{ end }}</figcaption>
|
||||||
{{ end }}
|
{{- end }}
|
||||||
</figure>
|
</figure>
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Loading…
Reference in New Issue
Block a user