Theme: Fix doubled "Neuigkeiten" heading
This commit is contained in:
parent
da5da9fd62
commit
c43009bbb3
2 changed files with 12 additions and 9 deletions
|
|
@ -7,7 +7,12 @@
|
|||
{{- $events := where (.Site.GetPage "blog").Pages ".Params.categories" "event" }}
|
||||
{{- $lookback := time.ParseDuration "-6h" }}
|
||||
{{- $upcoming := where $events ".Params.date" "ge" (time.Now.Add $lookback) }}
|
||||
{{ if $upcoming }}
|
||||
|
||||
{{- $article := where (.Site.GetPage "blog").Pages ".Params.categories" "article" }}
|
||||
{{- $articleDisplayTime := time.ParseDuration "-126h" }}
|
||||
{{- $articleNew := where $article ".Params.publishDate" "ge" (time.Now.Add $articleDisplayTime) }}
|
||||
|
||||
{{ if or $upcoming $articleNew }}
|
||||
<div class="announcements">
|
||||
<h2 id="neuigkeiten" class="on-hover-trg">Neuigkeiten <a href="#neuigkeiten" class="on-hover"><i class="fa-solid fa-link small"></i></a></h2>
|
||||
{{- range $upcoming.ByDate }}
|
||||
|
|
@ -24,15 +29,7 @@
|
|||
{{- end }}
|
||||
</div>
|
||||
{{- end }}
|
||||
</div>
|
||||
{{- end }}
|
||||
|
||||
{{- $article := where (.Site.GetPage "blog").Pages ".Params.categories" "article" }}
|
||||
{{- $articleDisplayTime := time.ParseDuration "-126h" }}
|
||||
{{- $articleNew := where $article ".Params.publishDate" "ge" (time.Now.Add $articleDisplayTime) }}
|
||||
{{ if $articleNew }}
|
||||
<div class="announcements">
|
||||
<h2 id="neuigkeiten" class="on-hover-trg">Neuigkeiten <a href="#neuigkeiten" class="on-hover"><i class="fa-solid fa-link small"></i></a></h2>
|
||||
{{- range $articleNew.ByDate }}
|
||||
<div class="announcement">
|
||||
{{- partial "blog-header.html" (dict "headingLink" true "level" 4 "reduced" true "page" . ) }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue