Files
libertytoolsio/themes/hugo-book.backup/layouts/_shortcodes/image.html

10 lines
579 B
HTML

{{- $destination := partial "docs/links/portable-image" (dict "Page" .Page "Destination" (.Get "src")) -}}
{{- $attributes := partial "docs/text/mapper" (dict
"attributes" (cond .IsNamedParams .Params dict)
"keep" (slice "id" "class" "tabindex" "alt" "title" "loading")
) -}}
<label class="book-image" for="book-image-toggle-{{ .Ordinal }}">
<input class="hidden toggle" type="checkbox" id="book-image-toggle-{{ .Ordinal }}" />
<img src="{{ $destination | safeURL }}" {{ partial "docs/html-attrs" $attributes | safeHTMLAttr }} />
</label>
{{- /* remove whitespaces */ -}}