-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
43 lines (37 loc) · 941 Bytes
/
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
---
layout: default
title: Home
---
{% include nav.html %}
<main>
<div class="row-wrap">
<h2>
<u class="header-underline">All Posts</u>
</h3>
</div>
<!-- Show last 5 posts here -->
{% for post in site.posts %}
{% assign year = post.date | date: "%Y" %}
{% if year != prev_year %}
<div class="row-wrap">
<h3 style="text-align: center;">{{year}}</h3>
</div>
{% endif %}
{% assign prev_year = year %}
{% if post.external_url %}
<a href="{{post.external_url}}" target="_blank" class="block-link">
{% else %}
<a href="{{site.baseurl}}{{post.url}}" class="block-link">
{% endif %}
<article class="row-wrap post-preview">
<h3 class="post-preview__title">
{{ post.title }}
</h3>
<p class="post-preview__body">
{% if post.readtime %}({{ post.readtime }} read){% endif %}
{{ post.description }}
</p>
</article>
</a>
{% endfor %}
</main>