Initial post commit i have also added more short codes

This commit is contained in:
John
2024-02-03 21:47:00 +00:00
committed by John W
parent 9cdbd208f2
commit 5af4a46009
54 changed files with 2688 additions and 3 deletions

View File

@@ -0,0 +1,9 @@
{{ $blocks := split .Inner "<!-- block_separator -->" }}
{{ range $index, $block := $blocks }}
<div class="block">
{{ $block | markdownify | safeHTML }}
</div>
{{ if ne (add $index 1) (len $blocks) }}
<hr class="separator" />
{{ end }}
{{ end }}

View File

@@ -0,0 +1,3 @@
<div class="center-block-90">
{{ .Inner | .Page.RenderString }}
</div>

View File

@@ -0,0 +1,4 @@
<div class="image-left">
<img src="{{ .Get "src" }}" alt="{{ .Get "alt" }}">
<div>{{ .Inner }}</div>
</div>

View File

@@ -0,0 +1,4 @@
<div class="image-right">
<div>{{ .Inner }}</div>
<img src="{{ .Get "src" }}" alt="{{ .Get "alt" }}">
</div>

View File

@@ -0,0 +1,22 @@
{{ $img := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) }}
{{ $width := .Get "width" }}
{{ $img = $img.Resize (print (default "1264x" $width) " webp") }}
{{ $title := .Get "title" }}
{{ $class := .Get "class" }}
{{- with .Parent -}}
<div>
{{ end }}
<figure class="image{{ if $class }} {{ $class }}{{ end }}">
<img src="{{ $img.RelPermalink }}" width="{{ $img.Width }}" height="{{ $img.Height }}" {{ if $title }}
alt="{{ $title }}" {{ end }}>
{{ if $title }}
<figcaption class="is-size-6">
<small>
{{ $title }}
</small>
</figcaption>
{{ end }}
</figure>
{{- with .Parent -}}
</div>
{{ end }}

View File

@@ -0,0 +1,3 @@
<div class="padded-center-image">
<img src="{{ .Get 0 }}" alt="{{ .Get 1 }}" />
</div>

View File

@@ -0,0 +1,4 @@
<div class="side-by-side-2-cols">
<img src="{{ .Get 0 }}" alt="{{ .Get 1 }}" />
<img src="{{ .Get 2 }}" alt="{{ .Get 3 }}" />
</div>

View File

@@ -0,0 +1,5 @@
<div class="side-by-side-3-cols">
<img src="{{ .Get "src1" }}" alt="{{ .Get "alt1" }}">
<img src="{{ .Get "src2" }}" alt="{{ .Get "alt2" }}">
<img src="{{ .Get "src3" }}" alt="{{ .Get "alt3" }}">
</div>