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>
This commit is contained in:
parent
75a8d446e4
commit
213e58256f
1 changed files with 393 additions and 2 deletions
13
layouts/_partials/footer.html
Normal file
13
layouts/_partials/footer.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{{- /* 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 }}
|
||||
Loading…
Reference in a new issue