Merge pull request 'Create structure for press articles' (#31) from feat/press-articles into develop

Reviewed-on: #31
This commit was merged in pull request #31.
This commit is contained in:
2024-02-15 21:24:02 +00:00
15 changed files with 192 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
{{ define "main" }}
<a name="top">
<h1>{{ .Title }}</h1>
</a>
{{ .Content }}
<div class="press-articles">
{{ range .Pages.ByPublishDate.Reverse }}
<div class="press-article">
<h2 class="title">{{ .Title }}</h2>
<div class="metadata">
<span class="date">{{ .Date.Format "02.01.2006" }}</span>
{{ with .Param "source" }}<span class="source">Quelle: {{ . }}</span>{{ end }}
</div>
<div class="content">{{ .Content }}</div>
</div>
{{ end }}
</div>
{{ partial "totop" }}
{{ end }}

View File

@@ -0,0 +1,7 @@
<!--
{{ .Get "url"}}{{ page.Resources}}
-->
{{ $res := page.Resources.GetMatch (.Get "url") }}
<a target="_blank" class="download press-download" href="{{ $res.RelPermalink }}">
{{ .Inner }}
</a>

View File

@@ -0,0 +1,7 @@
<!--
{{ .Get "src"}}{{ page.Resources}}
-->
<div class="press-img">
{{- $res := page.Resources.GetMatch (.Get "src") -}}
<img{{ with .Get "alt" }} alt="{{ . }}"{{ end }} src="{{ $res.RelPermalink }}">
</div>