-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
73 lines (63 loc) · 2.56 KB
/
index.html
File metadata and controls
73 lines (63 loc) · 2.56 KB
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
69
70
71
72
73
---
layout: default
---
<div class="post">
<div class="header-bar">
<h2>{{ "Recent Posts" }}</h2>
</div>
<ul class="post-list">
{% for post in site.posts limit:5 %}
{% if post.external_source == blank %}
{% assign read_time = post.content | number_of_words | divided_by: 180 | plus: 1 %}
{% else %}
{% assign read_time = post.feed_content | strip_html | number_of_words | divided_by: 180 | plus: 1 %}
{% endif %}
{% assign year = post.date | date: "%Y" %}
{% assign tags = post.tags | join: "" %}
{% assign categories = post.categories | join: "" %}
<li>
<h3>
{% if post.redirect == blank %}
<a class="post-title" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
{% else %}
{% if post.redirect contains '://' %}
<a class="post-title" href="{{ post.redirect }}" target="_blank">{{ post.title }}</a>
<svg width="2rem" height="2rem" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
<path d="M17 13.5v6H5v-12h6m3-3h6v6m0-6-9 9" class="icon_svg-stroke" stroke="#999" stroke-width="1.5" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path>
</svg>
{% else %}
<a class="post-title" href="{{ post.redirect | relative_url }}">{{ post.title }}</a>
{% endif %}
{% endif %}
</h3>
<p>{{ post.description }}</p>
<p class="post-meta">
{{ read_time }} min read ·
{{ post.date | date: '%B %-d, %Y' }}
{%- if post.external_source %}
· {{ post.external_source }}
{%- endif %}
</p>
<p class="post-tags">
<a href="{{ year | prepend: '/blog/' | prepend: site.baseurl}}">
<i class="fas fa-calendar fa-sm"></i> {{ year }} </a>
{% if tags != "" %}
·
{% for tag in post.tags %}
<a href="{{ tag | slugify | prepend: '/blog/tag/' | prepend: site.baseurl}}">
<i class="fas fa-hashtag fa-sm"></i> {{ tag }}</a>
{% endfor %}
{% endif %}
{% if categories != "" %}
·
{% for category in post.categories %}
<a href="{{ category | slugify | prepend: '/blog/category/' | prepend: site.baseurl}}">
<i class="fas fa-tag fa-sm"></i> {{ category }}</a>
{% endfor %}
{% endif %}
</p>
</li>
{% endfor %}
</ul>
{% include pagination.html %}
</div>