Large storage custom nas (#62)

NAS Storage blog post

Added `aimage`, `bimage`, `bgallery` and `fimage` custom shortcodes
This commit is contained in:
engineershamrock
2024-06-27 23:17:28 +01:00
committed by GitHub
parent 903947bd7e
commit 1c5513c6d8
76 changed files with 621 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
{{ $img := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) }}
{{ $width := .Get "width" }}
{{ $height := .Get "height" }}
{{ $title := .Get "title" }}
{{ $class := .Get "class" }}
{{- with .Parent -}}
<div style="width:{{$width}}px">
{{ end }}
<figure class="image{{ if $class }} {{ $class }}{{ end }}">
<img src="{{ $img.RelPermalink }}" width="{{$width}}px" heigth="{{$height}}px" {{ if $title }}
alt="{{ $title }}" {{ end }}>
{{ if $title }}
<figcaption class="is-size-6">
<small>
{{ $title }}
</small>
</figcaption>
{{ end }}
</figure>
{{- with .Parent -}}
</div>
{{ end }}