2018-09-07 18:12:01 +02:00
include ../../../pillar/src/templates/mixins/components
2017-07-13 18:35:18 +02:00
doctype
html(lang="en")
head
meta(charset="utf-8")
title {% if self.page_title() %}{% block page_title %}{% endblock %} — {% endif %}Blender Cloud
2018-08-27 16:56:38 +02:00
meta(name="viewport", content="width=device-width, initial-scale=1, shrink-to-fit=no")
2017-07-13 18:35:18 +02:00
meta(name="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="author", content="Blender Institute")
meta(name="theme-color", content="#3e92aa")
| {% if config['GOOGLE_SITE_VERIFICATION'] %}
meta(name="google-site-verification" content="{{ config['GOOGLE_SITE_VERIFICATION'] }}")
| {% endif %}
meta(property="og:site_name", content="Blender Cloud")
meta(property="og:locale", content="en_US")
meta(name="twitter:card", content="summary_large_image")
meta(name="twitter:site", content="@Blender_Cloud")
| {% block og %}
meta(property="og:title", content="Blender Cloud")
2018-09-05 13:58:13 +02:00
meta(property="og:url", content="{{ request.url }}")
2017-07-13 18:35:18 +02:00
meta(property="og:type", content="website")
meta(property="og:image", content="{{ url_for('static', filename='assets/img/backgrounds/background_gleb_locomotive.jpg')}}")
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:title", content="Blender Cloud")
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(name="twitter:image", content="{{ url_for('static', filename='assets/img/backgrounds/background_gleb_locomotive.jpg')}}")
2017-10-25 15:43:16 +02:00
| {% endblock og %}
2017-07-13 18:35:18 +02:00
2018-09-14 01:21:22 +02:00
script(src="{{ url_for('static_pillar', filename='assets/js/tutti.min.js') }}")
2018-12-12 11:45:46 +01:00
script.
pillar.utils.initCurrentUser({{ current_user | json | safe }});
2018-11-12 12:57:24 +01:00
script(src="{{ url_for('static_pillar', filename='assets/js/timeline.min.js') }}")
2018-03-23 17:25:47 +01:00
script(src="{{ url_for('static_pillar', filename='assets/js/vendor/jquery.typeahead-0.11.1.min.js')}}")
script(src="{{ url_for('static_pillar', filename='assets/js/vendor/js.cookie-2.0.3.min.js')}}")
2018-04-03 11:27:39 +02:00
| {% if current_user.is_authenticated %}
2018-03-29 17:34:22 +02:00
script(src="{{ url_for('static_pillar', filename='assets/js/vendor/clipboard.min.js')}}")
2018-04-03 11:27:39 +02:00
| {% endif %}
2017-07-13 18:35:18 +02:00
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")
| {% block head %}{% endblock %}
| {% block css %}
| {% if title == 'blog' %}
2018-03-23 17:25:47 +01:00
link(href="{{ url_for('static_pillar', filename='assets/css/blog.css') }}", rel="stylesheet")
2017-07-13 18:35:18 +02:00
| {% else %}
2018-03-23 17:25:47 +01:00
link(href="{{ url_for('static_cloud', filename='assets/css/main.css') }}", rel="stylesheet")
2017-07-13 18:35:18 +02:00
| {% endif %}
2017-10-25 15:43:16 +02:00
| {% endblock css %}
2017-07-13 18:35:18 +02:00
2018-08-27 16:56:38 +02:00
| {% if not title %}{% set title="default" %}{% endif %}
2019-03-29 15:22:00 +01:00
body(class="{{ title }} {{'project' if project and project.url != 'blender-cloud'}} {% block bodyclasses %}{% endblock %}"
2019-02-07 14:45:55 +01:00
"{% block bodyattrs %}{% endblock %}"
)
2018-08-31 19:08:52 +02:00
| {% with messages = get_flashed_messages(with_categories=True) %}
2019-04-03 22:54:00 +02:00
| {% if messages or (config.UI_ANNOUNCEMENT_NON_SUBSCRIBERS and not current_user.has_cap('subscriber')) %}
| {% if config.UI_ANNOUNCEMENT_NON_SUBSCRIBERS %}
.alert.d-flex.justify-content-center(
role="alert",
class="alert-{{ config.UI_ANNOUNCEMENT_NON_SUBSCRIBERS['category'] }}")
i.pr-2(class="{{ config.UI_ANNOUNCEMENT_NON_SUBSCRIBERS['icon'] }}")
| {{ config.UI_ANNOUNCEMENT_NON_SUBSCRIBERS['message'] | markdown }}
| {% endif %}
2018-08-31 19:08:52 +02:00
| {% for (category, message) in messages %}
2019-04-03 22:54:00 +02:00
.alert.d-flex.justify-content-center(
role="alert",
class="alert-{{ category }}")
2018-08-31 19:08:52 +02:00
i.alert-icon(class="{{ category }}")
span {{ message }}
button.close(type="button", data-dismiss="alert")
i.pi-cancel
| {% endfor %}
| {% endif %}
| {% endwith %}
nav.navbar.navbar-expand-md.fixed-top.bg-white
2018-09-06 13:03:22 +02:00
| {% block navigation_tabs %}
2019-02-07 14:45:55 +01:00
+nav-secondary(class="collapse navbar-collapse")#navigationLinks
+nav-secondary-link(
href="{{ url_for('main.homepage') }}")
i.pi-blender-cloud-logo
2018-09-06 13:03:22 +02:00
| {% endblock navigation_tabs %}
2018-11-22 15:31:52 +01:00
+nav-secondary()(class="m-auto keep-when-overlay")
div.nav-item.quick-search.qs-input#qs-input
2018-08-31 19:08:52 +02:00
2018-09-15 05:36:23 +02:00
+nav-secondary()(class="ml-auto")
2018-09-07 18:12:01 +02:00
| {% if node and node.properties and node.properties.category %}
| {% set category = node.properties.category %}
| {% else %}
| {% set category = title %}
| {% endif %}
2018-11-22 15:31:52 +01:00
li.nav-item.quick-search.cursor-pointer.px-3.pi-search#qs-toggle
2018-09-07 18:12:01 +02:00
| {% block navigation_sections %}
| {% endblock navigation_sections %}
| {% block navigation_user %}
| {% include 'menus/notifications.html' %}
| {% include 'menus/user.html' %}
| {% endblock navigation_user %}
| {% if current_user.is_anonymous %}
2018-09-17 17:09:43 +02:00
li
2018-09-17 18:42:04 +02:00
a.btn.btn-sm.btn-primary.px-4.mx-1(
2018-09-07 18:12:01 +02:00
href="https://store.blender.org/product/membership/",
title="Sign up") Sign up
| {% endif %}
2018-08-31 19:08:52 +02:00
2018-09-20 15:20:58 +02:00
.loading-bar
2018-09-07 14:56:38 +02:00
2018-08-31 19:08:52 +02:00
.page-content
2018-11-22 15:31:52 +01:00
.quick-search.container-fluid.m-auto.p-5#search-overlay
ul.qs-loading.text-center
i.h1.pi-spin.spinner
h2 Loading
2018-08-31 19:08:52 +02:00
| {% block page_overlay %}
#page-overlay
| {% endblock page_overlay %}
.page-body
| {% block body %}{% endblock %}
2017-07-13 18:35:18 +02:00
| {% block footer_container %}
2018-09-17 17:18:43 +02:00
| {% include '_footer.html' %}
2017-10-25 15:43:16 +02:00
| {% endblock footer_container %}
2017-07-13 18:35:18 +02:00
#notification-pop(data-url="", data-read-toggle="")
.nc-progress
a#pop-close(href="#", title="Dismiss")
i.pi-cancel
.nc-item
.nc-avatar
.nc-text
span.nc-date
a(href="")
2018-03-28 23:38:09 +02:00
| {% if current_user.is_authenticated %}
script(src="{{ url_for('static_pillar', filename='assets/js/vendor/jquery.typewatch-3.0.0.min.js') }}")
script.
// When sending an AJAX request, always add the X-CSRFToken header to it.
var csrf_token = "{{ csrf_token() }}";
$.ajaxSetup({
beforeSend: function (xhr, settings) {
if (!/^(GET|HEAD|OPTIONS|TRACE)$/i.test(settings.type) && !this.crossDomain) {
xhr.setRequestHeader("X-CSRFToken", csrf_token);
}
}
});
| {% endif %}
2017-07-13 18:35:18 +02:00
script.
$(document).ready(function() {
{% if current_user.is_authenticated %}
getNotificationsLoop(); // Check for new notifications in the background
// Resize #notifications and change overflow for scrollbars
$(window).on("resize", function() { notificationsResize(); });
{% endif %}
});
2018-09-15 05:36:23 +02:00
// Enable all tooltips.
2017-07-13 18:35:18 +02:00
if (typeof $().tooltip != 'undefined'){
$('[data-toggle="tooltip"]').tooltip({'delay' : {'show': 0, 'hide': 0}});
}
2018-11-22 15:31:52 +01:00
// Enable Quick Search
let searches = {
{% if project and not project.is_private %}
project: {
name: 'Project',
uiUrl: '{{ url_for("projects.search", project_url=project.url)}}',
apiUrl: '/api/newsearch/multisearch',
searchParams: [
{name: 'Assets', params: {project: '{{ project._id }}', node_type: 'asset'}},
{name: 'Blog', params: {project: '{{ project._id }}', node_type: 'post'}},
{name: 'Groups', params: {project: '{{ project._id }}', node_type: 'group'}},
]
},
{% endif %}
cloud: {
name: 'Cloud',
uiUrl: '/search',
apiUrl: '/api/newsearch/multisearch',
searchParams: [
{name: 'Assets', params: {node_type: 'asset'}},
{name: 'Blog', params: {node_type: 'post'}},
{name: 'Groups', params: {node_type: 'group'}},
]
},
}
$('#qs-toggle').quickSearch({
resultTarget: '#search-overlay',
inputTarget: '#qs-input',
searches: searches,
});
2017-07-13 18:35:18 +02:00
| {% block footer_scripts_pre %}{% endblock %}
| {% block footer_scripts %}{% endblock %}
script.
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{ config.GOOGLE_ANALYTICS_TRACKING_ID }} ', 'auto', {'allowAnchor': true});
ga('send', 'pageview');