refactor: switch render templates to partials
This commit is contained in:
parent
a158a617ed
commit
763a040751
@ -8,7 +8,7 @@
|
|||||||
{{ $paginator := .Paginate ( where .Data.Pages "Type" "post") }}
|
{{ $paginator := .Paginate ( where .Data.Pages "Type" "post") }}
|
||||||
{{ range $paginator.Pages }}
|
{{ range $paginator.Pages }}
|
||||||
<div class="col-md-6 d-flex align-items-stretch">
|
<div class="col-md-6 d-flex align-items-stretch">
|
||||||
{{ .Render "card" }}
|
{{ partial "card" . }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="col-12 mt-4">
|
<div class="col-12 mt-4">
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
{{ range .Pages }}
|
{{ range .Pages }}
|
||||||
<div class="col-lg-4 col-sm-6">
|
<div class="col-lg-4 col-sm-6">
|
||||||
{{ .Render "card-btn" }}
|
{{ partial "card-btn" . }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -38,8 +38,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ range where .Site.RegularPages "Params.author" "intersect" (slice .File.BaseFileName) }}
|
{{ range where .Site.RegularPages "Params.author" "intersect" (slice .File.BaseFileName) }}
|
||||||
<div class="col-lg-4 col-sm-6 mb-4">
|
<div class="col-lg-4 col-sm-6 mb-4 mb-lg-0 d-flex align-items-stretch">
|
||||||
{{ .Render "card" }}
|
{{ partial "card" . }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
{{ range .Pages }}
|
{{ range .Pages }}
|
||||||
<div class="col-lg-4 col-sm-6">
|
<div class="col-lg-4 col-sm-6">
|
||||||
{{ .Render "card-btn" }}
|
{{ partial "card-btn" . }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
{{ $related := (where .Site.RegularPages "Type" "begabte") | intersect (where .Site.Pages ".Title" "!=" .Title) | union (.Site.RegularPages.Related . ) | shuffle | first 3}}
|
{{ $related := (where .Site.RegularPages "Type" "begabte") | intersect (where .Site.Pages ".Title" "!=" .Title) | union (.Site.RegularPages.Related . ) | shuffle | first 3}}
|
||||||
{{ range first 3 $related }}
|
{{ range first 3 $related }}
|
||||||
<div class="col-lg-4 col-sm-6">
|
<div class="col-lg-4 col-sm-6">
|
||||||
{{ .Render "card-btn"}}
|
{{ partial "card-btn" . }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
{{ range sort .Data.Pages ".Params.index" }}
|
{{ range sort .Data.Pages ".Params.index" }}
|
||||||
<div class="col-lg-4 col-sm-6 d-flex align-items-stretch">
|
<div class="col-lg-4 col-sm-6 d-flex align-items-stretch">
|
||||||
{{ .Render "card-btn" }}
|
{{ partial "card-btn" . }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<div class="row filtr-container">
|
<div class="row filtr-container">
|
||||||
{{ range .Data.Pages }}
|
{{ range .Data.Pages }}
|
||||||
<div data-category="{{ .Params.category | urlize }}" class="col-lg-4 col-sm-6 mb-5 filtr-item">
|
<div data-category="{{ .Params.category | urlize }}" class="col-lg-4 col-sm-6 mb-5 filtr-item">
|
||||||
{{ .Render "ganztag" }}
|
{{ partial "ganztag" . }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
{{ $related := (where .Site.RegularPages "Type" "ganztagsangebote") | intersect (where .Site.Pages ".Title" "!=" .Title) | union (.Site.RegularPages.Related . ) | shuffle | first 3}}
|
{{ $related := (where .Site.RegularPages "Type" "ganztagsangebote") | intersect (where .Site.Pages ".Title" "!=" .Title) | union (.Site.RegularPages.Related . ) | shuffle | first 3}}
|
||||||
{{ range first 3 $related }}
|
{{ range first 3 $related }}
|
||||||
<div class="col-lg-4 col-sm-6">
|
<div class="col-lg-4 col-sm-6">
|
||||||
{{ .Render "ganztag"}}
|
{{ partial "ganztag" . }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -146,7 +146,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
{{ range first (cond $data.ausblick.enable (int $data.homepage.blog.number) (add $data.homepage.blog.number 1)) (where .Site.RegularPages "Type" "post")}}
|
{{ 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">
|
<div class="col-lg-4 col-sm-6 mb-4 mb-lg-0 d-flex align-items-stretch">
|
||||||
{{ .Render "card" }}
|
{{ partial "card" . }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
@ -200,7 +200,7 @@
|
|||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
{{ range first (int $data.homepage.ganztagsangebote.number) (where .Site.RegularPages "Type" "ganztagsangebote" | shuffle)}}
|
{{ range first (int $data.homepage.ganztagsangebote.number) (where .Site.RegularPages "Type" "ganztagsangebote" | shuffle)}}
|
||||||
<div class="col-lg-4 col-sm-6">
|
<div class="col-lg-4 col-sm-6">
|
||||||
{{ .Render "ganztag" }}
|
{{ partial "ganztag" . }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -5,4 +5,4 @@
|
|||||||
<h4 class="card-title text-truncate"><a href="{{ .Permalink }}">{{ .Title }}</a></h4>
|
<h4 class="card-title text-truncate"><a href="{{ .Permalink }}">{{ .Title }}</a></h4>
|
||||||
<a href="{{ .Permalink }}" class="btn btn-primary btn-sm text-uppercase" data-pagefind-ignore>Mehr anzeigen</a>
|
<a href="{{ .Permalink }}" class="btn btn-primary btn-sm text-uppercase" data-pagefind-ignore>Mehr anzeigen</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
@ -9,7 +9,7 @@
|
|||||||
<div class="row filtr-container">
|
<div class="row filtr-container">
|
||||||
{{ range .Data.Pages }}
|
{{ range .Data.Pages }}
|
||||||
<div data-category="{{ .Params.Category | urlize }}" class="col-lg-4 col-sm-6 filtr-item">
|
<div data-category="{{ .Params.Category | urlize }}" class="col-lg-4 col-sm-6 filtr-item">
|
||||||
{{ .Render "card-ct" }}
|
{{ partial "card-category" . }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
{{ $related := (where .Site.RegularPages "Type" "wettbewerbe") | intersect (where .Site.Pages ".Title" "!=" .Title) | union (.Site.RegularPages.Related . ) | shuffle | first 3}}
|
{{ $related := (where .Site.RegularPages "Type" "wettbewerbe") | intersect (where .Site.Pages ".Title" "!=" .Title) | union (.Site.RegularPages.Related . ) | shuffle | first 3}}
|
||||||
{{ range first 3 $related }}
|
{{ range first 3 $related }}
|
||||||
<div class="col-lg-4 col-sm-6">
|
<div class="col-lg-4 col-sm-6">
|
||||||
{{ .Render "card-ct"}}
|
{{ partial "card-category" . }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user