Use Navigation Tabs for homepage and index collections
This commit is contained in:
@@ -18,6 +18,10 @@ meta(property="og:image", content="{% if main_project.picture_header %}{{ main_p
|
|||||||
meta(name="twitter:image", content="{% if main_project.picture_header %}{{ main_project.picture_header.thumbnail('l', api=api) }}{% else %}{{ url_for('static', filename='assets/img/backgrounds/background_agent327_04.jpg')}}{% endif %}")
|
meta(name="twitter:image", content="{% if main_project.picture_header %}{{ main_project.picture_header.thumbnail('l', api=api) }}{% else %}{{ url_for('static', filename='assets/img/backgrounds/background_agent327_04.jpg')}}{% endif %}")
|
||||||
| {% endblock %}
|
| {% endblock %}
|
||||||
|
|
||||||
|
| {% block navigation_tabs %}
|
||||||
|
| {{ navigation_tabs(title) }}
|
||||||
|
| {% endblock navigation_tabs %}
|
||||||
|
|
||||||
| {% block body %}
|
| {% block body %}
|
||||||
.dashboard-container
|
.dashboard-container
|
||||||
section.dashboard-main
|
section.dashboard-main
|
||||||
|
@@ -76,7 +76,7 @@ html(lang="en")
|
|||||||
href="{{ url_for('main.homepage') }}",
|
href="{{ url_for('main.homepage') }}",
|
||||||
title="Blender Cloud")
|
title="Blender Cloud")
|
||||||
span.app-logo
|
span.app-logo
|
||||||
i.pi-blender-cloud-logo
|
i.pi-blender-cloud
|
||||||
|
|
||||||
button.navbar-toggler.text-light(
|
button.navbar-toggler.text-light(
|
||||||
data-target=".navbar-collapse",
|
data-target=".navbar-collapse",
|
||||||
@@ -86,12 +86,16 @@ html(lang="en")
|
|||||||
span.navbar-toggler-icon.d-flex.align-items-center
|
span.navbar-toggler-icon.d-flex.align-items-center
|
||||||
i.pi-menu
|
i.pi-menu
|
||||||
|
|
||||||
|
| {% block navigation_tabs %}
|
||||||
|
| {% endblock navigation_tabs %}
|
||||||
|
|
||||||
| {% block navigation_search %}
|
| {% block navigation_search %}
|
||||||
.search-input
|
// TODO (pablo) - bring it back asap
|
||||||
input#cloud-search(
|
.search-input
|
||||||
type="text",
|
input#cloud-search(
|
||||||
placeholder="Search assets, tutorials...")
|
type="text",
|
||||||
i.search-icon.pi-search
|
placeholder="Search assets, tutorials...")
|
||||||
|
i.search-icon.pi-search
|
||||||
| {% endblock navigation_search %}
|
| {% endblock navigation_search %}
|
||||||
|
|
||||||
.collapse.navbar-collapse
|
.collapse.navbar-collapse
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
| {% extends 'layout.html' %}
|
| {% extends 'layout.html' %}
|
||||||
|
|
||||||
include mixins/components
|
include mixins/components
|
||||||
|
|
||||||
| {# Default case is Open Projects #}
|
| {# Default case is Open Projects #}
|
||||||
@@ -39,26 +40,38 @@ meta(name="twitter:image", content="{{ page_header_image }}")
|
|||||||
| {{ page_title }}
|
| {{ page_title }}
|
||||||
| {% endblock %}
|
| {% endblock %}
|
||||||
|
|
||||||
|
| {% block navigation_tabs %}
|
||||||
|
|
||||||
|
| {% if title in ['courses', 'workshops'] %}
|
||||||
|
+nav-secondary
|
||||||
|
+nav-secondary-link(
|
||||||
|
class="{% if title == 'workshops' %}active{% endif %}",
|
||||||
|
href="{{ url_for('cloud.workshops') }}")
|
||||||
|
| Workshops
|
||||||
|
|
||||||
|
+nav-secondary-link(
|
||||||
|
class="{% if title == 'courses' %}active{% endif %}",
|
||||||
|
href="{{ url_for('cloud.courses') }}")
|
||||||
|
| Courses
|
||||||
|
|
||||||
|
+nav-secondary-link(
|
||||||
|
class="{% if title == 'gallery' %}active{% endif %}",
|
||||||
|
href="{{ url_for('projects.view', project_url='gallery') }}")
|
||||||
|
| Art Gallery
|
||||||
|
| {% endif %}
|
||||||
|
|
||||||
|
| {% endblock navigation_tabs %}
|
||||||
|
|
||||||
| {% block body %}
|
| {% block body %}
|
||||||
|
|
||||||
+jumbotron("{{ page_title }}", "{{ page_header_text }}", "{{ page_header_image }}")
|
|
||||||
|
|
||||||
.container.pb-5
|
.container.pb-5
|
||||||
+nav-secondary("{% if title in ['courses', 'workshops'] %}Training{% else %}Open Projects{% endif %}")
|
.pt-4
|
||||||
+nav-secondary-link(
|
h2.text-uppercase.font-weight-bold
|
||||||
class="{% if title == 'workshops' %}active{% endif %}",
|
| {{ page_title }}
|
||||||
href="{{ url_for('cloud.workshops') }}")
|
.lead
|
||||||
| Workshops
|
| {{ page_header_text }}
|
||||||
|
|
||||||
+nav-secondary-link(
|
hr.pb-2
|
||||||
class="{% if title == 'courses' %}active{% endif %}",
|
|
||||||
href="{{ url_for('cloud.courses') }}")
|
|
||||||
| Courses
|
|
||||||
|
|
||||||
+nav-secondary-link(
|
|
||||||
class="{% if title == 'gallery' %}active{% endif %}",
|
|
||||||
href="{{ url_for('projects.view', project_url='gallery') }}")
|
|
||||||
| Art Gallery
|
|
||||||
|
|
||||||
+card-deck(3)
|
+card-deck(3)
|
||||||
| {% for project in projects %}
|
| {% for project in projects %}
|
||||||
@@ -67,7 +80,7 @@ meta(name="twitter:image", content="{{ page_header_image }}")
|
|||||||
+card(data-url="{{ url_for('projects.view', project_url=project.url) }}", tabindex='{{ loop.index }}')
|
+card(data-url="{{ url_for('projects.view', project_url=project.url) }}", tabindex='{{ loop.index }}')
|
||||||
| {% if project.picture_header %}
|
| {% if project.picture_header %}
|
||||||
a(href="{{ url_for('projects.view', project_url=project.url) }}")
|
a(href="{{ url_for('projects.view', project_url=project.url) }}")
|
||||||
img.card-img-top.rounded-0(
|
img.card-img-top(
|
||||||
src="{{ project.picture_header.thumbnail('l', api=api) }}", alt="{{ project.name }}")
|
src="{{ project.picture_header.thumbnail('l', api=api) }}", alt="{{ project.name }}")
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user