Create structure for press articles #31

Merged
christian merged 5 commits from feat/press-articles into develop 2024-02-15 21:24:03 +00:00
4 changed files with 54 additions and 15 deletions
Showing only changes of commit 08b286faf5 - Show all commits

View File

@ -969,6 +969,36 @@ table.time {
}
}
.press-articles {
margin: 0 0 2em;
.press-article {
border-bottom: solid 1px $color-hor-line;
margin: 0 0 3em;
padding: 0 0 3em;
&:nth-last-of-type(1) {
border-bottom: none;
padding: 0;
margin: 0;
}
.press-img img {
display: block;
margin: 1em auto;
}
.metadata {
span {
display: block;
&.date {
font-weight: bold;
}
}
}
}
}
.iframe-generic {
display: block;
width: 100%;

View File

@ -3,22 +3,17 @@
<h1>{{ .Title }}</h1>
</a>
{{ .Content }}
<div class="press-articles">
{{ range .Pages.ByPublishDate.Reverse }}
<div class="press-article">
<div class="title">{{ .Title }}</div>
<h2 class="title">{{ .Title }}</h2>
<div class="metadata">
<span class="date">{{ .Date.Format "02.01.2006" }}</span>
{{ with .Param "source" }}<span class="source">{{ . }}</span>{{ end }}
{{ with .Param "source" }}<span class="source">Quelle: {{ . }}</span>{{ end }}
</div>
<div class="content">{{ .Content }}</div>
</div>
<!--<p>
<h3><a class="title" href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
{{ partial "metadata.html" . }}
<a class="summary" href="{{ .RelPermalink }}">
<p>{{ .Content }}</p>
</a>
</p>-->
{{ 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>