175 lines
4.7 KiB
Plaintext
175 lines
4.7 KiB
Plaintext
include ../../../../pillar/src/templates/mixins/components
|
|
|
|
| {#
|
|
| Secondary Navigation Bars.
|
|
| #}
|
|
|
|
| {% macro navigation_homepage(title) %}
|
|
button.navbar-toggler(
|
|
type="button",
|
|
data-toggle="collapse",
|
|
data-target="#navigationLinks",
|
|
aria-controls="navigationLinks",
|
|
aria-expanded="false",
|
|
aria-label="Toggle navigation"
|
|
)
|
|
i.pi-blender-cloud
|
|
i.pi-angle-down
|
|
+nav-secondary(class="collapse navbar-collapse")#navigationLinks
|
|
+nav-secondary-link(
|
|
href="{{ url_for('main.homepage') }}")
|
|
i.pi-blender-cloud-logo
|
|
|
|
+nav-secondary-link(
|
|
href="{{ url_for('cloud.open_projects') }}",
|
|
class="{% if title == 'films' %}active{% endif %}")
|
|
span Films
|
|
|
|
+nav-secondary-link(
|
|
href="{{ url_for('cloud.learn') }}",
|
|
class="{% if title in ('learn', 'courses', 'workshops') %}active{% endif %}")
|
|
span Training
|
|
|
|
+nav-secondary-link(
|
|
href="{{ url_for('cloud.libraries') }}",
|
|
class="{% if title == 'libraries' %}active{% endif %}")
|
|
span Libraries
|
|
|
|
+nav-secondary-link(
|
|
href="{{ url_for('cloud.services') }}",
|
|
class="{% if title == 'services' %}active{% endif %}")
|
|
span Services
|
|
| {% endmacro %}
|
|
|
|
|
|
| {% macro navigation_home_project(title) %}
|
|
button.navbar-toggler(
|
|
type="button",
|
|
data-toggle="collapse",
|
|
data-target="#navigationLinks",
|
|
aria-controls="navigationLinks",
|
|
aria-expanded="false",
|
|
aria-label="Toggle navigation"
|
|
)
|
|
i.pi-blender-cloud
|
|
i.pi-angle-down
|
|
+nav-secondary(class="collapse navbar-collapse")#navigationLinks
|
|
+nav-secondary-link(
|
|
href="{{ url_for('main.homepage') }}")
|
|
i.pi-blender-cloud
|
|
|
|
+nav-secondary-link(
|
|
href="{{ url_for('projects.index') }}",
|
|
class="{% if title == 'dashboard' %}active{% endif %}")
|
|
i.pi-star.pr-2
|
|
span My Projects
|
|
|
|
| {% if current_user.has_organizations() %}
|
|
+nav-secondary-link(
|
|
href="{{ url_for('pillar.web.organizations.index') }}",
|
|
class="{% if title == 'organizations' %}active{% endif %}")
|
|
i.pi-users.pr-2
|
|
span My Organizations
|
|
| {% endif %}
|
|
|
|
+nav-secondary-link(
|
|
href="{{ url_for('projects.home_project_shared_images')}}",
|
|
class="{% if title == 'images' %}active{% endif %}")
|
|
i.pi-picture.pr-2
|
|
span Image Sharing
|
|
|
|
+nav-secondary-link(
|
|
href="{{ url_for('projects.home_project') }}",
|
|
class="{% if title == 'blender-sync' %}active{% endif %}")
|
|
i.pi-blender.pr-2
|
|
span Blender Sync
|
|
| {% endmacro %}
|
|
|
|
|
|
| {% macro navigation_project(project, navigation_links, extension_sidebar_links, title) %}
|
|
|
|
| {% if project.category == 'course' %}
|
|
| {% set category_url = url_for('cloud.courses') %}
|
|
| {% set category_title = 'Courses' %}
|
|
|
|
| {% elif project.category == 'workshop' %}
|
|
| {% set category_url = url_for('cloud.workshops') %}
|
|
| {% set category_title = 'Workshops' %}
|
|
|
|
| {% elif project.category == 'film' %}
|
|
| {% set category_url = url_for('cloud.open_projects') %}
|
|
| {% set category_title = 'Films' %}
|
|
|
|
| {% elif project.category == 'assets' %}
|
|
| {% set category_url = url_for('cloud.libraries') %}
|
|
| {% set category_title = 'Libraries' %}
|
|
|
|
| {% else %}
|
|
| {% set category_url = url_for('main.homepage') %}
|
|
| {% set category_title = project.category %}
|
|
| {% endif %}
|
|
|
|
button.navbar-toggler(
|
|
type="button",
|
|
data-toggle="collapse",
|
|
data-target="#navigationLinks",
|
|
aria-controls="navigationLinks",
|
|
aria-expanded="false",
|
|
aria-label="Toggle navigation"
|
|
)
|
|
i.pi-blender-cloud
|
|
i.pi-angle-down
|
|
|
|
+nav-secondary(class="collapse navbar-collapse")#navigationLinks
|
|
|
|
//- Blender Cloud logo.
|
|
+nav-secondary-link(
|
|
href="{{ url_for('main.homepage') }}")
|
|
i.pi-blender-cloud
|
|
|
|
//- Category (Films, Courses, etc).
|
|
+nav-secondary-link(
|
|
href="{{ category_url }}",
|
|
class="px-0")
|
|
span {{ category_title }}
|
|
li(class="nav-item px-1")
|
|
i.pi-angle-right
|
|
|
|
//- Project Name.
|
|
| {% if project.url != 'blender-cloud' %}
|
|
+nav-secondary-link(
|
|
class="font-weight-bold{% if title == 'default' %} active{% endif %} px-0",
|
|
href="{{url_for('projects.view', project_url=project.url, _external=True)}}")
|
|
span {{ project.name }}
|
|
| {% endif %}
|
|
|
|
//- Pages (Blog, Team, Awards, etc).
|
|
| {% for link in navigation_links %}
|
|
+nav-secondary-link(
|
|
href="{{ link['url'] }}",
|
|
class="{% if link['slug'] == title %}active{% endif %}")
|
|
span {{ link['label'] }}
|
|
| {% endfor %}
|
|
|
|
+nav-secondary-link(
|
|
href="{{ url_for('cloud.project_browse', project_url=project.url) }}",
|
|
title="Browse {{ project.name }}",
|
|
class="{% if title == 'project' %}active{% endif %}")
|
|
span Browse
|
|
|
|
//- Link to Production Tools (Attract, Flamenco, SVN, etc).
|
|
| {% if extension_sidebar_links %}
|
|
+nav-secondary()
|
|
li.nav-item.dropdown
|
|
a.nav-link.dropdown-toggle(
|
|
class="{% if title == 'production-tools' %}active{% endif %}"
|
|
href="#"
|
|
data-toggle="dropdown")
|
|
span Production Tools
|
|
i.pi-angle-down
|
|
|
|
ul.dropdown-menu
|
|
| {{ extension_sidebar_links }}
|
|
| {% endif %}
|
|
| {% endmacro %}
|