-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathseries.html
More file actions
48 lines (44 loc) · 1.71 KB
/
Copy pathseries.html
File metadata and controls
48 lines (44 loc) · 1.71 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
---
title: Series
layout: default
description: "Posts grouped by series"
no-catalog: true
hide-in-nav: true
---
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<h1 class="page-heading">Series</h1>
<div class="series-index">
{% assign series_posts = site.posts | where_exp: "post", "post.series" %}
{% assign series_names = series_posts | map: "series" | uniq | sort %}
{% if series_names.size == 0 %}
<p class="series-empty-text">No series yet. Add <code>series: "Name"</code> to a post's front matter to start one.</p>
{% endif %}
{% for name in series_names %}
{% assign posts = series_posts | where: "series", name | sort: "date" %}
{% assign first_post = posts | first %}
{% assign last_post = posts | last %}
{% assign first_year = first_post.date | date: "%Y" %}
{% assign last_year = last_post.date | date: "%Y" %}
<div class="series-card">
<div class="series-branch">
<span class="branch-icon">*</span>
<a href="#series-{{ name | slugify }}" class="branch-name">{{ name }}</a>
<span class="series-count">({{ posts.size }}편)</span>
<span class="branch-meta">{{ posts.size }} commits · {% if first_year == last_year %}{{ first_year }}{% else %}{{ first_year }} ~ {{ last_year }}{% endif %}</span>
</div>
<ol class="series-card-posts" id="series-{{ name | slugify }}">
{% for post in posts %}
<li>
<a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
<span class="series-card-post-date">{{ post.date | date: "%Y-%m-%d" }}</span>
</li>
{% endfor %}
</ol>
</div>
{% endfor %}
</div>
</div>
</div>
</div>