-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
258 lines (227 loc) · 6.99 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
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
<!DOCTYPE html>
<html>
<head>
<meta name="google-site-verification" content="tTOcI-YmiTZ3Xuq6HQ6IcowNe2aSWRV17QnJXH0ekO8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ClassiFire</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100;700&display=swap');
body {
margin: 0;
background-color: #F5F5F5; /* Light grey */
font-family: 'Montserrat', sans-serif;
font-weight: 100;
color: black;
}
header {
background-color: #8B0000; /* Dark red */
color: white;
padding: 10px;
font-family: 'Montserrat', sans-serif;
font-weight: 500;
text-align: center;
}
nav {
background-color: #333; /* Dark grey */
color: white;
padding: 8px;
font-family: 'Montserrat', sans-serif;
font-weight: 300;
display: flex;
align-items: center;
justify-content: space-between;
text-align: center;
}
nav ul { /* ul is a list */
list-style-type: none;
margin: 0;
padding: 0;
display: flex;
align-items: center;
}
nav ul li a {
display: block;
color: white;
padding: 14px 16px;
text-decoration: none;
text-align: left;
}
nav ul li a:hover {
background-color: #111; /* Dark grey when hovering */
}
h1 {
color: white;
font-family: 'Montserrat', sans-serif;
font-weight: 500;
text-align: center;
}
nav h2 {
color: white;
font-family: 'Montserrat', sans-serif;
font-weight: 300;
position: absolute;
left: 50%;
transform: translateX(-50%);
top: 100px;
}
main {
max-width: 1000px;
margin: 20px auto;
padding: 0 20px;
}
p {
font-family: 'Montserrat', sans-serif;
font-weight: 100;
text-align: left;
font-size: 18px;
line-height: 1.5;
margin-bottom: 20px;
}
iframe {
width: 100%;
height: 700px;
}
.page {
display: none;
}
.page.active {
display: block;
}
footer {
text-align: center;
margin-top: 20px;
}
.centered-text {
margin-left: auto;
margin-right: auto;
}
#markdown-content h1 {
color: black;
font-family: 'Montserrat', sans-serif;
font-weight: 100;
}
#markdown-content h2 {
color: black;
font-family: 'Montserrat', sans-serif;
font-weight: 100;
}
#markdown-content img {
max-width: 100%;
height: auto;
}
@media (max-width: 600px) {
body {
font-size: 16px;
}
/* Adjust padding and margins */
nav ul li a {
padding: 10px 12px;
}
/* Increase size of clickable elements */
nav ul li a {
font-size: 18px;
}
/* Modify layout for smaller screens */
main {
padding: 0 10px;
}
/* Adjust iframe dimensions */
iframe {
height: 400px;
}
nav h2 {
display: none;
}
}
</style>
</head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/showdown/1.9.1/showdown.min.js"></script>
<body>
<header>
<h1>ClassiFire</h1>
</header>
<nav>
<ul>
<li><a href="#" data-page-id="page1">Home</a></li>
<li><a href="#" data-page-id="page2">Heat Map</a></li>
</ul>
<!--<h2 style="margin-right: 720px;">Wildfires Management Complexity Project</h2>-->
<div class="centeredtext">
<h2>Wildfires Management Complexity Project</h2>
</div>
</nav>
<main>
<div class="page" id="page1">
<div id="markdown-content"></div>
<style>
</style>
<script>
// Function to fetch the Markdown file
function fetchMarkdownFile(url) {
return fetch(url)
.then(response => response.text())
.catch(error => console.log(error));
}
// Function to convert Markdown to HTML using Showdown
function convertMarkdownToHTML(markdownContent) {
const converter = new showdown.Converter();
return converter.makeHtml(markdownContent);
}
// Fetch the Markdown file and display its content as HTML
fetchMarkdownFile('README.md')
.then(markdownContent => {
const htmlContent = convertMarkdownToHTML(markdownContent);
document.getElementById('markdown-content').innerHTML = htmlContent;
});
</script>
</div>
<div class="page" id="page2">
<body>
<header>
<h1>Wildfires from 2014 through 2023</h1>
</header>
<main>
<p>This heat map shows wildfires from 2014 through 2023 in the contiguous USA. The colors are weighted by fire complexity levels ranging from type 1 incidents to type 5 incidents.</p>
<p>Type 1 incidents have a higher weight, but the majority of the red spots indicate large clusters of type 4 and type 5 incidents rather than type 2 or 1 incidents.</p>
<p>This map displays roughly 18,000 fires out of the total 250,000 fires.</p>
<iframe src="https://keanang.github.io/ClassiFire/images/Heat_map.html"></iframe>
<p>If map doesn't show correctly, view directly through https://keanang.github.io/ClassiFire/images/Heat_map.html</p>
</main>
</body>
</div>
<footer>
<h3 align="center">Feel free to check out my capstone project repository or GitHub profile:</h3>
<a href="https://github.com/KeananG">
<img src="https://img.shields.io/badge/KeananG-black?logo=github&style=flat-square&logoColor=white" alt="KeananG">
</a>
<a href="https://github.com/KeananG/ClassiFire">
<img src="https://img.shields.io/badge/ClassiFire-black?logo=github&style=flat-square&logoColor=white" alt="ClassiFire">
</a>
</footer>
</main>
<script>
function showPage(pageId) {
const pages = document.querySelectorAll('.page');
for (let i = 0; i < pages.length; i++) {
if (pages[i].id === pageId) {
pages[i].classList.add('active');
} else {
pages[i].classList.remove('active');
}
}
}
function handleMenuClick(event) {
event.preventDefault();
const target = event.target;
if (target.tagName === 'A') {
const pageId = target.getAttribute('data-page-id');
showPage(pageId);
}
}
const menu = document.querySelector('nav ul');
menu.addEventListener('click', handleMenuClick);
// Setting default page to page1
showPage('page1');
</script>
</body>
</html>