forked from BradGroux/github-copilot-get-started
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
130 lines (123 loc) · 5.37 KB
/
index.html
File metadata and controls
130 lines (123 loc) · 5.37 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Weather Forecast | 5-Day Outlook</title>
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/weather-icons/2.0.12/css/weather-icons.min.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
</head>
<body>
<div class="app-container">
<!-- Header with Search -->
<header class="header">
<div class="logo">
<i class="wi wi-day-sunny"></i>
<span>WeatherView</span>
</div>
<div class="search-container">
<div class="search-box">
<i class="wi wi-search search-icon">🔍</i>
<input
type="text"
id="city-input"
placeholder="Search for a city..."
autocomplete="off"
>
<button id="search-btn" class="search-btn">Search</button>
</div>
<button id="location-btn" class="location-btn" title="Use my location">
📍
</button>
</div>
<div class="unit-toggle">
<button id="celsius-btn" class="unit-btn">°C</button>
<button id="fahrenheit-btn" class="unit-btn active">°F</button>
</div>
</header>
<!-- Loading State -->
<div id="loading" class="loading hidden">
<div class="spinner"></div>
<p>Fetching weather data...</p>
</div>
<!-- Error State -->
<div id="error" class="error hidden">
<i class="wi wi-na"></i>
<p id="error-message">Unable to fetch weather data</p>
<button id="retry-btn" class="retry-btn">Try Again</button>
</div>
<!-- Main Content -->
<main id="main-content" class="main-content hidden">
<!-- Current Weather Hero -->
<section class="current-weather">
<div class="current-weather-info">
<div class="location-info">
<h1 id="location-name">--</h1>
<p id="location-country">--</p>
<p id="current-date">--</p>
</div>
<div class="current-temp-container">
<i id="current-icon" class="wi wi-day-sunny current-icon"></i>
<div class="current-temp">
<span id="current-temp-value">--</span>
<span class="temp-unit">°</span>
</div>
</div>
<p id="current-condition" class="current-condition">--</p>
</div>
<div class="current-details">
<div class="detail-item">
<i class="wi wi-humidity"></i>
<div>
<span class="detail-label">Humidity</span>
<span id="current-humidity" class="detail-value">--%</span>
</div>
</div>
<div class="detail-item">
<i class="wi wi-strong-wind"></i>
<div>
<span class="detail-label">Wind</span>
<span id="current-wind" class="detail-value">-- km/h</span>
</div>
</div>
<div class="detail-item">
<i class="wi wi-raindrop"></i>
<div>
<span class="detail-label">Precipitation</span>
<span id="current-precip" class="detail-value">-- mm</span>
</div>
</div>
<div class="detail-item">
<i class="wi wi-barometer"></i>
<div>
<span class="detail-label">Pressure</span>
<span id="current-pressure" class="detail-value">-- hPa</span>
</div>
</div>
</div>
</section>
<!-- 5-Day Forecast -->
<section class="forecast-section">
<h2 class="section-title">5-Day Forecast</h2>
<div id="forecast-cards" class="forecast-cards">
<!-- Forecast cards will be dynamically inserted here -->
</div>
</section>
</main>
<!-- Welcome State -->
<div id="welcome" class="welcome">
<i class="wi wi-day-cloudy welcome-icon"></i>
<h2>Welcome to WeatherView</h2>
<p>Search for a city or use your location to get started</p>
</div>
<!-- Footer -->
<footer class="footer">
<p>Powered by <a href="https://open-meteo.com/" target="_blank" rel="noopener">Open-Meteo</a></p>
</footer>
</div>
<script src="app.js"></script>
</body>
</html>