Browse Source

past events are now automagically grayed-out

master
rra 6 years ago
parent
commit
7a0d3dddfd
  1. 4
      pelicanconf.py
  2. 5
      themes/cetcat/static/css/main.css
  3. 11
      themes/cetcat/templates/index.html

4
pelicanconf.py

@ -30,7 +30,7 @@ DEFAULT_PAGINATION = 25
# Uncomment following line if you want document-relative URLs when developing
PLUGIN_PATHS = ['./plugins', './plugins-custom']
PLUGINS = ['extract_toc', 'i18n_subsites', 'summary', 'events_ics']
PLUGINS = ['dateish','extract_toc', 'i18n_subsites', 'summary', 'events_ics']
MD_EXTENSIONS = ['codehilite','extra','toc']
STATIC_PATHS = ['extra/favicon.ico', 'images', 'pdfs']
@ -61,3 +61,5 @@ PLUGIN_EVENTS = {
'default_location' : '',
'calendar_per_category': True
}
DATEISH_PROPERTIES = ['event_start', 'event_end']

5
themes/cetcat/static/css/main.css

@ -171,6 +171,9 @@ pre{
width: 100%;
margin:0 0 1em 0;
}
.long-read .hentry{
width:calc(400px + 2em);
}
.hentry{
display: inline-block;
width: 200px;
@ -273,7 +276,7 @@ pre{
}
/* add a monochrome filter over past events */
.past-event{
.past-event img{
filter:opacity(0.1);
/*filter: url("/images/filter.svg#monochrome");
-webkit-filter: url("/images/filter.svg#monochrome");*/

11
themes/cetcat/templates/index.html

@ -8,16 +8,23 @@
{% endif %}
<div id="post-list">
{% for article in articles_page.object_list %}
<article class="hentry">
{% 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 %}
{{ article.event_start }}
{% set past = '' %}
{% if article.event_start < article.date.now() %}
{% set past = ' past-event' %}
{% endif %}
{% endif %}
</div>
</div>
<div class="summary">{{ article.summary }}
<div class="summary {{past}}">{{ article.summary }}
<span>
<a href="{{ article.url }}">
{% if DEFAULT_LANG == 'en' %}

Loading…
Cancel
Save