section und columns shortcodes implementiert

This commit is contained in:
Andreas Hnida 2024-02-19 11:50:55 +00:00
commit 75f3cc4b06
11 changed files with 121 additions and 105 deletions

View file

@ -26,6 +26,7 @@
<!-- tailwind size indicator -->
{{ partial "components/tw-size-indicator.html" . }}
{{ partial "testPartial" . }}
{{ end }}

View file

@ -1,5 +1,6 @@
{{/* Home Template File */}}
{{ define "main" }}
{{ .Content }}
<!-- Hero Slider -->
<section class="hero-slider h-screen md:h-[750px]">
<div class="verua-slider-wrapper">
@ -55,7 +56,7 @@
<section class="lg:container lg:mx-auto relative flex flex-col justify-between items-center lg:flex-row lg:items-center lg:-mt-[250px]">
{{ range $i, $e:= .Params.keyfeatures }}
<div class="w-full flex-1 lg:mt-8 p-8 lg:m-4 shadow-xl lg:rounded-3xl {{ with .color }} bg-{{ . }} {{ end }} {{ with .textcolor }} text-{{ . }} {{ end }}">
<div class="w-full flex-1 lg:mt-8 p-8 lg:m-4 lg:shadow-xl lg:rounded-3xl {{ with .color }} bg-{{ . }} {{ end }} {{ with .textcolor }} text-{{ . }} {{ end }}">
{{/* <div class="flex-shrink-0 relative {{ with .color }} bg-{{ . }} {{ end }} m-6 {{ with .textcolor }} text-{{ . }} {{ end }} -mt-[250px] overflow-hidden rounded-lg max-w-96 shadow-lg p-8"> */}}
{{ with .icon }}
@ -74,15 +75,35 @@
</section>
<!-- /Key Features -->
<!-- Features -->
{{ with .Params.featureslead }}
<div class="lg:container items-center grid grid-cols-8 gap-4">
<!-- Column -->
<div class="col-span-8 md:col-span-4">
{{ with .Params.featureslead }}
<section>
<div class="container">
<div class="row">
{{ partial "components/IconHeaderSubheaderText" (dict "icon" .icon "headline" .headline "subline" .subline "text" .content) }}
{{ partial "components/iconheadersubheadertext" . }}
</div>
</div>
</section>
{{ end }}
{{ end }}
</div>
<!-- Column -->
<div class="grid grid-cols-2 col-span-8 gap-4 md:col-span-4">
{{ range $i, $e:= .Params.features }}
<div class="col-span-2 md:col-span-1">
{{ partial "components/iconheadersubheadertext" . }}
</div>
{{ end }}
</div>
</div>
<!-- /Features -->
<!-- Testimonials -->
{{ with site.GetPage "sections/testimonial" }}

View file

@ -1,18 +0,0 @@
{{ 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 }}

View file

@ -0,0 +1,14 @@
<div class="iconheadersubheadertext">
{{ with .icon }}
<i class="fas fa-{{ . }} fa-fw text-5xl text-primary py-10"></i>
{{ end }}
{{ with .subline }}
<h3 class="text-primary pb-5">{{ . }}</h3>
{{ end }}
{{ if .headline }}
<h2 class="font-bold pb-5 {{ if eq .smallheadline true }} text-2xl {{ end }} ">{{ .headline }}</h2>
{{ end }}
{{ with .content | markdownify }}
<p class="text-base text-gray-700">{{ . }}</p>
{{ end }}
</div>

View file

@ -0,0 +1,3 @@
{{ define "testPartial" }}
<p>Dies ist ein Test-Partial.</p>
{{ end }}

View file

@ -0,0 +1,7 @@
<div class="flex p-4">
{{ range split .Inner "..column.." }}
{{ printf "<div class=\" markdown-inner flex-1 px-4 \">"| safeHTML }}
{{ . | safeHTML }}
{{ printf "</div>" | safeHTML }}
{{ end }}
</div>

View file

@ -0,0 +1,4 @@
<div class="container">
{{ .Inner }}
</div>