wip: programme

This commit is contained in:
mco-system 2023-04-09 21:37:50 +11:00
parent 61d16815fc
commit 6fee2c2be5
9 changed files with 55 additions and 15 deletions

View File

@ -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",

View File

@ -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;

View File

@ -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;

View File

@ -1,5 +1,5 @@
<div class="slot">
<div class="metadata">
<div class="metadata {{ slot.slot.start | date2dayclass}}">
<div class="speakers">
{% for speaker in slot.speakers %}
<div class="speaker">

View File

@ -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",

View File

@ -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;

View File

@ -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;

View File

@ -1,5 +1,5 @@
<div class="slot">
<div class="metadata">
<div class="metadata {{ slot.slot.start | date2dayclass}}">
<div class="speakers">
{% for speaker in slot.speakers %}
<div class="speaker">

View File

@ -1 +1 @@
94953
95325