-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
68 lines (62 loc) · 2.76 KB
/
index.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
layout: main
---
{% for post in paginator.posts %}
<article class="blog-posting" itemtype="http://schema.org/BlogPosting" itemscope>
<div class="row">
<div class="small-12 medium-4 columns imagebox">
<a href="{{ post.url | relative_url }}">
<img class="thumbnail blog-posting__media" src="{{ post.img | prepend: 'assets/img/posts/' | relative_url }}" alt="{{post.title}}">
</a>
</div>
<div class="small-12 medium-8 columns">
<div itemprop="author" itemtype="http://schema.org/Person" itemscope>
<meta itemprop="name" content="{{ post.author }}">
</div>
<h1 class="blog-posting__headline t-h4"><a href="{{ post.url | relative_url }}" itemprop="headline">{{ post.title }}</a></h1>
<p class="blog-posting__excerpt">
<meta itemprop="datePublished" content="{{ post.date | date_to_xmlschema }}" />
<meta itemprop="dateModified" content="{% if post.modified_time %}{{ post.modified_time | date_to_xmlschema }}{% else %}{{ post.date | date_to_xmlschema }}{% endif %}" />
<link itemprop="mainEntityOfPage" href="{{ post.url }}" />
<i class="blog-posting__pubdate">{{ post.date | date:"%d. %m. %Y" }}</i> — <span itemprop="description">{{ post.excerpt | truncatewords: 33 | strip_html }}</span>
</p>
<p>
<a class="blog-posting__readmore" href="{{ post.url | relative_url }}">Číst dále »</a>
</p>
</div>
</div>
</article>
{% endfor %}
<nav aria-label="Pagination">
<ul class="pagination text-center" role="navigation" aria-label="Pagination" itemscope itemtype="http://schema.org/SiteNavigationElement/Pagination">
{% if paginator.page == 1 %}
<li class="pagination-previous disabled">Předchozí</li>
{% else %}
<li class="pagination-previous">
<a href="{{ site.baseurl }}{{ paginator.previous_page_path }}" aria-label="Previous page">Předchozí</a>
</li>
{% endif %}
{% for page in (1..paginator.total_pages) %}
<li {% if page == paginator.page %} class="current"{% endif %}>
{% if page == paginator.page %}
{{ forloop.index }}
{% else %}
{% if forloop.index == 1 %}
<a href="{{ site.baseurl }}/" aria-label="Page {{ forloop.index }}">
{% else %}
<a href="{{ site.baseurl }}/stranka/{{forloop.index}}/" aria-label="Page {{ forloop.index }}">
{% endif %}
{{ forloop.index }}</a>
{% endif %}
</li>
{% endfor %}
{% if paginator.page == paginator.total_pages %}
<li class="pagination-next disabled">Další</li>
{% else %}
<li class="pagination-next">
<a href="{{ site.baseurl }}{{ paginator.next_page_path }}" aria-label="Next page">Další</a>
</li>
{% endif %}
</ul>
{% assign site.posts = paginator.posts %}
</nav>