Files
blender-cloud/src/templates/layout.pug

465 lines
15 KiB
Plaintext
Raw Normal View History

2018-09-07 18:12:01 +02:00
include ../../../pillar/src/templates/mixins/components
doctype
html(lang="en")
head
meta(charset="utf-8")
title {% if self.page_title() %}{% block page_title %}{% endblock %} — {% endif %}Blender Cloud
meta(name="viewport", content="width=device-width, initial-scale=1, shrink-to-fit=no")
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")
meta(property="og:url", content="{{ request.url }}")
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')}}")
| {% endblock og %}
script(src="{{ url_for('static_pillar', filename='assets/js/tutti.min.js') }}")
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')}}")
| {% if current_user.is_authenticated %}
script(src="{{ url_for('static_pillar', filename='assets/js/vendor/clipboard.min.js')}}")
| {% endif %}
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 %}
link(href="{{ url_for('static_pillar', filename='assets/css/font-pillar.css') }}", rel="stylesheet")
| {% if title == 'blog' %}
link(href="{{ url_for('static_pillar', filename='assets/css/blog.css') }}", rel="stylesheet")
| {% else %}
link(href="{{ url_for('static_cloud', filename='assets/css/main.css') }}", rel="stylesheet")
| {% endif %}
| {% endblock css %}
| {% if not title %}{% set title="default" %}{% endif %}
body(class="{{ title }}")
2018-08-31 19:08:52 +02:00
| {% with messages = get_flashed_messages(with_categories=True) %}
| {% if messages %}
| {% for (category, message) in messages %}
.alert(role="alert", class="alert-{{ category }}")
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-15 05:36:23 +02:00
+nav-secondary()
+nav-secondary-link(
href="{{ url_for('main.homepage') }}",
title="Blender Cloud Homepage",
data-toggle="tooltip",
data-placement="bottom",
class="px-2")
i.pi-blender-cloud
2018-08-31 19:08:52 +02:00
2018-09-15 05:36:23 +02:00
button.navbar-toggler.text-light(
data-target=".navbar-collapse",
data-toggle="collapse",
type="button")
span.sr-only Toggle navigation
span.navbar-toggler-icon.d-flex.align-items-center
i.pi-menu
li.nav-item.dropdown.large
a.nav-link.dropdown-toggle.px-2(
href="{{ url_for('main.homepage') }}"
data-toggle="dropdown")
span Blender Cloud
i.pi-angle-down
ul.dropdown-menu.nav-main
+nav-secondary()(
2018-09-17 17:09:43 +02:00
class="nav-secondary-vertical float-left bg-light border-left rounded-left")
2018-09-15 05:36:23 +02:00
+nav-secondary-link(
href="{{ url_for('main.homepage') }}",
data-toggle='dropdown-tab',
data-tab-target='home')
i.mr-2.pi-home
span Home
+nav-secondary-link(
href="{{ url_for('cloud.open_projects') }}",
data-toggle='dropdown-tab',
data-tab-target='films')
i.mr-2.pi-film-thick
span Films
+nav-secondary-link(
href="{{ url_for('cloud.workshops') }}",
data-toggle='dropdown-tab',
data-tab-target='training')
i.mr-2.pi-graduation-cap
span Training
+nav-secondary-link(
href="/p/textures",
data-toggle='dropdown-tab',
data-tab-target='libraries')
i.mr-2.pi-file-archive
span Libraries
+nav-secondary-link(
href="{{ url_for('cloud.services') }}",
data-toggle='dropdown-tab',
2018-09-17 17:09:43 +02:00
data-tab-target='services',
class="{% if title == 'services' %}active{% endif %}")
2018-09-15 05:36:23 +02:00
i.mr-2.pi-whoosh
span Services
.dropdown-menu-tab(data-tab='home')
.dropdown-menu-column
2018-09-17 17:09:43 +02:00
+nav-secondary()(class="nav-secondary-vertical rounded-right border-left overflow-hidden")
2018-09-15 05:36:23 +02:00
+nav-secondary-link(href="{{ url_for('projects.index') }}")
i.pi-star
span My Projects
+nav-secondary-link(href="{{ url_for('projects.index') }}")
i.pi-heart
span Shared with me
| {% if current_user.has_organizations() %}
+nav-secondary-link(href="{{ url_for('pillar.web.organizations.index') }}")
i.mr-2.pi-users
span My Organizations
| {% endif %}
+nav-secondary-link(href="{{ url_for('projects.home_project_shared_images')}}")
i.pi-picture
2018-09-15 05:36:23 +02:00
span Image Sharing
+nav-secondary-link(href="{{ url_for('projects.home_project') }}")
i.pi-blender
2018-09-15 05:36:23 +02:00
span Blender Sync
.dropdown-menu-tab(data-tab='films')
.dropdown-menu-column
2018-09-17 17:09:43 +02:00
+nav-secondary()(class="nav-secondary-vertical rounded-right border-left overflow-hidden")
+nav-secondary-link(
href="{{ url_for('cloud.open_projects') }}",
class="nav-see-more border-bottom")
span
| All Open Movies
i.pi-angle-right.pl-2
2018-09-15 05:36:23 +02:00
+nav-secondary-link(
href="{{ url_for('projects.view', project_url='spring') }}")
span Spring
+nav-secondary-link(
href="{{ url_for('projects.view', project_url='hero') }}")
span Hero
+nav-secondary-link(
href="{{ url_for('projects.view', project_url='dailydweebs') }}")
span The Daily Dweebs
+nav-secondary-link(
href="{{ url_for('projects.view', project_url='agent-327') }}")
span Agent 327
.dropdown-menu-tab(data-tab='training')
.dropdown-menu-column
2018-09-17 17:09:43 +02:00
+nav-secondary('Training')(class="nav-secondary-vertical rounded-right border-left overflow-hidden")
2018-09-15 05:36:23 +02:00
+nav-secondary-link(
href="{{ url_for('cloud.courses') }}")
i.pi-graduation-cap
span Courses
2018-09-15 05:36:23 +02:00
+nav-secondary-link(
href="{{ url_for('cloud.workshops') }}")
i.pi-lightbulb
span Workshops
2018-09-15 05:36:23 +02:00
+nav-secondary-link(
href="{{ url_for('cloud.production') }}")
i.pi-puzzle
span Production Lessons
2018-09-15 05:36:23 +02:00
.dropdown-menu-tab(data-tab='libraries')
.dropdown-menu-column
2018-09-17 17:09:43 +02:00
+nav-secondary('Libraries')(class="nav-secondary-vertical rounded-right border-left overflow-hidden")
2018-09-15 05:36:23 +02:00
+nav-secondary-link(href="{{ url_for('projects.view', project_url='textures') }}")
i.pi-folder-texture
2018-09-15 05:36:23 +02:00
span Textures
2018-09-15 21:36:32 +02:00
2018-09-15 05:36:23 +02:00
+nav-secondary-link(href="{{ url_for('projects.view', project_url='hdri') }}")
i.pi-globe
2018-09-15 05:36:23 +02:00
span HDRI
2018-09-15 21:36:32 +02:00
2018-09-15 05:36:23 +02:00
+nav-secondary-link(href="{{ url_for('projects.view', project_url='characters') }}")
i.pi-character
2018-09-15 05:36:23 +02:00
span Characters
2018-09-15 21:36:32 +02:00
+nav-secondary-link(href="{{ url_for('projects.view', project_url='gallery') }}")
i.pi-picture
2018-09-15 21:36:32 +02:00
span Art Gallery
2018-09-15 05:36:23 +02:00
.dropdown-menu-tab(data-tab='services')
.dropdown-menu-column
2018-09-17 17:09:43 +02:00
+nav-secondary()(class="nav-secondary-vertical rounded-right border-left overflow-hidden")
+nav-secondary-link(
href="{{ url_for('cloud.services') }}",
class="nav-see-more border-bottom")
span
| All Services
i.pi-angle-right.pl-2
2018-09-15 05:36:23 +02:00
+nav-secondary-link(href="/attract")
i.pi-attract
2018-09-15 05:36:23 +02:00
span Attract
+nav-secondary-link(href="/flamenco")
i.pi-attract
2018-09-15 05:36:23 +02:00
span Flamenco
+nav-secondary-link(href="{{ url_for('cloud.services') }}#blender-cloud-add-on")
i.pi-blender
2018-09-15 05:36:23 +02:00
span Blender Cloud add-on
+nav-secondary-link(href="{{ url_for('cloud.services') }}#texture-browser")
i.pi-texture
2018-09-15 05:36:23 +02:00
span Texture & HDRI Browser
| {% block navigation_tabs %}
| {% endblock navigation_tabs %}
2018-08-31 19:08:52 +02:00
| {% block navigation_search %}
| {% endblock navigation_search %}
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 %}
| {% block navigation_sections %}
2018-09-11 19:41:16 +02:00
+nav-secondary-link(
href="{{ url_for('main.nodes_search_index') }}",
title="Search Blender Cloud",
data-toggle="tooltip",
data-placement="bottom",
2018-09-15 05:36:23 +02:00
class="py-2 px-2 text-muted")
2018-09-11 19:41:16 +02:00
i.pi-search
2018-09-07 18:12:01 +02:00
| {% 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-07 18:12:01 +02:00
a.btn.btn-sm.btn-primary.px-3.mx-1(
href="https://store.blender.org/product/membership/",
title="Sign up") Sign up
| {% endif %}
2018-08-31 19:08:52 +02:00
.loader-bar
2018-08-31 19:08:52 +02:00
.page-content
#search-overlay
| {% block page_overlay %}
#page-overlay
| {% endblock page_overlay %}
.page-body
| {% block body %}{% endblock %}
| {% block footer_container %}
2018-08-31 19:08:52 +02:00
.footer-wrapper
| {% block footer_navigation %}
2018-08-31 19:08:52 +02:00
.footer-navigation
.container
.row
.col-md-4.col-xs-6
h4
a(href="{{ url_for('main.homepage') }}")
i.pi-blender-cloud-logo
p.pl-2.
Blender Cloud is the creative hub for your projects,
powered by Free and Open Source Software.
h5.d-flex
a.px-2(href="https://twitter.com/Blender_Cloud",
title="Follow us on Twitter")
i.pi-social-youtube
a.px-2(href="https://twitter.com/Blender_Cloud",
title="Follow us on Twitter")
i.pi-social-twitter
a.px-2(href="https://www.facebook.com/BlenderCloudOfficial/",
title="Follow us on Facebook")
i.pi-social-facebook
.col-md-2.col-xs-6
h7.font-weight-bold
| TRAINING
ul.list-unstyled
li
a(href="{{ url_for('cloud.courses') }}")
| Courses
li
a(href="{{ url_for('cloud.workshops') }}")
| Workshops
li
a(href="{{ url_for('projects.view', project_url='gallery') }}")
| Art Gallery
.col-md-2.col-xs-6
h7.font-weight-bold
| LIBRARIES
ul.list-unstyled
li
a(href="{{ url_for('main.main_blog') }}",
title="Blender Cloud Blog")
| HDRIs
li
a(href="{{ url_for('cloud.services') }}",
title="Blender Cloud Services")
| Textures
li
a(href="{{ url_for('cloud.about') }}",
title="About Blender Cloud")
| Characters
.col-md-2.col-xs-6
h7.font-weight-bold
a(href="{{ url_for('cloud.services') }}")
| SERVICES
ul.list-unstyled
li
a(href="{{ url_for('main.main_blog') }}",
title="Blender Cloud Blog")
| Add-on
li
a(href="{{ url_for('main.main_blog') }}",
title="Blender Cloud Blog")
| Blender Sync
li
a(href="{{ url_for('cloud.services') }}",
title="Blender Cloud Services")
| Attract
li
a(href="{{ url_for('cloud.about') }}",
title="About Blender Cloud")
| Flamenco
li
a(href="{{ url_for('cloud.about') }}",
title="About Blender Cloud")
| Image Sharing
.col-md-2.col-xs-6
h7.font-weight-bold
| BLENDER
ul.list-unstyled
li
a(href="{{ url_for('main.main_blog') }}",
title="Blender Cloud Blog")
| blender.org
li
a(href="{{ url_for('cloud.terms_and_conditions') }}",
title="Terms and Conditions")
| Terms and Conditions
li
a(href="{{ url_for('cloud.privacy') }}",
title="Privacy")
| Privacy
| {% endblock footer_navigation %}
2018-08-31 19:08:52 +02:00
#hop(title="Be awesome in space")
i.pi-angle-up
| {% endblock footer_container %}
#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="")
| {% 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 %}
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.
if (typeof $().tooltip != 'undefined'){
$('[data-toggle="tooltip"]').tooltip({'delay' : {'show': 0, 'hide': 0}});
}
2018-09-15 05:36:23 +02:00
// Main dropdown menu logic.
$('[data-toggle="dropdown-tab"]').hover(function(){
let tab = $(this).data('tab-target');
$('[data-toggle="dropdown-tab"]').removeClass('active');
$(this).addClass('active');
$('[data-tab]').removeClass('show');
$('[data-tab="' + tab + '"]').addClass('show');
});
| {% 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');