Home: Fix event annoucement summary
This commit is contained in:
parent
be7aaf7774
commit
f0a4d81451
|
@ -1,5 +1,6 @@
|
||||||
baseURL = 'https://hamburg.ccc.de/'
|
baseURL = 'https://hamburg.ccc.de/'
|
||||||
languageCode = 'de-de'
|
languageCode = 'de-de'
|
||||||
|
defaultContentLanguage = 'de'
|
||||||
title = 'CCC Hansestadt Hamburg e.V.'
|
title = 'CCC Hansestadt Hamburg e.V.'
|
||||||
theme = 'ccchh'
|
theme = 'ccchh'
|
||||||
|
|
||||||
|
|
|
@ -10,13 +10,15 @@ $roomstate_color_closed: var(--del-color);
|
||||||
header {
|
header {
|
||||||
margin-bottom: 3rem;
|
margin-bottom: 3rem;
|
||||||
|
|
||||||
h1 {
|
h1,
|
||||||
|
h2,
|
||||||
|
h3,
|
||||||
|
h4,
|
||||||
|
h5,
|
||||||
|
h6 {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
body>footer {
|
body>footer {
|
||||||
|
@ -114,6 +116,18 @@ body>main {
|
||||||
|
|
||||||
margin-bottom: var(--typography-spacing-vertical);
|
margin-bottom: var(--typography-spacing-vertical);
|
||||||
|
|
||||||
|
header {
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin-bottom: calc(var(--typography-spacing-vertical) / 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
// .morelink {
|
||||||
|
// margin-top: calc((var(--typography-spacing-vertical) / 2) * -1);
|
||||||
|
// }
|
||||||
|
|
||||||
p:last-child {
|
p:last-child {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
<article>
|
<article>
|
||||||
{{- partial "blog-header.html" (dict "subitem" true "page" . ) }}
|
{{- partial "blog-header.html" (dict "headingLink" true "level" 2 "page" . ) }}
|
||||||
|
|
||||||
{{- if in .RawContent "<!--more-->" }}
|
{{- if in .RawContent "<!--more-->" }}
|
||||||
{{ .Summary | safeHTML }}
|
{{ .Summary | safeHTML }}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<main class="container" aria-role="main">
|
<main class="container" aria-role="main">
|
||||||
{{- partial "blog-header.html" (dict "subitem" false "page" . ) }}
|
{{- partial "blog-header.html" (dict "page" . ) }}
|
||||||
|
|
||||||
<section class="content">
|
<section class="content">
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
|
|
|
@ -1,29 +1,23 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<main class="container" aria-role="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">
|
<div class="homepage-content">
|
||||||
<!-- Note that the content for index.html, as a sort of list page, will pull from content/_index.md -->
|
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{- $events := where (.Site.GetPage "blog").Pages ".Params.categories" "event" }}
|
{{- $events := where (.Site.GetPage "blog").Pages ".Params.categories" "event" }}
|
||||||
{{- $upcoming := where $events ".Params.date" "ge" now }}
|
{{- $upcoming := where $events ".Params.date" "ge" now }}
|
||||||
{{ if $upcoming}}
|
{{ if $upcoming }}
|
||||||
<div class="announcements">
|
<div class="announcements">
|
||||||
<h3>Neuigkeiten</h3>
|
<h3>Neuigkeiten</h3>
|
||||||
{{- range $upcoming.ByDate }}
|
{{- range $upcoming.ByDate }}
|
||||||
<div class="announcement">
|
<div class="announcement">
|
||||||
<p><a href="{{ .Permalink }}">{{ .Date.Format "2006-01-02" }}: {{ .Title }}</a>
|
{{- partial "blog-header.html" (dict "headingLink" true "level" 4 "reduced" true "page" . ) }}
|
||||||
{{ .Summary }}
|
|
||||||
{{- if .Truncated }}
|
{{- if in .RawContent "<!--more-->" }}
|
||||||
<a href="{{ .RelPermalink }}">Read More…</a>
|
{{ .Summary | safeHTML }}
|
||||||
|
{{- else }}
|
||||||
|
<p>{{ .Summary | safeHTML }}</p>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,22 +1,24 @@
|
||||||
{{- $page := .page -}}
|
{{- $page := .page -}}
|
||||||
{{- $isMain := not .subitem -}}
|
{{- $level := (.level | default 1) -}}
|
||||||
|
{{- $headingLink := (.headingLink | default false) -}}
|
||||||
|
{{- $showTags := not (.reduced | default false) -}}
|
||||||
|
{{- $showAuthors := not (.reduced | default false) -}}
|
||||||
|
|
||||||
{{ with $page }}
|
{{ with $page }}
|
||||||
<header>
|
<header>
|
||||||
{{- if $isMain }}
|
{{- if $headingLink }}<a href="{{ .Permalink }}">{{ end }}
|
||||||
<h1>{{ .Title }}</h1>
|
<h{{ $level }}>{{ .Title }}</h{{ $level }}>
|
||||||
{{- else }}
|
{{- if $headingLink }}</a>{{ end }}
|
||||||
<a href="{{ .Permalink }}"><h2>{{ .Title }}</h2></a>
|
|
||||||
{{- end }}
|
|
||||||
{{- with .Params.subtitle }}
|
{{- with .Params.subtitle }}
|
||||||
<span class="subtitle">{{ . }}</span>
|
<span class="subtitle">{{ . }}</span>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
<div class="infos">
|
<div class="infos">
|
||||||
<span class="li-space"><i class="fa-solid fa-calendar-day"></i> {{ .Date.Format "2006-01-02 15:04" }}</span>
|
<span class="li-space"><i class="fa-solid fa-calendar-day"></i> {{ .Date | time.Format "Mon, 2006-01-02 15:04" }}</span>
|
||||||
{{- with .Params.location }}
|
{{- with .Params.location }}
|
||||||
<span class="li-space"><i class="fa-solid fa-location-dot"></i> {{ . }}</span>
|
<span class="li-space"><i class="fa-solid fa-location-dot"></i> {{ . }}</span>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- if $showTags }}
|
||||||
{{- with .Page.GetTerms "tags" }}
|
{{- with .Page.GetTerms "tags" }}
|
||||||
<span class="li-space"><i class="fa-solid fa-tag"></i>
|
<span class="li-space"><i class="fa-solid fa-tag"></i>
|
||||||
{{- range . }}
|
{{- range . }}
|
||||||
|
@ -24,6 +26,8 @@
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</span>
|
</span>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if $showAuthors }}
|
||||||
<br>
|
<br>
|
||||||
{{- with .Page.GetTerms "authors" }}
|
{{- with .Page.GetTerms "authors" }}
|
||||||
<span class="li-space"><i class="fa-regular fa-user"></i>
|
<span class="li-space"><i class="fa-regular fa-user"></i>
|
||||||
|
@ -32,6 +36,7 @@
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</span>
|
</span>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
{{- end }}
|
{{- end }}
|
Loading…
Reference in a new issue