Skip to content

Commit

Permalink
Added subscribe functionality to calendar. (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
pantierra authored Mar 17, 2024
1 parent f6eb8ed commit 19f0186
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 43 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
53 changes: 40 additions & 13 deletions assets/css/_calendar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -50,6 +48,7 @@
background-position: 100% 50%;
}
}

.event_modal_template {
display: none;
}
Expand All @@ -71,7 +70,7 @@
padding: 1rem 0;
font-family: $font-family-brand;
font-size: 2rem;

.year,
.month {
font-weight: bold;
Expand All @@ -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 {
Expand Down Expand Up @@ -138,9 +158,11 @@
position: relative;
top: -0.16rem;
}

.end:before {
content: "";
}

.end:empty {
display: none;
}
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -296,4 +323,4 @@
display: block;
}
}
}
}
2 changes: 2 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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."
Expand Down
9 changes: 9 additions & 0 deletions content/de/calendar/subscribe.md
Original file line number Diff line number Diff line change
@@ -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`
10 changes: 10 additions & 0 deletions content/en/calendar/subscribe.md
Original file line number Diff line number Diff line change
@@ -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`

38 changes: 20 additions & 18 deletions i18n/de.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
- id: "global.about"
translation: "Über"

- id: "global.subscribe"
translation: "Abonnieren"

- id: "global.author_picture"
translation: "Bild des Autors"

Expand Down Expand Up @@ -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"
Expand All @@ -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"
- id: "on"
translation: "auf"
24 changes: 13 additions & 11 deletions i18n/en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
- id: "global.about"
translation: "About"

- id: "global.subscribe"
translation: "Subscribe"

- id: "global.author_picture"
translation: "Author's picture"

Expand Down Expand Up @@ -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"
Expand All @@ -219,7 +222,7 @@
- id: "Tue"
translation: "Tue"

- id: "Wed"
- id: "Wed"
translation: "Wed"

- id: "Thu"
Expand All @@ -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"
- id: "on"
translation: "on"
1 change: 1 addition & 0 deletions layouts/calendar/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ <h1 id="article-title">{{ .Title }}</h1>
<div class="month_wrapper">
<div class="month_header">
<div class="year">{{ $startOfMonth.Year }}</div>
<a class="subscribe" href="{{ urls.RelLangURL "" }}/calendar/subscribe">{{ i18n "global.subscribe" }}</a>
<div class="month">{{ T $startOfMonth.Month }}</div>
</div>
<div class="days_wrapper">
Expand Down

0 comments on commit 19f0186

Please sign in to comment.