Remove unused project macros file
The only macro was render_secondary_navigation, which is in the _navigation.pug template together with the other Blender Cloud navigation macros.
This commit is contained in:
parent
04f00cdd4f
commit
bbad8eb5c5
@ -1,58 +0,0 @@
|
||||
include ../mixins/components
|
||||
|
||||
| {% macro render_secondary_navigation(project, navigation_links, title) %}
|
||||
|
||||
| {% if project.category == 'course' %}
|
||||
| {% set category_url = url_for('cloud.courses') %}
|
||||
| {% elif project.category == 'workshop' %}
|
||||
| {% set category_url = url_for('cloud.workshops') %}
|
||||
| {% elif project.category == 'film' %}
|
||||
| {% set category_url = url_for('cloud.open_projects') %}
|
||||
| {% else %}
|
||||
| {% set category_url = url_for('main.homepage') %}
|
||||
| {% endif %}
|
||||
|
||||
+nav-secondary()
|
||||
| {% if project.url != 'blender-cloud' %}
|
||||
| {% if not project.is_private %}
|
||||
li.text-capitalize
|
||||
a.nav-link.text-muted.px-0(href="{{ category_url }}")
|
||||
| {% if project.category == 'film' %}
|
||||
span Open Projects
|
||||
| {% elif project.category == 'assets' %}
|
||||
span Libraries
|
||||
| {% else %}
|
||||
span {{ project.category }}
|
||||
| {% endif %}
|
||||
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 %}
|
Loading…
x
Reference in New Issue
Block a user