_navbar.scss
2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
.navbar-nav {
.form-inline .input-group {
width: 100%;
}
.nav-item {
&.active {
.nav-link {
color: $white;
}
}
&.dropdown {
.dropdown-toggle {
&::after {
width: 1rem;
text-align: center;
float: right;
vertical-align: 0;
border: 0;
font-weight: 900;
content: '\f105';
font-family: 'Font Awesome 5 Free';
}
}
&.show {
.dropdown-toggle::after {
content: '\f107';
}
}
&.no-arrow {
.dropdown-toggle::after {
display: none;
}
}
}
.nav-link {
&:focus {
// remove outline for Safari and Firefox
outline: none;
}
.badge {
position: absolute;
margin-left: 0.75rem;
top: 0.3rem;
font-weight: 400;
font-size: 0.5rem;
}
}
}
@media(min-width: 768px) {
.form-inline .input-group {
width: auto;
}
}
}
.sidebar {
width: $sidebar-collapsed-width !important;
background-color: $gray-900;
min-height: calc(100vh - #{$navbar-base-height});
@include sidebar-icons;
.nav-item {
.nav-link {
color: fade-out($white, 0.5);
&:active,
&:focus,
&:hover {
color: fade-out($white, 0.25);
}
}
}
&.toggled {
width: 0 !important;
overflow: hidden;
}
}
@media (min-width: 768px) {
.sidebar {
width: $sidebar-base-width !important;
.nav-item {
.nav-link {
display: block;
width: 100%;
text-align: left;
padding: 1rem;
width: $sidebar-base-width;
span {
font-size: 1rem;
display: inline;
}
}
.dropdown-menu {
position: static !important;
margin: 0 1rem;
// Position fix for Firefox
top: 0;
}
&.dropdown .dropdown-toggle::after {
display: block;
}
}
&.toggled {
overflow: visible;
width: $sidebar-collapsed-width !important;
@include sidebar-icons;
}
}
}
// Fixed Nav Option
// Add .fixed-top class to top .navbar-nav and to .sidebar - add .fixed-nav to body
.sidebar.fixed-top {
top: $navbar-base-height;
height: calc(100vh - #{$navbar-base-height});
overflow-y: auto;
}