hugo-page-test/themes/tsc_vfl/layouts/shortcodes/tsc/news/inline-float.html

23 lines
579 B
HTML
Raw Permalink Normal View History

<figure class="tsc-image">
2023-10-25 12:38:54 +00:00
{{ with .Get "href" }}
<a href="{{ . }}">
{{ end }}
<img
{{ with .Get "alt" }}alt="{{ . }}"{{ end }}
2023-10-25 12:38:54 +00:00
{{- $filename := .Get "src" }}
{{ $resource := .Page.Resources.Get $filename -}}
src="{{ $resource.RelPermalink }}"
style="
{{- with .Get "width" -}}max-width: {{.}}px;{{- end -}}
"
2023-10-25 12:38:54 +00:00
>
{{ with .Get "href" }}
</a>
{{ end }}
{{ with .Get "caption" }}
<figcaption>
{{ . }}
</figcaption>
{{ end }}
</figure>