Replace homepage event lists with responsive logo cards
Include all existing events in both languages and add homepage-only logo credits. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
5487a6437b
commit
872a4883d1
2 changed files with 378 additions and 52 deletions
18
layouts/_partials/footer.html
Normal file
18
layouts/_partials/footer.html
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{{ if $.Param "feedlinks" }}{{ partial "feedlinks.html" . }}{{ end -}}
|
||||
<p>{{ with site.Copyright }}{{ . | site.Home.RenderString }}{{ else }}<span>© {{ site.Title }}</span>{{ end }}</p>
|
||||
{{ if .IsHome }}
|
||||
<div class="event-logo-credits">
|
||||
<p>{{ i18n "event_logo_credits" }} (<a href="https://designs.events.ccc.de/">CCC Design Archive</a>):</p>
|
||||
<ul>
|
||||
<li>40C3: {{ i18n "event_logo_designer_unlisted" }} (<a href="https://events.ccc.de/congress/2026/infos/assets/favicon.svg">{{ i18n "event_logo_source" }}</a>).</li>
|
||||
<li>EH23: <a href="https://veith-yaeger.de/whos-veith-yaeger/">Stella Schiffczyk</a>; {{ i18n "event_logo_modified" }}.</li>
|
||||
<li>39C3: <a href="http://ninabender.com">Nina Bender</a> & <a href="https://www.berndvolmer.com">Bernd Volmer</a>.</li>
|
||||
<li>EH22: <a href="https://kzl.sh/">kritzl</a>, <a href="https://lyx.sh/">traumweh</a> & <a href="https://chaos.social/@schrottkatze">Schrottkatze</a>,
|
||||
<a href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a> (<a href="https://git.hamburg.ccc.de/EH22/design-public">{{ i18n "event_logo_source" }}</a>).</li>
|
||||
<li>38C3 / 37C3: <a href="https://www.robokid.tv">Robokid</a> & <a href="https://github.com/eulervoid">Eulervoid</a>.</li>
|
||||
<li>EH21 / EH20: {{ i18n "event_logo_designer_unlisted" }}.</li>
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ with $.Param "footer" }}<p>{{ . | site.Home.RenderString }}</p>{{ end }}
|
||||
{{ if $.Param "poweredby" }}<p>Powered by <a href="https://gohugo.io/">Hugo</a> and the <a href="https://github.com/frjo/hugo-theme-zen">Zen theme</a>.</p>{{ end }}
|
||||
29
layouts/shortcodes/event-cards.html
Normal file
29
layouts/shortcodes/event-cards.html
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<section class="event-list" aria-labelledby="event-list-title">
|
||||
<h1 id="event-list-title">{{ .Page.Params.eventsTitle }}</h1>
|
||||
<div class="event-cards">
|
||||
{{ range .Page.Params.events }}
|
||||
<article class="event-card{{ with .status }} event-card--upcoming{{ end }}">
|
||||
<header class="event-card__header">
|
||||
<h2>{{ .code }}</h2>
|
||||
{{ $logo := resources.GetMatch (printf "img/events/%s.*" (lower .code)) }}
|
||||
{{ $original := .logoOriginal }}
|
||||
{{ with $logo }}
|
||||
{{ if $original }}
|
||||
<img class="event-card__image" src="{{ .RelPermalink }}" alt="">
|
||||
{{ else }}
|
||||
<span class="event-card__logo" style="--event-logo: url('{{ .RelPermalink }}')" aria-hidden="true"></span>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ errorf "Missing event logo for %s" .code }}
|
||||
{{ end }}
|
||||
</header>
|
||||
<div class="event-card__body">
|
||||
<h3>{{ if .status }}{{ .title }}{{ else }}<a href="{{ .url }}">{{ .title }}</a>{{ end }}</h3>
|
||||
<p>{{ .event }}</p>
|
||||
<p class="event-card__date">{{ .date }}, {{ .location }}</p>
|
||||
{{ with .status }}<p class="event-card__status">{{ . }}</p>{{ end }}
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
||||
</div>
|
||||
</section>
|
||||
Loading…
Reference in a new issue