htdocs/template.js

28 lines
744 B
JavaScript
Raw Normal View History

2023-12-11 23:04:12 +01:00
let div = document.getElementById('main');
2023-12-11 23:45:30 +01:00
let divText = div.innerHTML;
2023-12-11 23:04:12 +01:00
console.log(divText);
2023-12-11 23:45:30 +01:00
let newPageHTML = `
2023-12-12 09:10:33 +01:00
<!DOCTYPE html>
<html>
2023-12-11 23:04:12 +01:00
<head>
<meta charset="UTF-8"/>
<title>DeaDvey's Domain</title>
2023-12-12 09:10:33 +01:00
<link rel="icon" href="../favicon.png">
<link rel="stylesheet" type="text/css" href="index.css">
2023-12-11 23:04:12 +01:00
</head>
<body>
2023-12-11 23:45:30 +01:00
<div class="header main">
2023-12-12 09:10:33 +01:00
<img class="header-image" /><br/><a href="http://deadvey.com">Home page</a> <a href="blog/index.html">Blogs</a> <a href="videos/index.html">Videos</a><hr/>
2023-12-11 23:04:12 +01:00
</div>
<div class="main">
${divText}
</div>
<div class="footer">
</div>
2023-12-12 09:10:33 +01:00
</body>
</html>`
2023-12-11 23:04:12 +01:00
document.body.innerHTML = newPageHTML