program: main css

This commit is contained in:
Lyn Fugmann 2024-09-27 09:57:38 +02:00
parent 5efbf587b1
commit 35cb6c7def
3 changed files with 115 additions and 40 deletions

View file

@ -1,4 +1,5 @@
header { header {
z-index: 1000;
display: flex; display: flex;
position: sticky; position: sticky;
top: 0; top: 0;

72
_includes/program.css Normal file
View file

@ -0,0 +1,72 @@
.program-date ul {
padding: 0;
}
.timeslot {
display: block;
border-bottom: 1px solid rgba(0,0,0,.05);
}
.timeslot h3 {
margin: 0;
font-size: 1.3em;
font-weight: 400;
}
.timeslot-container {
position: relative;
padding-top: 40px;
}
.timeslot-time {
position: absolute;
top: 0;
height: 40px;
}
.timeslot-time :is(.start, .end) {
display: none;
}
.timeslot-time .full {
font-size: 26px;
}
@media (width < 640px) {
.timeslot {
margin-bottom: 2.5rem;
}
}
@media (width >= 640px) {
.timeslot:last-child {
border-bottom: none;
}
.timeslot-container {
padding: 2rem 3rem;
margin-left: 14rem;
}
.timeslot-time {
height: auto;
width: 14rem;
left: -14rem;
text-align: right;
padding: 2rem 3rem;
}
.timeslot-time .start {
display: block;
font-size: 38px;
}
.timeslot-time .end {
display: block;
font-size: 21px;
}
.timeslot-time .full {
display: none;
}
}

View file

@ -13,59 +13,61 @@
{{ content | safe }} {{ content | safe }}
{% for date, events in program %} {% for date, events in program %}
<section> <section class="program-date">
<h2 id="{{ date }}"> <h2 id="{{ date }}">
{{ toDate(date).toLocaleDateString(lang, { weekday: 'long', month: 'short', day: 'numeric' }) }} {{ toDate(date).toLocaleDateString(lang, { weekday: 'long', month: 'short', day: 'numeric' }) }}
</h2> </h2>
<ul> <ul>
{% for event in events %} {% for event in events %}
<li class="timeslot"> <li class="timeslot">
<h3 id="{{date}}_{{loop.index}}"> <div class="timeslot-container">
{{ "🔴 " if event.livestream -}} <h3 id="{{date}}_{{loop.index}}">
{{ getLocalized(event.title) }} {{ "🔴 " if event.livestream -}}
</h3> {{ getLocalized(event.title) }}
</h3>
<div class="timeslot-time"> <div class="timeslot-time">
<span class="start">{{ event.start }}</span> <span class="start">{{ event.start }}</span>
{% if event.end %} {% if event.end %}
<span class="end"> {{ event.end }}</span> <span class="end"> {{ event.end }}</span>
{% endif %}
<span class="full">{{ event.start }}{{ " " + event.end if event.end }}</span>
</div>
<p>{{ getLocalized(event.description) }}</p>
{% if event.annotation %}
<p class="annotation">
{{ getLocalized(event.annotation) }}
</p>
{% endif %}
{% if event.location %}
<p class="location">
{{ getLocalized(event.location) }}
</p>
{% endif %}
{% if event.checkin_link %}
<a class="btn"
{% if event.checkin_link.startsWith("http") %}
href="{{ event.checkin_link }}"
target="_blank"
rel="noreferrer"
{% else %}
href="{{ event.checkin_link | locale_url }}"
{% endif %}
>
Check-in
</a>
{% endif %} {% endif %}
</div> </div>
<p>{{ getLocalized(event.description) }}</p>
{% if event.annotation %}
<p class="annotation">
{{ getLocalized(event.annotation) }}
</p>
{% endif %}
{% if event.location %}
<p class="location">
{{ getLocalized(event.location) }}
</p>
{% endif %}
{% if event.checkin_link %}
<a class="btn"
{% if event.checkin_link.startsWith("http") %}
href="{{ event.checkin_link }}"
target="_blank"
rel="noreferrer"
{% else %}
href="{{ event.checkin_link | locale_url }}"
{% endif %}
>
Check-in
</a>
{% endif %}
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
</section>
{% endfor %} {% endfor %}
{% css %} {% css %}
.timeslot { {% include "program.css" %}
display: block;
}
{% endcss %} {% endcss %}