Merge branch 'main' into explain-content-types
All checks were successful
/ build (pull_request) Successful in 44s
All checks were successful
/ build (pull_request) Successful in 44s
This commit is contained in:
commit
876443cd4d
2 changed files with 13 additions and 10 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,16 +29,8 @@
|
|||
{{- end }}
|
||||
</div>
|
||||
{{- end }}
|
||||
</div>
|
||||
{{- end }}
|
||||
|
||||
{{- $article := where (.Site.GetPage "blog").Pages ".Params.categories" "article" }}
|
||||
{{- $articleDisplayTime := time.ParseDuration "-30h" }}
|
||||
{{- $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 }}
|
||||
{{- range $articleNew.ByDate.Reverse }}
|
||||
<div class="announcement">
|
||||
{{- partial "blog-header.html" (dict "headingLink" true "level" 4 "reduced" true "page" . ) }}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,12 @@
|
|||
{{- end }}
|
||||
|
||||
<div class="infos">
|
||||
{{- if (eq .Params.categories "event") }}
|
||||
<span class="li-space"><i class="fa-solid fa-calendar-day"></i> {{ .Date | time.Format "Mon, 2006-01-02 15:04" }}</span>
|
||||
{{- else }}
|
||||
<span class="li-space"><i class="fa-solid fa-newspaper"></i> {{ .Date | time.Format "2006-01-02" }}</span>
|
||||
{{- end }}
|
||||
{{- if (eq .Params.categories "event") }}
|
||||
{{- with .Params.location }}
|
||||
<span class="li-space">
|
||||
<i class="fa-solid fa-location-dot"></i>
|
||||
|
|
@ -25,6 +30,7 @@
|
|||
{{- end -}}
|
||||
</span>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if $showTags }}
|
||||
{{- with .Page.GetTerms "tags" }}
|
||||
<span class="li-space"><i class="fa-solid fa-tag"></i>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue