selfprivacy.org/layouts/shortcodes/landing-feature.html
nevfy f5b80082ed Update layout (#102)
This merge request solves following issues with the current layout:
- **h1 header not instantly visible on the first screen on mobile:** changed the order so it appears before the screenshot gallery
- **alternation of text and images looking weird in vertical mobile layout:** removed the alternation on mobile
- **services and advantages being spread too wide on desktop:** added space on the sides
- **advantages having repetitive layout, supporters repeating the look of services:** added variety with sliding effect and alternating background color, removed card-like background

Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org/pulls/102
Reviewed-by: Inex Code <inex.code@selfprivacy.org>
Co-authored-by: nevfy <yaver4.0.0.0@gmail.com>
Co-committed-by: nevfy <yaver4.0.0.0@gmail.com>
2024-04-18 21:41:36 +03:00

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>