rajkhanke commited on
Commit
1d4a828
·
verified ·
1 Parent(s): 2c38cfd

Create templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +128 -0
templates/index.html ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>India Water Insights</title>
7
+ <!-- Font Awesome for icons -->
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ .spinner {
11
+ width: 60px;
12
+ height: 60px;
13
+ border: 8px solid #eee;
14
+ border-top: 8px solid #e53935;
15
+ border-radius: 50%;
16
+ animation: spin 1s linear infinite;
17
+ margin: 60px auto;
18
+ display: none;
19
+ }
20
+ @keyframes spin {
21
+ 0% { transform: rotate(0deg); }
22
+ 100% { transform: rotate(360deg); }
23
+ }
24
+ body {
25
+ margin: 0;
26
+ font-family: 'Segoe UI', Arial, sans-serif;
27
+ background: #f8f8f8;
28
+ }
29
+ .navbar {
30
+ background: linear-gradient(90deg, #232526 0%, #414345 100%);
31
+ display: flex;
32
+ justify-content: center;
33
+ align-items: center;
34
+ padding: 0 24px;
35
+ height: 72px;
36
+ box-shadow: 0 4px 24px rgba(0,0,0,0.12);
37
+ border-radius: 0 0 18px 18px;
38
+ position: fixed;
39
+ top: 0;
40
+ left: 0;
41
+ width: 100vw;
42
+ z-index: 100;
43
+ }
44
+ .nav-btn {
45
+ color: #fff;
46
+ background: none;
47
+ border: none;
48
+ outline: none;
49
+ font-size: 1.15rem;
50
+ padding: 0 36px;
51
+ height: 56px;
52
+ margin: 0 8px;
53
+ cursor: pointer;
54
+ display: flex;
55
+ align-items: center;
56
+ gap: 12px;
57
+ border-radius: 12px 12px 0 0;
58
+ position: relative;
59
+ transition: background 0.18s, color 0.18s, box-shadow 0.18s;
60
+ box-shadow: 0 2px 8px rgba(0,0,0,0.04);
61
+ }
62
+ .nav-btn:hover {
63
+ color: #e53935;
64
+ background: #fff;
65
+ box-shadow: 0 4px 16px rgba(229,57,53,0.08);
66
+ }
67
+ .nav-btn.active {
68
+ color: #e53935;
69
+ background: #fff;
70
+ box-shadow: 0 6px 24px rgba(229,57,53,0.12);
71
+ }
72
+ .nav-btn.active::after {
73
+ content: '';
74
+ position: absolute;
75
+ left: 50%;
76
+ bottom: -8px;
77
+ transform: translateX(-50%);
78
+ width: 36px;
79
+ height: 4px;
80
+ background: linear-gradient(90deg, #e53935 0%, #ffb300 100%);
81
+ border-radius: 2px;
82
+ box-shadow: 0 2px 8px rgba(229,57,53,0.18);
83
+ }
84
+ .map-container {
85
+ height: calc(100vh - 72px);
86
+ width: 100vw;
87
+ position: absolute;
88
+ top: 72px;
89
+ left: 0;
90
+ }
91
+ </style>
92
+ </head>
93
+ <body>
94
+ <nav class="navbar">
95
+ <button class="nav-btn active" onclick="showMap(0)"><i class="fa-solid fa-fire"></i> Artificial Recharge Hotspots</button>
96
+ <button class="nav-btn" onclick="showMap(1)"><i class="fa-solid fa-water"></i> GroundwaterLevel Heatmap</button>
97
+ <button class="nav-btn" onclick="showMap(2)"><i class="fa-solid fa-layer-group"></i> Aquifer Type Insights</button>
98
+ <button class="nav-btn" onclick="showMap(3)"><i class="fa-solid fa-cloud-rain"></i> Rainfall Trend Analysis</button>
99
+ </nav>
100
+
101
+ <div class="map-container" id="mapContainer"></div>
102
+ <div id="loadingSpinner" class="spinner"></div>
103
+
104
+ <script>
105
+ const maps = [
106
+ `<iframe src='/static/insightful_recharge_map.html' style='width:100%;height:100%;border:none;' onload='hideSpinner()'></iframe>`,
107
+ `<iframe src='/static/groundwater_map.html' style='width:100%;height:100%;border:none;' onload='hideSpinner()'></iframe>`,
108
+ `<iframe src='/static/aquifer_map_with_state_pie.html' style='width:100%;height:100%;border:none;' onload='hideSpinner()'></iframe>`,
109
+ `<iframe src='/static/district_rainfall_map.html' style='width:100%;height:100%;border:none;' onload='hideSpinner()'></iframe>`,
110
+ ];
111
+
112
+ function showMap(idx) {
113
+ document.getElementById('loadingSpinner').style.display = 'block';
114
+ document.getElementById('mapContainer').innerHTML = maps[idx];
115
+ document.querySelectorAll('.nav-btn').forEach((btn, i) => {
116
+ btn.classList.toggle('active', i === idx);
117
+ });
118
+ }
119
+
120
+ function hideSpinner() {
121
+ document.getElementById('loadingSpinner').style.display = 'none';
122
+ }
123
+
124
+ // load first map on page load
125
+ window.onload = () => showMap(0);
126
+ </script>
127
+ </body>
128
+ </html>