Merge nodes_blog and nodes_featured

This commit is contained in:
Pablo Vazquez 2016-11-24 18:16:15 +01:00
parent 44c4182a86
commit 8865ae02e4

View File

@ -67,53 +67,17 @@ script.
.node-extra
a.learn-more(href="{{ url_for( 'projects.about', project_url=project.url) }}") LEARN MORE
| {% if project.nodes_featured %}
.project-featured-container
h3 Featured Content
.featured-list#featured-list
| {% for n in project.nodes_featured %}
| {% if n.picture %}
a.featured-item.hidden(href="{{ url_for_node(node=n) }}")
.featured-item-info
span.type {{ n.properties.content_type }} - {{ n.user.full_name }}
span.title {{ n.name }}
img(src="{{ n.picture.thumbnail('l', api=api) }}")
| {% endif %}
| {% endfor %}
| {% endif %}
.node-extra
| {% if project.nodes_blog %}
.node-blog
a(href="{{url_for('main.project_blog', project_url=project.url)}}")
h3 Blog
ul.node-blog-list
| {% for n in project.nodes_blog %}
li.node-blog-list-item(data-node_id="{{ n._id }}")
a.image(href="{{ url_for_node(node=n) }}")
| {% if n.picture %}
img(src="{{ n.picture.thumbnail('m', api=api) }}")
| {% else %}
i.pi-newspaper
| {% endif %}
.info
a.title(href="{{ url_for_node(node=n) }}") {{ n.name }}
span.details
span.when {{ n._updated | pretty_date }} by
span.who {{ n.user.full_name }}
| {% endfor %}
| {% endif %}
| {% if project.nodes_latest %}
| {% if activity_stream %}
.node-updates
h3 Latest Assets
ul.node-updates-list
| {% for n in project.nodes_latest %}
| {% for n in activity_stream %}
| {% if n.node_type not in ['comment'] %}
li.node-updates-list-item(data-node_id="{{ n._id }}")
a.image(href="{{ url_for_node(node=n) }}")
| {% if n.picture %}
img(src="{{ n.picture.thumbnail('m', api=api) }}")
img(src="{{ n.picture.thumbnail('l', api=api) }}")
| {% else %}
| {% if n.properties.content_type == 'video' %}
i.pi-film-thick
@ -131,7 +95,8 @@ script.
a.title(href="{{ url_for_node(node=n) }}") {{ n.name }}
span.details
span.what {% if n.properties.content_type %}{{ n.properties.content_type | undertitle }}{% else %}{{ n.node_type | undertitle }}{% endif %} ·
span.when {{ n._updated | pretty_date }}
span.when {{ n._updated | pretty_date }} by
span.who {{ n.user.full_name }}
| {% endif %}
| {% endfor %}
| {% endif %}