diff --git a/dogadjaji.csv b/dogadjaji.csv index e1d1896..67de1d1 100644 --- a/dogadjaji.csv +++ b/dogadjaji.csv @@ -213,7 +213,7 @@ datum, vreme, lokacija, tema, tip, link, changed 04-12-2024, 18:00, Matematički fakultet (Učionica 153) https://www.openstreetmap.org/node/12291697569, OpenGL šejderi #2: SDF renderovanje, lecture, , 09-12-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Ne treba nam (toliko) Javascript, lecture, , 10-12-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Creating Interactive Fiction with TADS (en), lecture, , -11-12-2024, 18:00, DC Krov https://www.openstreetmap.org/node/10594728522, OpenGL šejderi #3: Kompleksna analiza, lecture, , +11-12-2024, 18:00, DC Krov https://www.openstreetmap.org/node/10594728522, OpenGL šejderi #3: Kompleksna analiza, lecture, , location 16-12-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Softverski hakaton, hack, https://wiki.dmz.rs/decentrala/dogadjaji/hakaton, 17-12-2024, 18:00, DC Krov https://www.openstreetmap.org/node/10594728522, Verifiable Computing Project - Truly Open Source Hardware (en), lecture, https://forum.dmz.rs/t/plan-za-decembar-2024/815/29, 17-12-2024, 19:00, DC Krov https://www.openstreetmap.org/node/10594728522, Hardverski hakaton, hack, https://forum.dmz.rs/t/hardware-hackathon-novembar/832, diff --git a/prep.py b/prep.py index d292294..c885c12 100755 --- a/prep.py +++ b/prep.py @@ -30,16 +30,15 @@ def load_events(csv_path:str) -> list[dict]: event_location = event[2] event_title = event[3] types = event[4].split() - try: - link = event[5] - except IndexError: - link = "" + link = event[5] + changed = event[6] current_event = {"date":event_date_parsed, "time":event_time, "location": event_location, "title":event_title.strip(), "types": types, - "link": link} + "link": link, + "changed": changed.strip()} events.append(current_event) return events @@ -51,17 +50,25 @@ def build_html(events: list[dict], dayNames: list[str], typesNames: dict) -> str date = event["date"] date = dayNames[date.weekday()]+", "+str(date.day)+". "+str(date.month)+". "+str(date.year)+", " time = event["time"]+"h" + changed = event["changed"] event_html = [] - event_html.append(f"
{date} {time}
") + + timeChanged = changed == "time" or changed == "date" + locationChanged = changed == "location" + + event_html.append(f"
{date} {time}
") if event["link"] != "": event_html.append(f"
{title}
") else: event_html.append(f"
{title}
") if "https://" in location: place,link = location.split("https://") - event_html.append(f"
@{place.strip()}
") + event_html.append(f"
@{place.strip()}
") else: - event_html.append(f"
@{location.strip()}
") + event_html.append(f"
@{location.strip()}
") + + if changed != "": + event_html.append("
") if len(event["types"]) != 0: types_list = "
" diff --git a/site/styles/events.css b/site/styles/events.css index 8c681a6..c34746e 100644 --- a/site/styles/events.css +++ b/site/styles/events.css @@ -41,6 +41,10 @@ font-style: italic; } +.changed, .changed a { + color: #965959; +} + @media screen and (max-width: 1160px) { .event { flex-direction: column;