bundle update
[minimalisti.git] / _includes / listing.html
blob7094ca02c78769469b2dc286b14385e8c184f7e0
1 {%- if paginator.posts.size > 0 -%}
2 <!--<h3 class="post-list-heading">{{ page.list_title | default: "Posts" }}</h3>-->
3 <ul class="post-list">
4 {%- for post in paginator.posts -%}
5 <li>
6 {%- assign date_format = site.date_format | default: "%-d. %-m. %Y" -%}
7 <h4>
8 <a href="{{ post.url | relative_url }}" class="post-link">
9 {{ post.title | escape }}
10 </a>
11 </h4>
12 <p class="post-meta">Vyšlo {{ post.date | date: date_format }} – Napsal {{ post.author }}</p>
13 {%- if site.show_excerpts -%}
14 {{ post.excerpt }}
15 {%- endif -%}
16 {%- if post.image -%}
17 <figure class="post-image">
18 <a href="{{ post.url | relative_url }}">
19 <img src="{{ post.image | prepend: '/images/posts/' | relative_url }}" alt="{{ post.image-alt }}">
20 </a>
21 </figure>
22 {%- endif -%}
23 <p class="post-more"><a href="{{ post.url | relative_url }}">Pokračovat ve čtení zápisku →</a></p>
24 </li>
25 {%- endfor -%}
26 </ul>
27 {%- endif -%}
29 {% if paginator.total_pages > 1 %}
30 <aside class="pagination">
31 {% if paginator.previous_page %}
32 <a href="{{ paginator.previous_page_path | relative_url }}">&laquo; Novější zápisky</a>
33 {% else %}
34 <span>&laquo; Novější zápisky</span>
35 {% endif %}
37 [{% for page in (1..paginator.total_pages) %}
38 {% if page == paginator.page %}
39 <em>{{ page }}</em>
40 {% elsif page == 1 %}
41 <a href="{{ "/" | relative_url }}">{{ page }}</a>
42 {% else %}
43 <a href="/{{ site.paginate_path | relative_url | replace: ":num", page }}">{{ page }}</a>
44 {% endif %}
45 {% if page < paginator.total_pages %}·{% endif %}
46 {% endfor %}]
48 {% if paginator.next_page %}
49 <a href="{{ paginator.next_page_path | relative_url }}">Starší zápisky &raquo;</a>
50 {% else %}
51 <span>Starší zápisky &raquo;</span>
52 {% endif %}
53 </aside>
54 {% endif %}