Homepage: Re-use render_blog_post macro to display posts
No need to have custom code when we have a nice little macro for it
This commit is contained in:
@@ -404,7 +404,7 @@
|
|||||||
list-style: none
|
list-style: none
|
||||||
border-top: thin solid $color-background
|
border-top: thin solid $color-background
|
||||||
|
|
||||||
> li
|
.blog_index-item
|
||||||
+container-box
|
+container-box
|
||||||
display: flex
|
display: flex
|
||||||
flex-direction: column
|
flex-direction: column
|
||||||
@@ -425,7 +425,7 @@
|
|||||||
&:before
|
&:before
|
||||||
display: none
|
display: none
|
||||||
|
|
||||||
a.title
|
a.item-title
|
||||||
font-size: 1.6em
|
font-size: 1.6em
|
||||||
padding: 5px 15px
|
padding: 5px 15px
|
||||||
display: block
|
display: block
|
||||||
@@ -434,15 +434,6 @@
|
|||||||
&:hover
|
&:hover
|
||||||
color: $color-primary
|
color: $color-primary
|
||||||
|
|
||||||
a.blog-stream__thumbnail
|
|
||||||
display: block
|
|
||||||
position: relative
|
|
||||||
|
|
||||||
img
|
|
||||||
border-top-left-radius: 3px
|
|
||||||
border-top-right-radius: 3px
|
|
||||||
width: 100%
|
|
||||||
|
|
||||||
ul.meta
|
ul.meta
|
||||||
+list-meta
|
+list-meta
|
||||||
font-size: .9em
|
font-size: .9em
|
||||||
@@ -453,8 +444,7 @@
|
|||||||
border-radius: 0
|
border-radius: 0
|
||||||
margin: 0
|
margin: 0
|
||||||
|
|
||||||
|
.item-content
|
||||||
.description
|
|
||||||
+node-details-description
|
+node-details-description
|
||||||
padding: 10px 15px
|
padding: 10px 15px
|
||||||
|
|
||||||
@@ -478,6 +468,15 @@
|
|||||||
&:before
|
&:before
|
||||||
left: -5px
|
left: -5px
|
||||||
|
|
||||||
|
.blog_index-header
|
||||||
|
display: block
|
||||||
|
position: relative
|
||||||
|
|
||||||
|
img
|
||||||
|
border-top-left-radius: 3px
|
||||||
|
border-top-right-radius: 3px
|
||||||
|
width: 100%
|
||||||
|
|
||||||
.more
|
.more
|
||||||
text-align: center
|
text-align: center
|
||||||
|
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
| {% extends 'layout.html' %}
|
| {% extends 'layout.html' %}
|
||||||
| {% from '_macros/_navigation.html' import navigation_tabs %}
|
| {% from '_macros/_navigation.html' import navigation_tabs %}
|
||||||
|
| {% from 'nodes/custom/blog/_macros.html' import render_blog_post %}
|
||||||
|
|
||||||
| {% set title = 'homepage' %}
|
| {% set title = 'homepage' %}
|
||||||
|
|
||||||
@@ -24,27 +25,8 @@ meta(name="twitter:image", content="{% if main_project.picture_header %}{{ main_
|
|||||||
section.blog-stream
|
section.blog-stream
|
||||||
ul.blog-stream__list
|
ul.blog-stream__list
|
||||||
| {% if latest_posts %}
|
| {% if latest_posts %}
|
||||||
| {% for n in latest_posts %}
|
| {% for node in latest_posts %}
|
||||||
li
|
| {{ render_blog_post(node) }}
|
||||||
| {% if n.picture %}
|
|
||||||
a.blog-stream__thumbnail(
|
|
||||||
href="{{ n.url }}")
|
|
||||||
img(src="{{ n.picture.thumbnail('l', api=api) }}")
|
|
||||||
| {% endif %}
|
|
||||||
ul.meta
|
|
||||||
li.where-project
|
|
||||||
a.project(href="{{ url_for('projects.view', project_url=n.project.url) }}") {{ n.project.name }}
|
|
||||||
li.when
|
|
||||||
a(href="{{ n.url }}",
|
|
||||||
title="Updated {{ n._updated | pretty_date }}")
|
|
||||||
| {{ n._created | pretty_date }}
|
|
||||||
|
|
||||||
a.title(href="{{ n.url }}")
|
|
||||||
| {{ n.name }}
|
|
||||||
|
|
||||||
.description
|
|
||||||
| {{ n.properties.content | markdown }}
|
|
||||||
|
|
||||||
| {% endfor %}
|
| {% endfor %}
|
||||||
| {% else %}
|
| {% else %}
|
||||||
li
|
li
|
||||||
@@ -59,7 +41,7 @@ meta(name="twitter:image", content="{% if main_project.picture_header %}{{ main_
|
|||||||
|
|
||||||
a.feed(
|
a.feed(
|
||||||
href="{{ url_for('main.feeds_blogs') }}",
|
href="{{ url_for('main.feeds_blogs') }}",
|
||||||
title="Blender Cloud & Projects Blog Feed",
|
title="Blogs Feed",
|
||||||
data-toggle="tooltip",
|
data-toggle="tooltip",
|
||||||
data-placement="left")
|
data-placement="left")
|
||||||
i.pi-rss
|
i.pi-rss
|
||||||
|
Reference in New Issue
Block a user