-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
182 lines (167 loc) · 5.13 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>SWE Forecast Map</title>
<!-- Leaflet CSS -->
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
<!-- Include Bootstrap CSS -->
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"
/>
<!-- Include Bootstrap Datepicker CSS -->
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/css/bootstrap-datepicker.min.css"
/>
<!-- Your CSS styles -->
<style>
body {
margin: 0;
overflow: hidden;
}
#map {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100vh;
}
#content {
position: absolute;
top: 20px; /* Adjust the top position as needed */
left: 20px; /* Adjust the left position as needed */
z-index: 1000; /* Ensure it's above the map */
}
h1,
label,
input,
button {
margin-bottom: 10px;
}
/* Header Section */
.header {
background: linear-gradient(90deg, #4caf50, #2196f3);
color: white;
text-align: center;
padding: 5px 10px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
position: relative;
/* z-index: 1000; */
display: flex;
justify-content: space-between;
}
.header h1 {
margin: 0;
font-size: 2rem;
font-weight: bold;
}
.header .subtitle {
margin: 5px 0 0;
font-size: 1.2rem;
opacity: 0.8;
}
/* Control Panel Section */
.control-panel-horizontal {
display: flex;
align-items: center;
justify-content: space-between;
/* background: rgba(255, 255, 255, 0.9); */
padding: 10px 20px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
position: relative;
/* z-index: 999; */
/* padding: -14rem; */
}
.control-panel-horizontal .form-group {
display: flex;
align-items: center;
margin: 0;
}
.control-panel-horizontal .form-group label {
margin-right: 10px;
font-weight: bold;
font-size: 1rem;
}
.control-panel-horizontal .form-control {
width: 200px;
margin-right: 20px;
}
.control-panel-horizontal button {
flex-shrink: 0;
margin-left: 10px;
}
.legend {
line-height: 18px;
color: #555;
}
.legend i {
width: 18px;
height: 18px;
float: left;
margin-right: 8px;
opacity: 0.7;
}
.state-label {
color: white;
font-size: 14px;
left: 2.5rem;
}
/* Map Container */
#map {
position: absolute;
top: 120px; /* Adjust to match the header + control panel height */
left: 0;
width: 100%;
height: calc(100vh - 120px);
}
.datepicker {
z-index: 1050 !important;
}
.datepicker-dropdown {
position: absolute !important;
}
</style>
</head>
<body>
<!-- <div id="content">
<h1>Snow Water Equivalent Estimation Map - SnowSource Team</h1>
<label for="datepicker">Select Dates:</label>
<input type="text" id="datepicker">
<button id="load_swe_to_map" >Load SWE Prediciton to Map</button>
<button id="download_swe_geotiff" >Download SWE Prediciton (GeoTiff)</button>
</div> -->
<!-- Header Section -->
<header class="header">
<h3>Snow Water Equivalent Estimation Map</h3>
<p class="subtitle">A Project by the SnowSource Team</p>
</header>
<!-- Control Panel -->
<div id="control-panel" class="control-panel-horizontal">
<div class="form-group">
<label for="datepicker">Select Date:</label>
<input type="text" id="datepicker" />
<button id="load_swe_to_map" class="btn btn-primary">
Load SWE Prediction
</button>
<button id="download_swe_geotiff" class="btn btn-secondary">
Download SWE Prediction (GeoTiff)
</button>
</div>
</div>
<div id="map"></div>
<!--<div id="map-controls"></div>-->
<!-- Leaflet JS -->
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
<!-- Include Bootstrap and Bootstrap Datepicker JS -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/js/bootstrap-datepicker.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/PapaParse/5.3.0/papaparse.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/chroma-js/2.1.0/chroma.min.js"></script>
<script src="swe.js"></script>
</body>
</html>