mirror of
https://github.com/amehime/hexo-theme-shoka.git
synced 2026-04-05 02:16:56 +08:00
47 lines
1.2 KiB
Plaintext
47 lines
1.2 KiB
Plaintext
{% extends '_partials/layout.njk' %}
|
|
{% import '_macro/card.njk' as card with context %}
|
|
{% import '_macro/postmeta.njk' as postmeta with context %}
|
|
{% import '_macro/segment.njk' as segment with context %}
|
|
|
|
{% block content %}
|
|
<div class="index wrap">
|
|
{%- if page.current == 1 %}
|
|
{%- if page.sticky.length > 0%}
|
|
<h2 class="divider">{{ __('index.sticky') }}</h2>
|
|
{%- set sticky = page.sticky.toArray() %}
|
|
<div class="segments sticky">
|
|
{%- for post in sticky %}
|
|
{{ segment.render(post) }}
|
|
{%- endfor %}
|
|
</div>
|
|
{%- endif %}
|
|
|
|
{%- if page.catlist.length > 0%}
|
|
<h2 class="divider">{{ __('index.category') }}</h2>
|
|
<div class="cards">
|
|
{%- for cat in page.catlist %}
|
|
{{ card.render(cat) }}
|
|
{%- endfor %}
|
|
</div>
|
|
{%- endif %}
|
|
{%- endif %}
|
|
|
|
{%- if page.posts.length > 0%}
|
|
{%- set posts = page.posts.toArray() %}
|
|
{%- if page.current == 1 %}
|
|
<h2 class="divider">{{ __('index.posts') }}</h2>
|
|
{%- endif %}
|
|
<div class="segments posts">
|
|
{%- for post in posts %}
|
|
{{ segment.render(post) }}
|
|
{%- endfor %}
|
|
</div>
|
|
{%- endif %}
|
|
|
|
</div>
|
|
|
|
{% include '_partials/pagination.njk' %}
|
|
|
|
{% endblock %}
|
|
|