Deduplicated blog templates by using macros.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
| {% import 'nodes/custom/blog/_macros.html' as blogmacros %}
|
||||
|
||||
#blog_container(class="{% if project and project._id == config.MAIN_PROJECT_ID %}cloud-blog{% endif %}")
|
||||
|
||||
@@ -15,26 +16,7 @@
|
||||
.clearfix
|
||||
| {% endif %}
|
||||
|
||||
| {% if node.picture %}
|
||||
.blog_index-header
|
||||
img(src="{{ node.picture.thumbnail('l', api=api) }}")
|
||||
| {% endif %}
|
||||
.blog_index-item
|
||||
|
||||
.item-title
|
||||
| {{node.name}}
|
||||
|
||||
.item-info.
|
||||
<span title="{{node._created}}">{{node._created | pretty_date }}</span>
|
||||
{% if node._created != node._updated %}
|
||||
<span title="{{node._updated}}">(updated {{node._updated | pretty_date }})</span>
|
||||
{% endif %}
|
||||
{% if node.properties.category %}| {{node.properties.category}}{% endif %}
|
||||
| by {{node.user.full_name}}
|
||||
|
||||
.item-content
|
||||
| {{ node.properties.content }}
|
||||
|
||||
| {{ blogmacros.render_blog_post(node) }}
|
||||
|
||||
#comments-embed
|
||||
.comments-list-loading
|
||||
|
@@ -21,10 +21,8 @@ meta(property="og:image", content="{{ node.picture.thumbnail('l', api=api) }}")
|
||||
| {% set title = 'blog' %}
|
||||
|
||||
| {% block body %}
|
||||
|
||||
.container
|
||||
| {% include 'nodes/custom/post/view_embed.html' %}
|
||||
|
||||
| {% endblock %}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user