-
Notifications
You must be signed in to change notification settings - Fork 0
/
newtab.html
382 lines (372 loc) · 20.5 KB
/
newtab.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
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1" name="viewport">
<title>Evergreen New Tab</title>
<link href="icons/evergreen32.png" rel="icon"/>
<link href="libs/bootstrap/bootstrap.min.css" rel="stylesheet">
<script src="libs/bootstrap/bootstrap.bundle.min.js"></script>
<script src="libs/fontawesome/solid.min.js"></script>
<script src="libs/fontawesome/brands.min.js"></script>
<script src="libs/fontawesome/fontawesome.min.js"></script>
<script src="libs/chroma.min.js"></script>
<script src="libs/chartjs/chart.min.js"></script>
<script src="libs/chartjs/chartjs-adapter-date-fns.bundle.min.js"></script>
<!-- <script src="libs/skycons.min.js"></script>-->
<link href="libs/kofi/kofi.min.css" rel="stylesheet">
<link href="calendar.css" rel="stylesheet">
<link href="evergreen.css" rel="stylesheet">
<link href="libs/climacons/climacons.min.css" rel="stylesheet">
</head>
<body>
<div id="bg" class="bg"></div>
<a id="bga" class="bg"></a>
<!--<div id="preloadimg" style="display:none;"></div>-->
<div id="caltemp" style="display:none;"></div>
<div id="tooltipmargin"></div>
<div id="body">
<div id="header">
<div class="row">
<div class="col text-start">
<h4 class="floating-text">
<a class="popper" id="evergreenpopover" role="button" tabindex="0">
<img alt="" class="logoimg" src="icons/evergreen128.png"/>Evergreen
</a>
</h4>
</div>
<div class="col text-center">
<h3 class="floating-text">
<a class="popper" id="clockpopover" role="button" tabindex="0">
<span id="clock"><!-- the time goes here --></span>
</a>
</h3>
</div>
<div class="col text-end">
<h4 class="floating-text">
<a class="popper" id="datepopover" role="button" tabindex="0">
<span id="date"><!-- the date goes here --></span>
</a>
</h4>
</div>
</div>
</div>
<div class="footer">
<div class="row">
<div class="col-3 text-start">
<h3 class="floating-text">
<a class="popper" id="weatherpopover" role="button" tabindex="0">
<span id="weatherimage"><!-- the weather icon goes here --></span>
<span id="weather">
<!-- the temperature goes here -->
<i class="fa-solid fa-sun fa-spin"></i>
</span>
</a>
</h3>
</div>
<div class="col-6 text-center">
<!-- google search -->
<form action="https://www.google.com/search" class="form-group" method="get">
<div class="input-group mb-3 circleround search" id="searchform">
<input class="form-control form-control-lg round" name="q" placeholder="Search Google"
type="text">
<button class="btn btn-primary btn-lg round" type="submit"><i class="fas fa-search"></i>
</button>
</div>
</form>
</div>
<div class="col-3 text-end">
<h3 class="floating-text">
<!-- settings menu -->
<i class="fas fa-ellipsis-h menu-btn" data-bs-target="#settings_modal"
data-bs-toggle="modal"
id="menu-button"
></i>
<!-- bootstrap will literally not let me do this in JS -->
</h3>
</div>
</div>
</div>
</div>
<!-- Settings Modal -->
<div class="modal fade" id="settings_modal" role="dialog" tabindex="-1">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><img alt="" class="logoimg" src="icons/evergreen128.png"/>Evergreen Options</h5>
<button aria-label="Close" class="btn-close" data-bs-dismiss="modal" type="button">
<span aria-hidden="true"></span>
</button>
</div>
<div class="modal-body d-grid" style="gap:0.75rem">
<div>
<p><i class="fa-solid fa-globe"></i> Internationalization:</p>
<div class="ms-4 d-grid gap-2">
<div>
<p><i class="fas fa-temperature-low"></i> System of Measurement:</p>
<div class="form-check form-check-inline">
<input class="form-check-input" id="farradio" name="tempunit" type="radio">
<label class="form-check-label" for="farradio">US Customary (Fahrenheit, Inches)</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" id="celradio" name="tempunit" type="radio">
<label class="form-check-label" for="celradio">Metric (Celsius, Centimeters)</label>
</div>
</div>
<div>
<p><i class="fas fa-clock"></i> Time Format:</p>
<div class="form-check form-check-inline">
<input class="form-check-input" id="12radio" name="timeform" type="radio">
<label class="form-check-label" for="12radio">12 hour time</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" id="24radio" name="timeform" type="radio">
<label class="form-check-label" for="24radio">24 hour time</label>
</div>
</div>
<div>
<p><i class="fas fa-calendar-day"></i> Date Format:</p>
<div class="form-check form-check-inline">
<input class="form-check-input" id="mdradio" name="dateform" type="radio">
<label class="form-check-label" for="mdradio">MM/DD/YYYY</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" id="dmradio" name="dateform" type="radio">
<label class="form-check-label" for="dmradio">DD/MM/YYYY</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" id="ymdradio" name="dateform" type="radio">
<label class="form-check-label" for="ymdradio">YYYY-MM-DD</label>
</div>
</div>
</div>
</div>
<div>
<p><i class="fa-solid fa-image"></i> Background:</p>
<div class="ms-4 d-grid gap-2">
<div id="attribution"></div>
<div>
<p id="blurval"><label for="blurslider"><i class="fas fa-droplet"></i> Blur:</label></p>
<input class="form-range" id="blurslider" max="15" min="0" step="0.5" type="range"
value="0"/>
</div>
<!-- <div>-->
<!-- <p>-->
<!-- <i class="fas fa-image-user"></i> Background image search topics-->
<!-- <span class="text-muted">(Optional)</span>:-->
<!-- </p>-->
<!-- <input class="form-control" id="bgtags" placeholder="nature,architecture" type="text">-->
<!-- <p class="pfix text-muted">-->
<!-- Separate search terms by commas with no spaces. Images are randomly sourced from-->
<!-- unsplash.com using these search tags. Example: forest,ocean,city-->
<!-- </p>-->
<!-- </div>-->
<div>
<p>
<i class="fas fa-images"></i> Time to wait before getting new image (in minutes)
<span class="text-muted">(Optional)</span>:
</p>
<input class="form-control" id="bgrefresh" max="1440" min="0"
placeholder="Time in minutes" type="number" value="0">
<p class="text-muted">Evergreen won't download a new background if a new one has been
downloaded
this
many minutes ago. Saves data. Set to 0 to disable.</p>
</div>
<div>
<button class="btn btn-primary" data-bs-dismiss="modal" id="bg-change" type="button"><i
class="fas fa-images"></i> Change Background
</button>
<button disabled class="btn btn-primary" data-bs-dismiss="modal" id="bg-download"
type="button"><i
class="fas fa-download"></i> Download Background
</button>
</div>
</div>
</div>
<div>
<p><i class="fa-solid fa-cloud-sun-rain"></i> Weather:</p>
<div class="ms-4 d-grid gap-2">
<div class="form-check form-switch">
<input class="form-check-input" id="enableweather" type="checkbox">
<label class="form-check-label" for="enableweather">
<i class="fa-solid fa-cloud-arrow-down"></i> Enable Weather
</label>
</div>
<div>
<p><i class="fa-solid fa-satellite-dish"></i> Weather Provider:</p>
<div class="form-check form-check-inline">
<input class="form-check-input disable-if-weather-disabled" id="wp-openweathermap-radio"
name="weatherprovider"
type="radio">
<label class="form-check-label disable-if-weather-disabled"
for="wp-openweathermap-radio">OpenWeatherMap</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" id="wp-nws-radio"
name="weatherprovider"
type="radio" disabled>
<!--disable-if-weather-disabled-->
<label class="form-check-label" for="wp-nws-radio">NWS <i
class="fa-solid fa-triangle-exclamation text-warning" disabled></i></label>
</div>
</div>
<div>
<p><i class="fa-solid fa-icons"></i> Icon Set:</p>
<div class="form-check form-check-inline">
<input class="form-check-input disable-if-weather-disabled" id="cradio"
name="weatherform" type="radio">
<label class="form-check-label disable-if-weather-disabled" data-bs-html="true"
data-bs-toggle="tooltip"
for="cradio"
title="">Climacons</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input disable-if-weather-disabled" id="faradio"
name="weatherform" type="radio">
<label class="form-check-label disable-if-weather-disabled"
for="faradio">FontAwesome</label>
</div>
</div>
<div>
<button class="btn btn-primary disable-if-weather-disabled" id="refresh-weather"
type="button">
<span id="refresh-progress"><i class="fa-solid fa-arrows-rotate"></i></span> Refresh
Weather Info
</button>
</div>
<div class="form-check form-switch">
<input class="form-check-input disable-if-weather-disabled" id="autolocate" type="checkbox">
<label class="form-check-label disable-if-weather-disabled" for="autolocate">
<i class="fa-solid fa-location-arrow"></i> Determine location automatically
</label>
</div>
<div>
<p><i class="fa-solid fa-map-location-dot"></i> Use this location:</p>
<div class="input-group">
<input aria-label="Latitude"
class="form-control disable-on-autolocate weather-coords disable-if-weather-disabled"
id="weather-latitude"
max="90" min="-90" placeholder="Latitude" type="number">
<input aria-label="Longitude"
class="form-control disable-on-autolocate weather-coords disable-if-weather-disabled"
id="weather-longitude"
max="180" min="-180" placeholder="Longitude" type="number">
</div>
</div>
<div>
<p><i class="fa-solid fa-location-question"></i> Get coordinates from city:</p>
<div class="input-group">
<input aria-describedby="submit-address" aria-label="City"
class="form-control disable-on-autolocate disable-if-weather-disabled"
id="weather-address" placeholder="City"
type="text">
<button class="btn btn-primary disable-on-autolocate disable-if-weather-disabled"
id="submit-address" type="button">
<i class="fa-solid fa-magnifying-glass-location"></i>
</button>
</div>
<!--<p class="text-muted">
<a class="whitelink" href="https://openstreetmap.org/copyright">
Data © OpenStreetMap contributors
</a>
</p>-->
</div>
</div>
</div>
<div>
<p>
<i class="fa-solid fa-mug-saucer"></i> If you want to support the development and upkeep of
Evergreen, donate to me via Ko-fi here:
</p>
<div class=btn-container>
<a class="kofi-button" href="https://ko-fi.com/Q5Q75US4A"
style="background-color:#ff00ff;" target="_blank"
title="Support me on ko-fi.com">
<span class="kofitext">
<img alt="Ko-fi donations" class="kofiimg" src="libs/kofi/cup-border.png"/>
Support Me on Ko-fi
</span>
</a>
</div>
</div>
<div>
<p>
<i class="fa-brands fa-github"></i> Raise an issue on
<a class="bug-report" href="https://github.com/HexCodeFFF/evergreen">the GitHub</a>
for any bug reports, feature requests, or other inquiries.
</p>
</div>
<div>
<button class="btn btn-primary" data-bs-dismiss="modal" id="changelog-button" type="button">
<i class="fas fa-plus"></i> Show Changelog
</button>
</div>
<div>
<p>
<a class="bug-report" href="https://fontawesome.com/license/free">
<i class="fab fa-font-awesome"></i> Icons by FontAwesome
</a>
</p>
</div>
</div>
<div class="modal-footer">
<div>
<button class="btn btn-success" id="save" type="button">Force Save</button>
<span class="text-muted" id="savetext" style="margin-left:10px;">Changes autosave.</span>
</div>
<button class="btn btn-secondary" data-bs-dismiss="modal" type="button">Close</button>
</div>
</div>
</div>
</div>
<!-- Welcome Modal -->
<div class="modal fade" id="welcome" role="dialog" tabindex="-1">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title"><img alt="" class="logoimg" src="icons/evergreen128.png"/>Welcome to Evergreen!
</h4>
<button aria-label="Close" class="btn-close" data-bs-dismiss="modal" type="button">
<span aria-hidden="true"></span>
</button>
</div>
<div class="modal-body">
<p>Thank you for using Evergreen! This page now replaces your browser's New Tab page.</p>
<p>Options and support are in the lower right corner.</p>
<p>Click on any text to show more info, such as the weather in the lower left.</p>
<p class="pfix">Please leave a review if you like Evergreen, it really helps.</p>
</div>
<div class="modal-footer">
<button class="btn btn-secondary" data-bs-dismiss="modal" type="button">Close</button>
</div>
</div>
</div>
</div>
<!-- Changelog Modal -->
<div class="modal fade" id="changelog" role="dialog" tabindex="-1">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title"><img alt="" class="logoimg" src="icons/evergreen128.png"/>Evergreen Changelog
</h4>
<button aria-label="Close" class="btn-close" data-bs-dismiss="modal" type="button">
<span aria-hidden="true"></span>
</button>
</div>
<div class="modal-body">
<!--TODO: changelog-->
<h3>Changelog v2.2.2</h3>
<h4>Changes</h4>
<ul>
<li>Updated verbage and config to support Firefox and MS Edge.</li>
</ul>
</div>
<div class="modal-footer">
<button class="btn btn-secondary" data-bs-dismiss="modal" type="button">Close</button>
</div>
</div>
</div>
</div>
<script src="weatherapi.js"></script>
<script src="evergreen.js"></script>