-
Notifications
You must be signed in to change notification settings - Fork 0
/
navbar.html
187 lines (156 loc) · 3.79 KB
/
navbar.html
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<nav id="navbar">
<input type="checkbox" id="check">
<label for="check">
<i class="fa fa-bars" id="btn"></i>
<i class="fa fa-times" id="cancel"></i>
</label>
<img src="/Img/propic1.jpg" id="logo" alt="Logo">
<ul>
<li><a href="home.html">Home</a> </li>
<li><a href="schedule.html">Schedule</a> </li>
<li><a href="items.html">Rates</a> </li>
<li><a href="about.html">About us</a> </li>
<li><a href="/reviews.html">Reviews</a> </li>
</ul>
<img src="/Img/sun.png" alt="Light" width="40px" id="Lightbulb">
<img src="/Img/moon.png" alt="Dark" width="40px" id="Darkbulb" class="hide">
</nav>
<style>
/******This is the css code for navbar****** */
.hide{
display: none;
}
/* Dark mode styles */
body.dark-mode {
background-color: #1a1a1a;
color: white;
}
.dark-mode #navbar {
background-color: #1d3825;
}
.dark-mode #navbar ul li a {
color: white;
}
header {
height: 115px;
/* position: fixed; */
}
#navbar {
height: 80px;
background-color: #fffefc;
border-radius: 0 0 30px 30px;
box-shadow: 5px 5px 5px #3fc833;
display: flex;
justify-content: flex-end;
align-items: center;
padding: 0 20px;
}
#navbar #logo {
position: absolute;
top: 4%;
left: 10%;
width: 90px;
border-radius: 50%;
border: 2px solid rgb(165, 23, 197);
filter: invert(100%);
z-index: 3;
transition: transform 1.5s ease-in;
}
#navbar #logo:hover {
border: none;
transform: translateX(500%);
}
nav ul {
list-style: none;
display: flex;
}
#navbar ul li {
margin: 0 20px;
}
#navbar ul li a {
color: black;
font-weight: bold;
font-size: 15px;
text-transform: uppercase;
text-decoration: none;
position: relative;
}
#navbar ul li a::after {
content: "";
display: block;
background-color: #3fc833;
height: 4px;
width: 100%;
transform-origin: left;
transform: scaleX(0);
transition: transform 0.8s ease;
}
#navbar ul li a:hover::after {
transform: scaleX(1);
}
label #btn,
#cancel {
display: none;
}
#check {
display: none;
}
@media (max-width: 768px) {
#navbar #logo {
width: 70px;
float: right;
}
#navbar ul {
position: absolute;
top: 85px;
left: 0;
width: 100%;
background: #1d3825;
flex-direction: column;
display: none;
opacity: 0.7;
z-index: 2;
}
#navbar ul li {
display: block;
margin: 10px 0;
text-align: center;
}
#navbar ul li a {
font-size: 14px;
color: white;
}
#navbar ul li a:before {
bottom: -1px;
height: 2px;
}
#navbar ul li a:hover:before {
transform: scaleX(1.2);
}
#navbar ul li a:hover {
text-decoration: none;
}
#check:checked~ul {
display: flex;
}
label #btn {
display: block;
}
#check:checked~label #btn {
display: none;
}
#check:checked~label #cancel {
display: block;
}
#navbar label {
order: 1;
margin-left: auto;
margin-right: 3%;
}
}
.chats {
text-align: center;
margin-top: 5%;
}
</style>
<!-- <script src="active.js"></script> -->