hackertours/layouts/_partials/footer.html
Vincent Mahnke 213e58256f
All checks were successful
/ build (pull_request) Successful in 1m16s
/ accessibility (pull_request) Successful in 2m1s
/ cleanup-staging (pull_request) Successful in 27s
feat: Shows events as cards on the home page
Replaces the line of links to previous events with cards after the 40C3
start page: each card has the event's logo (designs.events.ccc.de) in its
heading bar, the motto, full name, dates and venue. 40C3 is greyed out as
in progress; the other cards link to their tours.

The cards reuse the theme's own colours -- the link colour for the motto
and the heading and text colours for the rest -- on the hairline border
and 0.25rem corners of the start page's cards. The logo credits that a
licence asks for are shown in the page footer.

The events shortcode reads data/events.yaml; the README documents it.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-09 04:06:47 +01:00

13 lines
1.1 KiB
HTML

{{- /* Overrides the zen theme's footer.html: the theme's footer, plus the credits for event logos
whose licence asks for one (credit in data/events.yaml), on pages that show the event cards. */ -}}
{{ if $.Param "feedlinks" }}{{ partial "feedlinks.html" . }}{{ end -}}
<p>{{ with site.Copyright }}{{ . | site.Home.RenderString }}{{ else }}<span>© {{ site.Title }}</span>{{ end }}</p>
{{- if .HasShortcode "events" }}
{{- $credits := slice }}
{{- with hugo.Data.events }}{{ range .events }}{{ if .credit }}{{ $credits = $credits | append (dict "name" (.name | default (upper .event)) "credit" .credit) }}{{ end }}{{ end }}{{ end }}
{{- with $credits }}
<p>{{ range $index, $entry := . }}{{ if $index }} · {{ end }}{{ i18n "events_logo" (dict "Name" $entry.name) }}: {{ $entry.credit | site.Home.RenderString }}{{ end }}</p>
{{- end }}
{{- 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 }}