Browse Source

generator now adds classes for past & current events, current events are double width

transformations
rra 7 years ago
parent
commit
67700f4e0b
  1. 13
      themes/varia/static/css/main.css
  2. 27
      themes/varia/templates/index.html

13
themes/varia/static/css/main.css

@ -159,9 +159,7 @@ pre{
.summary p{ .summary p{
display: inline; display: inline;
} }
.long-read .hentry{
width:calc(400px + 2em);
}
.hentry{ .hentry{
display: inline-block; display: inline-block;
width: 200px; width: 200px;
@ -170,6 +168,9 @@ pre{
margin:0 2em 2em 0; margin:0 2em 2em 0;
padding:0; padding:0;
vertical-align: top; vertical-align: top;
}
.current{
width:calc(400px + 2em);
} }
.hentry .article-info{ .hentry .article-info{
width: 200px; width: 200px;
@ -200,11 +201,11 @@ pre{
} }
/* featured image */ /* featured image */
.hentry .article-info .featured-image img{ .hentry .article-info .featured-image img{
width:200px; width:100%;
max-height: 100%; max-height: 100%;
} }
/* double-blocks for super important categories */ /* 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); width: calc(400px + 2em);
} }
@ -230,7 +231,7 @@ pre{
width: calc(100% - 275px); width: calc(100% - 275px);
} }
.article-info .featured-image img{ .article-info .featured-image img{
max-width: 200px; max-width: 100%;
max-height: 300px; max-height: 300px;
} }
.post-info{ .post-info{

27
themes/varia/templates/index.html

@ -16,25 +16,30 @@
<div id="post-list"> <div id="post-list">
{% for article in articles_page.object_list %} {% for article in articles_page.object_list %}
{% if article.category %} {% if article.category %}
<article class="hentry {{article.category}}">
{% endif %}
<div class="article-info">
<span class="entry-title"><a href="{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></span>
<div class="event-details">
{% if article.event_start %} {% if article.event_start %}
{{ article.event_start }} {% set event_status = '' %}
{% set past = '' %}
{% if article.event_start < article.date.now() %} {% if article.event_start < article.date.now() %}
{% set past = ' past-event' %} {% set event_status = ' past' %}
{% endif %} {% endif %}
{% if article.event_start >= article.date.now() %}
{% set event_status = ' current' %}
{% endif %} {% endif %}
</div> {% endif %}
<div class="featured-image {{past}}"> <article class="hentry {{article.category}}{{event_status}}">
{% endif %}
<div class="article-info">
<span class="entry-title"><a href="{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></span>
<div class="featured-image {{event_status}}">
{% if article.featured_image %} {% if article.featured_image %}
<img src="{{ article.featured_image }}"> <img src="{{ article.featured_image }}">
{% endif %} {% endif %}
</div> </div>
{% if article.event_start %}
<div class="event-details">
{{ article.event_start }}
{% set past = '' %}
</div>
{% endif %}
</div> </div>
<div class="summary">{{ article.summary }} <div class="summary">{{ article.summary }}
<span> <span>

Loading…
Cancel
Save