2018-09-07 17:19:36 +02:00
|
|
|
include ../../../../pillar/src/templates/mixins/components
|
2018-09-06 12:54:15 +02:00
|
|
|
|
2018-09-20 16:36:46 +02:00
|
|
|
| {#
|
|
|
|
| Main dropdown macros. These are just links without a container.
|
|
|
|
| So the container can be set per case (big dropdown, mobile, footer, etc)
|
|
|
|
| and the links reused multiple times.
|
|
|
|
| #}
|
|
|
|
|
|
|
|
| {% macro dropdown_main_root(title) %}
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('main.homepage') }}",
|
|
|
|
data-toggle='dropdown-tab',
|
|
|
|
data-tab-target='home')
|
|
|
|
i.mr-2.pi-home
|
|
|
|
span Homepage
|
|
|
|
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('cloud.open_projects') }}",
|
|
|
|
data-toggle='dropdown-tab',
|
|
|
|
data-tab-target='open-projects')
|
|
|
|
i.mr-2.pi-film-thick
|
|
|
|
span Open Projects
|
|
|
|
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('cloud.learn') }}",
|
|
|
|
data-toggle='dropdown-tab',
|
|
|
|
data-tab-target='learn')
|
|
|
|
i.mr-2.pi-graduation-cap
|
|
|
|
span Learn
|
|
|
|
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('cloud.libraries') }}",
|
|
|
|
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',
|
|
|
|
data-tab-target='services',
|
|
|
|
class="{% if title == 'services' %}active{% endif %}")
|
|
|
|
i.mr-2.pi-whoosh
|
|
|
|
span Services
|
|
|
|
| {% endmacro %}
|
|
|
|
|
|
|
|
|
|
|
|
| {% macro dropdown_main_home(title) %}
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('main.main_blog') }}")
|
|
|
|
i.pi-newspaper
|
|
|
|
span Blog
|
|
|
|
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('projects.index') }}")
|
|
|
|
i.pi-star
|
|
|
|
span My Projects
|
|
|
|
|
|
|
|
| {% if current_user.has_organizations() %}
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('pillar.web.organizations.index') }}")
|
|
|
|
i.pi-users
|
|
|
|
span My Organizations
|
|
|
|
| {% endif %}
|
|
|
|
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('projects.home_project_shared_images')}}")
|
|
|
|
i.pi-picture
|
|
|
|
span Image Sharing
|
|
|
|
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('projects.home_project') }}")
|
|
|
|
i.pi-blender
|
|
|
|
span Blender Sync
|
|
|
|
| {% endmacro %}
|
|
|
|
|
|
|
|
|
|
|
|
| {% macro dropdown_main_open_projects(title) %}
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('cloud.open_projects') }}",
|
|
|
|
class="nav-see-more border-bottom")
|
|
|
|
span.font-weight-bold
|
|
|
|
| Open Projects
|
|
|
|
i.pi-angle-right.pl-2
|
|
|
|
|
|
|
|
+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
|
|
|
|
| {% endmacro %}
|
|
|
|
|
|
|
|
|
|
|
|
| {% macro dropdown_main_learn(title) %}
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('cloud.learn') }}",
|
|
|
|
class="nav-see-more border-bottom")
|
|
|
|
span.font-weight-bold
|
|
|
|
| Learn
|
|
|
|
i.pi-angle-right.pl-2
|
|
|
|
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('cloud.courses') }}")
|
|
|
|
i.pi-graduation-cap
|
|
|
|
span Courses
|
|
|
|
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('cloud.workshops') }}")
|
|
|
|
i.pi-lightbulb
|
|
|
|
span Workshops
|
|
|
|
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('cloud.production') }}")
|
|
|
|
i.pi-puzzle
|
|
|
|
span.new Production Lessons
|
|
|
|
| {% endmacro %}
|
|
|
|
|
|
|
|
|
|
|
|
| {% macro dropdown_main_libraries(title) %}
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('cloud.libraries') }}",
|
|
|
|
class="nav-see-more border-bottom")
|
|
|
|
span.font-weight-bold
|
|
|
|
| Libraries
|
|
|
|
i.pi-angle-right.pl-2
|
|
|
|
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('projects.view', project_url='textures') }}")
|
|
|
|
i.pi-folder-texture
|
|
|
|
span Textures
|
|
|
|
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('projects.view', project_url='hdri') }}")
|
|
|
|
i.pi-globe
|
|
|
|
span HDRI
|
|
|
|
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('projects.view', project_url='characters') }}")
|
|
|
|
i.pi-character
|
|
|
|
span Characters
|
|
|
|
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('projects.view', project_url='gallery') }}")
|
|
|
|
i.pi-picture
|
|
|
|
span Art Gallery
|
|
|
|
| {% endmacro %}
|
|
|
|
|
|
|
|
|
|
|
|
| {% macro dropdown_main_services(title) %}
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('cloud.services') }}",
|
|
|
|
class="nav-see-more border-bottom")
|
|
|
|
span.font-weight-bold
|
|
|
|
| Services
|
|
|
|
i.pi-angle-right.pl-2
|
|
|
|
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="/attract")
|
|
|
|
i.pi-attract
|
|
|
|
span Attract
|
|
|
|
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="/flamenco")
|
|
|
|
i.pi-attract
|
|
|
|
span Flamenco
|
|
|
|
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('cloud.services') }}#blender-cloud-add-on")
|
|
|
|
i.pi-blender
|
|
|
|
span Blender Cloud add-on
|
|
|
|
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('cloud.services') }}#texture-browser")
|
|
|
|
i.pi-texture
|
|
|
|
span Texture & HDRI Browser
|
|
|
|
| {% endmacro %}
|
|
|
|
|
|
|
|
|
|
|
|
| {#
|
|
|
|
| Secondary Navigation Bars.
|
|
|
|
| They include the nav-secondary() container unlike dropdown entries which are just links.
|
|
|
|
| #}
|
|
|
|
|
2018-09-19 11:20:17 +02:00
|
|
|
| {% macro navigation_homepage(title) %}
|
2018-09-21 16:19:13 +02:00
|
|
|
+nav-secondary(class="d-none d-sm-flex")
|
2018-09-19 19:34:49 +02:00
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('cloud.open_projects') }}",
|
|
|
|
class="{% if title == 'open-projects' %}active{% endif %}")
|
|
|
|
span Open Projects
|
2018-09-06 12:54:15 +02:00
|
|
|
|
|
|
|
+nav-secondary-link(
|
2018-09-20 18:11:26 +02:00
|
|
|
href="{{ url_for('cloud.learn') }}")
|
|
|
|
span Learn
|
2018-09-19 11:20:17 +02:00
|
|
|
|
|
|
|
+nav-secondary-link(
|
2018-09-20 18:11:26 +02:00
|
|
|
href="{{ url_for('cloud.libraries') }}")
|
|
|
|
span Libraries
|
2018-09-19 11:20:17 +02:00
|
|
|
|
|
|
|
+nav-secondary-link(
|
|
|
|
class="{% if title == 'services' %}active{% endif %}",
|
|
|
|
href="{{ url_for('cloud.services') }}")
|
|
|
|
span Services
|
|
|
|
| {% endmacro %}
|
2018-09-15 05:36:23 +02:00
|
|
|
|
2018-09-20 16:36:46 +02:00
|
|
|
|
2018-09-20 15:00:10 +02:00
|
|
|
| {% macro navigation_learn(title) %}
|
2018-09-21 16:19:13 +02:00
|
|
|
+nav-secondary(class="d-none d-sm-flex")
|
2018-09-20 15:00:10 +02:00
|
|
|
+nav-secondary-link(
|
|
|
|
class="px-0 text-black-50 {% if title == 'learn' %}active{% endif %}",
|
|
|
|
href="{{ url_for('cloud.learn') }}")
|
|
|
|
span Learn
|
2018-09-19 19:34:49 +02:00
|
|
|
|
2018-09-20 15:00:10 +02:00
|
|
|
li.pl-1
|
2018-09-19 19:34:49 +02:00
|
|
|
i.pi-angle-right
|
|
|
|
|
2018-09-19 11:20:17 +02:00
|
|
|
+nav-secondary-link(
|
|
|
|
class="{% if title == 'courses' %}active{% endif %}",
|
|
|
|
href="{{ url_for('cloud.courses') }}")
|
|
|
|
span Courses
|
|
|
|
|
|
|
|
+nav-secondary-link(
|
|
|
|
class="{% if title == 'workshops' %}active{% endif %}",
|
|
|
|
href="{{ url_for('cloud.workshops') }}")
|
|
|
|
span Workshops
|
|
|
|
|
|
|
|
+nav-secondary-link(
|
|
|
|
class="{% if title == 'production' %}active{% endif %}",
|
|
|
|
href="{{ url_for('cloud.production') }}")
|
|
|
|
span.new Production Lessons
|
2018-09-06 12:54:15 +02:00
|
|
|
| {% endmacro %}
|
2018-09-19 15:39:49 +02:00
|
|
|
|
2018-09-20 15:00:10 +02:00
|
|
|
|
|
|
|
| {% macro navigation_libraries(title) %}
|
2018-09-21 16:19:13 +02:00
|
|
|
+nav-secondary(class="d-none d-sm-flex")
|
2018-09-20 15:00:10 +02:00
|
|
|
+nav-secondary-link(
|
|
|
|
class="px-0 active",
|
|
|
|
href="{{ url_for('cloud.libraries') }}")
|
|
|
|
span Libraries
|
|
|
|
|
|
|
|
li.pl-1
|
|
|
|
i.pi-angle-right
|
|
|
|
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('projects.view', project_url='textures') }}")
|
|
|
|
span Textures
|
|
|
|
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('projects.view', project_url='hdri') }}")
|
|
|
|
span HDRI
|
|
|
|
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('projects.view', project_url='characters') }}")
|
|
|
|
span Characters
|
2018-09-20 18:13:41 +02:00
|
|
|
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('projects.view', project_url='gallery') }}")
|
|
|
|
span Art Gallery
|
2018-09-20 15:00:10 +02:00
|
|
|
| {% endmacro %}
|
|
|
|
|
|
|
|
|
2018-09-19 15:39:49 +02:00
|
|
|
| {% macro navigation_home_project(title) %}
|
2018-09-21 16:19:13 +02:00
|
|
|
+nav-secondary(class="d-none d-sm-flex")
|
2018-09-19 15:39:49 +02:00
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('projects.index') }}",
|
|
|
|
class="{% if title == 'dashboard' %}active{% endif %}")
|
2018-09-19 15:42:33 +02:00
|
|
|
i.pi-star.pr-2
|
2018-09-19 15:39:49 +02:00
|
|
|
span My Projects
|
|
|
|
|
|
|
|
| {% if current_user.has_organizations() %}
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('pillar.web.organizations.index') }}",
|
|
|
|
class="{% if title == 'organizations' %}active{% endif %}")
|
2018-09-19 15:42:33 +02:00
|
|
|
i.pi-users.pr-2
|
2018-09-19 15:39:49 +02:00
|
|
|
span My Organizations
|
|
|
|
| {% endif %}
|
|
|
|
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('projects.home_project_shared_images')}}",
|
|
|
|
class="{% if title == 'images' %}active{% endif %}")
|
2018-09-19 15:42:33 +02:00
|
|
|
i.pi-picture.pr-2
|
2018-09-19 15:39:49 +02:00
|
|
|
span Image Sharing
|
|
|
|
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('projects.home_project') }}",
|
|
|
|
class="{% if title == 'blender-sync' %}active{% endif %}")
|
2018-09-19 15:42:33 +02:00
|
|
|
i.pi-blender.pr-2
|
2018-09-19 15:39:49 +02:00
|
|
|
span Blender Sync
|
|
|
|
| {% endmacro %}
|
2018-09-19 19:34:49 +02:00
|
|
|
|
2018-09-20 15:00:10 +02:00
|
|
|
|
2018-09-19 19:34:49 +02:00
|
|
|
| {% macro navigation_services(title) %}
|
2018-09-21 16:19:13 +02:00
|
|
|
+nav-secondary(class="d-none d-sm-flex")
|
2018-09-20 15:00:10 +02:00
|
|
|
+nav-secondary-link(
|
|
|
|
class="px-0 active",
|
|
|
|
href="{{ url_for('cloud.services') }}")
|
|
|
|
span Services
|
2018-09-19 19:34:49 +02:00
|
|
|
|
2018-09-20 15:00:10 +02:00
|
|
|
li.pl-1
|
|
|
|
i.pi-angle-right
|
2018-09-19 19:34:49 +02:00
|
|
|
|
2018-09-20 15:00:10 +02:00
|
|
|
+nav-secondary-link(
|
|
|
|
href="/attract")
|
|
|
|
i.pi-attract.pr-2
|
|
|
|
span Attract
|
2018-09-19 19:34:49 +02:00
|
|
|
|
2018-09-20 15:00:10 +02:00
|
|
|
+nav-secondary-link(
|
|
|
|
href="/flamenco")
|
|
|
|
i.pi-flamenco.pr-2
|
|
|
|
span Flamenco
|
2018-09-19 19:34:49 +02:00
|
|
|
| {% endmacro %}
|
2018-09-20 12:06:43 +02:00
|
|
|
|
2018-09-20 15:00:10 +02:00
|
|
|
|
2018-09-20 12:06:43 +02:00
|
|
|
| {% macro navigation_project(project, navigation_links, title) %}
|
|
|
|
|
|
|
|
| {% if project.category == 'course' %}
|
|
|
|
| {% set category_url = url_for('cloud.courses') %}
|
2018-09-20 15:00:10 +02:00
|
|
|
| {% set category_title = 'Courses' %}
|
|
|
|
|
2018-09-20 12:06:43 +02:00
|
|
|
| {% elif project.category == 'workshop' %}
|
|
|
|
| {% set category_url = url_for('cloud.workshops') %}
|
2018-09-20 15:00:10 +02:00
|
|
|
| {% set category_title = 'Workshops' %}
|
|
|
|
|
2018-09-20 12:06:43 +02:00
|
|
|
| {% elif project.category == 'film' %}
|
|
|
|
| {% set category_url = url_for('cloud.open_projects') %}
|
2018-09-20 15:00:10 +02:00
|
|
|
| {% set category_title = 'Open Projects' %}
|
|
|
|
|
|
|
|
| {% elif project.category == 'assets' %}
|
|
|
|
| {% set category_url = url_for('cloud.libraries') %}
|
|
|
|
| {% set category_title = 'Libraries' %}
|
|
|
|
|
2018-09-20 12:06:43 +02:00
|
|
|
| {% else %}
|
|
|
|
| {% set category_url = url_for('main.homepage') %}
|
2018-09-20 15:00:10 +02:00
|
|
|
| {% set category_title = project.category %}
|
2018-09-20 12:06:43 +02:00
|
|
|
| {% endif %}
|
|
|
|
|
2018-09-21 16:19:13 +02:00
|
|
|
+nav-secondary(class="d-none d-sm-flex")
|
2018-09-20 12:06:43 +02:00
|
|
|
| {% if project.url != 'blender-cloud' %}
|
|
|
|
| {% if not project.is_private %}
|
2018-09-20 15:00:10 +02:00
|
|
|
+nav-secondary-link(
|
|
|
|
class="px-0 text-black-50 text-capitalize",
|
|
|
|
href="{{ category_url }}")
|
|
|
|
span {{ category_title }}
|
|
|
|
|
2018-09-20 12:06:43 +02:00
|
|
|
li.px-1
|
|
|
|
i.pi-angle-right
|
|
|
|
| {% endif %}
|
|
|
|
|
|
|
|
+nav-secondary-link(
|
|
|
|
class="px-1 font-weight-bold{% if title == 'landing' %} active{% endif %}",
|
|
|
|
href="{{url_for('projects.view', project_url=project.url, _external=True)}}")
|
|
|
|
span {{ project.name }}
|
|
|
|
| {% endif %}
|
|
|
|
|
|
|
|
| {% for link in navigation_links %}
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ link['url'] }}",
|
|
|
|
class="{% if link['slug'] == title %}active{% endif %}")
|
|
|
|
span {{ link['label'] }}
|
|
|
|
| {% endfor %}
|
|
|
|
|
|
|
|
| {% 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 %}
|
|
|
|
+nav-secondary-link(
|
|
|
|
href="{{ url_for('projects.view_node', project_url=project.url, node_id=featured_node_id) }}",
|
|
|
|
title="Explore {{ project.name }}",
|
|
|
|
class="{% if title == 'project' %}active{% endif %}")
|
|
|
|
span Browse
|
|
|
|
| {% endif %}
|
|
|
|
|
|
|
|
| {% endmacro %}
|