blog/themes/cmd/layout/index.njk
thisLight 781759d545 move cmd to nunjucks & update hexo to 6.0.0
Other changes:
* minor fix to the display for code blocks
* remove floating when hover on cards
* replace the list of tags and categories to the index page one
* small change on the title of tags' and categories' pages
2021-12-31 18:07:40 +08:00

41 lines
1.2 KiB
Text

{% extends 'includes/layout.njk' %}
{% from "includes/paginator.njk" import Paginiation with context %}
{% from "includes/postlist.njk" import PostList with context %}
{% import "includes/cards.njk" as cards with context %}
{% macro TagPanel(tags) %}
<div class="card-panel" style="padding-top: 12px; padding-bottom: 12px;">
<span class="chip transparent">Tags</span>
{% for tag in tags %}
<a href="{{ url_for(tag.path) }}">
<div class="chip">
{{ tag.name }}
</div>
</a>
{% endfor %}
</div>
{% endmacro %}
{% block body %}
<div class="row">
<div class="col m8 l9">
{% if page.current == 1 %}
{{ cards.Me(config.author, config.email, config.description) }}
{% endif %}
{% if page.posts.length > 0 %}
{{ PostList(page.posts.toArray()) }}
{% else %}
<span>No Posts Here...</span>
{% endif %}
<div class="center">
{{ Paginiation() }}
</div>
</div>
<div class="col m4 l3 hide-on-small-only">
{{ TagPanel(site.tags.data) }}
</div>
</div>
{% endblock %}
{% block add_head %}
<link rel="stylesheet" href="/css/index.css"/>
{% endblock %}