Move just held event to old events

This commit is contained in:
Mikko Ahlroth 2023-03-19 15:27:58 +02:00
parent 25652a7f7d
commit 3f4bbc4986
3 changed files with 37 additions and 23 deletions

View file

@ -49,7 +49,17 @@
<main class="content-wrapper ">
<section id="event" class="ribbon l-box-lrg contentpadding">
<h2 class="content-head content-head-ribbon is-center">Upcoming event</h2>
<h3 class="content-subhead">Thursday&comma; 16&period;3&period;2023&comma; 18&period;00</h3>
<div class="pure-g">
<div class="l-box-lrg pure-u-1">
<p>No upcoming event has yet been announced, but stay tuned!</p>
</div>
</div>
<h2 class="content-head content-head-ribbon is-center">Past events</h2>
<h3 class="content-subhead">Thursday&comma; 16&period;3&period;2023&comma; 18&period;00</h3>
<div class="pure-g">
<div class="l-box-lrg pure-u-1 pure-u-md-1-2">
@ -87,8 +97,6 @@
</div>
</div>
<h2 class="content-head content-head-ribbon is-center">Past events</h2>
<h3 class="content-subhead">21&period;9&period;2017</h3>

View file

@ -39,30 +39,28 @@ fn base_assigns(template_cache: renderer.TemplateCache) {
fn assigns() {
common_assigns()
|> assigns.add_bool("is_index", True)
|> assigns.add_map(
"upcoming_event",
map.from_list([
#("title", assigns.String("Thursday, 16.3.2023, 18.00")),
#("file", assigns.String(event_2023_03_16.file)),
#(
"description",
assigns.String(
"
|> assigns.add_bool("upcoming_event", False)
|> assigns.add_list(
"past_events",
[
assigns.Map(map.from_list([
#("title", assigns.String("Thursday, 16.3.2023, 18.00")),
#("file", assigns.String(event_2023_03_16.file)),
#(
"description",
assigns.String(
"
<p>
TRElixir will be next held on the 16<sup>th</sup> of March, 2023, at Vincit office in central Tampere, starting at 18.00 o'clock.
</p>
",
),
),
),
#(
"talks",
assigns.List(utils.talks_to_assigns(event_2023_03_16.data().talks)),
),
]),
)
|> assigns.add_list(
"past_events",
[
#(
"talks",
assigns.List(utils.talks_to_assigns(event_2023_03_16.data().talks)),
),
])),
assigns.Map(map.from_list([
#("title", assigns.String("21.9.2017")),
#("file", assigns.String("event-2017-09-21")),

View file

@ -1,6 +1,14 @@
<section id="event" class="ribbon l-box-lrg contentpadding">
<h2 class="content-head content-head-ribbon is-center">Upcoming event</h2>
<% render index_event.html.glemp event: upcoming_event %>
<% if upcoming_event %>
<% render index_event.html.glemp event: upcoming_event %>
<% else %>
<div class="pure-g">
<div class="l-box-lrg pure-u-1">
<p>No upcoming event has yet been announced, but stay tuned!</p>
</div>
</div>
<% end %>
<h2 class="content-head content-head-ribbon is-center">Past events</h2>
<% for event in past_events %>