This commit is contained in:
@ -5,7 +5,7 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<div class="row">
|
||||
{{ $paginator := .Paginate ( where .Data.Pages "Type" "post") }}
|
||||
{{ $paginator := .Paginate (where .Data.Pages "Type" "post") }}
|
||||
{{ range $paginator.Pages }}
|
||||
<div class="col-md-6 d-flex align-items-stretch">
|
||||
{{ partial "card-article" . }}
|
||||
|
@ -8,7 +8,7 @@
|
||||
{{ if eq $.Data.Plural "tags" }}
|
||||
<a href="{{ `tags/` | relURL }}{{ $name | urlize | lower }}">{{ $name }}</a>
|
||||
{{ else if eq $.Data.Plural "categories" }}
|
||||
<a href="{{ `categories/` | relURL }}{{ $name | urlize | lower }}">{{ if (index $transliterations $name) }}{{ index $transliterations $name }}{{ else }}{{ $name | title }}{{end}}</a>
|
||||
<a href="{{ `categories/` | relURL }}{{ $name | urlize | lower }}">{{ with (index $transliterations $name) }}{{ . }}{{ else }}{{ $name | title }}{{end}}</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
@ -14,7 +14,7 @@
|
||||
{{ .Content }}
|
||||
<hr>
|
||||
{{ with .Params.email }}
|
||||
<a href="mailto:{{ . }}">{{ partial "icons/icon" (dict "vendor" "mdi" "name" "at") }}</a>
|
||||
<a href="mailto:{{ . }}">{{ partial "icons/icon" (dict "vendor" "mdi" "name" "at") }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<div class="container">
|
||||
<h2 class="mb-4">Weitere Begabtenförderungsangebote</h2>
|
||||
<div class="row" data-pagefind-ignore="all">
|
||||
{{ range partial "related" . }}
|
||||
{{ range partial "data/related" . }}
|
||||
{{ partial "card-btn" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
@ -22,7 +22,7 @@
|
||||
<div class="container">
|
||||
<h2 class="mb-4">Andere Arbeitsgemeinschaften</h2>
|
||||
<div class="row">
|
||||
{{ range partial "related" . }}
|
||||
{{ range partial "data/related" . }}
|
||||
<div class="col-lg-4 col-sm-6">
|
||||
{{ partial "ganztag" . }}
|
||||
</div>
|
||||
|
@ -224,8 +224,8 @@
|
||||
{{ with .Site.GetPage "/termine/_index.md" }}
|
||||
|
||||
{{ $events := slice }}
|
||||
{{ range .Params.events }}
|
||||
{{ if or (ge (.date | time.AsTime).Unix now.Unix) (and .enddate (ge (.enddate | time.AsTime).Unix now.Unix)) }}
|
||||
{{ range sort .Params.events ".date" }}
|
||||
{{ if partial "data/termin-upcoming" . }}
|
||||
{{ $events = $events | append . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
1
layouts/partials/data/related.html
Normal file
1
layouts/partials/data/related.html
Normal file
@ -0,0 +1 @@
|
||||
{{ return ((where .Site.RegularPages "Type" .Type) | intersect (where .Site.Pages ".Title" "!=" .Title) | union (.Site.RegularPages.Related . ) | shuffle | first 3) }}
|
1
layouts/partials/data/termin-upcoming.html
Normal file
1
layouts/partials/data/termin-upcoming.html
Normal file
@ -0,0 +1 @@
|
||||
{{ return or (ge (.date | time.AsTime) now) (and .enddate (ge (.enddate | time.AsTime) now)) }}
|
@ -86,7 +86,7 @@
|
||||
|
||||
{{ $top_banner := .Site.Data.homepage.top_banner }}
|
||||
{{ if and $top_banner.enable }}
|
||||
{{ if or (not $top_banner.temporarily.enable) (and $top_banner.temporarily.enable (and (le ($top_banner.temporarily.start_date | time.AsTime).Unix now.Unix ) (ge ($top_banner.temporarily.end_date | time.AsTime).Unix now.Unix))) }}
|
||||
{{ if or (not $top_banner.temporarily.enable) (and $top_banner.temporarily.enable (and (le ($top_banner.temporarily.start_date | time.AsTime) now) (ge ($top_banner.temporarily.end_date | time.AsTime) now))) }}
|
||||
{{ with $top_banner }}
|
||||
<div id="top-banner" class="p-3" style="background: {{ .color }}" data-pagefind-ignore>
|
||||
<div class="container">
|
||||
|
@ -1,2 +0,0 @@
|
||||
{{ $related := (where .Site.RegularPages "Type" .Type) | intersect (where .Site.Pages ".Title" "!=" .Title) | union (.Site.RegularPages.Related . ) | shuffle | first 3 }}
|
||||
{{ return $related }}
|
@ -8,8 +8,8 @@
|
||||
<li class="list-inline-item m-3 text-uppercase" data-filter="past">Vergangen</li>
|
||||
</ul>
|
||||
<div class="filter-container row mx-auto">
|
||||
{{ range .Params.events }}
|
||||
<div class="filter-item col-12" data-groups="{{ if or (ge (.date | time.AsTime).Unix now.Unix) (and .enddate (ge (.enddate | time.AsTime).Unix now.Unix)) }}upcoming{{else}}past{{end}}" data-time="{{.date}}">
|
||||
{{ range sort .Params.events ".date" }}
|
||||
<div class="filter-item col-12" data-groups='{{if partial "data/termin-upcoming" .}}upcoming{{else}}past{{end}}'>
|
||||
{{ partial "termin" . }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
@ -6,7 +6,7 @@
|
||||
<div class="container">
|
||||
<h2 class="mb-4">Weitere Wettbewerbe</h2>
|
||||
<div class="row" data-pagefind-ignore="all">
|
||||
{{ range partial "related" . }}
|
||||
{{ range partial "data/related" . }}
|
||||
<div class="col-lg-4 col-sm-6">
|
||||
{{ partial "card-category" . }}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user