-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
203 lines (196 loc) · 5.76 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Mt Kilimanjaro Trip</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
</head>
<body class="container-fluid">
<h1 class="h1">Mt. Kilimanjaro Trip</h1>
<h2>Dates</h2>
<table class="table">
<tr>
<th>Event</th>
<th>Date</th>
<th>Days Until</th>
</tr>
<tr>
<td>Departure</td>
<td></td>
<td data-month="8" data-day="22">...calculating...</td>
</tr>
<tr>
<td>Start climb</td>
<td>Tue, Aug 22</td>
<td data-month="8" data-day="25">...calculating...</td>
</tr>
<tr>
<td>Summit</td>
<td>Tue, Aug 22</td>
<td data-month="8" data-day="31">...calculating...</td>
</tr>
<tr>
<td>Start safari</td>
<td>Tue, Sep 2</td>
<td data-month="9" data-day="2">...calculating...</td>
</tr>
<tr>
<td>Fly home</td>
<td>Tue, Aug 22</td>
<td data-month="9" data-day="6">...calculating...</td>
</tr>
<tr>
<td>Arrive home</td>
<td>Tue, Aug 22</td>
<td data-month="9" data-day="7">...calculating...</td>
</tr>
</table>
<h2>Info</h2>
<p><a href="https://www.ultimatekilimanjaro.com/lemosho-route/">Lemosho Route Description</a></p>
<p>
<img class="w-100 h-auto" src="kilimanjaro_lemosho.png" alt="profile of Lemosho route up Mt Kilimanjaro"
width="2560" height="893">
</p>
<table class="table">
<tr>
<!-- <th>Day</th> -->
<th>Start</th>
<th>Altitude</th>
<th>Stop</th>
<th>Altitude</th>
<th>Hours</th>
<th>Miles</th>
</tr>
<tr>
<!-- <td>1</td> -->
<td>Gate</td>
<td>7742</td>
<td>Mkubwa</td>
<td>9498</td>
<td>3-4</td>
<td>4</td>
</tr>
<tr>
<!-- <td>2</td> -->
<td>Mkubwa</td>
<td>9498</td>
<td>Shira</td>
<td>11500</td>
<td>5-6</td>
<td>5</td>
</tr>
<tr>
<!-- <td>3</td> -->
<td>Shira</td>
<td>11500</td>
<td>Moir</td>
<td>13800</td>
<td>5-7</td>
<td>7</td>
</tr>
<tr>
<!-- <td>4</td> -->
<td>Moir<br>Tower</td>
<td>13800<br>15190</td>
<td>Tower<br>Barranco</td>
<td>15190<br>13044</td>
<td>4-5<br>2-3</td>
<td>4<br>2</td>
</tr>
<tr>
<!-- <td>5</td> -->
<td>Barranco</td>
<td>13044</td>
<td>Karanga</td>
<td>13106</td>
<td>4-5</td>
<td>3</td>
</tr>
<tr>
<!-- <td>6</td> -->
<td>Karanga</td>
<td>13106</td>
<td>Barafu</td>
<td>15331</td>
<td>4-5</td>
<td>2</td>
</tr>
<tr>
<!-- <td>7</td> -->
<td>Barafu<br>Uhuru</td>
<td>15331<br>19341</td>
<td>Uhuru<br>Mweka</td>
<td>19341<br>10065</td>
<td>7-8<br>4-6</td>
<td>3<br>7</td>
</tr>
<tr>
<!-- <td>8</td> -->
<td>Mweka</td>
<td>10065</td>
<td>Gate</td>
<td>5380</td>
<td>3-4</td>
<td>6</td>
</tr>
<tr>
<!-- <td></td> -->
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>43</td>
</tr>
</table>
<h2>Notes</h2>
<table class="table">
<tr>
<td>Nights in Africa</td>
<td>14</td>
</tr>
<tr>
<td>Nights notes:</td>
<td>Two Moshi, Seven Hike, Moshi, Hotel, Tent, Hotel, Hotel</td>
</tr>
</table>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/global/luxon.min.js"></script>
<script>
function getNumberSuffix(num) {
const th = 'th'
const rd = 'rd'
const nd = 'nd'
const st = 'st'
if (num === 11 || num === 12 || num === 13) return th
let lastDigit = num.toString().slice(-1)
switch (lastDigit) {
case '1': return st
case '2': return nd
case '3': return rd
default: return th
}
}
function getDaysUntil(dt) {
const now = luxon.DateTime.now();
let i, days;
if (now < dt) {
i = luxon.Interval.fromDateTimes(now, dt);
days = Math.round(i.length('days'));
} else {
i = luxon.Interval.fromDateTimes(dt, now);
days = -Math.round(i.length('days'));
}
return days;
}
document.querySelectorAll('td[data-month]').forEach(el => {
const dt = luxon.DateTime.local(2023, Number(el.dataset.month), Number(el.dataset.day));
el.textContent = getDaysUntil(dt);
el.previousElementSibling.innerHTML =
`${dt.setLocale('en-US').toLocaleString({ month: 'short' })}
${dt.day}<sup>${getNumberSuffix(dt.day)}</sup>`;
});
</script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"></script>
</body>
</html>