1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-22 18:04:26 +04:00

sidebar menu fixes

This commit is contained in:
codecalm
2020-04-07 23:23:43 +02:00
parent c09fad1eb3
commit 8e52b0acc7
6 changed files with 10 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
{% assign breakpoint = include.breakpoint | default: 'md' %} {% assign breakpoint = include.breakpoint | default: 'md' %}
{% assign secondary = include.secondary | default: false %} {% assign secondary = include.secondary | default: false %}
<header class="navbar navbar-expand-{{ breakpoint }}{% unless include.transparent %} {% if include.dark %}navbar-dark{% else %}navbar-light{% endif %}{% if include.background %} bg-{{ include.background }}{% endif %}{% endunless %}{% if include.sticky %} sticky-top{% endif %}"{% if include.background-color %} style="background: {{ include.background-color }}"{% endif %}> <header class="navbar navbar-expand-{{ breakpoint }}{% unless include.transparent %} {% if include.dark %}navbar-dark{% else %}navbar-light{% endif %}{% if include.background %} bg-{{ include.background }}{% endif %}{% endunless %}{% if include.sticky %} sticky-top{% endif %}{% if include.class %} {{ include.class }}{% endif %}"{% if include.background-color %} style="background: {{ include.background-color }}"{% endif %}>
<div class="container{% if page.layout-fluid %}-fluid{% else %}-xl{% endif %}"> <div class="container{% if page.layout-fluid %}-fluid{% else %}-xl{% endif %}">
{% include layout/navbar-toggler.html target="navbar-menu" %} {% include layout/navbar-toggler.html target="navbar-menu" %}

View File

@@ -2,10 +2,14 @@
<aside class="navbar navbar-vertical{% if include.right %} navbar-right{% endif %} navbar-expand-{{ breakpoint }}{% unless include.transparent %} {% if include.dark %}navbar-dark{% else %}navbar-light{% endif %}{% if include.background %} bg-{{ include.background }}{% endif %}{% endunless %}"{% if include.background-color %} style="background: {{ include.background-color }}"{% endif %}> <aside class="navbar navbar-vertical{% if include.right %} navbar-right{% endif %} navbar-expand-{{ breakpoint }}{% unless include.transparent %} {% if include.dark %}navbar-dark{% else %}navbar-light{% endif %}{% if include.background %} bg-{{ include.background }}{% endif %}{% endunless %}"{% if include.background-color %} style="background: {{ include.background-color }}"{% endif %}>
<div class="container-fluid"> <div class="container-fluid">
{% include layout/navbar-toggler.html target="navbar-menu" %}
{% unless include.hide-brand %} {% unless include.hide-brand %}
{% include layout/navbar-logo.html dark=include.dark breakpoint=breakpoint %} {% include layout/navbar-logo.html dark=include.dark breakpoint=breakpoint %}
{% endunless %} {% endunless %}
{% 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"> <div class="collapse navbar-collapse" id="navbar-menu">
{% include layout/navbar-menu.html %} {% include layout/navbar-menu.html %}
</div> </div>

View File

@@ -2,10 +2,10 @@
layout: base layout: base
--- ---
{% include layout/sidebar.html dark=true %} {% include layout/sidebar.html dark=true breakpoint="lg" %}
<div class="page"> <div class="page">
{% include layout/navbar.html hide-brand=true hide-menu=true %} {% include layout/navbar.html hide-brand=true hide-menu=true class="d-none d-lg-flex" %}
{% include layout/content.html %} {% include layout/content.html %}
</div> </div>

View File

@@ -387,7 +387,7 @@ $navbar-brand-padding-y: $nav-link-padding-y !default;
$navbar-brand-image-height: 2rem !default; $navbar-brand-image-height: 2rem !default;
$navbar-brand-margin-right: 0 !default; $navbar-brand-margin-right: 0 !default;
$navbar-brand-font-size: $h3-font-size !default; $navbar-brand-font-size: $h3-font-size !default;
$navbar-brand-font-weight: 600 !default; $navbar-brand-font-weight: 500 !default;
$navbar-toggler-font-size: 1rem !default; $navbar-toggler-font-size: 1rem !default;
$navbar-toggler-padding-x: 0 !default; $navbar-toggler-padding-x: 0 !default;

View File

@@ -3,6 +3,7 @@ Navbar
*/ */
.navbar { .navbar {
min-height: $navbar-height; min-height: $navbar-height;
align-items: stretch;
.navbar-nav { .navbar-nav {
min-height: subtract($navbar-height, 2 * $navbar-padding-y); min-height: subtract($navbar-height, 2 * $navbar-padding-y);
@@ -148,7 +149,7 @@ Navbar
position: absolute; position: absolute;
left: 0; left: 0;
right: 0; right: 0;
bottom: subtract(-$navbar-padding-y, 1px); bottom: subtract(-.25rem, 1px);
border-bottom: 2px solid $primary; border-bottom: 2px solid $primary;
} }
} }

View File

@@ -11,7 +11,6 @@
top: 0; top: 0;
left: 0; left: 0;
bottom: 0; bottom: 0;
padding: 0;
z-index: $zindex-fixed; z-index: $zindex-fixed;
align-items: flex-start; align-items: flex-start;
transition: .3s transform; transition: .3s transform;