mirror of
https://github.com/thangisme/notes.git
synced 2026-07-30 03:10:52 -04:00
Improved navigation: folding, vsual feedback, optimization for mobile
(cherry picked from commit db50f282bab1e98397cc7434a811b8b7da2fe6dc)
This commit is contained in:
+58
-48
@@ -7,66 +7,76 @@
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.nav-list-child-list {
|
||||
padding-left: $sp-3;
|
||||
list-style: none;
|
||||
|
||||
.nav-list-link {
|
||||
color: $nav-child-link-color;
|
||||
}
|
||||
|
||||
.nav-list-item {
|
||||
position: relative;
|
||||
@include fs-4;
|
||||
margin: 0;
|
||||
|
||||
&::before {
|
||||
@include mq(md) {
|
||||
@include fs-3;
|
||||
}
|
||||
|
||||
.nav-list-link {
|
||||
display: block;
|
||||
height: $nav-list-item-height;
|
||||
line-height: #{$nav-list-item-height - 2 * $sp-1};
|
||||
padding-top: $sp-1;
|
||||
padding-right: $gutter-spacing-sm;
|
||||
padding-bottom: $sp-1;
|
||||
padding-left: $nav-list-item-height;
|
||||
|
||||
&.active {
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&.active {
|
||||
background-color: darken($sidebar-color, 3%);
|
||||
}
|
||||
}
|
||||
|
||||
.nav-list-expander {
|
||||
position: absolute;
|
||||
margin-top: 0.3em;
|
||||
margin-left: -0.8em;
|
||||
color: rgba($body-text-color, 0.3);
|
||||
content: "- ";
|
||||
width: $nav-list-item-height;
|
||||
height: $nav-list-item-height;
|
||||
padding-top: #{$nav-list-item-height / 4};
|
||||
padding-right: #{$nav-list-item-height / 4};
|
||||
padding-bottom: #{$nav-list-item-height / 4};
|
||||
padding-left: #{$nav-list-item-height / 4};
|
||||
fill: $link-color;
|
||||
|
||||
&:hover {
|
||||
background-color: darken($sidebar-color, 3%);
|
||||
}
|
||||
}
|
||||
|
||||
> .nav-list {
|
||||
display: none;
|
||||
padding-left: $sp-3;
|
||||
list-style: none;
|
||||
|
||||
.nav-list-item {
|
||||
position: relative;
|
||||
|
||||
.nav-list-link {
|
||||
color: $nav-child-link-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.active {
|
||||
&::before {
|
||||
color: $body-text-color;
|
||||
> .nav-list-expander svg {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
> .nav-list {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.nav-list-item {
|
||||
@include fs-4;
|
||||
margin: 0;
|
||||
|
||||
@include mq(md) {
|
||||
@include fs-3;
|
||||
}
|
||||
|
||||
.nav-list-child-list {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&.active {
|
||||
.nav-list-child-list {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.nav-list-link {
|
||||
display: block;
|
||||
padding-top: $sp-1;
|
||||
padding-bottom: $sp-1;
|
||||
|
||||
&.active {
|
||||
font-weight: 600;
|
||||
color: $body-heading-color;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
// Small screen nav
|
||||
|
||||
.site-nav {
|
||||
|
||||
Reference in New Issue
Block a user