refactor: switch render templates to partials
All checks were successful
website-main / prod-build (push) Successful in 1m20s
website-main / test-build (push) Successful in 55s
website-main / auto-rebuild (push) Has been skipped
website-dev / dev-build (push) Successful in 58s

This commit is contained in:
Denys Konovalov 2023-07-15 15:50:10 +02:00
parent a158a617ed
commit 763a040751
Signed by: Denys Konovalov
GPG Key ID: 50F02F239C099532
15 changed files with 14 additions and 14 deletions

@ -8,7 +8,7 @@
{{ $paginator := .Paginate ( where .Data.Pages "Type" "post") }}
{{ range $paginator.Pages }}
<div class="col-md-6 d-flex align-items-stretch">
{{ .Render "card" }}
{{ partial "card" . }}
</div>
{{ end }}
<div class="col-12 mt-4">

@ -5,7 +5,7 @@
<div class="row">
{{ range .Pages }}
<div class="col-lg-4 col-sm-6">
{{ .Render "card-btn" }}
{{ partial "card-btn" . }}
</div>
{{ end }}
</div>

@ -38,8 +38,8 @@
</div>
</div>
{{ range where .Site.RegularPages "Params.author" "intersect" (slice .File.BaseFileName) }}
<div class="col-lg-4 col-sm-6 mb-4">
{{ .Render "card" }}
<div class="col-lg-4 col-sm-6 mb-4 mb-lg-0 d-flex align-items-stretch">
{{ partial "card" . }}
</div>
{{ end }}
</div>

@ -8,7 +8,7 @@
<div class="row">
{{ range .Pages }}
<div class="col-lg-4 col-sm-6">
{{ .Render "card-btn" }}
{{ partial "card-btn" . }}
</div>
{{ end }}
</div>

@ -14,7 +14,7 @@
{{ $related := (where .Site.RegularPages "Type" "begabte") | intersect (where .Site.Pages ".Title" "!=" .Title) | union (.Site.RegularPages.Related . ) | shuffle | first 3}}
{{ range first 3 $related }}
<div class="col-lg-4 col-sm-6">
{{ .Render "card-btn"}}
{{ partial "card-btn" . }}
</div>
{{ end }}
</div>

@ -14,7 +14,7 @@
<div class="row">
{{ range sort .Data.Pages ".Params.index" }}
<div class="col-lg-4 col-sm-6 d-flex align-items-stretch">
{{ .Render "card-btn" }}
{{ partial "card-btn" . }}
</div>
{{ end }}
</div>

@ -6,7 +6,7 @@
<div class="row filtr-container">
{{ range .Data.Pages }}
<div data-category="{{ .Params.category | urlize }}" class="col-lg-4 col-sm-6 mb-5 filtr-item">
{{ .Render "ganztag" }}
{{ partial "ganztag" . }}
</div>
{{ end }}
</div>

@ -72,7 +72,7 @@
{{ $related := (where .Site.RegularPages "Type" "ganztagsangebote") | intersect (where .Site.Pages ".Title" "!=" .Title) | union (.Site.RegularPages.Related . ) | shuffle | first 3}}
{{ range first 3 $related }}
<div class="col-lg-4 col-sm-6">
{{ .Render "ganztag"}}
{{ partial "ganztag" . }}
</div>
{{ end }}
</div>

@ -146,7 +146,7 @@
{{ end }}
{{ range first (cond $data.ausblick.enable (int $data.homepage.blog.number) (add $data.homepage.blog.number 1)) (where .Site.RegularPages "Type" "post")}}
<div class="col-lg-4 col-sm-6 mb-4 mb-lg-0 d-flex align-items-stretch">
{{ .Render "card" }}
{{ partial "card" . }}
</div>
{{ end }}
</div>
@ -200,7 +200,7 @@
<div class="row justify-content-center">
{{ range first (int $data.homepage.ganztagsangebote.number) (where .Site.RegularPages "Type" "ganztagsangebote" | shuffle)}}
<div class="col-lg-4 col-sm-6">
{{ .Render "ganztag" }}
{{ partial "ganztag" . }}
</div>
{{ end }}
</div>

@ -9,7 +9,7 @@
<div class="row filtr-container">
{{ range .Data.Pages }}
<div data-category="{{ .Params.Category | urlize }}" class="col-lg-4 col-sm-6 filtr-item">
{{ .Render "card-ct" }}
{{ partial "card-category" . }}
</div>
{{ end }}
</div>

@ -13,7 +13,7 @@
{{ $related := (where .Site.RegularPages "Type" "wettbewerbe") | intersect (where .Site.Pages ".Title" "!=" .Title) | union (.Site.RegularPages.Related . ) | shuffle | first 3}}
{{ range first 3 $related }}
<div class="col-lg-4 col-sm-6">
{{ .Render "card-ct"}}
{{ partial "card-category" . }}
</div>
{{ end }}
</div>