Home: Rework structure

This commit is contained in:
jtbx 2023-10-17 22:07:39 +02:00
commit 93b4246cd1
13 changed files with 11 additions and 10 deletions

View file

@ -23,16 +23,17 @@
</div>
{{- end }}
{{- $home_sections := .Site.GetPage "/home" }}
{{- range sort ($home_sections.Resources.Match "*.md") ".Name" }}
{{- $home := .Site.GetPage "/home" }}
{{- range sort ($home.Resources.ByType "page") "File.Path" "asc" }}
<div class="section">
<h2>{{ .Title }}</h2>
{{ .Content -}}
{{- $sec := .CurrentSection }}
{{- with .Params.Resources }}
<div class="flex-grid">
{{- range . }}
{{- $img := $home_sections.Resources.GetMatch (printf "%s" .src) }}
{{- $img := $sec.Resources.GetMatch (printf "*/%s" .src) }}
<div class="img-link"><a href="{{ .params.url }}"><img src="{{ $img.Permalink }}" class="box-image" alt=""></a></div>
{{- end }}
</div>