-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
248 lines (210 loc) · 10.7 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
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.11.3/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="assets/css/style.css">
<title>Astronomy Dashboard</title>
</head>
<!-- Page background color -->
<body class="bg-slate-400/50">
<!-- NAV -->
<header>
<nav class="px-2 m-4 sm:px-4 py-2.5 rounded bg-[url(images/purple.jpeg)]">
<div class="container flex flex-wrap justify-between items-center mx-auto">
<span
class="self-center text-2xl bg-slate-700/50 text-white font-semibold whitespace-nowrap dark:text-white">Astronomy
Dashboard</span>
<div class="hidden w-full sm:block sm:w-auto">
<ul class="flex flex-col mt-4 sm:flex-row sm:space-x-8 sm:mt-0 sm:text-sm sm:font-medium ">
<li>
<a href="#"
class="hover:ring-2 hover:ring-white block py-2 pr-4 pl-3 text-white bg-slate-700/20 rounded"
aria-current="page" id="apod">Astronomy Photo of the Day</a>
</li>
<li>
<a href="#weather"
class="hover:ring-2 hover:ring-white rounded block text-white bg-slate-700/20 py-2 pr-4 pl-3">Weather</a>
</li>
<li>
<a href="#constellations"
class="hover:ring-2 hover:ring-white rounded block text-white bg-slate-700/20 py-2 pr-4 pl-3">Constellation</a>
</li>
<li>
<a href="#moon-phase"
class="hover:ring-2 hover:ring-white rounded block text-white bg-slate-700/20 py-2 pr-4 pl-3">Moon
Phase</a>
</li>
<li>
<a href="#meteors"
class="hover:ring-2 hover:ring-white rounded block text-white py-2 bg-slate-700/20 pr-4 pl-3">Upcoming
Events</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
<!-- Page body -->
<main class="container flex grid-flow-row min-w-full">
<!-- City Search bar -->
<div class="search w-3/12 inset-y-0 left-0 text-center text-xl bg-[url(images/galaxy.jpeg)] text-white rounded ml-4 flex-shrink ">
<h2 class="py-3 text-2xl underline decoration-double">City Search</h2>
<div>
<input text="type" class="text-black rounded w-full" placeholder="Please enter a city" id="cityText">
<button class="bg-violet-500 border border-violet-700 hover:bg-violet-400 m-2 rounded" type="button"
id="searchButton">
🔍
</button>
</div>
<!--We put the search history below-->
<div id="searchedCities" class="history flex flex-col-reverse p-2">
</div>
<button class="text-sm bg-slate-500/80 hover:bg-slate-400 m-2 rounded lg:w-40" id="clearButton">Clear
Results
</button>
</div>
<div class="w-5/12 ml-10 flex flex-col w-full">
<!-- City search buttons that appear only after entering invalid search input -->
<div
class="hidden search-btns flex flex-col md:flex-shrink bg-[url(images/galaxy.jpeg)] text-slate-100 rounded-md text-center font-mono w-full">
<div id="choose-city"></div>
<div class="flex flex-col" id="city-names"></div>
</div>
<!-- Weather Container -->
<div class="flex flex-col md:flex-shrink text-slate-100 rounded-md text-center font-mono w-full bg-gradient-to-t from-fuchsia-700 to-[#b965c4] border-b border-fuchsia-700 shadow-lg shadow-fuchsia-800/70"
id="weather">
<br>
<h2 class="text-4xl text-slate-50 capitalize underline decoration-double" id="cityName"></h2>
<br>
<img id="weather-icon" class="self-center w-16 h-16"></img>
<!--Current weather conditions-->
<p id="temperature"></p>
<p id="cloudiness"></p>
<p id="visibility"></p>
<br>
</div>
<br>
<br>
<!--Displays current moon phase and info about phase -->
<div class="self-center text-center rounded-full px-20 py-10 bg-gradient-to-t from-violet-500 to-[#af93f1] border-b border-violet-500 shadow-lg shadow-violet-700/60"
id="moon-phase">
<div>
<h2 class="text-3xl underline decoration-double">Current Moon Phase:</h2>
<br>
<p class="text-2xl text-black/80 pb-7 underline" id="moon-phase-name"></p>
</div>
<img class="mx-auto" id="moon-phase-icon" src="">
<br>
<p class="text-center text-black/60 italic overline self-center" id="phase-description"></p>
</div>
<br>
<br>
<!-- Show available constellations based on month -->
<div class="container flex-col text-center self-center rounded-md bg-gradient-to-t bg-gradient-to-t from-fuchsia-700 to-[#b965c4] border-b border-fuchsia-700 shadow-lg shadow-fuchsia-800/70"
id="constellations">
<div>
<h2 class="py-10 text-3xl text-slate-200 underline decoration-double self-center">Constellations
Visible This Month:</h2>
<img class="mx-auto pb-10 flex-initial shrink" id="img1">
</div>
<div class="flex-col self-center text-justify" id="constellationInfo">
<h3 class="text-center text-2xl text-slate-200 underline decoration-double pb-8">Noteworthy
Constellations</h3>
<p class="text-l text-slate-200 px-5 pb-5" id="cInfo1"></p>
<p class="text-l text-slate-200 px-5 pb-10" id="cInfo2"></p>
</div>
</div>
<br>
<br>
<!-- Table of Upcoming Meteor Showers -->
<div class="flex container self-center text-center rounded-md py-10 bg-gradient-to-t from-violet-500 to-[#af93f1] border-b border-violet-500 shadow-lg shadow-violet-700/60"
id="meteors">
<!-- <h2 class="text-3xl underline decoration-double">Upcoming Meteor Showers:</h2> -->
<br>
<table class="shrink table-fixed text-sm text-left mx-10 stripe hover" id="meteorTable">
<thead>
<tr>
<th class="w-auto">Name of Shower</th>
<th>Date</th>
<th>Time Remaining</th>
</tr>
</thead>
<tbody>
<tr>
<td>Lyrids</td>
<td>April 22</td>
<td id="m1"></td>
</tr>
<tr>
<td>eta Aquariids</td>
<td>May 07</td>
<td id="m2"></td>
</tr>
<tr>
<td>Southern Delta Aquariids</td>
<td>July 30</td>
<td id="m3"></td>
</tr>
<tr>
<td>Alpha Capricornids</td>
<td>July 27</td>
<td id="m4"></td>
</tr>
<tr>
<td>Perseids</td>
<td>Aug 12</td>
<td id="m5"></td>
</tr>
<tr>
<td>Orionids</td>
<td>October 22</td>
<td id="m6"></td>
</tr>
<tr>
<td>Southern Taurids</td>
<td>October 29</td>
<td id="m7"></td>
</tr>
<tr>
<td>Northern Taurids</td>
<td>Novermber 11</td>
<td id="m8"></td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
</div>
<!-- News Article API -->
<div class="w-4/12 inset-y-0 text-xl bg-[url(images/galaxy.jpeg)] text-white
rounded ml-10 mr-4 flex-shrink" id="news">
<div>
<h2 class="py-3 text-2xl text-center underline decoration-double">Latest News</h2>
</div>
<!--We put the news search history below-->
<ul id="latestNews" class="mx-2 text-slate-50">
</ul>
</div>
</main>
<!-- Footer -->
<footer class="text-center border-gray-200 px-2 m-4 sm:px-4 py-2.5 rounded footer">
<p>Created with <a>❤️</a> by David Chou, Courtney Fosters & Baofeng Guo</p>
<p><a class="font-bold">Resources: </a><a class="font-normal hover:font-bold"
href="https://www.nasa.gov/">NASA</a> | <a class="font-normal hover:font-bold"
href="https://www.space.com/">Space.com</a> | <a class="font-normal hover:font-bold"
href="https://hubblesite.org/">Hubble Space Telescope</a> | <a class="font-normal hover:font-bold"
href="https://www.heavens-above.com/">Heavens-Above</a>
</p>
</footer>
</body>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.27.0/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.1/umd/popper.min.js"></script>
<script src="assets/js/script.js"></script>
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.11.3/js/jquery.dataTables.js"></script>
</html>