Turn calendar download link into an icon, vendor font awesome for that.
Some checks failed
/ build (pull_request) Successful in 43s
/ accessibility (pull_request) Has been cancelled

This commit is contained in:
Stefan Bethke 2026-10-17 02:07:04 +02:00
commit 01054e1419
2895 changed files with 3114 additions and 16 deletions

View file

@ -49,7 +49,7 @@ Without a data file, or without any tours in it, the shortcode renders nothing a
## Shortcode: Calendar entry
`{{< calendar >}}` adds two links after a tour date: a calendar file (`.ics`) and a link that adds the date in Google Calendar. Hackertours-Admin puts it into the list of dates on each tour page:
`{{< calendar >}}` adds a calendar icon after a tour date that downloads a calendar file (`.ics`) for that date. Hackertours-Admin puts it into the list of dates on each tour page:
```markdown
* Tag 1 (27.12.) **17:30 Uhr** {{< calendar date="2026-12-27" time="17:30" duration="210" >}}
@ -62,7 +62,9 @@ Without a data file, or without any tours in it, the shortcode renders nothing a
| `duration` | no | Length in minutes. Without it, `duration` of the tour in `tours` in the schedule file is used (see "Map data in the schedule file"); without either, the calendar entry has no end time and the build logs a warning with the ID `warning-calendar-duration`. |
| `title` | no | Title of the calendar entry. Without it, the `title` of this date in the schedule file is used, then the page title. |
The `.ics` file is in the iCalendar format (RFC 5545), which Apple Calendar, Outlook, Thunderbird and most other calendar apps open directly, as does Google Calendar when importing a file. The extra Google Calendar link is there because the Google Calendar app on Android doesn't open downloaded `.ics` files.
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 app on Android can't open downloaded `.ics` files, so on Android the link adds the date in Google Calendar instead ([assets/js/calendar.js](assets/js/calendar.js) switches it when the browser reports Android). That also applies to Android users with another calendar app, such as Samsung Calendar, which could have opened the file; without JavaScript, everyone gets the `.ics` file.
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.
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`.