-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
109 lines (101 loc) · 4.39 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
107
108
109
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="style.css" />
<title>Weather App</title>
</head>
<body
class="bg-[url('./images/bg_image.jpg')] bg-center bg-cover bg-no-repeat bg-fixed min-h-screen w-full flex flex-col gap-5 items-center justify-start p-10">
<div class="w-fit flex items-center">
<h1 class="text-white font-bold text-2xl">Weather Now</h1>
<img src="./images/116.png" alt="" class="w-14 h-14" srcset="" />
</div>
<form action="" method="get" id="form"
class="relative flex w-4/5 md:w-3/5 lg:w-[35%] items-center justify-center gap-2">
<input type="text" name="city" id="town" placeholder="Enter a city..." required
class="py-2 px-3 w-full rounded-full bg-white text-white text-lg outline outline-2 backdrop-blur-lg ease-in-out duration-300 outline-white/70 focus:bg-white/20" />
<button type="submit" class="">
<ion-icon class="text-white font-black text-2xl p-3 bg-white/50 rounded-full" name="search"></ion-icon>
</button>
<ul id="suggestions"
class="absolute top-full left-0 w-full bg-white/20 backdrop-blur-lg text-white z-50 rounded-lg shadow-lg mt-2">
</ul>
</form>
<!-- Home city card -->
<div
class="p-5 w-4/5 justify-between flex rounded-3xl shadow-2xl cursor-pointer transform ease-in-out bg-white/20 duration-500 backdrop-blur-sm md:w-3/5 lg:w-[35%] hover:scale-[105%]">
<div id="left" class="flex flex-col">
<div id="top" class="mb-6">
<p id="temperature-main" class="font-bold text-4xl text-white">
24°C
</p>
<p class="font-semibold text-md text-white">Now</p>
</div>
<p class="font-semibold text-xl text-white">
<span id="city">Islamabad</span>, <span id="country">PK</span>
</p>
</div>
<div id="right" class="flex justify-end items-center">
<img class="w-28 h-4w-28" src="./images/113.png" alt="" />
</div>
</div>
<!-- Weather Details -->
<!-- Left -->
<div
class="flex w-full justify-between bg-[#0198afb6] p-3 backdrop-blur-2xl ease-in-out duration-500 rounded-xl md:w-3/5 lg:w-[35%]">
<div id="left" class="flex flex-col justify-start">
<!-- Icon -->
<img id="icon" src="./images/116.png" alt="weather icon" />
<!-- Weather -->
<p id="weather" class="font-bold text-4xl text-white">Sunny</p>
<!-- Description -->
<p id="weather-description" class="font-semibold text-white">
clear sky
</p>
</div>
<div id="right" class="w-1/2 flex-col space-y-2">
<!-- Temperature -->
<div class="flex w-full justify-around items-center bg-white/30 rounded-lg p-1 gap-6">
<ion-icon class="w-8 h-8 text-white" name="thermometer"></ion-icon>
<div class="">
<p id="temperature" class="font-bold text-2xl text-right text-[#ff5a00]">
26.08 °C
</p>
<p class="text-sm text-white text-right">Temperature</p>
</div>
</div>
<!-- Wind Speed -->
<div class="flex w-full justify-around items-center bg-white/30 rounded-lg p-1 gap-6">
<ion-icon class="w-8 h-8 text-white" name="speedometer"></ion-icon>
<div class="">
<p id="wind-speed" class="font-bold text-2xl text-[#ff5a00] text-right">
1.18 m/s
</p>
<p class="text-sm text-white text-right">Wind</p>
</div>
</div>
<!-- Humidity -->
<div class="flex w-full justify-around items-center bg-white/30 rounded-lg p-1 gap-6">
<ion-icon class="w-8 h-8 text-white" name="rainy"></ion-icon>
<div class="">
<p id="humidity" class="font-bold text-2xl text-[#ff5a00] text-right">
89 %
</p>
<p class="text-sm text-white text-right">Humidity</p>
</div>
</div>
</div>
</div>
<!-- Weather Forecast Container with plain background -->
<div
class="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-4 w-full justify-items-center p-3 bg-[#0198afb6] rounded-xl md:w-3/5 lg:w-[35%]"
id="forecast-container">
<!-- Forecast items will be dynamically injected here -->
</div>
<script src="script.js"></script>
<script type="module" src="https://unpkg.com/ionicons@7.1.0/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/ionicons@7.1.0/dist/ionicons/ionicons.js"></script>
</body>
</html>