Introduce expandable image shortcode, improve portable links logic
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
{{- /* remove whitespaces */ -}}
|
||||
{{- $destination := partial "docs/links/portable-image" (dict "Page" .Page "Destination" (.Get "src")) -}}
|
||||
<label class="book-image" for="book-image-toggle-{{ .Ordinal }}">
|
||||
<input class="hidden toggle" type="checkbox" id="book-image-toggle-{{ .Ordinal }}" />
|
||||
<img src="{{ $destination | safeURL }}"
|
||||
{{- with .Get "alt"}} alt="{{ . }}"{{ end -}}
|
||||
{{- with .Get "title"}} title="{{ . }}"{{ end -}}
|
||||
{{- with .Get "loading"}} loading="{{ . }}"{{ end -}}
|
||||
{{- with .Get "class"}} class="{{ . }}"{{ end -}}
|
||||
/>
|
||||
</label>
|
||||
{{- /* remove whitespaces */ -}}
|
||||
Reference in New Issue
Block a user