-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.js
More file actions
29 lines (27 loc) · 967 Bytes
/
Copy pathheader.js
File metadata and controls
29 lines (27 loc) · 967 Bytes
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
// Function to create header
function createHeader() {
const header = document.createElement('nav');
header.innerHTML = `
<!-- Logo: Ole Ahrenhold, link to landing page -->
<h2><a href="/" style="color: #333; text-decoration: none;">Ole Ahrenhold</a></h2>
<ul>
<li><a href="#about">Über mich</a></li>
<li><a href="#projects">Projekte</a></li>
<li><a href="#socials">Soziales</a></li>
<li><a href="#contact">Kontakt</a></li>
</ul>
`;
document.body.insertBefore(header, document.body.firstChild);
}
// Function to create footer
function createFooter() {
const footerHTML = `
<footer>
<p>© 2025 Ole Ahrenhold. All Rights Reserved.</p>
</footer>
`;
document.getElementById('footer-placeholder').innerHTML = footerHTML;
}
// Call functions to add header and footer to the page
createHeader();
createFooter();