New layout
This commit is contained in:
parent
440e7a3994
commit
f6a070f084
45 changed files with 661 additions and 758 deletions
|
@ -1,39 +1,24 @@
|
|||
{% macro render_blog_post(post, from_index=false) %}
|
||||
{% macro render_blog_post(post, from_index=false, include_content=true) %}
|
||||
{% set summary = post.body.html.split('<!-- readmore -->') %}
|
||||
<article class="blog-post center">
|
||||
<h1><a href="{{ post|url }}">{{ post.title }}</a></h1>
|
||||
<h1 class="title"><a href="{{ post|url }}">{{ post.title }}</a></h1>
|
||||
<div class="info">
|
||||
Published on {{ post.pub_date }}
|
||||
</div>
|
||||
<div class="content">
|
||||
{% if from_index and summary|length > 1 %}
|
||||
{{ summary[0] }}
|
||||
<p class="text-right"><a href="{{ post|url }}">Read more »</a></p>
|
||||
{% else %}
|
||||
{{ post.body }}
|
||||
{% if include_content %}
|
||||
<div class="content">
|
||||
{% if from_index and summary|length > 1 %}
|
||||
{{ summary[0] }}
|
||||
<p class="text-right"><a href="{{ post|url }}">Read more »</a></p>
|
||||
{% else %}
|
||||
{{ post.body }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if not from_index and post.edit_comment %}
|
||||
<h3>Edits</h3>
|
||||
{{ post.edit_comment }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% if not from_index and post.edit_comment %}
|
||||
<h3>Edits</h3>
|
||||
{{ post.edit_comment }}
|
||||
{% endif %}
|
||||
<hr class="light">
|
||||
</article>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro render_gallery(post) %}
|
||||
<div class="center">
|
||||
<h2>Gallery</h2>
|
||||
<div class="grid">
|
||||
{% for attachment in post.children.get("gallery").attachments.order_by("_id") %}
|
||||
<a href="/blog/{{post._slug}}/gallery/{{attachment._id}}">
|
||||
<img src="/blog/{{post._slug}}/gallery/{{attachment._id}}" class="col-1-3">
|
||||
</a>
|
||||
{% if loop.index is divisibleby(3) %}
|
||||
</div><div class="grid">
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<hr class="light">
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue