1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/tmaize-demo-tmaize-blog

Клонировать/Скачать
index.html 1.1 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
tym Отправлено 19.07.2020 08:26 f672de3
---
layout: page
title: 首页
---
<div class="page page-index">
{% for post in site.posts -%}
{%- capture post_year %}{{ post.date | date: "%Y" }}{% endcapture -%}
{%- capture post_previous_year %}{{ post.previous.date | date: "%Y" }}{% endcapture -%}
{%- capture post_next_year %}{{ post.next.date | date: "%Y" }}{% endcapture -%}
{%- if forloop.first or post_next_year != post_year -%}
<div class="list-post">
<h2 id="{{post_year}}">{{post_year}}</h2>
<ul>
{%- endif %}
<li>
<span class="date">{{ post.date | date: "%Y/%m/%d" }}</span>
<div class="title">
<a href="{{ site.baseurl | append: post.url }}" class="hover-underline">{{ post.title }}</a>
</div>
<div class="categories">
{% for categorie in post.categories -%}
<a href="{{site.baseurl}}/pages/categories.html#{{ categorie }}" class="hover-underline">{{ categorie }}</a>
{%- endfor %}
</div>
</li>
{%- if forloop.last or post_previous_year != post_year %}
</ul>
</div>
{%- endif %}
{%- endfor %}
</div>

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/tmaize-demo-tmaize-blog.git
git@api.gitlife.ru:oschina-mirror/tmaize-demo-tmaize-blog.git
oschina-mirror
tmaize-demo-tmaize-blog
tmaize-demo-tmaize-blog
master