-
Notifications
You must be signed in to change notification settings - Fork 245
/
Copy pathindex.html
64 lines (61 loc) · 2.06 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
63
64
---
layout: default
---
{% capture posts %}
{% for post in site.categories.blog %}
{% unless post.categories[1] %}
<article class="teaser">
<h3 class="teaser__title"><a href="{{ post.url }}">{{ post.title | markdownline }}</a></h3>
<p class="meta meta--teaser">
<time datetime="%Y-%m-%d" class="meta__time">{{ post.date | date: '%-d %B %Y' }}</time>
by <span class="meta__author">{% include author-name.html object=post %}</span>
in <a href="/{{ post.categories[0] }}/" class="meta__category">{{ post.categories[0] | capitalize }}</a>
</p>
{% if post.intro %}
<p class="teaser__intro">{{ post.intro | markdownline }}</p>
{% endif %}
</article>(•)
{% endunless %}
{% endfor %}
{% endcapture %}
{% capture articles %}
{% for post in site.categories.articles %}
{% unless post.categories[1] %}
<article class="teaser">
<h3 class="teaser__title"><a href="{{ post.url }}">{{ post.title | markdownline }}</a></h3>
<p class="meta meta--teaser">
<time datetime="%Y-%m-%d" class="meta__time">{{ post.date | date: '%-d %B %Y' }}</time>
by <span class="meta__author">{% include author-name.html object=post %}</span>
in <a href="/{{ post.categories[0] }}/" class="meta__category">{{ post.categories[0] | capitalize }}</a>
</p>
{% if post.intro %}
<p class="teaser__intro">{{ post.intro | markdownline }}</p>
{% endif %}
</article>(•)
{% endunless %}
{% endfor %}
{% endcapture %}
<main class="main">
<section class="main__blog">
<h2 class="main__title"><a href="/blog/">Blog</a></h2>
{% assign posts = posts | split: '(•)' %}
{% for post in posts limit:6 %}
{{ post }}
{% endfor %}
</section>
<section class="main__articles">
<h2 class="main__title"><a href="/articles/">Articles</a></h2>
<div class="main__articles-wrapper">
<div class="main__articles-column">
{% assign articles = articles | split: '(•)' %}
{% for article in articles limit:12 %}
{{ article }}
{% if forloop.index == 6 %}
</div>
<div class="main__articles-column">
{% endif %}
{% endfor %}
</div>
</div>
</section>
</main>