Feat: Add links capability to hero

This commit is contained in:
Dorian Zedler 2022-01-13 12:07:12 +01:00
parent ad31246997
commit a8eac506ab
Signed by: dorian
GPG key ID: 989DE36109AFA354
2 changed files with 8 additions and 11 deletions

View file

@ -1,18 +1,8 @@
{{ define "hero" }}
{{ with partial "modular/_dataGetter.html" . }}
{{ range . }}
{{ if eq .modularLayout "hero" }}
{{ partial "modular/hero.html" . }}
{{end}}
{{ end }}
{{ end }}
{{ end }}
{{ define "body" }}
{{ $pageObj := . }}
{{ with partial "modular/_dataGetter.html" . }}
{{ range . }}
{{ if not (eq .modularLayout "hero") }}
{{ if or (not (isset . "enabled")) .enabled }}
{{ partial (print "modular/" .modularLayout ".html") (merge . (dict "page" $pageObj) ) }}
{{ end }}
{{ end }}

View file

@ -7,6 +7,13 @@
<div class="image-overlay"></div>
<section class="container {{ site.Params.GridSize }}" style="text-align: {{ default "center" .align }}">
{{ .content | markdownify }}
{{ with .links }}
<p>
{{ range . }}
<a href="{{ .href }}" class="{{ .classes }}" {{ with .target }}target="{{.}}"{{ end }}>{{ .text }}</a>
{{ end }}
</p>
{{ end }}
</section>
<i id="to-start" class="pulse fa fa-angle-down"></i>
</section>