-
Notifications
You must be signed in to change notification settings - Fork 58
/
style.css
431 lines (359 loc) · 7.96 KB
/
style.css
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
/* Adding google-fonts in the CSS file */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300&family=Inconsolata&family=Indie+Flower&family=Nunito&family=Open+Sans&family=Orbitron:wght@500&family=Poppins&family=Righteous&family=Roboto&family=Rowdies&family=Rubik+Mono+One&family=Sassy+Frass&family=Shadows+Into+Light&family=Source+Code+Pro&family=Ubuntu+Mono&family=Yeon+Sung&display=swap');
*{
padding: 0;
margin: 0;
box-sizing: border-box;
font-family: 'Open Sans', sans-serif;
}
/* Light Mode (default) */
body {
background: #e3f2fd;
background-color: rgb(192, 242, 247);
color: black;
transition: background-color 0.3s, color 0.3s;
}
/* Dark Mode */
body.dark-mode {
background-color: #1e1e1e;
color: #fff;
}
body.dark-mode h1 {
background-color: #244b73; /* Dark violet background in dark mode */
}
.logo{
max-width: 60px; /* Adjust the size to your needs */
margin-right: 10px;
height: auto;
margin-left: 10px;
}
/* Style for the navbar */
nav{
display: flex;
height: 50px;
width: 100%;
align-items: center;
justify-content: space-between;
}
input[type="checkbox"]{
appearance: none;
-webkit-appearance: none;
}
label{
display: none;
cursor: pointer;
}
nav ul{
float: right;
margin-right: 50px;
}
nav ul li{
display: inline-block;
line-height: 80px; /*gap from above */
margin: 0 5px; /*gap in between */
}
nav ul li a{
color: white;
font-size:17px;
text-decoration: none;
padding: 6px 20px;
transition: .5s;
position: relative;
}
nav a:hover{
color: aqua;
}
nav a span{
position: absolute;
top:0;
left: 0;
width: 100%;
height: 100%;
border-radius: 15px;
border-bottom: 2px solid aqua;
border: radius 15px;
transform: scale(0) translateY(50px);
transition: .5s;
opacity: 0;
}
nav a:hover span{
transform: scale(1) translateY(2px);
opacity: 1;
}
/* H1 styling */
h1 {
font-size: 1.8rem;
color: #fff;
padding: 15px 0;
background: #2c6c8c;
display: flex;
align-items: center;
position: relative;
}
/* Dark Mode Toggle Button styling */
.dark-mode-toggle {
position: absolute;
background: none;
right: 2%;
border: none;
color: #fff;
cursor: pointer;
font-size: 1.5rem;
display: flex;
}
.dark-mode-toggle:focus {
outline: none;
}
/* Icon styling */
.dark-mode-toggle i {
transition: color 0.3s, transform 0.3s;
}
.dark-mode-toggle:hover i {
color: #ddd;
}
/* Dark mode styles */
body.dark-mode {
background-color: #333;
color: #fff;
}
body.dark-mode h1 {
background-color: #444;
}
h1::selection{
color: green;
background: black;
}
.container{
display: flex;
gap: 35px ;
padding: 30px;
}
.weather-input{
width: 550px;
display: flex;
flex-direction: column;
}
.search-sec{
height: 45%;
}
.map-sec{
background-color: #5fdec9;
height: 50%;
}
#leaflet-map {
width: 390px !important;
height: 300px !important;
padding: 0 !important;
margin: 0 !important;
position: absolute !important;
}
.weather-input input{
width: 100%;
height: 46px;
outline: none;
padding: 0 17px;
margin: 10px 0 20px 0;
font-size: 1.07rem;
border: 1px solid #ccc;
border-radius: 4px;
}
.weather-input .separator{
height: 1px ;
width: 100%;
margin: 25px 0px;
background: #bbb;
display: flex;
align-items: center;
justify-content: center;
}
.weather-input .separator::before{
content: " or ";
color: #6c757d;
font-size: 1.18rem;
padding: 0 15px ;
background: #e3f2fd;
}
.weather-input button{
width: 100%;
padding: 10px 0;
cursor: pointer;
outline: none;
border: none;
font-size: 1rem;
color: #fff;
border-radius: 4px;
/* background: #5372f0; */
background: #f18d28;
}
/* changes on hover */
.weather-input .search-btn:hover{
/* background: #5163ad; */
background: #c98037;
}
.weather-input .location-btn:hover{
background: #515960;
/* background: #776B5D; */
}
.weather-input .location-btn{
/* background: #6c757d; */
background: #776B5D;
}
.weather-data{
width: 100%;
}
/* left side of the weather APP Update Dashboard */
.current-weather:hover{
/* background: #5163ad; */
background: #c98037;
}
.current-weather{
color: #fff;
padding: 20px 70px 20px 20px ;
border-radius: 6px;
/* background: #5372f0; */
background: #f18d28;
display: flex;
justify-content:space-between ;
gap: 50px;
}
.current-weather h2{
font-size: 1.3rem;
}
.graph-sec img {
width: 100px; /* Adjust the width as needed */
height: auto; /* Maintain aspect ratio */
max-width:100%; /* Ensure it doesn’t exceed its container */
max-height: 250px; /* Adjust the height as needed */
}
#line-grap {
height: 150px;
width: 600px;
border: 0.1px solid black;
border-radius: 8px;
}
.details {
width: 35%; /* Adjust width as needed */
height: 100%; /* Ensure it has a defined height */
}
.weather-data h4{
margin-top: 12px;
font-size: 1.1rem;
font-weight: 500;
}
.current-weather .icon {
text-align: center;
}
.current-weather .icon img {
max-width: 120px ;
margin-top: -15px;
}
.current-weather .icon h4{
margin-top: -10px ;
text-transform: capitalize;
}
.days-forecast h5{
font-size: 1.5rem;
margin: 20px 0;
}
.weather-cards{
display: flex;
gap: 20px ;
}
.weather-cards .card{
/* background: #6c757d; */
background: #776B5D;
list-style: none;
padding: 18px 16px ;
color: #fff;
border-radius: 5px;
width: calc(100% / 5);
}
.weather-cards .card:hover{
/* background: #776B5D; */
background: #515960;
}
.weather-cards .card img {
max-width: 70px ;
margin: 5px 0 -12px 0;
}
/* let's make the static webpage to be responsive ---by using the Media Queries */
@media (max-width : 1400px ) {
.weather-data .current-weather{
padding: 20px;
}
.weather-cards{
flex-wrap: wrap;
}
.weather-cards .card{
width: calc(100% /4 - 15px);
}
}
@media (max-width : 1200px ) {
.weather-cards .card{
width: calc(100% /3 - 15px);
}
}
@media (max-width : 950px ) {
.weather-input {
width: 450px ;
}
.weather-cards .card{
width: calc(100% /2 - 10px);
}
}
@media (max-width : 750px ) {
.container{
flex-wrap: wrap;
padding: 15px;
}
.weather-input{
width: 100%;
}
}
/* footer css */
.footer{
/* font-size: 1.8rem; */
display: flex;
align-items: center;
justify-content: space-around;
gap: 100px;
color: #fff;
padding: 26px 4px;
/* background: #5372f0; */
background: #676565;
}
.more-info >p>a {
text-decoration: none;
color: #fff;
font-size: small;
}
.social-media ul{
list-style: none;
display: flex;
justify-content: center;
align-items: center;
gap: 20px;
}
.social-media ul>li>a {
text-decoration: none;
color: #fff;
}
.act{
display: flex;
align-items: center;
justify-content: space-around;
gap: 100px;
color: #fff;
padding: 10px 5px;
/* background: #5372f0; */
background: #676565;
}
@media (max-width : 865px ) {
.footer{
/* flex-wrap: wrap; */
flex-direction: column-reverse;
padding: 20px;
gap: 20px;
width: 100%;
}
}