forked from pirati-web/chrudim.pirati.cz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblog.html
41 lines (32 loc) · 957 Bytes
/
blog.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
layout: eu
wide: true
title: Blog
category: program
---
{% assign blogs = (site.posts) %}
{% assign modulo = 0 %}
{% for blog in site.categories.blog reverse %}
{% if modulo == 0 or forloop.first %}
<div class="row blog">
{% endif %}
<div class="medium-6 columns{% if forloop.last and modulo == '0' %} end{% endif %}">
<img src="{{ blog.image }}"/>
<h2><a href="{{ blog.url }}">{{ blog.title }}</a></h2>
{% if blog.autor %} <span class="radius label">{{ blog.autor}}</span> {% endif %}
{% if blog.date %} <span class="radius secondary label">{{ blog.date | date: "%d.%m.%Y" }}</span> {% endif %}
{% if blog.excerpt %}{{ blog.excerpt | truncatewords: 30 }}
{% else %}
{{ blog.content | strip_html | truncatewords: 30 }}
{% endif %}
<a href="{{ blog.url }}">více</a>.
</div>
{% if modulo == 1 or forloop.last %}
</div>
{% endif %}
{% if modulo == 0 %}
{% assign modulo = 1 %}
{% else %}
{% assign modulo = 0 %}
{% endif %}
{% endfor %}