impl. partial IconheaderSubheaderText for streamlined textrendering

This commit is contained in:
Andreas Hnida 2024-02-16 08:54:15 +00:00
commit 6d5d93fae1
3 changed files with 74 additions and 77 deletions

View file

@ -74,49 +74,16 @@
</section>
<!-- /Key Features -->
<!-- Features -->
{{ range $i, $e:= .Params.features }}
<section class="section-sm {{ if (modBool $i 2) }}bg-gradient{{ end }}">
{{ with .Params.featureslead }}
<section>
<div class="container">
<div class="row items-center justify-between">
<div
class="mb:md-0 {{ if not (modBool $i 2) }}
md:order-2
{{ end }} md:col-5 mb-6">
{{ partial "image" (dict "Src" .image "Alt" "feature image" "DisplayXL" "520x" "DisplayLG" "425x" "DisplayMD" "360x") }}
</div>
<div
class="{{ if not (modBool $i 2) }}
md:order-1
{{ end }} md:col-7 lg:col-6">
<h2 class="mb-4">
{{ .title | markdownify }}
</h2>
<p class="mb-8 text-lg">
{{ .content | markdownify }}
</p>
<ul>
{{ range .bulletpoints }}
<li class="relative mb-4 pl-6">
<i class="fa fa-check absolute left-0 top-1.5"></i>
{{ . | markdownify }}
</li>
{{ end }}
</ul>
{{ with .button }}
{{ if .enable }}
<a class="btn btn-primary mt-6" href="{{ .link | absURL }}">
{{ .label }}
<i class="fa fa-arrow-right pl-2"></i>
</a>
{{ end }}
{{ end }}
</div>
<div class="row">
{{ partial "components/IconHeaderSubheaderText" (dict "icon" .icon "headline" .headline "subline" .subline "text" .content) }}
</div>
</div>
</section>
{{ end }}
<!-- /Features -->
{{ end }}
<!-- /Features -->
<!-- Testimonials -->
{{ with site.GetPage "sections/testimonial" }}
{{ if .Params.enable }}

View file

@ -0,0 +1,18 @@
{{ define "IconHeaderSubheaderText" }}
<div class="flex items-center space-x-4">
{{ with .icon }}
<i class="fas fa-{{ . }} fa-fw text-5xl text-primary py-10"></i>
{{ end }}
<div>
{{ with .headline }}
<h2 class="text-xl font-bold">{{ . }}</h2>
{{ end }}
{{ with .subline }}
<h3 class="text-lg text-gray-500">{{ . }}</h3>
{{ end }}
{{ with .text }}
<p class="text-base text-gray-700">{{ . }}</p>
{{ end }}
</div>
</div>
{{ end }}