diff options
author | Valentin Popov <info@valentineus.link> | 2018-12-16 17:07:19 +0300 |
---|---|---|
committer | Valentin Popov <info@valentineus.link> | 2018-12-16 17:07:19 +0300 |
commit | d53231853aa812ab0507e0386a03bb768c7dca74 (patch) | |
tree | 64a62b1f3979d6d66181e4c36b6ce58f0cb0f120 /_pages | |
parent | 0645f56405e111b0012ace8b47b1e3f2f8aecc8b (diff) | |
download | popov.link-d53231853aa812ab0507e0386a03bb768c7dca74.tar.xz popov.link-d53231853aa812ab0507e0386a03bb768c7dca74.zip |
feat(list): Update the list of posts
Signed-off-by: Valentin Popov <info@valentineus.link>
Diffstat (limited to '_pages')
-rw-r--r-- | _pages/index.html | 50 |
1 files changed, 23 insertions, 27 deletions
diff --git a/_pages/index.html b/_pages/index.html index adaed06..93152b9 100644 --- a/_pages/index.html +++ b/_pages/index.html @@ -1,36 +1,32 @@ --- -permalink: "index.html" -title: "Home" layout: page +permalink: "index.html" +title: "Список всех постов" --- -{% assign amount = 0 %} {% assign postsByYear = site.posts | group_by_exp: "post", "post.date | date: '%Y'" %} {% for year in postsByYear %} - {% capture amount %}{{ amount | plus: 1 }}{% endcapture %} - - <h2>{{ year.name | strip_newlines | strip_html | strip | normalize_whitespace | smartify | slugify }}</h2> - - <table itemtype="http://schema.org/BreadcrumbList" itemscope class="table table-striped"> - {% for post in year.items %} - <tr itemprop="itemListElement" itemtype="http://schema.org/ListItem" itemscope> - <!-- Position --> - <td itemprop="position" style="display: none;" hidden>{{ amount }}</td> - - <!-- Date --> - <td><time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date_to_long_string }}</time></td> + <section> + <!-- Header --> + <h3>{{ year.name | strip_newlines | strip_html | strip | normalize_whitespace | smartify | slugify }}</h3> - <!-- Title --> - <td> - <a itemprop="item" href="{{ post.url | relative_url | uri_escape }}"> - <span itemprop="name">{{ post.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</span> - </a> - </td> + <ul> + {% for post in year.items %} + <li> + <!-- Title / Link --> + <a href="{{ post.url | relative_url | uri_escape }}"> + {{ post.title | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }} + </a> - <!-- Description --> - <td itemprop="description">{{ post.description | strip_newlines | strip_html | strip | normalize_whitespace | smartify | truncatewords: 32 | xml_escape }}</td> - </tr> - {% endfor %} - </table> -{% endfor %}
\ No newline at end of file + <small> + <!-- Date of publication --> + <time datetime="{{ post.date | date_to_xmlschema }}"> + <em>{{ post.date | date: '- %b %d' | strip_newlines | strip_html | strip | normalize_whitespace | smartify | xml_escape }}</em> + </time> + </small> + </li> + {% endfor %} + </ul> + </section> +{% endfor %} |