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

24 lines
641 B
HTML
Raw Permalink Normal View History

2024-08-09 13:46:18 +00:00
<figure class="tsc-image" style="{{- with .Get "width" -}}max-width: min(90%, {{.}}px);{{- end -}}">
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 }}"
>
{{ with .Get "href" }}
</a>
{{ end }}
2024-08-09 13:46:18 +00:00
{{ with .Get "credits" }}
<div class="credits">Foto: {{ . }}</div>
{{ end }}
2023-10-25 12:38:54 +00:00
{{ with .Get "caption" }}
<figcaption>
{{ . }}
</figcaption>
{{ end }}
</figure>
2024-08-09 13:46:18 +00:00