From 50382378e451959a2a4aba67a977ef472001b1fb Mon Sep 17 00:00:00 2001 From: Felix Delattre Date: Tue, 5 Mar 2024 15:00:22 +0000 Subject: [PATCH] Added subscribe functionality to calendar. --- README.md | 2 +- assets/css/_calendar.scss | 53 ++++++++++++++++++++++++-------- config.toml | 2 ++ content/de/calendar/subscribe.md | 9 ++++++ content/en/calendar/subscribe.md | 10 ++++++ i18n/de.yaml | 38 ++++++++++++----------- i18n/en.yaml | 24 ++++++++------- layouts/calendar/list.html | 1 + 8 files changed, 96 insertions(+), 43 deletions(-) create mode 100644 content/de/calendar/subscribe.md create mode 100644 content/en/calendar/subscribe.md diff --git a/README.md b/README.md index 5ef8fb4..27fb487 100644 --- a/README.md +++ b/README.md @@ -50,4 +50,4 @@ Production: https://www.x-hain.de [![status-badge](https://ci.x-hain.de/api/bad ## Calendar -The calendar is managed by [Nextcloud](https://files.x-hain.de/apps/calendar/dayGridMonth/now). For your convenience (old) data is available in `data/calendar.json`. If you want to update the information you can run `python3 download_calendar.py`. +The calendar is managed by [Nextcloud](https://files.x-hain.de/apps/calendar/dayGridMonth/now). diff --git a/assets/css/_calendar.scss b/assets/css/_calendar.scss index eb54adb..fadf4c3 100644 --- a/assets/css/_calendar.scss +++ b/assets/css/_calendar.scss @@ -12,17 +12,15 @@ z-index: -2; width: 100%; height: 100%; - background: linear-gradient( - 60deg, - hsl(224, 85%, 66%), - hsl(269, 85%, 66%), - hsl(314, 85%, 66%), - hsl(359, 85%, 66%), - hsl(44, 85%, 66%), - hsl(89, 85%, 66%), - hsl(134, 85%, 66%), - hsl(179, 85%, 66%) - ); + background: linear-gradient(60deg, + hsl(224, 85%, 66%), + hsl(269, 85%, 66%), + hsl(314, 85%, 66%), + hsl(359, 85%, 66%), + hsl(44, 85%, 66%), + hsl(89, 85%, 66%), + hsl(134, 85%, 66%), + hsl(179, 85%, 66%)); background-size: 300% 300%; background-position: 0 50%; border-radius: calc(2 * var(--border-width)); @@ -50,6 +48,7 @@ background-position: 100% 50%; } } + .event_modal_template { display: none; } @@ -71,7 +70,7 @@ padding: 1rem 0; font-family: $font-family-brand; font-size: 2rem; - + .year, .month { font-weight: bold; @@ -82,6 +81,27 @@ float: right; font-size: 2.5rem; } + + .subscribe { + float: right; + margin-top: 0.3rem; + margin-right: 0.6rem; + padding: 0px 8px; + background-color: #000; + border-radius: 0.3rem; + + color: grey; + font-size: 0.6rem; + font-weight: bold; + text-decoration: none; + + &:hover { + color: #000; + background-color: $link-color; + } + } + + } .day { @@ -138,9 +158,11 @@ position: relative; top: -0.16rem; } + .end:before { content: " – "; } + .end:empty { display: none; } @@ -189,18 +211,23 @@ .day-2:first-child { grid-column: 2; } + .day-3:first-child { grid-column: 3; } + .day-4:first-child { grid-column: 4; } + .day-5:first-child { grid-column: 5; } + .day-6:first-child { grid-column: 6; } + .day-6:first-child { grid-column: 7; } @@ -296,4 +323,4 @@ display: block; } } -} \ No newline at end of file +} diff --git a/config.toml b/config.toml index 1942918..24743b3 100755 --- a/config.toml +++ b/config.toml @@ -43,6 +43,7 @@ paginate = 6 weight = 1 languageName = "Deutsch" calendarName = "Kalender" +calendarSubscribe = "Abbonieren" contentDir = "content/de" title = "xHain hack+makespace" defaultDescription = "Hack- & Makespace im Herzen von Friedrichshain, Bastelstube für Technikinteressierte + Raum für Netzpolitisches" @@ -51,6 +52,7 @@ defaultDescription = "Hack- & Makespace im Herzen von Friedrichshain, Bastelstub weight = 2 languageName = "English" calendarName = "Calendar" +calendarSubscribe = "Subscribe" contentDir = "content/en" title = "xHain hack+makespace" defaultDescription = "Hack and make space in the heart of Friedrichshain, tinkering room for people interested in technology + space for net politics." diff --git a/content/de/calendar/subscribe.md b/content/de/calendar/subscribe.md new file mode 100644 index 0000000..0a9e988 --- /dev/null +++ b/content/de/calendar/subscribe.md @@ -0,0 +1,9 @@ +--- +title: Kalender abonnieren +date: 2024-03-05 +draft: false +--- + +Integriere den xHain-Veranstaltungskalender in deine bevorzugte Kalender-App oder -Programm mittels CalDAV. Füge dafür einfach einen neuen Kalender in deiner Anwendung hinzu und kopiere die folgenden URL dort hinein: + +`https://files.x-hain.de/remote.php/dav/public-calendars/Yi63cicwgDnjaBHR` diff --git a/content/en/calendar/subscribe.md b/content/en/calendar/subscribe.md new file mode 100644 index 0000000..af9cbc4 --- /dev/null +++ b/content/en/calendar/subscribe.md @@ -0,0 +1,10 @@ +--- +title: Subscribe to our calendar +date: 2024-03-05 +draft: false +--- + +Easily add the xHain event calendar to your preferred calendar app or programm on any device. Simply use CalDAV to integrate our events. To do so, add a new calendar in your application and copy and input this url: + +`https://files.x-hain.de/remote.php/dav/public-calendars/Yi63cicwgDnjaBHR` + diff --git a/i18n/de.yaml b/i18n/de.yaml index 958bea7..9883730 100644 --- a/i18n/de.yaml +++ b/i18n/de.yaml @@ -23,6 +23,9 @@ - id: "global.about" translation: "Über" +- id: "global.subscribe" + translation: "Abonnieren" + - id: "global.author_picture" translation: "Bild des Autors" @@ -198,13 +201,13 @@ - id: "Tuesday" translation: "Dienstag" -- id: "Wednesday" +- id: "Wednesday" translation: "Mittwoch" -- id: "Thursday" - translation: "Donnerstag" +- id: "Thursday" + translation: "Donnerstag" -- id: "Friday" +- id: "Friday" translation: "Freitag" - id: "Saturday" @@ -214,45 +217,44 @@ translation: "Sonntag" - id: "Mon" - translation: "Mo." + translation: "Mo" - id: "Tue" - translation: "Di." + translation: "Di" -- id: "Wed" - translation: "Mi." +- id: "Wed" + translation: "Mi" - id: "Thu" - translation: "Do." + translation: "Do" - id: "Fri" - translation: "Fr." + translation: "Fr" - id: "Sat" - translation: "Sa." + translation: "Sa" - id: "Sun" - translation: "So." + translation: "So" # Recent Post - id: "continueReading" translation: "Weiterlesen" - # Menu Language - id: "language" translation: "Sprache" -- id: "english" +- id: "english" translation: "Englisch" - id: "german" translation: "Deutsch" -# Twitter -- id: "visit" +# Twitter +- id: "visit" translation: "Besuche" -- id: "on" - translation: "auf" \ No newline at end of file +- id: "on" + translation: "auf" diff --git a/i18n/en.yaml b/i18n/en.yaml index 79bada9..0230d52 100644 --- a/i18n/en.yaml +++ b/i18n/en.yaml @@ -23,6 +23,9 @@ - id: "global.about" translation: "About" +- id: "global.subscribe" + translation: "Subscribe" + - id: "global.author_picture" translation: "Author's picture" @@ -198,13 +201,13 @@ - id: "Tuesday" translation: "Tuesday" -- id: "Wednesday" +- id: "Wednesday" translation: "Wednesday" -- id: "Thursday" +- id: "Thursday" translation: "Thursday" -- id: "Friday" +- id: "Friday" translation: "Friday" - id: "Saturday" @@ -219,7 +222,7 @@ - id: "Tue" translation: "Tue" -- id: "Wed" +- id: "Wed" translation: "Wed" - id: "Thu" @@ -239,22 +242,21 @@ - id: "continueReading" translation: "Continue Reading" - # Menu Language - id: "language" translation: "Language" -- id: "english" +- id: "english" translation: "English" - id: "german" translation: "German" -# Twitter -# Twitter -- id: "visit" +# Twitter +# Twitter +- id: "visit" translation: "Visit" -- id: "on" - translation: "on" \ No newline at end of file +- id: "on" + translation: "on" diff --git a/layouts/calendar/list.html b/layouts/calendar/list.html index a097a65..0723f3f 100644 --- a/layouts/calendar/list.html +++ b/layouts/calendar/list.html @@ -39,6 +39,7 @@

{{ .Title }}

{{ $startOfMonth.Year }}
+
{{ T $startOfMonth.Month }}