From 7df0b58366f346a2bdd9b8270a85a3082e2962bf Mon Sep 17 00:00:00 2001 From: Txrpe Date: Sun, 8 Dec 2024 20:00:36 +0100 Subject: [PATCH] Load templates in prep.py instead of old pages --- prep.py | 4 ++-- template/events-en.html | 8 ++++++++ template/events-sr.html | 11 +++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 template/events-en.html create mode 100644 template/events-sr.html diff --git a/prep.py b/prep.py index d292294..f6e1c1c 100755 --- a/prep.py +++ b/prep.py @@ -141,7 +141,7 @@ for key, value_pair in TYPES_DICT.items(): # Build Serbian Events page new_events_html = build_html(new_events, DAYS_SR, sr_types) -with open("pages/sr/events.html", "r") as file: +with open("template/events-sr.html", "r") as file: page_template = ([line for line in file]) with open("pages/sr/events.html", "w") as file: @@ -149,7 +149,7 @@ with open("pages/sr/events.html", "w") as file: # Build English Events page new_events_html = build_html(new_events, DAYS_EN, en_types) -with open("pages/en/events.html", "r") as file: +with open("template/events-en.html", "r") as file: page_template = ([line for line in file]) with open("pages/en/events.html", "w") as file: diff --git a/template/events-en.html b/template/events-en.html new file mode 100644 index 0000000..0c659fd --- /dev/null +++ b/template/events-en.html @@ -0,0 +1,8 @@ +

Events

+

+ Following list contains all forthcoming events. Held events are listed in + archive. +

+
+

We also provide ical file

+
diff --git a/template/events-sr.html b/template/events-sr.html new file mode 100644 index 0000000..0fee31a --- /dev/null +++ b/template/events-sr.html @@ -0,0 +1,11 @@ +

Događaji

+

+ Naredna lista sadrži sve predstojeće događaje. Za listu održanih događaja + pogledaj arhivu. +

+
+

+ Događaje možeš učitati i sa + ical datotekom. +

+