Browse Source

using thumbnails for everything except gifs

master
rra 6 years ago
parent
commit
5ba0249003
  1. 13
      themes/varia/templates/article.html
  2. 97
      themes/varia/templates/index.html

13
themes/varia/templates/article.html

@ -30,9 +30,16 @@
</div> </div>
<div class="article-info"> <div class="article-info">
<div class="featured-image"> <div class="featured-image">
{% if article.featured_image %} {% if article.featured_image %}
<img src="{{ article.featured_image }}"> {% set thumb_size ='/thumb'%}
{% endif %} <a href="{{ article.featured_image }}">
{% if article.featured_image.endswith('.gif') %}
{% set thumb_size =''%}
{% endif %}
<img src="{{ article.featured_image | replace('images','images'+thumb_size) }}">
</a>
{% endif %}
</div> </div>
<div class="event-details"> <div class="event-details">
{% if article.event_start %} {% if article.event_start %}

97
themes/varia/templates/index.html

@ -5,75 +5,82 @@
{% for p in pages %} {% for p in pages %}
{% if p.title == 'header' %} {% if p.title == 'header' %}
<div id="title"> <div id="title">
{{ p.content }} {{ p.content }}
</div> </div>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</header> </header>
{% block content_title %} {% block content_title %}
{% endblock %} {% endblock %}
{% if articles_page.has_other_pages() %} {% if articles_page.has_other_pages() %}
{% include 'pagination.html' %} {% include 'pagination.html' %}
{% endif %} {% endif %}
<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 %}
{% if article.event_start %} {% if article.event_start %}
{% set event_status = '' %} {% set event_status = '' %}
{% set thumb_size = '/thumb' %}
{% if article.event_start < article.date.now() %} {% if article.event_start < article.date.now() %}
{% set event_status = ' past' %} {% set event_status = ' past' %}
{% endif %} {% endif %}
{% if article.event_start >= article.date.now() %} {% if article.event_start >= article.date.now() %}
{% set event_status = ' current' %} {% set event_status = ' current' %}
{% set thumb_size = '/thumb2x' %}
{% endif %} {% endif %}
{% endif %} {% endif %}
<article class="hentry {{article.category}}{{event_status}}"> <article class="hentry {{article.category}}{{event_status}}">
{% endif %} {% endif %}
<div class="article-info"> <div class="article-info">
<span class="entry-title"><a href="{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></span> <span class="entry-title"><a href="{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">{{ article.title }}</a></span>
{% if article.event_start %} {% if article.event_start %}
<div class="event-details"> <div class="event-details">
{{ article.event_start | strftime('%d %B %Y') }} {{ article.event_start | strftime('%d %B %Y') }}
{% set event_status = '' %} <!-- {% set event_status = '' %} -->
</div> </div>
{% endif %} {% endif %}
<div class="featured-image {{event_status}}"> <div class="featured-image {{event_status}}">
{% if article.featured_image %} {% if article.featured_image %}
<a href="{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}"> <a href="{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title|striptags }}">
<img src="{{ article.featured_image }}"> {% if article.featured_image.endswith('.gif') %}
</a> {% set thumb_size =''%}
{% endif %} {% endif %}
</div> <img src="{{ article.featured_image | replace('images','images'+thumb_size) }}">
</div>
<div class="summary {{ article.category }}">{{ article.summary }} </a>
<span> {% endif %}
{% if DEFAULT_LANG == 'en' %} </div>
<a href="/en/{{ article.url }}">read more</a> </div>
{% elif DEFAULT_LANG == 'nl' %}
<a href="/{{ article.url }}">lees meer</a> <div class="summary {{ article.category }}">{{ article.summary }}
{% endif %} <span>
</span> {% if DEFAULT_LANG == 'en' %}
</div> <a href="/en/{{ article.url }}">read more</a>
<div class="separator"><hr></div> {% elif DEFAULT_LANG == 'nl' %}
<div class="post-info"> <a href="/{{ article.url }}">lees meer</a>
{% if article.category %} {% endif %}
<div class="categories"> </span>
<span itemprop="articleSection"> </div>
<a href="/{{ article.category.url }}" rel="category">{{ article.category }}</a> <div class="separator"><hr></div>
</span> <div class="post-info">
</div> {% if article.category %}
{% endif %} {% if article.tags %} <div class="categories">
<div class="tags"> <span itemprop="articleSection">
Tags: {% for tag in article.tags %} <a href="/{{ article.category.url }}" rel="category">{{ article.category }}</a>
<span itemprop="keywords"> </span>
<a href="/{{ tag.url }}" rel="tag">{{ tag }}</a> </div>
</span> {% endfor %} {% endif %} {% if article.tags %}
</div> <div class="tags">
{% endif %} Tags: {% for tag in article.tags %}
</div> <span itemprop="keywords">
</article> <a href="/{{ tag.url }}" rel="tag">{{ tag }}</a>
</span> {% endfor %}
</div>
{% endif %}
</div>
</article>
{% endfor %} {% endfor %}
</div><!-- /#posts-list --> </div><!-- /#posts-list -->

Loading…
Cancel
Save