wip: programme

This commit is contained in:
mco-system 2023-04-09 11:12:29 +11:00
parent a76b8e034a
commit 99d69e6af8
16 changed files with 373 additions and 127 deletions

View File

@ -49,7 +49,30 @@ except Exception as err:
def page_not_found(err):
return redirect(url_for('index'))
# ------------------------------------------------------------------------------
# -- Custom filters
# ------------------------------------------------------------------------------
@app.template_filter('date2dmyhm')
def date2dmyhm(date):
splitted_date = date.split("-")
splitted_time = splitted_date[2].split("T")[1].split(":")
year, month, day = (splitted_date[0],
splitted_date[1],
splitted_date[2].split("T")[0])
hour, minutes = (splitted_time[0], splitted_time[1].split("+")[0])
return f"{day}/{month} {hour}:{minutes}"
@app.template_filter('toicon')
def date2dmyhm(slot_type):
slot_types = {"Projection": "fa-solid fa-film",
"Presentation Courte": "fa-solid fa-person-chalkboard",
"DJ Set": "fa-solid fa-guitar",
"Concert": "fa-solid fa-guitar",
"Présentation": "fa-solid fa-person-chalkboard",
"Table Ronde": "fa-solid fa-users-line",
"Atelier": "fa-solid fa-screwdriver-wrench",
"Exposition": "fa-solid fa-palette"}
return slot_types[slot_type]
# ------------------------------------------------------------------------------
# -- Routes
# ------------------------------------------------------------------------------

View File

@ -13,38 +13,116 @@
align-items: flex-start;
align-content: flex-start;
margin: 1em;
border-radius: 5px;
border-color: var(--alt-color);
background-color: var(--main-color);
border-style: solid;
border-width: 1px;
font-size: 2em;
width: 25em;
width: 22em;
}
.metadata, .data {
display: flex;
flex-direction: column;
justify-content: start;
align-items: flex-start;
align-content: flex-start;
padding: 0.5em;
border-style: solid;
height: 13em;
}
.metadata {
display: flex;
flex-direction: column;
justify-content: start;
align-items: flex-start;
align-content: flex-start;
width: 7.333em;
border-radius: 10px 0 0 10px;
background-color: var(--alt-bg-color);
color: var(--main-color);
border-color: var(--main-color);
font-family: pfdintextcompprothin;
border-width: 1px 0 0px 1px;
}
.data {
display: flex;
flex-direction: column;
justify-content: start;
align-items: flex-start;
align-content: flex-start;
margin-left: 2em;
width: 14.666em;
background-color: var(--main-color);
color: var(--alt-main-color);
border-color: var(--main-color);
border-width: 1px 1px 1px 0;
font-family: pfdintextcompprothin;
overflow-y: auto;
}
.speaker_avatar {
height: 50px;
width: 50px;
.metadata > .button {
font-size: 1em;
margin-bottom: 1em;
}
.data_img {
height: 50px;
width: 50px;
.title {
font-family: pfdintextcomppromedium;
font-weight: 250;
margin-bottom: 0.5em;
}
.speakers {
font-family: pfdintextcompprothin;
font-weight: 250;
margin-bottom: 0.5em;
}
.speaker_details {
position: relative;
display: inline-block;
}
.speaker_details .details {
visibility: hidden;
background-color: var(--main-color);
color: var(--alt-main-color);
text-align: center;
border-radius: 6px;
padding: 5px 0;
position: absolute;
z-index: 1;
bottom: 0;
left: 0;
opacity: 0;
transform: translateX(2em) translateY(50%);
transition: opacity 1s;
}
.speaker_details .details::after {
content: "";
position: relative;
margin-left: -5px;
border-width: 5px;
}
.speaker_details:hover .details {
visibility: visible;
opacity: 1;
font-size: 0.7em;
padding: 0.2em;
}
.speaker_details > .details > img, .data > .abstract > img {
max-width: 200px;
max-height: 200px;
float: left;
margin: 0 0.5em 0.5em 0;
}
.speaker_details > .details > p {
text-align: justify;
font-size: 0.5em;
}
.data > .abstract > p {
text-align: justify;
font-size: 1em;
}
.data > .details {
font-family: pfdintextcomppromedium;
font-weight: 250;
margin-bottom: 0.5em;
}
.data > .resources > .resource > a {
color: var(--main-bg-color);
}

View File

@ -10,8 +10,10 @@
:root {
--main-bg-color: #e6007e;
--alt-bg-color: #E59730;
--alt2-bg-color: #9EBF43;
--main-color: #ffffff;
--alt-color: #1A000D;
--alt-main-color: #1A000D;
}
* {
@ -30,7 +32,7 @@ body {
}
.black {
color: var(--alt-color);
color: var(--alt-main-color);
}
.thin {
@ -56,18 +58,10 @@ body {
width: inherit;
}
.cursor {
width: 0;
height: 0;
border-left: 0.75em solid transparent;
border-right: 0.75em solid transparent;
border-bottom: 0.75em solid var(--alt-color);
}
a {
font-family: pfdintextcomppromedium;
font-weight: 250;
color: var(--alt-color);
color: var(--alt-main-color);
transition-property: color;
transition-duration: 1s;
text-decoration: wavy;
@ -137,10 +131,6 @@ a:hover {
width: 100vw;
}
#cursorbar {
margin-top: 1em;
}
#blah {
margin: 2em 0 2em;
font-size: 2em;

View File

@ -1,12 +1,13 @@
.tooltip {
.tooltip, .planning_tooltip {
position: relative;
display: inline-block;
}
.tooltip .tooltiptext {
visibility: hidden;
background-color: var(--main-color);
color: var(--alt-color);
color: var(--alt-main-color);
text-align: center;
border-radius: 6px;
padding: 5px 0;
@ -19,7 +20,7 @@
transition: opacity 1s;
}
.tooltip .tooltiptext::after {
.tooltip .tooltiptext::after, .planning_tooltip .planning_tooltiptext::after {
content: "";
position: absolute;
top: 100%;
@ -28,9 +29,25 @@
border-width: 5px;
}
.tooltip:hover .tooltiptext {
.tooltip:hover .tooltiptext, .planning_tooltip:hover .planning_tooltiptext {
visibility: visible;
opacity: 1;
font-size: 0.7em;
padding: 0.2em;
}
.planning_tooltip .planning_tooltiptext {
visibility: hidden;
background-color: var(--main-color);
color: var(--alt-main-color);
text-align: center;
border-radius: 6px;
padding: 5px 0;
position: absolute;
z-index: 1;
bottom: 0;
left: 0;
opacity: 0;
transform: translateX(2em) translateY(-3em);
transition: opacity 1s;
}

View File

@ -68,9 +68,9 @@
<span class="tooltiptext thin">Expositions</span>
</i>
<i class="button tooltip black fa-solid fa-person-chalkboard"
title="Conférences"
alt="Conférences">
<span class="tooltiptext thin">Conférences</span>
title="Présentation"
alt="Présentation">
<span class="tooltiptext thin">Présentation</span>
</i>
</div>
</body>

View File

@ -9,33 +9,51 @@
{% for slot in slots %}
<div class="slot">
<div class="metadata">
<div class="title">{{slot["title"]}}</div>
<i class="button planning_tooltip black {{slot['submission_type']['fr'] | toicon }}"
title="{{slot['submission_type']['fr']}}"
alt="{{slot['submission_type']['fr']}}">
<span class="planning_tooltiptext thin">{{slot['submission_type']['fr']}}</span><span class="title white">{{slot["title"]}}</span>
</i>
<div class="speakers">
{% for speaker in slot["speakers"] %}
<div class="speaker">
<div class="name">{{speaker["name"]}}</div>
<img class="speaker_avatar" src="{{speaker['avatar']}}"/>
<div class="speaker_biography">{{speaker["biography"]}}</div>
</div>
{{speaker["name"] | title}}
<i class="speaker_details fa-solid fa-user">
{% if speaker['avatar'] or speaker["biography"] %}
<div class="details">
{% if speaker['avatar'] %}
<img src="{{speaker['avatar']}}" />
{% endif %}
{% if speaker['biography'] %}
<p class="thin">{{speaker["biography"]}}</p>
{% endif %}
</div>
{% endif %}
</i> {{ ", " if not loop.last else "" }}
{% endfor %}
</div>
<div class="type">{{slot["submission_type"]["fr"]}}</div>
<div class="start">{{slot["slot"]["start"]}}</div>
<div class="duration">{{slot["duration"]}}</div>
<div class="room">{{slot["slot"]["room"]["fr"]}}</div>
<div class="locale">{{slot["content_locale"]}}</div>
</div>
<div class="data">
<div class="abstract">{{slot["abstract"]}}</div>
<div class="details">
<div class="room">{{slot["slot"]["room"]["fr"]}}</div>
<div class="start">{{slot["slot"]["start"] | date2dmyhm}} - {{slot["duration"]}} minutes ({{slot["content_locale"] | capitalize}})</div>
</div>
<div class="abstract">
{% if slot['image'] %}
<img class="data_img" src="{{slot['image']}}"/>
{% endif %}
<p>{{slot["abstract"]}}</p>
</div>
<div class="description">{{slot["description"]}}</div>
<img class="data_img" src="{{slot['image']}}"/>
{% if slot["resources"] %}
<div class="resources">
<h3>Ressources</h3>
{% for resource in slot["resources"] %}
<div class="resources">
<a href="{{resource['resource']}}">{{resource["description"]}}</a>
<div class="resource">
<a class="thin" href="{{resource['resource']}}">{{resource["description"]}}</a>
</div>
{% endfor %}
</div>
{% endif %}
</div>
</div>
{% endfor %}

View File

@ -23,7 +23,6 @@ install_requires =
gunicorn
pyYAML
requests
pandas
[options.packages.find]
where = src

View File

@ -5,8 +5,6 @@ Summary: "THSF website"
Home-page: https://git.tetalab.org/tetalab/thsf.net
Author: Doug Le Tough
Author-email: doug@redatomik.org
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
@ -50,5 +48,3 @@ Le processus de publication est le suivant:
Aucun contrôle de qualité ou de tests n'est mis en place. Vous êtes seuls sur le coup.
Soyez responsable et **testez vos modifications sur votre machine locale avant de fusionner votre branche** sur la branche `master`.

View File

@ -2,7 +2,6 @@ flask
gunicorn
pyYAML
requests
pandas
[dev]
twine

View File

@ -49,7 +49,30 @@ except Exception as err:
def page_not_found(err):
return redirect(url_for('index'))
# ------------------------------------------------------------------------------
# -- Custom filters
# ------------------------------------------------------------------------------
@app.template_filter('date2dmyhm')
def date2dmyhm(date):
splitted_date = date.split("-")
splitted_time = splitted_date[2].split("T")[1].split(":")
year, month, day = (splitted_date[0],
splitted_date[1],
splitted_date[2].split("T")[0])
hour, minutes = (splitted_time[0], splitted_time[1].split("+")[0])
return f"{day}/{month} {hour}:{minutes}"
@app.template_filter('toicon')
def date2dmyhm(slot_type):
slot_types = {"Projection": "fa-solid fa-film",
"Presentation Courte": "fa-solid fa-person-chalkboard",
"DJ Set": "fa-solid fa-guitar",
"Concert": "fa-solid fa-guitar",
"Présentation": "fa-solid fa-person-chalkboard",
"Table Ronde": "fa-solid fa-users-line",
"Atelier": "fa-solid fa-screwdriver-wrench",
"Exposition": "fa-solid fa-palette"}
return slot_types[slot_type]
# ------------------------------------------------------------------------------
# -- Routes
# ------------------------------------------------------------------------------

View File

@ -13,38 +13,116 @@
align-items: flex-start;
align-content: flex-start;
margin: 1em;
border-radius: 5px;
border-color: var(--alt-color);
background-color: var(--main-color);
border-style: solid;
border-width: 1px;
font-size: 2em;
width: 25em;
width: 22em;
}
.metadata, .data {
display: flex;
flex-direction: column;
justify-content: start;
align-items: flex-start;
align-content: flex-start;
padding: 0.5em;
border-style: solid;
height: 13em;
}
.metadata {
display: flex;
flex-direction: column;
justify-content: start;
align-items: flex-start;
align-content: flex-start;
width: 7.333em;
border-radius: 10px 0 0 10px;
background-color: var(--alt-bg-color);
color: var(--main-color);
border-color: var(--main-color);
font-family: pfdintextcompprothin;
border-width: 1px 0 0px 1px;
}
.data {
display: flex;
flex-direction: column;
justify-content: start;
align-items: flex-start;
align-content: flex-start;
margin-left: 2em;
width: 14.666em;
background-color: var(--main-color);
color: var(--alt-main-color);
border-color: var(--main-color);
border-width: 1px 1px 1px 0;
font-family: pfdintextcompprothin;
overflow-y: auto;
}
.speaker_avatar {
height: 50px;
width: 50px;
.metadata > .button {
font-size: 1em;
margin-bottom: 1em;
}
.data_img {
height: 50px;
width: 50px;
.title {
font-family: pfdintextcomppromedium;
font-weight: 250;
margin-bottom: 0.5em;
}
.speakers {
font-family: pfdintextcompprothin;
font-weight: 250;
margin-bottom: 0.5em;
}
.speaker_details {
position: relative;
display: inline-block;
}
.speaker_details .details {
visibility: hidden;
background-color: var(--main-color);
color: var(--alt-main-color);
text-align: center;
border-radius: 6px;
padding: 5px 0;
position: absolute;
z-index: 1;
bottom: 0;
left: 0;
opacity: 0;
transform: translateX(2em) translateY(50%);
transition: opacity 1s;
}
.speaker_details .details::after {
content: "";
position: relative;
margin-left: -5px;
border-width: 5px;
}
.speaker_details:hover .details {
visibility: visible;
opacity: 1;
font-size: 0.7em;
padding: 0.2em;
}
.speaker_details > .details > img, .data > .abstract > img {
max-width: 200px;
max-height: 200px;
float: left;
margin: 0 0.5em 0.5em 0;
}
.speaker_details > .details > p {
text-align: justify;
font-size: 0.5em;
}
.data > .abstract > p {
text-align: justify;
font-size: 1em;
}
.data > .details {
font-family: pfdintextcomppromedium;
font-weight: 250;
margin-bottom: 0.5em;
}
.data > .resources > .resource > a {
color: var(--main-bg-color);
}

View File

@ -10,8 +10,10 @@
:root {
--main-bg-color: #e6007e;
--alt-bg-color: #E59730;
--alt2-bg-color: #9EBF43;
--main-color: #ffffff;
--alt-color: #1A000D;
--alt-main-color: #1A000D;
}
* {
@ -30,7 +32,7 @@ body {
}
.black {
color: var(--alt-color);
color: var(--alt-main-color);
}
.thin {
@ -56,18 +58,10 @@ body {
width: inherit;
}
.cursor {
width: 0;
height: 0;
border-left: 0.75em solid transparent;
border-right: 0.75em solid transparent;
border-bottom: 0.75em solid var(--alt-color);
}
a {
font-family: pfdintextcomppromedium;
font-weight: 250;
color: var(--alt-color);
color: var(--alt-main-color);
transition-property: color;
transition-duration: 1s;
text-decoration: wavy;
@ -137,10 +131,6 @@ a:hover {
width: 100vw;
}
#cursorbar {
margin-top: 1em;
}
#blah {
margin: 2em 0 2em;
font-size: 2em;

View File

@ -1,12 +1,13 @@
.tooltip {
.tooltip, .planning_tooltip {
position: relative;
display: inline-block;
}
.tooltip .tooltiptext {
visibility: hidden;
background-color: var(--main-color);
color: var(--alt-color);
color: var(--alt-main-color);
text-align: center;
border-radius: 6px;
padding: 5px 0;
@ -19,7 +20,7 @@
transition: opacity 1s;
}
.tooltip .tooltiptext::after {
.tooltip .tooltiptext::after, .planning_tooltip .planning_tooltiptext::after {
content: "";
position: absolute;
top: 100%;
@ -28,9 +29,25 @@
border-width: 5px;
}
.tooltip:hover .tooltiptext {
.tooltip:hover .tooltiptext, .planning_tooltip:hover .planning_tooltiptext {
visibility: visible;
opacity: 1;
font-size: 0.7em;
padding: 0.2em;
}
.planning_tooltip .planning_tooltiptext {
visibility: hidden;
background-color: var(--main-color);
color: var(--alt-main-color);
text-align: center;
border-radius: 6px;
padding: 5px 0;
position: absolute;
z-index: 1;
bottom: 0;
left: 0;
opacity: 0;
transform: translateX(2em) translateY(-3em);
transition: opacity 1s;
}

View File

@ -68,9 +68,9 @@
<span class="tooltiptext thin">Expositions</span>
</i>
<i class="button tooltip black fa-solid fa-person-chalkboard"
title="Conférences"
alt="Conférences">
<span class="tooltiptext thin">Conférences</span>
title="Présentation"
alt="Présentation">
<span class="tooltiptext thin">Présentation</span>
</i>
</div>
</body>

View File

@ -9,33 +9,51 @@
{% for slot in slots %}
<div class="slot">
<div class="metadata">
<div class="title">{{slot["title"]}}</div>
<i class="button planning_tooltip black {{slot['submission_type']['fr'] | toicon }}"
title="{{slot['submission_type']['fr']}}"
alt="{{slot['submission_type']['fr']}}">
<span class="planning_tooltiptext thin">{{slot['submission_type']['fr']}}</span><span class="title white">{{slot["title"]}}</span>
</i>
<div class="speakers">
{% for speaker in slot["speakers"] %}
<div class="speaker">
<div class="name">{{speaker["name"]}}</div>
<img class="speaker_avatar" src="{{speaker['avatar']}}"/>
<div class="speaker_biography">{{speaker["biography"]}}</div>
</div>
{{speaker["name"] | title}}
<i class="speaker_details fa-solid fa-user">
{% if speaker['avatar'] or speaker["biography"] %}
<div class="details">
{% if speaker['avatar'] %}
<img src="{{speaker['avatar']}}" />
{% endif %}
{% if speaker['biography'] %}
<p class="thin">{{speaker["biography"]}}</p>
{% endif %}
</div>
{% endif %}
</i> {{ ", " if not loop.last else "" }}
{% endfor %}
</div>
<div class="type">{{slot["submission_type"]["fr"]}}</div>
<div class="start">{{slot["slot"]["start"]}}</div>
<div class="duration">{{slot["duration"]}}</div>
<div class="room">{{slot["slot"]["room"]["fr"]}}</div>
<div class="locale">{{slot["content_locale"]}}</div>
</div>
<div class="data">
<div class="abstract">{{slot["abstract"]}}</div>
<div class="details">
<div class="room">{{slot["slot"]["room"]["fr"]}}</div>
<div class="start">{{slot["slot"]["start"] | date2dmyhm}} - {{slot["duration"]}} minutes ({{slot["content_locale"] | capitalize}})</div>
</div>
<div class="abstract">
{% if slot['image'] %}
<img class="data_img" src="{{slot['image']}}"/>
{% endif %}
<p>{{slot["abstract"]}}</p>
</div>
<div class="description">{{slot["description"]}}</div>
<img class="data_img" src="{{slot['image']}}"/>
{% if slot["resources"] %}
<div class="resources">
<h3>Ressources</h3>
{% for resource in slot["resources"] %}
<div class="resources">
<a href="{{resource['resource']}}">{{resource["description"]}}</a>
<div class="resource">
<a class="thin" href="{{resource['resource']}}">{{resource["description"]}}</a>
</div>
{% endfor %}
</div>
{% endif %}
</div>
</div>
{% endfor %}

View File

@ -1 +1 @@
3629
81518