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

20 lines
460 B
HTML
Raw Normal View History

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