Blog on frontpage

This commit is contained in:
2016-11-25 13:32:05 +01:00
parent f2d9df8b61
commit f75c43055f
4 changed files with 171 additions and 11 deletions

View File

@@ -39,10 +39,6 @@ meta(name="twitter:image", content="{% if main_project.picture_header %}{{ main_
data-filter='file',
title="List files")
i.pi-file-archive
li.filter.active(
data-filter='post',
title="List blog posts")
i.pi-newspaper
li.filter(
data-filter='comment',
title="List comments")
@@ -133,6 +129,64 @@ meta(name="twitter:image", content="{% if main_project.picture_header %}{{ main_
href="https://cloud.blender.org/p/agent-327/")
| Learn More
section#blog-stream
a.feed(
href="{{ url_for('main.feeds_blogs') }}",
title="Blender Cloud & Projects Blog Feed",
data-toggle="tooltip",
data-placement="left")
i.pi-rss
h3
a(href="{{ url_for('main.main_blog') }}") Blog
ul#blog-stream__list
| {% if latest_posts %}
| {% for n in latest_posts %}
| {% if n.picture and loop.first %}
li.blog-stream__list-item.featured
a.blog-stream__thumbnail(
href="{{ url_for_node(node=n) }}")
img(src="{{ n.picture.thumbnail('l', api=api) }}")
a.title(href="{{ url_for_node(node=n) }}")
| {{ n.name }}
ul.meta
li.when
a(href="{{ url_for_node(node=n) }}",
title="Updated {{ n._updated | pretty_date }}")
| {{ n._created | pretty_date }}
li.where-project
a.project(href="{{ url_for('projects.view', project_url=n.project.url) }}") {{ n.project.name }}
| {% else %}
li.blog-stream__list-item
a.blog-stream__list-thumbnail(href="{{ url_for_node(node=n) }}")
| {% if n.picture %}
img.image(src="{{ n.picture.thumbnail('s', api=api) }}")
| {% else %}
i.pi-newspaper
| {% endif %}
.blog-stream__list-details
a.title(href="{{ url_for_node(node=n) }}") {{ n.name }}
ul.meta
li.when
a(href="{{ url_for_node(node=n) }}",
title="Updated {{ n._updated | pretty_date }}")
| {{ n._created | pretty_date }}
li.where-project
a.project(href="{{ url_for('projects.view', project_url=n.project.url) }}") {{ n.project.name }}
| {% endif %}
| {% endfor %}
| {% else %}
li.blog-stream__list-item
.blog-stream__list-details
ul.meta
li.when No updates yet
| {% endif %}
li.blog-stream__list-item.more
a(href="{{ url_for('main.main_blog') }}") See All Blog Posts
section#random-asset
h3
a(href="/search") Explore the Cloud

View File

@@ -37,8 +37,8 @@ html(lang="en")
loadCSS( "//fonts.googleapis.com/css?family=Roboto:300,400" );
script(src="{{ url_for('static_pillar', filename='assets/js/markdown.min.js', v=241120162) }}")
script(src="{{ url_for('static_pillar', filename='assets/js/tutti.min.js', v=241120162) }}")
script(src="{{ url_for('static_pillar', filename='assets/js/markdown.min.js', v=251120161) }}")
script(src="{{ url_for('static_pillar', filename='assets/js/tutti.min.js', v=251120161) }}")
link(href="{{ url_for('static', filename='assets/img/favicon.png') }}", rel="shortcut icon")
link(href="{{ url_for('static', filename='assets/img/apple-touch-icon-precomposed.png') }}", rel="icon apple-touch-icon-precomposed", sizes="192x192")
@@ -48,12 +48,12 @@ html(lang="en")
| {% block head %}{% endblock %}
| {% block css %}
link(href="{{ url_for('static_pillar', filename='assets/css/font-pillar.css', v=241120162) }}", rel="stylesheet")
link(href="{{ url_for('static_pillar', filename='assets/css/base.css', v=241120162) }}", rel="stylesheet")
link(href="{{ url_for('static_pillar', filename='assets/css/font-pillar.css', v=251120161) }}", rel="stylesheet")
link(href="{{ url_for('static_pillar', filename='assets/css/base.css', v=251120161) }}", rel="stylesheet")
| {% if title == 'blog' %}
link(href="{{ url_for('static_pillar', filename='assets/css/blog.css', v=241120162) }}", rel="stylesheet")
link(href="{{ url_for('static_pillar', filename='assets/css/blog.css', v=251120161) }}", rel="stylesheet")
| {% else %}
link(href="{{ url_for('static_pillar', filename='assets/css/main.css', v=241120162) }}", rel="stylesheet")
link(href="{{ url_for('static_pillar', filename='assets/css/main.css', v=251120161) }}", rel="stylesheet")
| {% endif %}
| {% endblock %}