781759d545
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
40 lines
1.2 KiB
Text
40 lines
1.2 KiB
Text
{% extends 'includes/layout.njk' %}
|
|
|
|
{% from 'includes/tags.njk' import PostTags with context%}
|
|
|
|
{% macro Gallery(photos) %}
|
|
<div class="row">
|
|
<div class="col">
|
|
{% set i = 0 %}
|
|
{% for p in photos %}
|
|
{% set i = i + 1 %}
|
|
<img onerror="M.toast({ html: 'Some photos could not be showed at the moment, please try again later.' });" src="{{p}}" data-caption="{{i}}" class="responsive-img materialboxed gallery-img" async />
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endmacro %}
|
|
|
|
{% block body %}
|
|
<article id="post">
|
|
<div class="card">
|
|
<div class="card-content">
|
|
<span class="card-title">{{ page.title }}</span>
|
|
<div class="row">
|
|
<div class="col" style="padding-left:0;"><span class="mdi mdi-account">{{config.author}}</span></div>
|
|
<div class="col"><span class="mdi mdi-clock">{{date(page.date, 'YYYY/M/D')}}</span></div>
|
|
</div>
|
|
{{ PostTags(page) }}
|
|
{% if page.photos && page.photos.length > 0%}
|
|
{{Gallery(page.photos)}}
|
|
{% endif %}
|
|
<div class="entry">
|
|
{% autoescape false %}{{ page.content }}{% endautoescape %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</article>
|
|
|
|
<div id="paginator">
|
|
{{ paginator() }}
|
|
</div>
|
|
{% endblock %}
|