2017-07-13 18:35:18 +02:00
| {% extends 'layout.html' %}
| {% from '_macros/_navigation.html' import navigation_tabs %}
2018-09-11 17:46:09 +02:00
| {% from '_macros/_asset_list_item.html' import asset_list_item %}
2017-11-23 16:17:38 +01:00
| {% from 'nodes/custom/blog/_macros.html' import render_blog_post %}
2018-09-11 17:46:09 +02:00
2018-09-10 19:01:43 +02:00
include ../../../pillar/src/templates/mixins/components
2017-07-13 18:35:18 +02:00
| {% set title = 'homepage' %}
| {% block og %}
meta(property="og:type", content="website")
2018-09-05 13:57:15 +02:00
meta(property="og:url", content="{{ request.url }}")
2017-07-13 18:35:18 +02:00
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.")
2017-11-24 19:36:43 +01:00
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_agent327_04.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_agent327_04.jpg')}}{% endif %}")
2017-07-13 18:35:18 +02:00
| {% endblock %}
2018-09-06 13:03:22 +02:00
| {% block navigation_tabs %}
| {{ navigation_tabs(title) }}
| {% endblock navigation_tabs %}
2017-07-13 18:35:18 +02:00
| {% block body %}
2018-09-06 13:03:40 +02:00
.container-fluid.dashboard-container.imgs-fluid
.row
2018-09-16 03:06:08 +02:00
.col-md-9.col-xl-10
2018-09-06 13:03:40 +02:00
section.blog
2018-09-16 03:06:08 +02:00
| {% if latest_posts %}
| {% for node in latest_posts %}
| {{ render_blog_post(node) }}
| {% endfor %}
| {% else %}
| No blog entries... yet!
| {% endif %}
2017-07-13 18:35:18 +02:00
2018-09-06 13:03:40 +02:00
.d-block.text-center
a.d-inline-block.p-3.text-muted(href="{{ url_for('main.main_blog') }}")
| See All Blog Posts
a.d-inline-block.p-3.text-muted(
href="{{ url_for('main.feeds_blogs') }}",
title="Blogs Feed",
data-toggle="tooltip",
data-placement="left")
i.pi-rss
| RSS Feed
2018-09-16 03:06:08 +02:00
.col-md-3.col-xl-2
2018-09-06 13:03:40 +02:00
.dashboard-sidebar
section.pt-3
h6.title-underline In Production
a(href="/p/spring/")
img(src="{{ url_for('static', filename='assets/img/projects/spring_450x150.jpg')}}")
p.text-muted.pt-2.
A poetic short film about a mountain spirit and her wise little dog. #[a(href="/p/spring/") Check it out].
section.stream.py-3
h6.title-underline Latest Assets
2018-09-10 19:01:43 +02:00
| {% if activity_stream %}
.card-padless.p-2
2018-09-11 17:46:09 +02:00
| {% for child in activity_stream %}
| {% if child.node_type not in ['comment'] %}
| {{ asset_list_item(child, current_user) }}
2018-09-10 19:01:43 +02:00
| {% endif %}
2018-09-06 13:03:40 +02:00
| {% endfor %}
2018-09-10 19:01:43 +02:00
| {% else %}
.card
.card-body
h6.card-title
| No assets.
| {% endif %}
2017-07-13 18:35:18 +02:00
2018-09-06 13:03:40 +02:00
section.random-asset.py-3
h6.title-underline
a(href="/search") Explore the Cloud
.pb-3.text-muted Random selection of the best assets & tutorials
ul.random-asset__list.list-unstyled
| {% for n in random_featured %}
| {% if n.picture and loop.first %}
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) }}")
2017-07-13 18:35:18 +02:00
| {% endif %}
2018-09-06 13:03:40 +02:00
.random-asset__list-details
a.title(href="{{ n.project.url }}") {{ n.project.name }}
| {% if n.project.summary %}
ul.list-unstyled.d-flex.text-muted
li.what
a(href="{{ n.project.url }}") {{ n.project.summary }}
2017-07-13 18:35:18 +02:00
| {% endif %}
2018-09-06 13:03:40 +02:00
li.random-asset__list-item.featured
| {% if n.permissions.world %}
.ribbon
2018-09-10 19:01:43 +02:00
span FREE
2018-09-06 13:03:40 +02:00
| {% endif %}
a.random-asset__thumbnail(
href="{{ n.url }}",
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 %}
2017-07-13 18:35:18 +02:00
2018-09-06 13:03:40 +02:00
| {% endif %}
2017-07-13 18:35:18 +02:00
2018-09-06 13:03:40 +02:00
a.title(href="{{ n.url }}")
| {{ n.name }}
ul.list-unstyled.d-flex.text-muted
li.what
a(href="{{ n.url }}")
| {% if n.properties.content_type %}{{ n.properties.content_type | undertitle }}{% else %}Folder{% endif %}
li.where
a(href="{{ n.project.url }}")
| {{ n.project.name }}
| {% else %}
2017-09-17 20:12:47 +02:00
2018-09-06 13:03:40 +02:00
li
| {% if n.permissions.world %}
.ribbon
2018-09-10 19:01:43 +02:00
span FREE
2018-09-06 13:03:40 +02:00
| {% endif %}
a.random-asset__list-thumbnail(
href="{{ n.url }}",
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
a.title(href="{{ n.url }}") {{ n.name }}
ul.list-unstyled.d-flex.text-muted
li.what
a(href="{{ n.url }}")
| {% if n.properties.content_type %}{{ n.properties.content_type }}{% else %}Folder{% endif %}
li.where
a(href="{{ n.project.url }}") {{ n.project.name }}
2017-07-13 18:35:18 +02:00
| {% endif %}
2018-09-06 13:03:40 +02:00
| {% endfor %}
2017-07-13 18:35:18 +02:00
2018-09-06 13:03:40 +02:00
section.comments.py-3
h6.title-underline Latest Comments
2017-07-13 18:35:18 +02:00
2018-09-06 13:03:40 +02:00
ul.list-unstyled
| {% 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
2018-09-06 13:03:40 +02:00
a.comment-content(href="{{ n.url }}")
| {{ n.properties.content | striptags | truncate(200) }}
2017-07-13 18:35:18 +02:00
2018-09-06 13:03:40 +02:00
ul.list-unstyled.d-flex.text-muted
li.who {{ n.user.full_name }}
| {% if n.attached_to %}
2017-07-13 18:35:18 +02:00
2018-09-06 13:03:40 +02:00
li.where-parent
a(href="{{ n.attached_to.url }}") {{ n.attached_to.name }}
| {% endif %}
2017-07-13 18:35:18 +02:00
2018-09-06 13:03:40 +02:00
li.when
a(href="{{ n.url }}", title="{{ n._created }}")
| {{ n._created | pretty_date_time }}
| {% endfor %}
2017-07-13 18:35:18 +02:00
2018-09-06 13:03:40 +02: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 %}