-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsmartcontracts.html
50 lines (42 loc) · 1.81 KB
/
smartcontracts.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>David McPhee's Personal Homepage</title>
<link rel="shortcut icon" type="image/png" href="includes/favicon.png">
<link href="includes/main.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body style="background-color:#121212;">
<div id="content">
<!-- Header content will be dynamically loaded here -->
<div id="header-container"></div>
<!-- Main content will be dynamically loaded here -->
<div id="main-container"></div>
<!-- Footer content will be dynamically loaded here -->
<div id="footer-container"></div>
</div>
<!-- JavaScript to load the header, main content, and footer -->
<script>
// Fetch the header, main content, and footer dynamically
Promise.all([
fetch('header-content.html').then(response => response.text()),
fetch('/includes/projects/smartcontracts/content.html').then(response => response.text()),
fetch('footer-content.html').then(response => response.text())
])
.then(([headerData, mainData, footerData]) => {
document.getElementById('header-container').innerHTML = headerData;
document.getElementById('main-container').innerHTML = mainData;
document.getElementById('footer-container').innerHTML = footerData;
})
.catch(error => {
console.error('Error loading content:', error);
document.getElementById('header-container').innerHTML = '<p>Sorry, the header could not be loaded.</p>';
document.getElementById('main-container').innerHTML = '<p>Sorry, the main content could not be loaded.</p>';
document.getElementById('footer-container').innerHTML = '<p>Sorry, the footer could not be loaded.</p>';
});
</script>
</body>
</html>