selfprivacy.org/layouts/shortcodes/landing-feature.html

40 lines
1.8 KiB
HTML
Raw Normal View History

2023-01-11 16:53:46 +00:00
{{ $illustration := .Page.Resources.GetMatch (printf "**%s*" (.Get 0)) }}
{{ $title := .Get 1 }}
{{ $bg := .Get 2 }}
{{ $side := .Get 3 }}
{{ if eq $side "right" }}
<div class="d-flex flex-column flex-lg-row flex-xl-row justify-content-center align-items-center sp-feature sp-feature{{ $bg }} my-auto">
<div class="col-xl-4 col-lg-6 col-md-8 col-xs-12 px-5">
2023-01-11 16:53:46 +00:00
{{ if $title }}
<h2 class="sp-feature-title">{{ $title }}</h2>
{{ end }}
{{ .Inner }}
</div>
{{ if $illustration }}
2024-04-27 13:17:09 +00:00
<div class="col-lg-4 col-md-6 col-sm-8 col-xs-12">
<object role="img" class="my-auto d-flex justify-content-center align-items-center card-img-top" type="image/svg+xml" data="{{ $illustration.RelPermalink }}">
<div class="error sp-feature-img">
<i class="fa-solid fa-triangle-exclamation"></i>
</div>
</object>
2024-04-27 13:17:09 +00:00
</div>
2023-01-11 16:53:46 +00:00
{{ end }}
{{ else }}
<div class="d-flex flex-column-reverse flex-lg-row flex-xl-row justify-content-center align-items-center sp-feature sp-feature{{ $bg }}">
2023-01-11 16:53:46 +00:00
{{ if $illustration }}
2024-04-27 13:17:09 +00:00
<div class="col-lg-4 col-md-6 col-sm-8 col-xs-12">
<object role="img" class="col-lg-4 col-md-6 col-sm-8 col-xs-12 my-auto d-flex justify-content-center align-items-center card-img-top" type="image/svg+xml" data="{{ $illustration.RelPermalink }}">
<div class="error sp-feature-img">
<i class="fa-solid fa-triangle-exclamation"></i>
</div>
</object>
2024-04-27 13:17:09 +00:00
</div>
2023-01-11 16:53:46 +00:00
{{ end }}
<div class="col-xl-4 col-lg-6 col-md-8 col-xs-12 px-5">
2023-01-11 16:53:46 +00:00
{{ if $title }}
<h2 class="sp-feature-title">{{ $title }}</h2>
{{ end }}
{{ .Inner }}
</div>
{{ end }}
</div>