Blog update for large storage

Added aimage, bimage, bgallery and fimage shortcodes
This commit is contained in:
engineershamrock
2024-06-26 21:13:23 +01:00
parent faeb42a122
commit 23e370f4ee
5 changed files with 149 additions and 85 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 }}