2018-04-16 14:38:08 +02:00
|
|
|
| {% extends 'layout.html' %}
|
2018-09-20 12:06:43 +02:00
|
|
|
| {% from '_macros/_navigation.html' import navigation_project %}
|
|
|
|
|
2018-09-17 15:03:53 +02:00
|
|
|
include ../../../../pillar/src/templates/mixins/components
|
|
|
|
|
2019-03-29 15:22:53 +01:00
|
|
|
| {% block bodyclasses %}{{ super() }} landing-home{% endblock %}
|
|
|
|
|
2018-09-14 17:13:54 +02:00
|
|
|
| {% from '_macros/_asset_list_item.html' import asset_list_item %}
|
2018-04-16 14:38:08 +02:00
|
|
|
|
|
|
|
| {% block page_title %}{{ project.name }}{% endblock%}
|
|
|
|
|
|
|
|
| {% block og %}
|
|
|
|
meta(property="og:type", content="website")
|
|
|
|
|
|
|
|
| {% if og_picture %}
|
|
|
|
meta(property="og:image", content="{{ og_picture.thumbnail('l', api=api) }}")
|
|
|
|
meta(name="twitter:image", content="{{ og_picture.thumbnail('l', api=api) }}")
|
|
|
|
| {% elif node and node.picture %}
|
|
|
|
meta(property="og:image", content="{{ node.picture.thumbnail('l', api=api) }}")
|
|
|
|
meta(name="twitter:image", content="{{ node.picture.thumbnail('l', api=api) }}")
|
|
|
|
| {% elif project.picture_header %}
|
|
|
|
meta(property="og:image", content="{{ project.picture_header.thumbnail('l', api=api) }}")
|
|
|
|
meta(name="twitter:image", content="{{ project.picture_header.thumbnail('l', api=api) }}")
|
|
|
|
| {% endif %}
|
|
|
|
|
|
|
|
| {% if show_project %}
|
|
|
|
meta(property="og:title", content="{{ project.name }} - Blender Cloud")
|
|
|
|
meta(name="twitter:title", content="{{ project.name }} - Blender Cloud")
|
|
|
|
meta(property="og:description", content="{{ project.summary }}")
|
|
|
|
meta(name="twitter:description", content="{{ project.summary }}")
|
|
|
|
meta(property="og:url", content="{{ url_for('projects.view', project_url=project.url, _external=True) }}")
|
|
|
|
| {% else %}
|
|
|
|
|
|
|
|
| {% if node %}
|
|
|
|
meta(property="og:title", content="{{ node.name }} - Blender Cloud")
|
|
|
|
meta(name="twitter:title", content="{{ node.name }} on Blender Cloud")
|
|
|
|
|
|
|
|
| {% if node.node_type == 'post' %}
|
|
|
|
|
|
|
|
| {% if node.properties.content %}
|
|
|
|
meta(property="og:description", content="{{ node.properties.content | truncate(180) }}")
|
|
|
|
meta(name="twitter:description", content="{{ node.properties.content | truncate(180) }}")
|
|
|
|
| {% else %}
|
|
|
|
meta(property="og:description", content="Blender Cloud, your source for open content and training")
|
|
|
|
meta(name="twitter:description", content="Blender Cloud, your source for open content and training")
|
|
|
|
| {% endif %}
|
|
|
|
|
|
|
|
| {% else %}
|
|
|
|
|
|
|
|
| {% if node.description %}
|
|
|
|
meta(property="og:description", content="{{ node.description | truncate(180) }}")
|
|
|
|
meta(name="twitter:description", content="{{ node.description | truncate(180) }}")
|
|
|
|
| {% else %}
|
|
|
|
meta(property="og:description", content="Blender Cloud, your source for open content and training")
|
|
|
|
meta(name="twitter:description", content="Blender Cloud, your source for open content and training")
|
|
|
|
| {% endif %}
|
|
|
|
|
|
|
|
| {% endif %}
|
|
|
|
|
2018-09-05 15:11:46 +02:00
|
|
|
meta(property="og:url", content="{{url_for('projects.view_node', project_url=project.url, node_id=node._id, _external=True)}}")
|
2018-04-16 14:38:08 +02:00
|
|
|
| {% else %}
|
|
|
|
meta(property="og:title", content="{{ project.name }} Blog on Blender Cloud")
|
|
|
|
meta(name="twitter:title", content="{{ project.name }} Blog on Blender Cloud")
|
|
|
|
meta(property="og:description", content="{{ project.summary }}")
|
|
|
|
meta(name="twitter:description", content="{{ project.summary }}")
|
|
|
|
|
|
|
|
meta(property="og:url", content="{{url_for('projects.view', project_url=project.url, _external=True)}}")
|
|
|
|
| {% endif %}
|
|
|
|
|
|
|
|
| {% endif %}
|
|
|
|
| {% endblock og %}
|
|
|
|
|
|
|
|
| {% block page_overlay %}
|
|
|
|
#page-overlay.video
|
|
|
|
.video-embed
|
|
|
|
#others
|
|
|
|
| {% endblock %}
|
|
|
|
|
|
|
|
| {% block css %}
|
2018-09-14 17:13:23 +02:00
|
|
|
link(href="{{ url_for('static_cloud', filename='assets/css/project-main.css') }}", rel="stylesheet")
|
2018-04-16 14:38:08 +02:00
|
|
|
| {% endblock %}
|
|
|
|
|
2018-09-14 17:13:54 +02:00
|
|
|
| {% block navigation_tabs %}
|
2019-02-06 10:31:36 +01:00
|
|
|
| {{ navigation_project(project, navigation_links, extension_sidebar_links, title) }}
|
2018-09-14 17:13:54 +02:00
|
|
|
| {% endblock navigation_tabs %}
|
|
|
|
|
2018-04-16 14:38:08 +02:00
|
|
|
| {% block body %}
|
2019-03-27 12:12:59 +01:00
|
|
|
|
2019-03-27 12:13:36 +01:00
|
|
|
| {% if project.has_method('PUT') %}
|
|
|
|
+nav-secondary
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('projects.edit', project_url=project.url) }}",
|
|
|
|
class="text-white")
|
|
|
|
i.pi-edit.pr-2
|
|
|
|
span Edit Project
|
|
|
|
| {% endif %}
|
2019-03-27 12:12:59 +01:00
|
|
|
|
2019-04-03 16:59:14 +02:00
|
|
|
| {% if project.picture_header %}
|
|
|
|
| {% set project_header = project.picture_header.thumbnail('h', api=api) %}
|
|
|
|
| {% endif %}
|
|
|
|
|
|
|
|
.jumbotron.text-white.jumbotron-overlay-gradient-fade-to-gray(
|
|
|
|
style="background-image: url(\'{{ project_header }}\');")
|
|
|
|
.container
|
|
|
|
.row
|
|
|
|
.col-md-8
|
|
|
|
.display-4.text-uppercase.font-weight-bold
|
|
|
|
| {% if project.extension_props.cloud.logo %}
|
|
|
|
img.img-fluid(src="{{ project.extension_props.cloud.logo.thumbnail('m', api=api) }}")
|
|
|
|
| {% else %}
|
|
|
|
| {{ project.name }}
|
|
|
|
| {% endif %}
|
|
|
|
|
|
|
|
.lead
|
|
|
|
| {% if project.summary %}
|
|
|
|
| {{ project | markdowned('summary') }}
|
|
|
|
| {% endif %}
|
|
|
|
|
|
|
|
.d-flex
|
|
|
|
| {% if project.extension_props.cloud.video_url %}
|
|
|
|
a.btn.btn-primary.px-5(
|
|
|
|
href="{{ project.extension_props.cloud.video_url }}",
|
|
|
|
target="_blank")
|
|
|
|
i.pi-play.pr-2
|
|
|
|
| WATCH
|
|
|
|
| {% endif %}
|
|
|
|
|
|
|
|
a.btn.btn-link.px-5.text-white(href="{{ url_for('projects.view', project_url=project.url) }}")
|
|
|
|
| Explore
|
|
|
|
i.pi-angle-right.pl-2
|
|
|
|
|
2018-09-14 17:13:54 +02:00
|
|
|
|
2018-09-18 12:54:32 +02:00
|
|
|
.container-fluid.landing
|
2018-09-14 17:13:54 +02:00
|
|
|
.row
|
2019-03-27 12:35:58 +01:00
|
|
|
.col-md-8.mx-auto.mt-5
|
2018-09-14 17:13:54 +02:00
|
|
|
.node-details-description
|
2018-09-20 12:14:47 +02:00
|
|
|
| {% if project.description %}
|
2018-09-14 17:13:54 +02:00
|
|
|
| {{ project | markdowned('description') }}
|
2018-09-20 12:14:47 +02:00
|
|
|
| {% endif %}
|
2018-09-14 17:13:54 +02:00
|
|
|
|
|
|
|
.row
|
|
|
|
.col-md-10.mx-auto
|
|
|
|
section.py-5
|
2018-09-19 15:50:03 +02:00
|
|
|
.gallery.mx-auto
|
2018-09-14 17:13:54 +02:00
|
|
|
| {% for n in activity_stream %}
|
|
|
|
| {% if n.node_type not in ['comment', 'post'] and n.picture %}
|
|
|
|
.thumbnail.expand-image-links
|
|
|
|
.img-container
|
2019-03-27 12:34:44 +01:00
|
|
|
a.js-open-overlay(
|
|
|
|
href="{{ n.picture.thumbnail('l', api=api) }}",
|
|
|
|
title="{{ n.name }}")
|
2018-09-14 17:13:54 +02:00
|
|
|
img(src="{{ n.picture.thumbnail('l', api=api) }}", alt="{{ n.name }}")
|
|
|
|
| {% endif %}
|
|
|
|
| {% endfor %}
|
2019-03-27 12:36:11 +01:00
|
|
|
|
|
|
|
.clearfix
|
|
|
|
|
2018-09-14 17:13:54 +02:00
|
|
|
| {% if project.nodes_featured %}
|
|
|
|
| {# In some cases featured_nodes might might be embedded #}
|
|
|
|
| {% if '_id' in project.nodes_featured[0] %}
|
|
|
|
| {% set featured_node_id=project.nodes_featured[0]._id %}
|
|
|
|
| {% else %}
|
|
|
|
| {% set featured_node_id=project.nodes_featured[0] %}
|
|
|
|
| {% endif %}
|
|
|
|
.text-center.p-5
|
2018-09-21 12:19:23 +02:00
|
|
|
a.btn.btn-outline-primary.px-5(
|
2018-09-14 17:13:54 +02:00
|
|
|
href="{{ url_for('projects.view_node', project_url=project.url, node_id=featured_node_id) }}")
|
|
|
|
| See More Artwork
|
|
|
|
| {% endif %}
|
|
|
|
|
|
|
|
.row
|
|
|
|
.col-md-10.mx-auto
|
2019-03-27 12:14:24 +01:00
|
|
|
h2.pb-3 Timeline
|
|
|
|
.timeline-dark
|
|
|
|
+timeline("{{ project._id }}")
|
2018-04-16 14:38:08 +02:00
|
|
|
|
|
|
|
| {% endblock body %}
|
|
|
|
|
|
|
|
|
|
|
|
| {% block footer_scripts %}
|
|
|
|
script.
|
2019-03-27 12:34:11 +01:00
|
|
|
function showOverlay(html_content) {
|
|
|
|
$('#page-overlay')
|
|
|
|
.addClass('active')
|
|
|
|
.html(html_content);
|
|
|
|
}
|
|
|
|
|
2018-04-16 14:38:08 +02:00
|
|
|
function hideOverlay() {
|
2019-03-27 12:34:11 +01:00
|
|
|
$('#page-overlay')
|
|
|
|
.removeClass('active')
|
|
|
|
.html('');
|
2018-04-16 14:38:08 +02:00
|
|
|
}
|
|
|
|
|
2019-03-27 12:34:11 +01:00
|
|
|
//- Click anywhere in the page to hide the overlay.
|
2018-04-16 14:38:08 +02:00
|
|
|
$(document).click(function () {
|
|
|
|
hideOverlay();
|
|
|
|
});
|
|
|
|
|
|
|
|
$(document).keyup(function (e) {
|
|
|
|
if (e.keyCode == 27) {
|
|
|
|
hideOverlay();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2018-09-15 22:19:47 +02:00
|
|
|
$("a.js-open-overlay").on( "click", function(e) {
|
2018-04-16 14:38:08 +02:00
|
|
|
e.preventDefault();
|
|
|
|
e.stopPropagation();
|
2018-09-15 22:19:47 +02:00
|
|
|
|
2018-04-16 14:38:08 +02:00
|
|
|
var url = $(this).attr('href');
|
2019-03-27 12:34:11 +01:00
|
|
|
showOverlay('<img src="' + url + '"/>');
|
2018-04-16 14:38:08 +02:00
|
|
|
});
|
2018-04-16 16:24:00 +02:00
|
|
|
| {% endblock %}
|