Skip to content

Commit 3d72131

Browse files
committed
copy of docys _nav.scss
1 parent f02cb80 commit 3d72131

File tree

1 file changed

+213
-0
lines changed

1 file changed

+213
-0
lines changed
Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
//
2+
// Main navbar
3+
//
4+
5+
.td-navbar-cover {
6+
@include media-breakpoint-up(md) {
7+
background: transparent !important;
8+
9+
.nav-link {
10+
text-shadow: 1px 1px 2px $dark;
11+
}
12+
}
13+
14+
&.navbar-bg-onscroll .nav-link {
15+
text-shadow: none;
16+
}
17+
}
18+
19+
.navbar-bg-onscroll {
20+
background: $primary !important;
21+
opacity: inherit;
22+
}
23+
24+
.td-navbar {
25+
@extend .navbar;
26+
@extend .navbar-expand;
27+
28+
background: $primary;
29+
min-height: 4rem;
30+
margin: 0;
31+
z-index: 32;
32+
33+
.navbar-brand {
34+
text-transform: none;
35+
36+
&__name {
37+
font-weight: $font-weight-bold;
38+
}
39+
40+
svg {
41+
display: inline-block;
42+
margin: 0 10px;
43+
height: 30px;
44+
}
45+
}
46+
47+
.navbar-nav {
48+
padding-top: $spacer * 0.5;
49+
white-space: nowrap;
50+
}
51+
52+
.nav-link {
53+
text-transform: none;
54+
font-weight: $font-weight-bold;
55+
}
56+
57+
// For .td-search__input styling, see _search.scss
58+
59+
.dropdown {
60+
min-width: 100px;
61+
}
62+
63+
@include media-breakpoint-up(md) {
64+
position: fixed;
65+
top: 0;
66+
width: 100%;
67+
68+
.nav-item {
69+
padding-inline-end: $spacer * 0.5;
70+
}
71+
72+
.navbar-nav {
73+
padding-top: 0 !important;
74+
}
75+
}
76+
77+
@include media-breakpoint-down(lg) {
78+
.td-navbar-nav-scroll {
79+
max-width: 100%;
80+
height: 2.5rem;
81+
overflow: hidden;
82+
font-size: 0.9rem;
83+
}
84+
85+
.navbar-brand {
86+
margin-right: 0;
87+
}
88+
89+
.navbar-nav {
90+
padding-bottom: 2rem;
91+
overflow-x: auto;
92+
}
93+
}
94+
}
95+
96+
// Icons
97+
#main_navbar {
98+
li i {
99+
padding-right: 0.5em;
100+
101+
&:before {
102+
display: inline-block;
103+
text-align: center;
104+
min-width: 1em;
105+
}
106+
}
107+
.alert {
108+
background-color: inherit;
109+
padding: 0;
110+
color: $secondary;
111+
border: 0;
112+
font-weight: inherit;
113+
114+
&:before {
115+
display: inline-block;
116+
font-style: normal;
117+
font-variant: normal;
118+
text-rendering: auto;
119+
-webkit-font-smoothing: antialiased;
120+
font-family: $font-awesome-font-name;
121+
font-weight: 900;
122+
content: "\f0d9";
123+
padding-left: 0.5em;
124+
padding-right: 0.5em;
125+
}
126+
}
127+
}
128+
129+
// Foldable sidebar menu
130+
nav.foldable-nav {
131+
&#td-section-nav {
132+
position: relative;
133+
}
134+
135+
&#td-section-nav label {
136+
margin-bottom: 0;
137+
width: 100%;
138+
}
139+
140+
.td-sidebar-nav__section,
141+
.with-child ul {
142+
list-style: none;
143+
padding: 0;
144+
margin: 0;
145+
}
146+
147+
.ul-1 > li {
148+
padding-left: 1.5em;
149+
}
150+
151+
ul.foldable {
152+
display: none;
153+
}
154+
155+
input:checked ~ ul.foldable {
156+
display: block;
157+
}
158+
159+
input[type="checkbox"] {
160+
display: none;
161+
}
162+
163+
.with-child,
164+
.without-child {
165+
position: relative;
166+
padding-left: 1.5em;
167+
}
168+
169+
.ul-1 .with-child > label:before {
170+
display: inline-block;
171+
font-style: normal;
172+
font-variant: normal;
173+
text-rendering: auto;
174+
-webkit-font-smoothing: antialiased;
175+
font-family: $font-awesome-font-name;
176+
font-weight: 900;
177+
content: "\f0da";
178+
position: absolute;
179+
left: 0.1em;
180+
padding-left: 0.4em;
181+
padding-right: 0.4em;
182+
font-size: 1em;
183+
color: $gray-900;
184+
transition: all 0.5s;
185+
&:hover {
186+
transform: rotate(90deg);
187+
}
188+
}
189+
190+
.ul-1 .with-child > input:checked ~ label:before {
191+
color: $primary;
192+
transform: rotate(90deg);
193+
transition: transform 0.5s;
194+
}
195+
196+
.with-child ul {
197+
margin-top: 0.1em;
198+
}
199+
}
200+
201+
@media (hover: hover) and (pointer: fine) {
202+
nav.foldable-nav {
203+
.ul-1 .with-child > label:hover:before {
204+
color: $primary;
205+
transition: color 0.3s;
206+
}
207+
208+
.ul-1 .with-child > input:checked ~ label:hover:before {
209+
color: $primary;
210+
transition: color 0.3s;
211+
}
212+
}
213+
}

0 commit comments

Comments
 (0)