Blog: Unify the looks of blog posts
Now that the render_blog_post macro is shared with the homepage
This commit is contained in:
@@ -59,6 +59,7 @@ def posts_view(project_id=None, project_url=None, url=None, *, archive=False, pa
|
|||||||
|
|
||||||
for post in posts._items:
|
for post in posts._items:
|
||||||
post.picture = get_file(post.picture, api=api)
|
post.picture = get_file(post.picture, api=api)
|
||||||
|
post.url = url_for_node(node=post)
|
||||||
|
|
||||||
# Use the *_main_project.html template for the main blog
|
# Use the *_main_project.html template for the main blog
|
||||||
is_main_project = project_id == current_app.config['MAIN_PROJECT_ID']
|
is_main_project = project_id == current_app.config['MAIN_PROJECT_ID']
|
||||||
|
@@ -239,22 +239,18 @@
|
|||||||
font:
|
font:
|
||||||
family: $font-body
|
family: $font-body
|
||||||
size: 1.8em
|
size: 1.8em
|
||||||
padding-bottom: 10px
|
|
||||||
padding-top: 20px
|
|
||||||
|
|
||||||
.item-info
|
padding: 10px 25px 10px
|
||||||
color: $color-text-dark-secondary
|
|
||||||
font-size: 1em
|
|
||||||
|
|
||||||
a
|
ul.meta
|
||||||
color: $color-text-dark-secondary
|
+list-meta
|
||||||
&:hover
|
font-size: .9em
|
||||||
color: $color-primary
|
padding: 15px 25px 5px
|
||||||
|
|
||||||
.item-content
|
.item-content
|
||||||
+node-details-description
|
+node-details-description
|
||||||
padding: 35px 25px
|
|
||||||
font-size: 1.3em
|
font-size: 1.3em
|
||||||
|
padding: 15px 25px 25px
|
||||||
|
|
||||||
+media-xs
|
+media-xs
|
||||||
padding:
|
padding:
|
||||||
|
@@ -1,24 +1,28 @@
|
|||||||
//- ******************************************************* -//
|
//- ******************************************************* -//
|
||||||
| {% macro render_blog_post(node) %}
|
| {% macro render_blog_post(node) %}
|
||||||
| {% if node.picture %}
|
| {% if node.picture %}
|
||||||
a.blog_index-header(href="{{ url_for_node(node=node) }}")
|
a.blog_index-header(href="{{ node.url }}")
|
||||||
img(src="{{ node.picture.thumbnail('l', api=api) }}")
|
img(src="{{ node.picture.thumbnail('l', api=api) }}")
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
.blog_index-item
|
.blog_index-item
|
||||||
a.item-title(
|
ul.meta
|
||||||
href="{{ url_for_node(node=node) }}")
|
| {% if node.project.name %}
|
||||||
| {{node.name}}
|
li {{ node.project.name }}
|
||||||
|
| {% endif %}
|
||||||
|
|
||||||
.item-info.
|
li.when
|
||||||
#[span(title="{{node._created}}") {{node._created | pretty_date }}]
|
a(href="{{ node.url }}",
|
||||||
{% if node._created != node._updated %}
|
title="Updated {{ node._updated | pretty_date }}")
|
||||||
#[span(title="{{node._updated}}") (updated {{node._updated | pretty_date }})]
|
| {{ node._created | pretty_date }}
|
||||||
{% endif %}
|
|
||||||
{% if node.properties.category %}| {{node.properties.category}}{% endif %}
|
li
|
||||||
· {{node.user.full_name}}
|
a(href="{{ node.url }}#comments")
|
||||||
· #[a(href="{{ url_for_node(node=node) }}#comments") comment]
|
| comment
|
||||||
{% if node.properties.status != 'published' %} | {{ node.properties.status}} {% endif %}
|
|
||||||
|
a.item-title(
|
||||||
|
href="{{ node.url }}")
|
||||||
|
| {{ node.name }}
|
||||||
|
|
||||||
.item-content
|
.item-content
|
||||||
| {{ node.properties.content }}
|
| {{ node.properties.content }}
|
||||||
@@ -30,15 +34,15 @@ a.blog_index-header(href="{{ url_for_node(node=node) }}")
|
|||||||
.blog_index-item.list
|
.blog_index-item.list
|
||||||
|
|
||||||
| {% if node.picture %}
|
| {% if node.picture %}
|
||||||
a.item-header(href="{{ url_for_node(node=node) }}")
|
a.item-header(href="{{ node.url }}")
|
||||||
img.image(src="{{ node.picture.thumbnail('s', api=api) }}")
|
img.image(src="{{ node.picture.thumbnail('s', api=api) }}")
|
||||||
| {% else %}
|
| {% else %}
|
||||||
a.item-header.nothumb(href="{{ url_for_node(node=node) }}")
|
a.item-header.nothumb(href="{{ node.url }}")
|
||||||
i.pi-document-text
|
i.pi-document-text
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
a.item-title(
|
a.item-title(
|
||||||
href="{{ url_for_node(node=node) }}")
|
href="{{ node.url }}")
|
||||||
| {{node.name}}
|
| {{node.name}}
|
||||||
|
|
||||||
.item-info.
|
.item-info.
|
||||||
|
@@ -29,7 +29,7 @@ link(href="{{ url_for('static_pillar', filename='assets/css/blog.css', v=1732017
|
|||||||
| {% for post in posts %}
|
| {% for post in posts %}
|
||||||
li.jstree-node
|
li.jstree-node
|
||||||
a.jstree-anchor.tree-item.post(
|
a.jstree-anchor.tree-item.post(
|
||||||
href="{{ url_for_node(node=post) }}")
|
href="{{ node.url }}")
|
||||||
.tree-item-thumbnail
|
.tree-item-thumbnail
|
||||||
| {% if post.picture %}
|
| {% if post.picture %}
|
||||||
img(src="{{ post.picture.thumbnail('s', api=api) }}")
|
img(src="{{ post.picture.thumbnail('s', api=api) }}")
|
||||||
|
Reference in New Issue
Block a user