Use a pill with explicit links for iCal and Google Calendar.
This commit is contained in:
parent
1ff57e8c7a
commit
443ae1e05d
9 changed files with 34 additions and 40 deletions
|
|
@ -49,7 +49,7 @@ Without a data file, or without any tours in it, the shortcode renders nothing a
|
|||
|
||||
## Shortcode: Calendar entry
|
||||
|
||||
`{{< 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:
|
||||
`{{< calendar >}}` adds a small pill after a tour date with a calendar icon and two links: "iCal download", a calendar file (`.ics`) for that date, and "Google calendar", which adds the date in Google Calendar. 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,7 @@ 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. 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 `.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.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue