This repository was archived by the owner on Nov 24, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuv-index.html.jinja
More file actions
88 lines (87 loc) · 3.95 KB
/
uv-index.html.jinja
File metadata and controls
88 lines (87 loc) · 3.95 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
{% from "components/forms.jinja" import select_number %}
{% from "components/chart.jinja" import chart %}
<!DOCTYPE html>
<html lang="en-GB" data-theme="dark">
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1" name="viewport">
<title>Weatherdan</title>
<link href="https://use.fontawesome.com/releases/v6.3.0/css/all.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bulma@1.0.2/css/bulma.min.css" rel="stylesheet">
<link href="/static/css/styles.css" rel="stylesheet">
<link href="/static/img/favicon.ico" id="favicon" rel="icon" type="image/x-icon">
</head>
<body class="has-navbar-fixed-top">
{% include "components/navbar.jinja" %}
<main class="section">
<div class="container">
<header class="block has-text-centered">
<h1 class="title is-1">UV Index</h1>
</header>
<div class="columns is-centered">
<div class="column is-one-quarter-tablet is-one-fifth-fullhd">
<div class="box has-background-text-soft">
<h4 class="title is-4 has-text-text-bold">Filter</h5>
<form accept-charset="UTF-8" method="GET">
{{ select_number(label="Select Year", name="year", value=year, options=year_list) }}
{% if year %}
{{ select_number(label="Select Month", name="month", value=month, options=month_list) }}
{% endif %}
<div class="buttons is-centered">
<button class="button is-warning" onclick="resetForm('/uv-index/historical')" type="button">
<span class="icon">
<i class="fa-solid fa-rotate"></i>
</span>
<span>Reset</span>
</button>
</div>
</form>
</div>
</div>
<div class="column">
<div class="columns is-multiline is-centered is-desktop">
{% if month %}
<div class="column is-half-desktop">
{{ chart(label="Daily Stats", id="daily-stats") }}
</div>
<div class="column is-half-desktop">
{{ chart(label="Weekly Stats", id="weekly-stats") }}
</div>
{% endif %}
{% if year %}
<div class="column is-half-desktop">
{{ chart(label="Monthly Stats", id="monthly-stats") }}
</div>
{% endif %}
<div class="column is-half-desktop">
{{ chart(label="Yearly Stats", id="yearly-stats") }}
</div>
</div>
</div>
</div>
</div>
</main>
{% include "components/footer.jinja" %}
<script src="https://cdn.jsdelivr.net/npm/jquery@^3.7" type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js@^4.4" type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/npm/moment@^2.29" type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/npm/chartjs-adapter-moment@^1.0" type="text/javascript"></script>
<script src="/static/js/scripts.js" type="text/javascript"></script>
<script src="/static/js/bulma-navbar.js" type="text/javascript"></script>
<script type="text/javascript">
ready(() => {
{% if month %}
loadUVIndexStats("Daily", "daily-stats", maxEntries=100);
loadUVIndexStats("Weekly", "weekly-stats", maxEntries=100);
{% endif %}
{% if year %}
loadUVIndexStats("Monthly", "monthly-stats", maxEntries=100);
{% endif %}
loadUVIndexStats("Yearly", "yearly-stats", maxEntries=100);
});
ready(() => {
refreshData("/api/uv-index");
});
</script>
</body>
</html>