1
0
mirror of https://github.com/tabler/tabler.git synced 2026-08-01 07:54:38 +04:00

top menu dropdowns

This commit is contained in:
codecalm
2020-01-07 22:39:40 +01:00
parent 446ef17b2c
commit 391c12fb0a
10 changed files with 81 additions and 46 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
<div class="col-{% if include.wide %}12{% else %}6{% endif %} mb-{% if include.wide %}5{% else %}6{% endif %}{% if layout.soon %} opacity-25{% endif %}">
<div class="row">
<div class="col-auto">
<a href="{{ site.base }}/{{ layout.page }}">
<a href="{{ site.base }}/{{ layout.page }}" class="position-relative">
{% include parts/demo-layout.html topmenu=layout.config.topmenu topmenu-dark=layout.config.topmenu-dark sidebar=layout.config.sidebar sidebar-narrow=layout.config.sidebar-narrow sidebar-right=layout.config.sidebar-right sidebar-dark=layout.config.sidebar-dark hide-topnav=layout.config.hide-topnav %}
</a>
</div>
+12 -10
View File
@@ -23,10 +23,10 @@
</a>
{% if level-1[1].children %}
<div class="dropdown-menu">
<ul class="dropdown-menu">
{% for level-2 in level-1[1].children %}
<div class="dropright">
<a class="dropdown-item" {% 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 %}>
<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 %}>
<span class="nav-text">
{{ level-2[1].title }}
{% if level-2[1].label %}
@@ -34,15 +34,17 @@
{% endif %}
</span>
</a>
</div>
<ul class="dropdown-menu">
<li><a href="">AA</a></li>
<li><a href="">BB</a></li>
<li><a href="">CC</a></li>
</ul>
{% if level-2[1].children %}
<div class="dropdown-menu">
{% for level-3 in level-2[1].children %}
<a href="{{ site.base }}/{{ level-3[1].url }}" class="dropdown-item">{{ level-3[1].title }}</a>
{% endfor %}
</div>
{% endif %}
</li>
{% endfor %}
</div>
</ul>
{% endif %}
</li>
{% endfor %}
+1 -1
View File
@@ -1,4 +1,4 @@
<header class="topnav topbar">
<header class="topnav">
<div class="navbar navbar-expand-lg {% if include.dark %}navbar-dark{% else %}navbar-light{% endif %}">
<div class="container{% if include.fluid %}-fluid{% endif %}">
{% include layout/menu.html top=true %}
+1 -1
View File
@@ -1,4 +1,4 @@
<header class="topnav topbar">
<header class="topnav">
<div class="container{% if include.fluid %}-fluid{% endif %}">
<div class="navbar navbar-expand-lg {% if include.dark %}navbar-dark bg-dark text-white{% else %}navbar-light{% endif %}{% if include.sticky %} navbar-sticky{% endif %}">
{% include layout/navbar.html search=true menu-layout=page.menu-layout %}