From 6fee2c2be56149f63fa0d6a4f7d3e652405984da Mon Sep 17 00:00:00 2001 From: mco-system Date: Sun, 9 Apr 2023 21:37:50 +1100 Subject: [PATCH] wip: programme --- build/lib/thsf/__init__.py | 14 ++++++++++---- build/lib/thsf/static/css/planning.css | 2 -- build/lib/thsf/static/css/style.css | 16 ++++++++++++++++ build/lib/thsf/templates/slot.html | 2 +- src/thsf/__init__.py | 14 ++++++++++---- src/thsf/static/css/planning.css | 2 -- src/thsf/static/css/style.css | 16 ++++++++++++++++ src/thsf/templates/slot.html | 2 +- thsf.pid | 2 +- 9 files changed, 55 insertions(+), 15 deletions(-) diff --git a/build/lib/thsf/__init__.py b/build/lib/thsf/__init__.py index 690c0a5..5f29f23 100644 --- a/build/lib/thsf/__init__.py +++ b/build/lib/thsf/__init__.py @@ -52,10 +52,6 @@ except Exception as err: def page_not_found(err): return redirect(url_for('index')) -def get_days(): - days = ["26/05", "27/05", "28/05"] - return [{"title": f"Jour #{index+1}", "date": day} for index, day in enumerate(days)] - # ------------------------------------------------------------------------------ # -- Custom filters # ------------------------------------------------------------------------------ @@ -69,6 +65,16 @@ def date2dmyhm(date): hour, minutes = (splitted_time[0], splitted_time[1].split("+")[0]) return f"{day}/{month} {hour}:{minutes}" +@app.template_filter('date2dayclass') +def date2dayclass(date): + classes = {"26/05": "bg1", + "27/05": "bg2", + "28/05": "bg3",} + splitted_date = date.split("-") + month, day = (splitted_date[1], + splitted_date[2].split("T")[0]) + return classes[f"{day}/{month}"] + @app.template_filter('toicon') def date2dmyhm(slot_type): slot_types = {"Projection": "fa-solid fa-film", diff --git a/build/lib/thsf/static/css/planning.css b/build/lib/thsf/static/css/planning.css index a574e80..00daac7 100644 --- a/build/lib/thsf/static/css/planning.css +++ b/build/lib/thsf/static/css/planning.css @@ -37,9 +37,7 @@ .metadata { width: 7.333em; border-radius: 10px 0 0 10px; - background-color: var(--alt-bg-color); color: var(--main-color); - border-color: var(--alt-bg-color); font-family: pfdintextcompprothin; border-width: 1px 0 0px 1px; text-align: left; diff --git a/build/lib/thsf/static/css/style.css b/build/lib/thsf/static/css/style.css index 73e0291..8ac17e1 100644 --- a/build/lib/thsf/static/css/style.css +++ b/build/lib/thsf/static/css/style.css @@ -12,6 +12,7 @@ --main-bg-color: #e6007e; --alt-bg-color: #E59730; --alt2-bg-color: #9EBF43; + --alt3-bg-color: #3096E5; --main-color: #ffffff; --alt-main-color: #1A000D; } @@ -59,6 +60,21 @@ body { width: inherit; } +.bg1 { + background-color: var(--alt-bg-color); + border-color: var(--alt-bg-color); +} + +.bg2 { + background-color: var(--alt2-bg-color); + border-color: var(--alt2-bg-color); +} + +.bg3 { + background-color: var(--alt3-bg-color); + border-color: var(--alt3-bg-color); +} + a { font-family: pfdintextcomppromedium; font-weight: 250; diff --git a/build/lib/thsf/templates/slot.html b/build/lib/thsf/templates/slot.html index ba0b287..b87bc73 100644 --- a/build/lib/thsf/templates/slot.html +++ b/build/lib/thsf/templates/slot.html @@ -1,5 +1,5 @@
-