-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.css
218 lines (214 loc) · 3.78 KB
/
index.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
@import url("https://fonts.googleapis.com/css2?family=Poppins&family=Rubik&display=swap");
body {
margin: 0;
font-family: "Rubik", sans-serif;
background: #111;
}
* {
box-sizing: border-box;
}
h1,
h3 {
font-weight: 100vh;
}
.brand{
color: #fff;
}
.a-brand{
text-decoration: none;
}
.weather-app {
min-height: 100vh;
background-image: url(./image/day/cloudy.jpg);
background-position: center;
background-repeat: no-repeat;
background-size: cover;
color: #fff;
position: relative;
transition: 500 ms;
opacity: 1; /* change to 0 after finishing app*/
}
/* Add background overlay*/
.weather-app::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.3);
z-index: 0;
}
.container {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: space-between;
align-items: flex-start;
flex-direction: column;
padding: 2em 3em 4em 3em;
}
.container > div {
display: flex;
justify-content: center;
align-items: center;
}
.city-time,
.temp,
.weaather {
margin: 0 1 em;
}
.city-time h3 {
margin: 0;
margin-bottom: 0.2em;
font-size: 3em;
}
.temp {
font-size: 7em;
margin: 0;
}
.weather img {
display: block;
margin: 0.5em 0;
}
.panel {
position: absolute;
width: 40%;
height: 100%;
top: 0;
right: 0;
background: rgba(110, 110, 110, 0.2);
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.18);
z-index: 1;
padding: 3em 2em;
overflow-y: hidden;
}
.panel form {
margin-bottom: 3em;
}
.submit {
position: absolute;
top: 0;
right: 0;
padding: 1.5em;
margin: 0;
border: none;
outline: none;
background: #fa6d1b;
color: #fff;
cursor: pointer;
font-size: 1.2em;
transition: 0.4s;
}
.submit:hover {
background: #fff !important;
color: #000;
}
.search {
background: none;
border: none;
border-bottom: 1px #ccc solid;
padding: 0 1em 0.5em 0;
width: 80%;
color: #fff;
font-size: 1.1em;
}
.search:focus {
outline: none;
}
.search::placeholder {
color: #fff;
}
.panel ul,
.details {
padding: 0 0 1em 0;
margin: 2em 0;
border-bottom: 1px solid #ccc;
}
.panel ul li,
.details li {
color: #ccc;
margin: 2.5em 0;
}
.panel ul h4,
.details h4 {
margin: 3em 0;
}
.cities {
max-height: 300px;
overflow-y: scroll;
margin: -2.5em 0px 0px 0px !important;
}
.city {
display: block;
cursor: pointer;
}
.city:hover {
color: #fff;
}
.details li {
display: flex;
justify-content: space-between;
align-items: center;
}
.loader {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: #fff url(image/loader.gif) no-repeat center center;
background-size: 30%;
overflow: hidden;
z-index: 500;
transition: opacity 0.75s, visibility 0.75s;
}
.loader--hidden {
opacity: 0;
visibility: hidden;
}
/* Responsive website */
@media screen and (max-width: 800px) {
.panel,
.container {
position: relative;
width: 100%;
top: initial;
}
.loader{
background-size: 50%;
}
}
@media screen and (max-width: 500px) {
html {
font-size: 12px;
}
.cities {
max-height: 200px;
}
.loader{
background-size: 80%;
}
}
@media screen and (max-width: 350px) {
.container {
padding: 2em 1em 4em 1em;
}
}
@media screen and (max-width: 300px) {
.weather-app {
min-height: 40em;
}
}
::-webkit-scrollbar {
width: 0px;
}