Main dropdown tweaks for responsive.

Most of the changes are done in Pillar, in 0_navbar.js (part of tutti).
This commit is contained in:
2018-09-21 16:19:13 +02:00
parent 3de73ac35e
commit 594af19b2b
3 changed files with 11 additions and 30 deletions

View File

@@ -192,7 +192,7 @@ include ../../../../pillar/src/templates/mixins/components
| #}
| {% macro navigation_homepage(title) %}
+nav-secondary()
+nav-secondary(class="d-none d-sm-flex")
+nav-secondary-link(
href="{{ url_for('cloud.open_projects') }}",
class="{% if title == 'open-projects' %}active{% endif %}")
@@ -214,7 +214,7 @@ include ../../../../pillar/src/templates/mixins/components
| {% macro navigation_learn(title) %}
+nav-secondary
+nav-secondary(class="d-none d-sm-flex")
+nav-secondary-link(
class="px-0 text-black-50 {% if title == 'learn' %}active{% endif %}",
href="{{ url_for('cloud.learn') }}")
@@ -241,7 +241,7 @@ include ../../../../pillar/src/templates/mixins/components
| {% macro navigation_libraries(title) %}
+nav-secondary
+nav-secondary(class="d-none d-sm-flex")
+nav-secondary-link(
class="px-0 active",
href="{{ url_for('cloud.libraries') }}")
@@ -269,7 +269,7 @@ include ../../../../pillar/src/templates/mixins/components
| {% macro navigation_home_project(title) %}
+nav-secondary()
+nav-secondary(class="d-none d-sm-flex")
+nav-secondary-link(
href="{{ url_for('projects.index') }}",
class="{% if title == 'dashboard' %}active{% endif %}")
@@ -299,7 +299,7 @@ include ../../../../pillar/src/templates/mixins/components
| {% macro navigation_services(title) %}
+nav-secondary()
+nav-secondary(class="d-none d-sm-flex")
+nav-secondary-link(
class="px-0 active",
href="{{ url_for('cloud.services') }}")
@@ -343,7 +343,7 @@ include ../../../../pillar/src/templates/mixins/components
| {% set category_title = project.category %}
| {% endif %}
+nav-secondary()
+nav-secondary(class="d-none d-sm-flex")
| {% if project.url != 'blender-cloud' %}
| {% if not project.is_private %}
+nav-secondary-link(

View File

@@ -68,14 +68,6 @@ html(lang="en")
nav.navbar.navbar-expand-md.fixed-top.bg-white
+nav-secondary()
button.navbar-toggler(
data-target=".sarasa",
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') }}"
@@ -175,17 +167,6 @@ html(lang="en")
$('[data-toggle="tooltip"]').tooltip({'delay' : {'show': 0, 'hide': 0}});
}
// 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 %}

View File

@@ -7,31 +7,31 @@ ul.dropdown-menu.nav-main
class="nav-secondary-vertical float-left bg-light border-left rounded-left")
| {{ navigation.dropdown_main_root(title) }}
.dropdown-menu-tab(data-tab='home')
.dropdown-menu-tab(data-dropdown-tab='home')
.dropdown-menu-column
+nav-secondary()(
class="nav-secondary-vertical rounded-right border-left overflow-hidden")
| {{ navigation.dropdown_main_home(title) }}
.dropdown-menu-tab(data-tab='open-projects')
.dropdown-menu-tab(data-dropdown-tab='open-projects')
.dropdown-menu-column
+nav-secondary()(
class="nav-secondary-vertical rounded-right border-left overflow-hidden")
| {{ navigation.dropdown_main_open_projects(title) }}
.dropdown-menu-tab(data-tab='learn')
.dropdown-menu-tab(data-dropdown-tab='learn')
.dropdown-menu-column
+nav-secondary()(
class="nav-secondary-vertical rounded-right border-left overflow-hidden")
| {{ navigation.dropdown_main_learn(title) }}
.dropdown-menu-tab(data-tab='libraries')
.dropdown-menu-tab(data-dropdown-tab='libraries')
.dropdown-menu-column
+nav-secondary()(
class="nav-secondary-vertical rounded-right border-left overflow-hidden")
| {{ navigation.dropdown_main_libraries(title) }}
.dropdown-menu-tab(data-tab='services')
.dropdown-menu-tab(data-dropdown-tab='services')
.dropdown-menu-column
+nav-secondary()(
class="nav-secondary-vertical rounded-right border-left overflow-hidden")