e95b9d1961
* Initial push * Add banner * article: Address review comments * article: Address review comments pt. 2 * shortcodes: Fix mp4 size * Fix some errors (#1) * Fix some errors * Address feedback * new juxtapose and media descriptions * fix media * Add missing stuff (#2) * Add missing stuff * Another small home menu fix * Fix build isses from outdated packages * Address reviews * Address review comments pt. 3 * change date for release * resize juxtapose images --------- Co-authored-by: FearlessTobi <thm.frey@gmail.com> Co-authored-by: GPUCode <47210458+GPUCode@users.noreply.github.com>
30 lines
1022 B
HTML
30 lines
1022 B
HTML
{{ $title := .Get 0 }}
|
|
{{ $originals := (.Page.Resources.ByType "image") }}
|
|
<div class="columns is-bottom-marginless">
|
|
<div class="column is-bottom-paddingless juxtapose">
|
|
{{ range $param := last 2 .Params }}
|
|
<!-- image -->
|
|
{{ $items := split $param "|" }}
|
|
{{ $src := (index $items 0) }}
|
|
{{ $subtitle := (index $items 1) }}
|
|
{{ $split_src := split $src "." }}
|
|
{{ $extension := index $split_src (sub (len $split_src) 1) }}
|
|
{{- if eq $extension "png" -}}
|
|
{{ $original := $originals.GetMatch (printf "*%s" (path.Base $src)) }}
|
|
{{ $resized_width := math.Min $original.Width 1024 }}
|
|
{{ $resized := $original.Resize (print $resized_width "x q90 jpg" ) }}
|
|
<img src="{{ $resized.Permalink }}" alt="{{ $title }}">
|
|
{{- else -}}
|
|
<img src="{{ $src }}" alt="{{ $title }}">
|
|
{{- end -}}
|
|
{{ end }}
|
|
</div>
|
|
</div>
|
|
|
|
{{ with "title" }}
|
|
<figcaption>
|
|
<h4 style="text-align: center">
|
|
{{ $title }}
|
|
</h4>
|
|
</figcaption>
|
|
{{ end }} |