aboutsummaryrefslogtreecommitdiff
path: root/_pages/index.html
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2018-04-23 00:30:25 +0300
committerValentin Popov <info@valentineus.link>2018-04-23 00:30:25 +0300
commit43da1bdb8cc02f556eb325a8a9af17b4c874ecbd (patch)
treee3ad95f4f353f00ad447a7f168828b38d44397cd /_pages/index.html
parentb8c158641aca8a9fc197d3c2a1a069b296cdc336 (diff)
downloadpopov.link-43da1bdb8cc02f556eb325a8a9af17b4c874ecbd.tar.xz
popov.link-43da1bdb8cc02f556eb325a8a9af17b4c874ecbd.zip
Redesigned home page
Signed-off-by: Valentin Popov <info@valentineus.link>
Diffstat (limited to '_pages/index.html')
-rw-r--r--_pages/index.html36
1 files changed, 22 insertions, 14 deletions
diff --git a/_pages/index.html b/_pages/index.html
index bfc4958..97f5032 100644
--- a/_pages/index.html
+++ b/_pages/index.html
@@ -3,18 +3,26 @@ permalink: "index.html"
layout: page
---
-{% for post in site.posts %}
- <div class="header">
- <h2 class="header-title">
- <a href="{{ post.url | relative_url | uri_escape }}">
- {{ post.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify }}
- </a>
- </h2>
- {% if post.description %}
- <p class="header-annotation">
- {{ post.description | strip_newlines | strip_html | strip | normalize_whitespace | smartify }}
- </p>
- {% endif %}
- <time>{{ post.date | date_to_long_string }}</time>
- </div>
+{% assign postsByYear = site.posts | group_by_exp: "post", "post.date | date: '%Y'" %}
+
+<!-- Links to social networks -->
+{% include sociallinks.html %}
+
+{% for year in postsByYear %}
+ <h2>{{ year.name | strip_newlines | strip_html | strip | normalize_whitespace | slugify }}</h2>
+
+ {% for post in year.items %}
+ <div class="post-item">
+ <small><time datetime="{{ post.date | date_to_xmlschema}}">{{ post.date | date_to_long_string }}</time></small>
+ <h4>
+ <a href="{{ post.url | relative_url | uri_escape }}">
+ {{ post.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | capitalize }}
+ </a>
+ </h4>
+
+ {% if post.description %}
+ <p>{{ post.description | strip_newlines | strip_html | strip | normalize_whitespace | smartify | truncatewords: 32 }}</p>
+ {% endif %}
+ </div>
+ {% endfor %}
{% endfor %}