top navigation fixes

This commit is contained in:
codecalm
2020-01-14 21:47:35 +01:00
parent 6511170004
commit 60169a73d9
8 changed files with 29 additions and 12 deletions
+2 -2
View File
@@ -4,12 +4,12 @@
{% if page.sidebar %}
{% include layout/navbar-search.html class="mr-4" %}
{% else %}
{% include layout/navbar-logo.html class="mr-4" %}
{% include layout/navbar-logo.html class="mr-4" dark=include.dark %}
{% endif %}
<ul class="nav navbar-menu align-items-center ml-auto">
<li class="nav-item d-none d-lg-flex mr-3">
{% include ui/button.html href=site.github_url text="Source code" icon="brand/github" icon-color="github" external=true %}
{% include ui/button.html href=site.github_url text="Source code" icon="brand/github" external=true %}
</li>
<li class="nav-item dropdown">
+1 -1
View File
@@ -1,5 +1,5 @@
<header class="topnav">
<div class="navbar navbar-expand-lg {% if include.dark %}navbar-dark{% else %}navbar-light{% endif %}">
<div class="navbar navbar-expand-lg {% if page.topmenu-dark %}navbar-dark bg-dark text-white{% else %}navbar-light{% endif %}">
<div class="container{% if include.fluid %}-fluid{% endif %}">
{% include layout/menu.html top=true %}
+2 -2
View File
@@ -1,7 +1,7 @@
<header class="topnav">
<div class="navbar navbar-expand-lg {% if page.topnav-dark %}navbar-dark bg-dark text-white{% else %}navbar-light{% endif %}{% if include.sticky %} navbar-sticky{% endif %}">
<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 %}
{% include layout/navbar.html dark=page.topnav-dark menu-layout=page.menu-layout %}
</div>
</div>
</header>
+1
View File
@@ -1,6 +1,7 @@
---
page-title: Page Layouts
menu: layouts
topmenu-dark: true
---
{% include layout/layouts.html %}
+1
View File
@@ -1,6 +1,7 @@
---
page-title: Page Layouts
menu: layouts
topnav-dark: true
---
{% include layout/layouts.html %}
-1
View File
@@ -1,5 +1,4 @@
---
tmp: true
page-title: Dark
---
-1
View File
@@ -1,5 +1,4 @@
---
tmp: true
menu: a.b.c
---
+21 -4
View File
@@ -123,16 +123,14 @@ $sidenav-folded-item-height: 3.5rem;
Top nav
*/
.topnav {
border-bottom: 1px solid;
background-color: $navbar-bg;
border-color: $navbar-border-color;
position: absolute;
top: 0;
right: 0;
left: 0;
padding: 0 .5rem;
z-index: $zindex-sticky;
min-height: $navbar-height;
box-shadow: inset 0 -1px 0 0px $navbar-border-color;
user-select: none;
& + & {
@@ -166,7 +164,7 @@ Top nav
&:after {
content: '';
position: absolute;
bottom: -1px;
bottom: 0;
left: 2px;
right: 2px;
border-bottom: 1px solid $primary;
@@ -439,3 +437,22 @@ Sidebar dark
@include scrollbar(true);
}
}
/**
Right sidebar
*/
.sidebar-right {
left: auto;
right: 0;
box-shadow: inset 1px 0 $sidenav-border-color;
+ .content {
margin-left: 0;
margin-right: $sidenav-width;
.topnav {
left: 0;
right: $sidenav-width;
}
}
}