blog/themes/cmd/layout/index.njk

42 lines
1.2 KiB
Text
Raw Normal View History

{% 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 %}