From 7f853e3563826479fa249232ebf3dbf5d67028fa Mon Sep 17 00:00:00 2001 From: Jonathan Weth <git@jonathanweth.de> Date: Wed, 17 Feb 2021 15:33:22 +0100 Subject: [PATCH] Correct use CSS classes for week version of "My timetable" --- .../apps/chronos/templates/chronos/partials/elements.html | 2 +- .../chronos/templates/chronos/partials/supervision.html | 2 +- .../templates/chronos/partials/week_timetable.html | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/aleksis/apps/chronos/templates/chronos/partials/elements.html b/aleksis/apps/chronos/templates/chronos/partials/elements.html index d7c4fb17..a7df614d 100644 --- a/aleksis/apps/chronos/templates/chronos/partials/elements.html +++ b/aleksis/apps/chronos/templates/chronos/partials/elements.html @@ -1,4 +1,4 @@ -<div class="card lesson-card {% if week_day == active_day %} z-depth-5 active {% endif %}"> +<div class="card lesson-card {% if active_day and week_day == active_day %} z-depth-5 active {% endif %}"> <div class="card-content"> {% for element in elements %} {% if element.label_ == "lesson_period" %} diff --git a/aleksis/apps/chronos/templates/chronos/partials/supervision.html b/aleksis/apps/chronos/templates/chronos/partials/supervision.html index 10ff5188..c0364cfd 100644 --- a/aleksis/apps/chronos/templates/chronos/partials/supervision.html +++ b/aleksis/apps/chronos/templates/chronos/partials/supervision.html @@ -1,6 +1,6 @@ {% load i18n %} -<div class="card lesson-card supervision-card"> +<div class="card lesson-card supervision-card {% if active_day and week_day == active_day %} z-depth-5 active {% endif %}"> <div class="card-content"> {% if supervision %} <div style=" diff --git a/aleksis/apps/chronos/templates/chronos/partials/week_timetable.html b/aleksis/apps/chronos/templates/chronos/partials/week_timetable.html index 95ff53c3..22030da9 100644 --- a/aleksis/apps/chronos/templates/chronos/partials/week_timetable.html +++ b/aleksis/apps/chronos/templates/chronos/partials/week_timetable.html @@ -1,12 +1,12 @@ {# Week days #} <div class="row"> - <div class="col s1"> + <div class="col {% if active_day %}s1{% else %}s2{% endif %}"> </div> {# Show short weekdays on tablets #} {% for weekday in weekdays_short %} <div class="col s2 hide-on-large-only"> - <div class="card timetable-title-card"> + <div class="card timetable-title-card {% if active_day and weekday.date == active_day %} z-depth-5 {% endif %}"> <div class="card-content"> <span class="card-title"> {{ weekday.name }} @@ -28,7 +28,7 @@ {# Show long weekdays elsewere #} {% for weekday in weekdays %} <div class="col {% if weekday.date == active_day %} s3 {% else %} s2 {% endif %} hide-on-med-only"> - <div class="card timetable-title-card {% if weekday.date == active_day %} z-depth-5 {% endif %}"> + <div class="card timetable-title-card {% if active_day and weekday.date == active_day %} z-depth-5 {% endif %}"> <div class="card-content"> <span class="card-title"> {{ weekday.name }} @@ -51,7 +51,7 @@ {# Lessons #} {% for row in timetable %} <div class="row"> - <div class="col s1"> + <div class="col {% if active_day %}s1{% else %}s2{% endif %}"> {% if row.type == "period" %} {% include "chronos/partials/period_time.html" with period=row.period periods=periods %} {% endif %} -- GitLab