jarnat/themes/meghna-hugo/layouts/partials/feature.html

47 lines
1.6 KiB
HTML
Raw Normal View History

2022-07-19 09:14:46 +02:00
{{ $data := index site.Data site.Language.Lang }}
{{ if $data.feature.feature.enable }}
{{ with $data.feature.feature }}
{{"<!-- feature -->" | safeHTML}}
2022-10-07 22:07:27 +02:00
<section class="section section-bg" id="feature">
2022-07-19 09:14:46 +02:00
<div class="container-fluid">
2022-10-07 22:07:27 +02:00
<div class="row justify-content-center align-items-center p-3">
2022-09-08 15:24:41 +02:00
<div class="col-12 col-md-2 m-md-0 m-5 m-md-3" style="height: 150px; background-image: url('{{ .image_webp | absURL }}'); background-size: contain; background-position: center; background-repeat: no-repeat; ">
2022-07-19 09:14:46 +02:00
<!-- this image is for trigger this section fallback background image -->
<img src="{{ .image_webp | absURL }}" style="display: none;" onerror="this.onerror=null;this.parentElement.style.backgroundImage= 'url({{ .image | absURL }})'" loading="lazy">
2022-07-19 09:14:46 +02:00
</div>
2022-09-08 15:24:41 +02:00
<div class="col-12 col-md-9">
2022-07-19 09:14:46 +02:00
<div class="content-block">
<h2>{{ .title | markdownify }}</h2>
<p>{{ .content | markdownify }}</p>
2022-09-08 15:24:41 +02:00
{{ with .call_to_action }}
2022-10-07 22:07:27 +02:00
<div class="text-center text-md-left pt-3 px-3">
2022-10-06 17:53:33 +02:00
<a class="btn btn-primary" href="{{ .link | safeURL }}">{{ .text }}</a>
</div>
2022-09-08 15:24:41 +02:00
{{ end }}
2022-07-19 09:14:46 +02:00
<div class="row">
{{ range .feature_item }}
<div class="col-lg-6">
<div class="media">
{{with .icon}}
<div class="align-self-start mr-3">
<i class="{{ . }}"></i>
</div>
{{ end }}
<div class="media-body">
<h4 class="media-heading">{{ .title | markdownify }}</h4>
<p>{{ .content | markdownify }}</p>
</div>
</div>
</div>
{{ end }}
</div>
</div>
</div>
</div>
</div>
</section>
{{"<!-- /feature -->" | safeHTML}}
{{ end }}
{{ end }}