-
Notifications
You must be signed in to change notification settings - Fork 51
/
index.html
113 lines (93 loc) · 3.35 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
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Meta -->
<meta charset="UTF-8" />
<title>Mars weather</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Google fonts -->
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,500,700&display=swap" rel="stylesheet">
<!-- Styles -->
<link rel="stylesheet" href="css/main.css">
<!-- Scripts -->
<script src="scripts/index.js" defer></script>
</head>
<body>
<main class="mars-current-weather">
<h1 class="main-title">Latest weather at Elysium Planitia</h1>
<div class="date">
<h2 class="section-title section-title--date">
Sol
<span data-current-sol>375</span>
</h2>
<p class="date__day" data-current-date></p>
</div>
<div class="temp">
<h2 class="section-title">Temperature</h2>
<p class="reading">
High:
<span data-current-temp-high></span>
°<span data-temp-unit></span>
</p>
<p class="reading">
Low:
<span data-current-temp-low></span>
°<span data-temp-unit></span>
</p>
</div>
<div class="wind">
<h2 class="section-title">Wind</h2>
<p class="reading">
<span data-wind-speed></span>
<span data-speed-unit></span>
</p>
<div class="wind__direction">
<p class="sr-only" data-wind-direction-text></p>
<!-- update --direction custom prop
to change arrow direction -->
<div class="wind__arrow" data-wind-direction-arrow></div>
</div>
</div>
<div class="info">
<p>InSight is taking daily weather measurements (temperature, wind, pressure) on the surface of Mars at Elysium Planitia, a flat, smooth plain near Mars’ equator.</p>
<p>This is only a part of InSight’s mission. <a href="https://mars.nasa.gov/insight/mission/overview/">Click here</a> to find out more.</p>
</div>
<div class="unit">
<label for="cel">°C</label>
<input type="radio" id="cel" name="unit" checked>
<!-- when unit__toggle is clicked
checkbox needs to change -->
<button class="unit__toggle" data-unit-toggle></button>
<label for="fah">°F</label>
<input type="radio" id="fah" name="unit">
</div>
</main>
<div class="previous-weather">
<!-- When clicked, toggle '.show-weather'
to .previous-weather div -->
<button for="weather-toggle" class="show-previous-weather"><span>↑</span> <span class="sr-only">Show previous weather</span></button>
<h2 class="main-title previous-weather__title">Previous 7 days</h2>
<div class="previous-days" data-previous-sols></div>
</div>
<template data-previous-sol-template>
<div class="previous-day">
<h3 class="previous-day__sol">
Sol
<span data-sol></span>
</h3>
<p class="previous-day__date" data-date></p>
<p class="previous-day__temp">
High:
<span data-temp-high></span>
°<span data-temp-unit></span>
</p>
<p class="previous-day__temp">
Low:
<span data-temp-low></span>
°<span data-temp-unit></span>
</p>
<button class="previous-day__more-info" data-select-button>more info</button>
</div>
</template>
</body>
</html>