mirror of
https://github.com/tabler/tabler.git
synced 2026-07-24 03:54:42 +04:00
auto-open layout
This commit is contained in:
@@ -165,6 +165,9 @@ layout:
|
||||
fluid:
|
||||
url: layout-fluid.html
|
||||
title: Fluid
|
||||
fluid-vertical:
|
||||
url: layout-fluid-vertical.html
|
||||
title: Fluid vertical
|
||||
|
||||
docs:
|
||||
title: Docs
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
{% for level-1 in menu %}
|
||||
{% assign icon = level-1[1].icon %}
|
||||
<li class="nav-item{% if level-1[0] == current-page[0] or level-1[1].active %} active{% endif %}{% if level-1[1].children %} dropdown{% endif %}">
|
||||
<a class="nav-link{% if level-1[1].children %} dropdown-toggle{% endif %}{% if level-1[1].disabled %} disabled{% endif %}" {% if level-1[1].children %}href="#navbar-{{ level-1[0] }}" data-toggle="dropdown" role="button"
|
||||
aria-expanded="{% if level-1[0] == current-page[0] %}true{% else %}false{% endif %}" {% else %}href="{{ site.base }}/{{ level-1[1].url }}" {% endif %}>
|
||||
<a class="nav-link{% if level-1[1].children %} dropdown-toggle{% endif %}{% if level-1[1].disabled %} disabled{% endif %}" {% if level-1[1].children %}href="#navbar-{{ level-1[0] }}" data-toggle="dropdown" role="button" aria-expanded="{% if include.auto-open and level-1[0] == current-page[0] %}true{% else %}false{% endif %}" {% else %}href="{{ site.base }}/{{ level-1[1].url }}" {% endif %}>
|
||||
{% unless hide-icons %}
|
||||
<span class="nav-link-icon d-md-none d-lg-inline-block">{% include ui/icon.html icon=icon %}</span>
|
||||
{% endunless %}
|
||||
@@ -30,7 +29,7 @@
|
||||
</a>
|
||||
|
||||
{% if level-1[1].children %}
|
||||
<ul class="dropdown-menu{% if level-1[1].right %} dropdown-menu-right{% endif %}{% if level-1[1].columns %} dropdown-menu-columns dropdown-menu-columns-{{ level-1[1].columns }}{% endif %}">
|
||||
<ul class="dropdown-menu{% if level-1[1].right %} dropdown-menu-right{% endif %}{% if level-1[1].columns %} dropdown-menu-columns dropdown-menu-columns-{{ level-1[1].columns }}{% endif %}{% if include.auto-open and level-1[0] == current-page[0] %} show{% endif %}">
|
||||
{% for level-2 in level-1[1].children %}
|
||||
<li {% if level-2[1].children %}class="dropright"{% endif %}>
|
||||
<a class="dropdown-item{% if level-2[1].children %} dropdown-toggle{% endif %}{% if level-1[0] == current-page[0] and level-2[0] == current-page[1] and current-page.size == 2 %} active{% endif %}" {% if level-2[1].children %}href="#sidebar-{{ level-2[0] }}" data-toggle="dropdown" role="button" aria-expanded="false" {% else %}href="{{ site.base }}/{{ level-2[1].url }}" {% endif %}>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
{% include layout/navbar-side.html class="d-lg-none" hide-username=include.hide-username person-id=include.person-id %}
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbar-menu">
|
||||
{% include layout/navbar-menu.html class="pt-lg-3" %}
|
||||
{% include layout/navbar-menu.html auto-open=true class="pt-lg-3" %}
|
||||
|
||||
{% comment %}
|
||||
<div class="d-none d-{{ breakpoint }}-flex mt-auto">
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
page-header: Fluid vertical layout
|
||||
menu: layout.fluid-vertical
|
||||
layout-fluid: true
|
||||
layout-sidebar: true
|
||||
layout-sidebar-dark: true
|
||||
layout-hide-topbar: true
|
||||
---
|
||||
|
||||
{% include layout/homepage.html %}
|
||||
Reference in New Issue
Block a user