From 858cdd2d20575791f1ec3a088bc2ffb3c55fc0c1 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Sun, 29 Oct 2017 21:08:32 +0100 Subject: [PATCH] Nicer styling for calendars --- naucse/static/css/calendar.css | 19 ++++++++++++++----- naucse/templates/course_calendar.html | 3 +-- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/naucse/static/css/calendar.css b/naucse/static/css/calendar.css index 2879726354..2467050f41 100644 --- a/naucse/static/css/calendar.css +++ b/naucse/static/css/calendar.css @@ -1,12 +1,15 @@ -.calendar-card .card-header .year { - color: #868e96; +.calendar-heading { + margin-top: 2em; + margin-bottom: 1em; + text-align: center; } table.calendar { border-spacing: 0.25em; border-collapse: separate; - display: block; margin: 0.5em auto; + margin-left: auto; + margin-right: auto; } table.calendar tr { @@ -16,7 +19,6 @@ table.calendar tr { table.calendar td, table.calendar th { width: 14.28%; - min-width: 5em; height: 100%; background-color: rgba(0,0,0,.03); vertical-align: center; @@ -55,9 +57,16 @@ table.calendar .session-number { table.calendar .session-title { display: block; - width: 4em; text-align: center; text-overflow: '…'; white-space: nowrap; + width: 4em; overflow: hidden; } + +@media (min-width: 768px) { + table.calendar td, + table.calendar th { + min-width: 5em; + } +} diff --git a/naucse/templates/course_calendar.html b/naucse/templates/course_calendar.html index 0b629763dd..b7b3fee5fe 100644 --- a/naucse/templates/course_calendar.html +++ b/naucse/templates/course_calendar.html @@ -31,7 +31,7 @@

{{ course.subtitle }}

{% if course.start_date %} {% for year, month in months %} -

+

{{ month | monthname }} {{ year }}

@@ -63,7 +63,6 @@

{% endif %} {% if date.weekday() == 6 %}{% endif %} {% endfor %} -

{% endfor %} {% else %}