forked from rroszczyk/rroszczyk.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·49 lines (48 loc) · 2.04 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
---
layout: main
---
{% for post in paginator.posts %}
<article class="post">
{% if post.ximg %}
<a class="post-thumbnail" style="background-image: url({{"/img/" | prepend: site.baseurl | append : post.ximg}})" href="{{post.url | prepend: site.baseurl}}"></a>
{% else if post.img %}
<a class="post-thumbnail" style="background-image: url({{"/img/" | prepend: site.baseurl | append : post.img}})" href="{{post.url | prepend: site.baseurl}}"></a>
{% else %}
{% endif %}
<div class="post-content">
<h2 class="post-title"><a href="{{post.url | prepend: site.baseurl}}">{{post.title}}</a></h2>
{% if post.description %}
<p class="text-justify">{{ post.description | strip_html }}</p>
{% else %}
<p class="text-justify">{{ post.content | strip_html | truncatewords: 15 }}</p>
{% endif %}
<span class="post-date">
{% assign m = post.date | date: "%-m" %}
{{ post.date | date: "%-d" }}
{% case m %}
{% when '1' %}Styczeń
{% when '2' %}Luty
{% when '3' %}Marzec
{% when '4' %}Kwiecień
{% when '5' %}Maj
{% when '6' %}Czerwiec
{% when '7' %}Lipiec
{% when '8' %}Sierpień
{% when '9' %}Wrzesień
{% when '10' %}Październik
{% when '11' %}Listopad
{% when '12' %}Grudzień
{% endcase %}
{{ post.date | date: "%Y" }} —
</span>
<!-- <span class="post-date">{{post.date | date: '%Y, %b %d'}} — </span> -->
<!-- <span class="post-words">{% capture words %}{{ post.content | number_of_words }}{% endcapture %}{% unless words contains "-" %}{{ words | plus: 250 | divided_by: 250 | append: " minute read" }}{% endunless %}</span> -->
<span class="post-words">{% assign words = post.content | number_of_words %}
{% if words < 360 %} 1 minuta czytania
{% elsif words < 900 %} {{ words | divided_by: 180 }} minuty czytania
{% else %} {{ words | divided_by: 180 }} minut czytania
{% endif %}</span>
</div>
</article>
{% endfor %}
{% include pagination.html %}