/
index.html
62 lines (60 loc) · 3.4 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
---
layout: page
description: '& the art of over-engineering'
---
{% for post in paginator.posts %}
<div class="post-preview">
<div class="col-sm-2 col-md-3 col-lg-2 datetime">
<span class="post-meta">
<time datetime="{{ post.date | date_to_xmlschema }}">
<span class="day">
{{ post.date | date: "%d" }}
</span>
<span class="month-year">
{{ post.date | date: "%B %Y" }}
</span>
{% if post.modified %}{% if modifiedtime != posttime %}
<span class="month-year">
<br>Updated on
</span>
<time datetime="{{ post.modified | date_to_xmlschema }}">
<span class="month-year">
{{ post.modified | date: "%d %B %Y" }}
</span>
{% endif %}{% endif %}
</time>
</span>
</div>
<div class="col-sm-10 col-md-9 col-lg-10">
<a href="{{ post.url | prepend: site.baseurl }}">
<h1 class="post-title"> {{ post.title }}
</h1>
{% if post.subtitle %}
<h3 class="post-subtitle">
{{ post.subtitle }}
</h3>
{% endif %}
</a>
<p>{{ post.content | strip_html | truncatewords:50 }}</p>
<div class="index-post-tags">
{% for tag in post.categories %}<a href="{{ site.url }}/categories/index.html#{{ tag | cgi_encode }}" title="Other posts from the {{ tag | capitalize }} category" class="btn btn-sm">{{ tag | capitalize }}</a>{% unless forloop.last %} {% endunless %}{% endfor %}{% if site.readtime %} <a class="btn btn-sm"><i class="fa fa-clock-o"></i> {% if readtime > 60 %}{% assign readtime_hours = readtime | divided_by: 60 %}{% assign readtime_minutes = readtime | modulo:60 %}{% if readtime_hours > 1 and readtime_hours < 2 %}1 hour{% else %}<span class="hour">{{ readtime_hours }}</span> hours{% endif %}{% if readtime_minutes < 1 %}{% elsif readtime_minutes > 1 and readtime_minutes < 1.5 %} and 1 minute {% elsif readtime_minutes > 1.5 %} and <span class="time">{{ readtime_minutes }}</span> minutes{% endif %}{% else %}{% if readtime < 1 %}Less than 1 minute {% elsif readtime > 1 and readtime < 1.5 %}1 minute {% elsif readtime > 1.5 %}<span class="time">{{ readtime }}</span> minutes {% endif %}{% endif %} read</a>{% endif %}{% if post.featured %} <a href="{{ site.url }}/featured"><i class="fa fa-star-half-o fa-spin"></i> Featured</a>{% endif %}{% if post.video %} <a><i class="fa fa-youtube-play"></i> Video</a>{% endif %}{% if post.location %} <a href="https://www.google.com/maps/place/{% if post.locationgps %}{{ post.locationgps }}{% else %}{{ post.location}}{% endif %}" target="_blank" class="btn btn-sm"><i class="fa fa-map-marker"></i> {{ post.location }}</a>{% endif %}
</div>
<hr>
</div>
</div>
{% endfor %}
<!-- Pager -->
{% if paginator.total_pages > 1 %}
<ul class="pager">
{% if paginator.previous_page %}
<li class="previous">
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">← Newer Posts</a>
</li>
{% endif %}
{% if paginator.next_page %}
<li class="next">
<a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">Older Posts →</a>
</li>
{% endif %}
</ul>
{% endif %}