-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
106 lines (106 loc) · 2.64 KB
/
index.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
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>Weather Application</title>
<linkrel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
<link rel="stylesheet" href="css/style.css">
</head>
<style> body{
background-image: url(hey.jpg);
background-size:cover;
}
.container{
width: 500px; height: 300px;
margin:25vh auto; border-radius: 25px;
box-shadow: 0 20px 40px 0px rgba(0,0,0,0.3);
}
.header {
height: 20%;
background-color: #FF9800;
border-top-left-radius: 25px;
border-top-right-radius: 25px;
text-align: center;
position:relative;
}
#temp, #humidity-div {
font-family: "Courier New";
font-weight: bold;
font-size: 50px;
color: #fff; position: absolute; left: 50%;
top: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
.city-icon-holder { position:absolute; left: 25%;
top: 40%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%); text-align: center;
}
#city-name {
font-family: "Courier New"; font-size: 30px;
font-weight: bold; color: #fff;
}
#icon { width:50%;
}
#main{
width: 100%;
height: 100%; position: relative;
}
.city-icon { height: 80%;
width: 50%;
border-bottom-left-radius: 25px; background-color: #FFC107;
}
.temperature { position: absolute; left: 50%;
top:0%; height: 40%;
width: 50%;
background-color: #9C27B0;
}
.humidity { height: 40%;
width: 50%; position:absolute; left:50%; top:40%;
border-bottom-right-radius: 25px; background-color: #E91E63;
}
#search-btn {
width: 40px; height:40px; color: #eee;
}
#search-txt { color: red; height:30px;
border-radius: 10px; border-style:none; outline:none; padding-right:1px; padding-left:1px; text-align:center;
}
.search {
position: absolute; left: 50%; top:50%;
webkit-transform:translate(-50%,-50%); transform:translate(-50%,-50%);
}
.tuban{
color:white; padding-left: 40px;
padding-bottom: 10px;
}
</style>
<body>
<div class="container">
<header class="header">
<div class="search">
<input type="text" placeholder="Enter City Name" id="search-txt">
<a id="search-btn" href="#"><i class="fas fa-search"></i></a>
</div>
</header>
<main id="main">
<div class="city-icon">
<div class="city-icon-holder">
<div id="city-name"></div>
<img src="" alt="" id="icon">
</div>
</div>
<div class="temperature">
<h5 class="tuban">Temperature(C)</h5>
<div id="temp"></div>
</div>
<div class="humidity">
<h5 class="tuban">Humidity(%)</h5>
<div id="humidity-div"></div>
</div>
</main>
</div>
<script src='https://use.fontawesome.com/releases/v5.0.13/js/all.js'></script>
<script src="index.js"></script>
</body>
</html>