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

32 lines
1.3 KiB
HTML

{{ $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="flex-none col-xl-4 col-lg-6 col-md-8 col-xs-12 px-5">
{{ if $title }}
<h2 class="sp-feature-title">{{ $title }}</h2>
{{ end }}
{{ .Inner }}
</div>
{{ if $illustration }}
<div class="col-lg-4 col-md-6 col-sm-8 col-xs-12">
<img class="card-img-top rounded-img" src="{{ $illustration.RelPermalink }}">
</div>
{{ 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 }}">
{{ if $illustration }}
<div class="col-lg-4 col-md-6 col-sm-8 col-xs-12">
<img class="card-img-top rounded-img" src="{{ $illustration.RelPermalink }}">
</div>
{{ end }}
<div class="col-xl-4 col-lg-6 col-md-8 col-xs-12 px-5">
{{ if $title }}
<h2 class="sp-feature-title">{{ $title }}</h2>
{{ end }}
{{ .Inner }}
</div>
{{ end }}
</div>