forked from pirati-cz/webpraha
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblog.html
39 lines (30 loc) · 797 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
---
layout: eu
wide: true
title: Blog
category: program
---
{% assign blogs = (site.posts | where: "category", "blog" | sort: 'date') %}
{% assign modulo = 0 %}
{% for blog in blogs reversed %}
{% 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.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 %}