Home: Rework structure
This commit is contained in:
parent
4784466e69
commit
93b4246cd1
13 changed files with 11 additions and 10 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue