-
Notifications
You must be signed in to change notification settings - Fork 10
/
archive.html
51 lines (45 loc) · 1.6 KB
/
archive.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
---
layout: default
title: Technical Fridays | Archives
---
<header id="top_header">
<div class="container">
<div id="branding">
<h1><a href="/blog">Technical Fridays</a></h1>
</div>
<nav>
<ul>
<li><a href="{{ site.url }}">Home</a></li>
<li><a href="/blog">Blog</a></li>
<li><a href="/poems">Poems</a></li>
</ul>
</nav>
</div>
</header>
<div class="container">
<div id="post">
<h1>Archives</h1>
{% assign postsByYearMonth = site.posts | group_by_exp:"post", "post.date | date: '%Y %b'" %}
{% for yearMonth in postsByYearMonth %}
<h3>{{ yearMonth.name }}</h3>
{% for post in yearMonth.items %}
<div class="card">
<div style="text-align: center">
{% assign foundImage = 0 %}
{% assign images = post.content | split:"<img " %}
{% for image in images %}
{% if image contains 'src' %}
{% if foundImage == 0 %}
{% assign html = image | split:"/>" | first %}
<img style="display:block; margin:auto; height: 200px; max-width: 100%;" {{ html }} />
{% endif %}
{% assign foundImage = 1 %}
{% endif %}
{% endfor %}
<a href="{{ post.url }}">{{ post.title }}</a>
</div>
</div>
{% endfor %}
{% endfor %}
</div>
</div>