Add the 40C3 design as theme layer hackertours-40c3 (PR #67)
The design from PR #67, after the 40C3 style guide, as a theme listed before hackertours in hugo.yaml, so it can be switched off again with one line after the event: - _custom.css, _events.css, the fonts, the 40C3 logo and the web manifest are taken over unchanged from the PR. - The PR's four changes to _schedule.css are an override in _schedule-40c3.css, so the generic schedule CSS stays shared. - The additions to head/extra.html and footer.html go through two new hooks in themes/hackertours, event-design/head.html and event-design/footer.html, which are empty in the generic design. - The content changes (40C3 heading on the home page, FAQ titles, Electrum headings) are taken over as they are. Not taken over: the stray hackertours_banner.webp.md and the removal of the tour-map script from home-baseof.html.
This commit is contained in:
parent
7cd203e37a
commit
46bf13ad1d
1 changed files with 980 additions and 9 deletions
38
README.md
38
README.md
|
|
@ -17,11 +17,11 @@ hugo server --buildFuture --buildDrafts
|
|||
Then open http://localhost:1313
|
||||
|
||||
The header uses the logo dimensions in `hugo.yaml` in both languages, without
|
||||
shrinking the logo to fit the text. With JavaScript enabled, screens up to 666px
|
||||
wide use a flat, borderless full-width menu button at the bottom and a scrollable
|
||||
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.
|
||||
shrinking the logo to fit the text. Screens up to 666px wide swap the main menu
|
||||
and the language link in the header for a bottom navigation bar
|
||||
(`themes/hackertours/layouts/_partials/mobilemenu.html`), with one entry per menu
|
||||
item plus one for the language switch. The page reserves space for the bar so it
|
||||
does not cover content.
|
||||
|
||||
## Themes
|
||||
|
||||
|
|
@ -30,6 +30,7 @@ that exists in more than one of them, the first theme in the list wins:
|
|||
|
||||
```yaml
|
||||
theme:
|
||||
- hackertours-40c3
|
||||
- hackertours
|
||||
- zen
|
||||
```
|
||||
|
|
@ -42,6 +43,33 @@ theme:
|
|||
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.
|
||||
- `themes/hackertours-40c3` is the design for 40C3, after the 40C3 style guide
|
||||
(PR #67): colours, the Jersey 10 and Hack fonts, square corners, and the
|
||||
40C3 logo in the footer. It contains only what differs from the generic
|
||||
design: `assets/css/_custom.css` and `assets/css/_events.css` replace the
|
||||
generic ones, `assets/css/_schedule-40c3.css` adjusts the schedule, and
|
||||
`static/site.webmanifest` has the 40C3 colours.
|
||||
|
||||
An event design adds to the page through two hooks, which are empty in
|
||||
`themes/hackertours`: `layouts/_partials/event-design/head.html` (fonts,
|
||||
`theme-color`) and `layouts/_partials/event-design/footer.html` (the event
|
||||
logo). Changes to the generic `_custom.css` or `_events.css` don't reach the
|
||||
40C3 design, which has its own copies of those files, so make them there too if
|
||||
they matter during the event.
|
||||
|
||||
### Switching back to the generic design
|
||||
|
||||
After 40C3, remove `hackertours-40c3` from `theme` in `hugo.yaml`:
|
||||
|
||||
```yaml
|
||||
theme:
|
||||
- hackertours
|
||||
- zen
|
||||
```
|
||||
|
||||
You can leave `themes/hackertours-40c3` in the repository, or delete it. To
|
||||
preview the generic design without changing `hugo.yaml`, run
|
||||
`hugo server --buildFuture --theme hackertours,zen`.
|
||||
|
||||
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/`
|
||||
|
|
|
|||
Loading…
Reference in a new issue