2017-07-13 18:35:18 +02:00
| {% extends 'layout.html' %}
2018-09-19 11:20:17 +02:00
| {% from '_macros/_navigation.html' import navigation_homepage %}
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 %}
2018-09-19 11:20:17 +02:00
| {{ navigation_homepage(title) }}
2018-09-06 13:03:22 +02:00
| {% endblock navigation_tabs %}
2019-04-15 12:46:31 +02:00
mixin featured_project_card(title, description, url, image)
a.featured-project-card.card.asset.my-2(href=url)
img.card-thumbnail(alt=title, src=image)
.card-body.py-2()
.card-title.mb-1.font-weight-bold
=title
.card-text
=description
.btn-link
| See more
i.pi-angle-right
mixin featured_projects()
section.py-2.mb-3
h6.title-underline
| Featured Projects
.px-3
+card-deck(3)&attributes(attributes)
+featured_project_card(
"SPRING",
"The latest Open Movie project.",
"/p/spring",
"{{ url_for('static', filename='assets/img/features/open_movies_spring_03.jpg')}}")
+featured_project_card(
"SPEED SCULPTING",
"Learn how to speed up your sculpts in Blender 2.8",
"/p/speed-sculpting",
"{{ url_for('static', filename='assets/img/features/training_speed_sculpting_03.jpg')}}")
+featured_project_card(
"GREASE PENCIL",
"Master the new 2D animation worflow.",
"/p/grease-pencil-fundamentals",
"{{ url_for('static', filename='assets/img/features/training_grease_pencil_02.jpg')}}")
2017-07-13 18:35:18 +02:00
| {% block body %}
2018-09-06 13:03:40 +02:00
.container-fluid.dashboard-container.imgs-fluid
2019-03-27 13:08:28 +01:00
.row.mt-3
2019-04-15 12:46:31 +02:00
.col-md-10.col-lg-9.col-xl-8.mx-auto
.d-xl-none
+featured_projects()
2018-11-20 16:29:01 +01:00
+timeline()
2017-07-13 18:35:18 +02:00
2018-11-12 12:57:24 +01:00
.d-block.text-center
a.d-inline-block.p-3.text-muted(href="{{ url_for('main.main_blog') }}")
| See All Blog Posts
2018-09-06 13:03:40 +02:00
2018-11-12 12:57:24 +01:00
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-06 13:03:40 +02:00
2019-04-15 12:46:31 +02:00
.col-md-10.col-lg-9.col-xl-4.mx-auto
.d-lg-none.d-xl-block
+featured_projects()(class="card-deck-vertical border-bottom pb-3")
section.py-2.border-bottom.mb-3
2018-09-17 12:16:52 +02:00
h6.title-underline
2018-09-18 12:54:57 +02:00
a.text-muted(href="{{ url_for('main.nodes_search_index') }}")
| Random Awesome
2017-07-13 18:35:18 +02:00
2018-09-18 12:54:57 +02:00
| {% if random_featured %}
2019-04-10 17:19:17 +02:00
+card-deck()(class='pl-3 random-featured')
2018-09-18 12:54:57 +02:00
| {% for child in random_featured %}
| {% if child.node_type not in ['comment'] %}
| {{ asset_list_item(child, current_user) }}
| {% endif %}
| {% endfor %}
| {% else %}
.card
.card-body
h6.card-title
| No random featured.
| {% endif %}
2017-07-13 18:35:18 +02:00
2018-09-17 12:16:52 +02:00
section.py-3
h6.title-underline Latest Comments
2017-07-13 18:35:18 +02:00
2018-09-17 12:52:01 +02:00
ul.list-unstyled.pt-2
2018-09-17 12:16:52 +02:00
| {% if latest_comments %}
| {% for n in latest_comments %}
li.pb-2.mb-2.border-bottom.text-truncate
2017-07-13 18:35:18 +02:00
2018-09-17 12:16:52 +02:00
a.js-comment-content.text-muted(href="{{ n.url }}")
| {{ n.properties.content | striptags | truncate(200) }}
2017-07-13 18:35:18 +02:00
2018-09-17 12:16:52 +02:00
| {% if n.attached_to %}
.d-flex.align-items-baseline
a.text-muted.text-truncate(href="{{ n.attached_to.url }}")
small.pr-2.font-weight-bold {{ n.project.name }}
small {{ n.attached_to.name }}
| {% endif %}
2017-07-13 18:35:18 +02:00
2018-09-17 12:16:52 +02:00
.d-flex.align-items-baseline
small.pr-2.font-weight-bold {{ n.user.full_name }}
2017-07-13 18:35:18 +02:00
2018-09-17 12:16:52 +02:00
a.text-muted(href="{{ n.url }}", title="{{ n._created }}")
small {{ n._created | pretty_date }}
| {% endfor %}
2017-07-13 18:35:18 +02:00
2018-09-17 12:16:52 +02:00
| {% else %}
span
| No comments... yet!
2017-07-13 18:35:18 +02:00
2018-09-17 12:16:52 +02:00
| {% endif %}
2017-07-13 18:35:18 +02:00
2019-03-27 13:08:28 +01: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 */
2018-09-17 12:16:52 +02:00
$('.js-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
});
hopToTop(); // Display jump to top button
});
| {% endblock %}