2017-07-13 18:35:18 +02:00
| {% extends 'layout.html' %}
| {% from '_macros/_navigation.html' import navigation_tabs %}
| {% set title = 'homepage' %}
| {% block og %}
meta(property="og:type", content="website")
meta(property="og:url", content="https://cloud.blender.org/")
meta(property="og:title", content="Blender Cloud")
meta(name="twitter:title", content="Blender Cloud")
meta(property="og:description", content="Blender Cloud is a web based service developed by Blender Institute that allows people to access the training videos and all the data from the open projects.")
meta(name="twitter:description", content="Blender Cloud is a web based service developed by Blender Institute that allows people to access the training videos and all the data from the open projects.")
meta(property="og:image", content="{% if main_project.picture_header %}{{ main_project.picture_header.thumbnail('l', api=api) }}{% else %}{{ url_for('static', filename='assets/img/backgrounds/background_caminandes_3_02.jpg')}}{% endif %}")
meta(name="twitter:image", content="{% if main_project.picture_header %}{{ main_project.picture_header.thumbnail('l', api=api) }}{% else %}{{ url_for('static', filename='assets/img/backgrounds/background_caminandes_3_02.jpg')}}{% endif %}")
| {% endblock %}
| {% block body %}
.dashboard-container
2017-11-09 18:37:25 +01:00
section#side
section.blog-stream
ul.blog-stream__list
| {% if latest_posts %}
| {% for n in latest_posts %}
2017-11-10 17:35:19 +01:00
li
2017-11-09 18:37:25 +01:00
| {% if n.picture %}
a.blog-stream__thumbnail(
href="{{ n.url }}")
img(src="{{ n.picture.thumbnail('l', api=api) }}")
| {% endif %}
ul.meta
2017-11-10 17:35:19 +01:00
li.where-project
a.project(href="{{ url_for('projects.view', project_url=n.project.url) }}") {{ n.project.name }}
2017-11-09 18:37:25 +01:00
li.when
a(href="{{ n.url }}",
title="Updated {{ n._updated | pretty_date }}")
| {{ n._created | pretty_date }}
2017-11-10 17:35:19 +01:00
a.title(href="{{ n.url }}")
| {{ n.name }}
2017-11-09 18:37:25 +01:00
.description
| {{ n.properties.content | markdown }}
| {% endfor %}
| {% else %}
2017-11-10 17:35:19 +01:00
li
2017-11-09 18:37:25 +01:00
.blog-stream__list-details
ul.meta
li.when No blog entries... yet!
| {% endif %}
2017-11-10 17:35:19 +01:00
.more
a(href="{{ url_for('main.main_blog') }}")
| See All Blog Posts
2017-11-09 18:37:25 +01:00
a.feed(
href="{{ url_for('main.feeds_blogs') }}",
title="Blender Cloud & Projects Blog Feed",
data-toggle="tooltip",
data-placement="left")
i.pi-rss
2017-07-13 18:35:18 +02:00
section#main
| {{ navigation_tabs(title) }}
2017-11-09 18:37:25 +01:00
section.stream
h4 Latest Assets
ul.activity-stream__list
2017-07-13 18:35:18 +02:00
| {% for n in activity_stream %}
2017-11-09 18:37:25 +01:00
li(
2017-07-13 18:35:18 +02:00
class="{{ n.node_type }} {{ n.properties.content_type }} {% if n.picture %}with-picture{% endif %}",
2017-09-15 15:25:27 +02:00
data-url="{{ n.url }}")
2017-07-13 18:35:18 +02:00
a.activity-stream__list-thumbnail(
class="{{ n.properties.content_type }}",
2017-09-15 15:25:27 +02:00
href="{{ n.url }}")
2017-07-13 18:35:18 +02:00
| {% if n.picture %}
img(src="{{ n.picture.thumbnail('m', api=api) }}")
| {% endif %}
.activity-stream__list-thumbnail-icon
| {% if n.node_type == 'asset' %}
| {% if n.properties.content_type == 'video' %}
i.pi-play
| {% elif n.properties.content_type == 'image' %}
i.pi-picture
| {% elif n.properties.content_type == 'file' %}
i.pi-file-archive
| {% else %}
i.pi-folder
| {% endif %}
| {% endif %}
.activity-stream__list-details
2017-09-15 15:25:27 +02:00
a.title(href="{{ n.url }}")
2017-07-13 18:35:18 +02:00
| {{ n.name }}
2017-11-09 18:37:25 +01:00
2017-07-13 18:35:18 +02:00
| {% if n.permissions.world %}
.ribbon
span free
| {% endif %}
ul.meta
2017-11-09 18:37:25 +01:00
| {% if not n.picture %}
2017-07-13 18:35:18 +02:00
li.when
2017-09-15 15:25:27 +02:00
a(href="{{ n.url }}", title="{{ n._created }}") {{ n._created | pretty_date_time }}
2017-07-13 18:35:18 +02:00
li.who {{ n.user.full_name }}
| {% endif %}
| {% if n.attached_to %}
li.where-parent
2017-09-15 15:25:27 +02:00
a(href="{{ n.attached_to.url }}") {{ n.attached_to.name }}
2017-07-13 18:35:18 +02:00
| {% endif %}
li.where-project
a.project(href="{{ url_for('projects.view', project_url=n.project.url) }}") {{ n.project.name }}
li.what
| {% if n.node_type == 'asset' %}
| {{ n.properties.content_type | undertitle }}
| {% endif %}
| {% if n.picture %}
ul.meta.extra
li.when
2017-09-15 15:25:27 +02:00
a(href="{{ n.url }}", title="{{ n._created }}") {{ n._created | pretty_date_time }}
2017-07-13 18:35:18 +02:00
li.who {{ n.user.full_name }}
| {% endif %}
| {% endfor %}
li.activity-stream__list-item.empty#activity-stream__empty
| No items to list.
2017-11-09 18:37:25 +01:00
section.random-asset
h4
2017-07-13 18:35:18 +02:00
a(href="/search") Explore the Cloud
span.section-lead Random selection of the best assets & tutorials
ul.random-asset__list
| {% for n in random_featured %}
| {% if n.picture and loop.first %}
2017-09-17 20:12:47 +02:00
li.random-asset__list-item.project
| {% if n.project.picture_square %}
a.random-asset__list-thumbnail(
href="{{ n.project.url }}")
img.image(src="{{ n.project.picture_square.thumbnail('s', api=api) }}")
| {% endif %}
.random-asset__list-details
a.title(href="{{ n.project.url }}") {{ n.project.name }}
| {% if n.project.summary %}
ul.meta
2017-09-21 19:13:41 +02:00
li.what
a(href="{{ n.project.url }}") {{ n.project.summary }}
2017-09-17 20:12:47 +02:00
| {% endif %}
2017-07-13 18:35:18 +02:00
li.random-asset__list-item.featured
| {% if n.permissions.world %}
.ribbon
span free
| {% endif %}
a.random-asset__thumbnail(
2017-09-15 15:25:27 +02:00
href="{{ n.url }}",
2017-07-13 18:35:18 +02:00
class="{{ n.properties.content_type }}")
| {% if n.picture %}
img(src="{{ n.picture.thumbnail('l', api=api) }}")
| {% if n.properties.content_type == 'video' %}
i.pi-play
| {% endif %}
| {% endif %}
2017-09-15 15:25:27 +02:00
a.title(href="{{ n.url }}")
2017-07-13 18:35:18 +02:00
| {{ n.name }}
ul.meta
li.what
2017-09-15 15:25:27 +02:00
a(href="{{ n.url }}")
2017-11-09 18:37:25 +01:00
| {% if n.properties.content_type %}{{ n.properties.content_type | undertitle }}{% else %}Folder{% endif %}
2017-07-13 18:35:18 +02:00
li.where
2017-09-17 20:12:47 +02:00
a(href="{{ n.project.url }}")
2017-07-13 18:35:18 +02:00
| {{ n.project.name }}
| {% else %}
2017-11-09 18:37:25 +01:00
li
2017-07-13 18:35:18 +02:00
| {% if n.permissions.world %}
.ribbon
span free
| {% endif %}
a.random-asset__list-thumbnail(
2017-09-15 15:25:27 +02:00
href="{{ n.url }}",
2017-07-13 18:35:18 +02:00
class="{{ n.properties.content_type }}")
| {% if n.picture %}
img.image(src="{{ n.picture.thumbnail('s', api=api) }}")
| {% else %}
| {% if n.properties.content_type == 'video' %}
i.pi-film-thick
| {% elif n.properties.content_type == 'image' %}
i.pi-picture
| {% elif n.properties.content_type == 'file' %}
i.pi-file-archive
| {% else %}
i.pi-folder
| {% endif %}
| {% endif %}
.random-asset__list-details
2017-09-15 15:25:27 +02:00
a.title(href="{{ n.url }}") {{ n.name }}
2017-07-13 18:35:18 +02:00
ul.meta
li.what
2017-09-15 15:25:27 +02:00
a(href="{{ n.url }}")
2017-07-13 18:35:18 +02:00
| {% if n.properties.content_type %}{{ n.properties.content_type }}{% else %}Folder{% endif %}
li.where
2017-09-17 20:12:47 +02:00
a(href="{{ n.project.url }}") {{ n.project.name }}
2017-07-13 18:35:18 +02:00
| {% endif %}
| {% endfor %}
2017-11-09 18:37:25 +01:00
section.comments
2017-07-13 18:35:18 +02:00
2017-11-09 18:37:25 +01:00
h4 Latest Comments
2017-07-13 18:35:18 +02:00
2017-11-09 18:37:25 +01:00
ul
| {% if latest_comments %}
| {% for n in latest_comments %}
li(
class="{{ n.node_type }}",
data-url="{{ n.url }}")
2017-07-13 18:35:18 +02:00
2017-11-09 18:37:25 +01:00
a.comment-content(href="{{ n.url }}")
| {{ n.properties.content | striptags | truncate(200) }}
2017-07-13 18:35:18 +02:00
2017-11-09 18:37:25 +01:00
ul.meta
li.who {{ n.user.full_name }}
| {% if n.attached_to %}
2017-07-13 18:35:18 +02:00
2017-11-09 18:37:25 +01:00
li.where-parent
a(href="{{ n.attached_to.url }}") {{ n.attached_to.name }}
| {% endif %}
2017-07-13 18:35:18 +02:00
2017-11-09 18:37:25 +01:00
li.when
a(href="{{ n.url }}", title="{{ n._created }}")
| {{ n._created | pretty_date_time }}
| {% endfor %}
2017-07-13 18:35:18 +02:00
2017-11-09 18:37:25 +01:00
| {% else %}
li.activity-stream__list-item.empty#activity-stream__empty
| No comments... yet!
2017-07-13 18:35:18 +02:00
2017-11-09 18:37:25 +01:00
| {% endif %}
2017-07-13 18:35:18 +02:00
2017-11-09 18:37:25 +01:00
| {% endblock %}
2017-07-13 18:35:18 +02:00
2017-11-09 18:37:25 +01:00
| {% block footer_scripts %}
script.
$(function () {
2017-07-13 18:35:18 +02:00
2017-11-09 18:37:25 +01:00
/* cleanup mentions in comments */
2017-11-10 17:35:19 +01:00
$('.comment-content').each(function(){
2017-11-09 18:37:25 +01:00
$(this).text($(this).text().replace(/\*|\@|\<(.*?)\>/g, ''));
2017-07-13 18:35:18 +02:00
});
/* Click on the whole asset/comment row to go */
2017-11-10 17:35:19 +01:00
$('.activity-stream__list li, .comments ul li').click(function(e){
2017-07-13 18:35:18 +02:00
window.location.href = $(this).data('url');
$(this).addClass('active');
});
hopToTop(); // Display jump to top button
});
| {% endblock %}