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") }}
|
||||
{{ 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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user