51 lines
1.5 KiB
HTML
51 lines
1.5 KiB
HTML
{{ 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.kind" "event" }}
|
|
{{- $upcoming := where $events ".Params.date" "ge" now }}
|
|
{{ 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>
|
|
{{- end }}
|
|
</p>
|
|
</div>
|
|
{{- end }}
|
|
</div>
|
|
{{- end }}
|
|
|
|
{{- $home_sections := .Site.GetPage "/home" }}
|
|
{{- range sort ($home_sections.Resources.Match "*.md") ".Name" }}
|
|
<div class="section">
|
|
<h3>{{ .Title }}</h3>
|
|
{{ .Content -}}
|
|
|
|
{{- with .Params.Resources }}
|
|
<div class="flex-grid">
|
|
{{- range . }}
|
|
{{- $img := $home_sections.Resources.GetMatch (printf "%s" .src) }}
|
|
<div class="img-link"><a href="{{ .params.url }}"><img src="{{ $img.Permalink }}" class="box-image" alt=""></a></div>
|
|
{{- end }}
|
|
</div>
|
|
{{- end }}
|
|
</div>
|
|
{{ end }}
|
|
|
|
</main>
|
|
{{ end }}
|