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,13 +13,14 @@
{{ 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">
<div class="timeslot-container">
<h3 id="{{date}}_{{loop.index}}"> <h3 id="{{date}}_{{loop.index}}">
{{ "🔴 " if event.livestream -}} {{ "🔴 " if event.livestream -}}
{{ getLocalized(event.title) }} {{ getLocalized(event.title) }}
@ -30,6 +31,7 @@
{% if event.end %} {% if event.end %}
<span class="end"> {{ event.end }}</span> <span class="end"> {{ event.end }}</span>
{% endif %} {% endif %}
<span class="full">{{ event.start }}{{ " " + event.end if event.end }}</span>
</div> </div>
<p>{{ getLocalized(event.description) }}</p> <p>{{ getLocalized(event.description) }}</p>
@ -59,13 +61,13 @@
Check-in Check-in
</a> </a>
{% endif %} {% endif %}
</div>
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
</section>
{% endfor %} {% endfor %}
{% css %} {% css %}
.timeslot { {% include "program.css" %}
display: block;
}
{% endcss %} {% endcss %}