Home: Fix event annoucement summary
This commit is contained in:
parent
be7aaf7774
commit
f0a4d81451
6 changed files with 40 additions and 26 deletions
|
@ -1,29 +1,23 @@
|
|||
{{ define "main" }}
|
||||
<main class="container" aria-role="main">
|
||||
<!-- <header class="homepage-header">
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ with .Params.subtitle }}
|
||||
<span class="subtitle">{{ . }}</span>
|
||||
{{ end }}
|
||||
</header> -->
|
||||
<div class="homepage-content">
|
||||
<!-- Note that the content for index.html, as a sort of list page, will pull from content/_index.md -->
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
||||
{{- $events := where (.Site.GetPage "blog").Pages ".Params.categories" "event" }}
|
||||
{{- $upcoming := where $events ".Params.date" "ge" now }}
|
||||
{{ if $upcoming}}
|
||||
{{ if $upcoming }}
|
||||
<div class="announcements">
|
||||
<h3>Neuigkeiten</h3>
|
||||
{{- range $upcoming.ByDate }}
|
||||
<div class="announcement">
|
||||
<p><a href="{{ .Permalink }}">{{ .Date.Format "2006-01-02" }}: {{ .Title }}</a>
|
||||
{{ .Summary }}
|
||||
{{- if .Truncated }}
|
||||
<a href="{{ .RelPermalink }}">Read More…</a>
|
||||
{{- partial "blog-header.html" (dict "headingLink" true "level" 4 "reduced" true "page" . ) }}
|
||||
|
||||
{{- if in .RawContent "<!--more-->" }}
|
||||
{{ .Summary | safeHTML }}
|
||||
{{- else }}
|
||||
<p>{{ .Summary | safeHTML }}</p>
|
||||
{{- end }}
|
||||
</p>
|
||||
</div>
|
||||
{{- end }}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue