From 67700f4e0b43f7a6f1751a846f115037c8b06dab Mon Sep 17 00:00:00 2001 From: rra Date: Tue, 27 Feb 2018 14:10:09 +0100 Subject: [PATCH] generator now adds classes for past & current events, current events are double width --- themes/varia/static/css/main.css | 15 ++++++++------- themes/varia/templates/index.html | 29 +++++++++++++++++------------ 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/themes/varia/static/css/main.css b/themes/varia/static/css/main.css index 07c0721b..e3f9d1e4 100644 --- a/themes/varia/static/css/main.css +++ b/themes/varia/static/css/main.css @@ -159,9 +159,7 @@ pre{ .summary p{ display: inline; } -.long-read .hentry{ - width:calc(400px + 2em); -} + .hentry{ display: inline-block; width: 200px; @@ -170,6 +168,9 @@ pre{ margin:0 2em 2em 0; padding:0; vertical-align: top; +} +.current{ + width:calc(400px + 2em); } .hentry .article-info{ width: 200px; @@ -200,11 +201,11 @@ pre{ } /* featured image */ .hentry .article-info .featured-image img{ - width:200px; + width:100%; max-height: 100%; } /* double-blocks for super important categories */ - .hentry.longread, .hentry.longread .article-info, .hentry.longread .featured-image img{ + .hentry.current, .hentry.current .article-info, .hentry.current .featured-image img{ width: calc(400px + 2em); } @@ -230,7 +231,7 @@ pre{ width: calc(100% - 275px); } .article-info .featured-image img{ - max-width: 200px; + max-width: 100%; max-height: 300px; } .post-info{ @@ -313,6 +314,6 @@ pre{ /* add a monochrome filter over past events */ .featured-image.past-event img{ /*filter:opacity(0.25);*/ - /*filter: url("/images/filter.svg#monochrome"); +/* filter: url("/images/filter.svg#monochrome"); -webkit-filter: url("/images/filter.svg#monochrome");*/ } diff --git a/themes/varia/templates/index.html b/themes/varia/templates/index.html index 4b087798..6e209366 100644 --- a/themes/varia/templates/index.html +++ b/themes/varia/templates/index.html @@ -16,25 +16,30 @@
{% for article in articles_page.object_list %} {% if article.category %} -
+ {% if article.event_start %} + {% set event_status = '' %} + {% if article.event_start < article.date.now() %} + {% set event_status = ' past' %} + {% endif %} + {% if article.event_start >= article.date.now() %} + {% set event_status = ' current' %} + {% endif %} + {% endif %} +
{% endif %}