-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpost-item.html
executable file
·52 lines (52 loc) · 1.29 KB
/
post-item.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
{% if post.lang == "fa" %}
<li class="post-item float-rtl">
{% else %}
<li class="post-item">
{% endif %}
<h2 class="post-title">
<a href="{{ post.url }}">
{{ post.title }}
</a>
</h2>
<div class="post-meta">
<time datetime="{{ post.date | date: "%B %-d, %Y" }}">{{ post.date | date_to_string }}</time>
<span class="post-meta-divider"></span>
<small class="post-meta-readtime">
☕
{% assign words = post.content | number_of_words %}
{% if words < 360 %}1{% else %}{{ words | divided_by:180 }}{% endif %}
{% if post.lang == "fa" %}
دقیقه مطالعه
{% else %}
min read
{% endif %}
</small>
</div>
{% comment %}
<span class="post-meta-category">
{% assign sortedCategories = post.categories | sort %}
{% for category in sortedCategories %}
<a class="link-normal" href="{{ site.url }}/category/{{ category }}">#{{ category }}</a>
{% endfor %}
</span>
{% endcomment %}
<div class="clear"></div>
<div class="post-text">
{% if showAll %}
{{ post.content }}
{% else %}
{% if post.excerpt %}
{{ post.excerpt }}
{% else %}
{{ post.content }}
{% endif %}
{% endif %}
</div>
<div class="clear"></div>
{% if showAll %}
{% else %}
<a class="post-read link-underlined" href="{{ post.url }}">
مطالعه بیشتر
</a>
{% endif %}
</li>