Move the Hackertours design into a stacked theme, use upstream zen

hugo.yaml now stacks themes: hackertours, then zen. layouts/, assets/,
i18n/ and the design files from static/ (web manifest, Lucide icons)
move to themes/hackertours/. themes/zen goes back to the unmodified
upstream v7.1.0; the changes from the hackertours-mobile-nav fork branch
live in themes/hackertours instead (mobilemenu.css and mobilemenu.js
override zen's, the mobile menu colour is set in _custom.css; the fork's
_custom.css additions were already in ours).

The generated site is unchanged, apart from where the mobile menu
colour is declared in the CSS.
This commit is contained in:
Stefan Bethke 2026-11-14 00:26:30 +01:00
commit 7cd203e37a

View file

@ -23,6 +23,30 @@ panel above it. The language link spans the panel's content width, includes the
translation icon, and uses the same font size as the menu links.
The page reserves space for the button so it does not cover content.
## Themes
The site's design is a stack of Hugo themes, set in `hugo.yaml`. For a file
that exists in more than one of them, the first theme in the list wins:
```yaml
theme:
- hackertours
- zen
```
- `themes/zen` is the [Zen theme](https://github.com/frjo/hugo-theme-zen) as a
submodule, unmodified. To update it, check out a newer release tag in the
submodule and commit the new pointer.
- `themes/hackertours` is the Hackertours design, kept in this repository: all
templates, shortcodes, CSS, JavaScript, translations and icons. To change
something in Zen, put a file with the same path here; for example,
`assets/css/mobilemenu.css` and `assets/js/mobilemenu.js` replace Zen's mobile
menu with the bottom navigation bar.
Content, `data/` and the site-specific files in `static/` (logo, favicons, map
data) stay at the top level of the repository. Don't add `layouts/`, `assets/`
or `i18n/` there: Hugo lets them override every theme.
## Brand spelling check
Hugo builds check content source lines for the name `Hackertours` in any other
@ -87,13 +111,13 @@ Without a data file, or without any tours in it, the shortcode renders nothing a
The `.ics` file is in the iCalendar format (RFC 5545), which Apple Calendar, Outlook, Thunderbird and most other calendar apps open directly. The Google calendar link is there because the Google Calendar app on Android can't open downloaded `.ics` files.
The icon is `regular/calendar-plus` from [Font Awesome Free](https://fontawesome.com/search?ic=free), kept in [assets/vendor/fontawesome/](assets/vendor/fontawesome/). Other templates can use any of its icons with `{{ partial "fa-icon.html" "solid/ship" }}`: it inlines the SVG, decorative and in the text colour. The icons are CC BY 4.0; the attribution is the comment inside each SVG, which the partial keeps.
The icon is `regular/calendar-plus` from [Font Awesome Free](https://fontawesome.com/search?ic=free), kept in [themes/hackertours/assets/vendor/fontawesome/](themes/hackertours/assets/vendor/fontawesome/). Other templates can use any of its icons with `{{ partial "fa-icon.html" "solid/ship" }}`: it inlines the SVG, decorative and in the text colour. The icons are CC BY 4.0; the attribution is the comment inside each SVG, which the partial keeps.
Each entry starts at the time given, in Hamburg time, at the Hackertours desk (with `map.origin` from the schedule file as the address, if there is one). Its description is the tour summary and a link to the tour page. The files are generated next to the tour page, one per date and language, e.g. `/de/40c3/tour-of-the-giants/tour-of-the-giants-2026-12-27-1730.ics`.
## Shortcode: Tour map
`{{< tour-map >}}` on an event's overview page shows a map of the tour locations, with the routes from the Congress, on OpenStreetMap. For a different event than the page's section, pass its name: `{{< tour-map 39c3 >}}`. It uses [Leaflet](https://leafletjs.com), which is kept in [assets/vendor/leaflet/](assets/vendor/leaflet/).
`{{< tour-map >}}` on an event's overview page shows a map of the tour locations, with the routes from the Congress, on OpenStreetMap. For a different event than the page's section, pass its name: `{{< tour-map 39c3 >}}`. It uses [Leaflet](https://leafletjs.com), which is kept in [themes/hackertours/assets/vendor/leaflet/](themes/hackertours/assets/vendor/leaflet/).
- Each tour gets a marker in its colour, with its `icon` in white, and its route as a line; walking legs are dotted. Clicking a marker or a route shows the tour title, linked to the tour page, and the directions.
- The map shows all tours at once. Scroll-wheel zoom only starts after clicking into the map, so the page still scrolls normally.
@ -162,11 +186,11 @@ Legs should join up: each leg starts where the previous one ends, and the first
### Map icons
Marker icons come from three public-domain (CC0) icon sets for maps, kept in [assets/vendor/icons/](assets/vendor/icons/):
Marker icons come from three public-domain (CC0) icon sets for maps, kept in [themes/hackertours/assets/vendor/icons/](themes/hackertours/assets/vendor/icons/):
| Set | Icons | Browse |
|---|---|---|
| `osmic` | 154 | [OSMIC](https://github.com/gmgeo/osmic), or the files in `assets/vendor/icons/osmic/` |
| `osmic` | 154 | [OSMIC](https://github.com/gmgeo/osmic), or the files in `themes/hackertours/assets/vendor/icons/osmic/` |
| `maki` | 211 | [Maki](https://labs.mapbox.com/maki-icons/) |
| `temaki` | 557 | [Temaki](https://rapideditor.github.io/temaki/docs/) |
@ -176,7 +200,7 @@ Only the icons a page uses end up in it, so the size of the sets doesn't matter.
### The 39C3 tour map (uMap)
The 39C3 overview pages embed a map with the `map-39c3` shortcode ([layouts/_shortcodes/map-39c3.html](layouts/_shortcodes/map-39c3.html)). It is an iframe of the uMap map [39c3 Hackertours](https://umap.openstreetmap.fr/en/map/39c3-hackertours_1329184), which was created by the uMap user WinstonS in December 2025. The map has no other editors, so only that account can change it. Nothing about the map is stored in this repository apart from the embed code.
The 39C3 overview pages embed a map with the `map-39c3` shortcode ([themes/hackertours/layouts/_shortcodes/map-39c3.html](themes/hackertours/layouts/_shortcodes/map-39c3.html)). It is an iframe of the uMap map [39c3 Hackertours](https://umap.openstreetmap.fr/en/map/39c3-hackertours_1329184), which was created by the uMap user WinstonS in December 2025. The map has no other editors, so only that account can change it. Nothing about the map is stored in this repository apart from the embed code.
How the map is built:
@ -209,7 +233,7 @@ In the GeoJSON, `coordinates` are already in `[lon, lat]` order, the colour and
| Param | Required | Content |
|---|---|---|
| `src` | yes | The image: a file in the page's folder, or a path in `assets/`. It must be a photo Hugo can resize (JPEG, PNG, WebP…), not SVG. |
| `src` | yes | The image: a file in the page's folder, or a path in `themes/hackertours/assets/`. It must be a photo Hugo can resize (JPEG, PNG, WebP…), not SVG. |
| `alt` | yes | What the image shows. It is the thumbnail's alt text and the caption in the lightbox. |
| `credit` | no | Photographer and licence, shown under the thumbnail and in the lightbox. |
@ -236,7 +260,7 @@ events:
- `status` (optional): `inprogress` greys the card out, without a link, and marks it "In Vorbereitung" / "In progress", for an event whose tours aren't online yet. Remove it once the event's section exists.
- `credit` (optional) names the logo's authors and licence in Markdown, shown in the page footer, for logos whose licence asks for it.
The heading shows the event's logo, `assets/img/events/<event>.svg`, in the text colour. The SVG's own colours are ignored, only its shape counts, so use a version without a background. Where each logo comes from, and its licence, is listed in [assets/img/events/Sources.txt](assets/img/events/Sources.txt).
The heading shows the event's logo, `themes/hackertours/assets/img/events/<event>.svg`, in the text colour. The SVG's own colours are ignored, only its shape counts, so use a version without a background. Where each logo comes from, and its licence, is listed in [themes/hackertours/assets/img/events/Sources.txt](themes/hackertours/assets/img/events/Sources.txt).
An event without a section, that isn't in progress either, gets a greyed-out card without a link, and the build logs a warning, as it does for a missing logo. Without a data file, or without any events in it, the shortcode renders nothing and the build logs a warning; to silence it, add `warning-events-empty` to `ignoreLogs` in `hugo.yaml`.