From 35cb6c7def1fe8f0d59fa2d0ca1f389724e5095a Mon Sep 17 00:00:00 2001 From: Lyn Fugmann Date: Fri, 27 Sep 2024 09:57:38 +0200 Subject: [PATCH] program: main css --- _includes/header.css | 1 + _includes/program.css | 72 +++++++++++++++++++++++++++++++++++++ _includes/program.njk | 82 ++++++++++++++++++++++--------------------- 3 files changed, 115 insertions(+), 40 deletions(-) create mode 100644 _includes/program.css diff --git a/_includes/header.css b/_includes/header.css index 678a8ff..2cdff53 100644 --- a/_includes/header.css +++ b/_includes/header.css @@ -1,4 +1,5 @@ header { + z-index: 1000; display: flex; position: sticky; top: 0; diff --git a/_includes/program.css b/_includes/program.css new file mode 100644 index 0000000..ca515a0 --- /dev/null +++ b/_includes/program.css @@ -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; + } +} diff --git a/_includes/program.njk b/_includes/program.njk index eafbad0..829dcae 100644 --- a/_includes/program.njk +++ b/_includes/program.njk @@ -13,59 +13,61 @@ {{ content | safe }} {% for date, events in program %} -
+

{{ toDate(date).toLocaleDateString(lang, { weekday: 'long', month: 'short', day: 'numeric' }) }}

    {% for event in events %}
  • -

    - {{ "🔴 " if event.livestream -}} - {{ getLocalized(event.title) }} -

    +
    +

    + {{ "🔴 " if event.livestream -}} + {{ getLocalized(event.title) }} +

    -
    - {{ event.start }} - {% if event.end %} - – {{ event.end }} +
    + {{ event.start }} + {% if event.end %} + – {{ event.end }} + {% endif %} + {{ event.start }}{{ " – " + event.end if event.end }} +
    + +

    {{ getLocalized(event.description) }}

    + + {% if event.annotation %} +

    + {{ getLocalized(event.annotation) }} +

    + {% endif %} + + {% if event.location %} +

    + {{ getLocalized(event.location) }} +

    + {% endif %} + + {% if event.checkin_link %} + + Check-in + {% endif %}
    - -

    {{ getLocalized(event.description) }}

    - - {% if event.annotation %} -

    - {{ getLocalized(event.annotation) }} -

    - {% endif %} - - {% if event.location %} -

    - {{ getLocalized(event.location) }} -

    - {% endif %} - - {% if event.checkin_link %} - - Check-in - - {% endif %}
  • {% endfor %}
+
{% endfor %} {% css %} -.timeslot { - display: block; -} + {% include "program.css" %} {% endcss %}