diff --git a/web/layouts/index.html b/web/layouts/index.html index 3815937daaf49577c7cc5fbbed6b8a5afee3afbe..5f921cbc51c4ac42be60e1e929486e6d82397e61 100644 --- a/web/layouts/index.html +++ b/web/layouts/index.html @@ -1,4 +1,8 @@ {{ define "main" }} - <h1>{{ .Title }}</h1> - {{.Content}} + {{- partial "components/hero" .Params.hero }} + {{- range .Params.features -}} + {{- partial "components/feature" (dict "pg" $ "feature" .) -}} + {{- end -}} + <!-- <h1>{{ .Title }}</h1> --> + <!-- {{.Content}} --> {{ end }} diff --git a/web/layouts/partials/components/feature.html b/web/layouts/partials/components/feature.html new file mode 100644 index 0000000000000000000000000000000000000000..ef7a1588a959372038fdfab27278e16c6b5caf6d --- /dev/null +++ b/web/layouts/partials/components/feature.html @@ -0,0 +1,41 @@ +{{- with .feature -}} + {{- if and .headline .textline -}} + <div class="ml-4 py-8 {{ .direction | default "ltr"}} {{ .class }}"> + <div class="container"> + <div class="flex -mx-4"> + {{- if eq .direction "ltr" -}} + <div class="w-full md:w-1/2 md:px-4"> + <h2>{{ markdownify .headline }}</h2> + <div> + {{ markdownify .textline }} + </div> + </div> + <div class="w-full md:w-1/2 md:px-4"> + <img src="{{ .visual.permalink }}"> + </div> + {{- else -}} + <div class="w-full md:w-1/2 md:px-4"> + <img src="{{ .visual.permalink }}"> + </div> + <div class="w-full md:w-1/2 md:px-4"> + <h2>{{ markdownify .headline }}</h2> + <div> + {{ markdownify .textline }} + </div> + </div> + {{- end -}} + </div> + <div class="flex -mx-4"> + {{- range .subfeatures -}} + <div class="w-full md:w-1/3 md:px-4"> + <h4>{{ markdownify .headline }}</h4> + <div> + {{ markdownify .textline }} + </div> + </div> + {{- end -}} + </div> + </div> + </div> + {{- end -}} +{{- end -}} diff --git a/web/layouts/partials/components/hero.html b/web/layouts/partials/components/hero.html new file mode 100644 index 0000000000000000000000000000000000000000..c75d2b6938143b13dc1586677c7319bc2e7915c3 --- /dev/null +++ b/web/layouts/partials/components/hero.html @@ -0,0 +1,9 @@ +{{- if and .headline .textline -}} + <div class="pl-4 py-6"> + <div class="container"> + <h1>{{ markdownify .headline }}</h1> + <div>{{ markdownify .textline }}</div> + </div> + </div> +{{- end -}} +