Add web-vanilla

This commit is contained in:
olari
2019-05-26 15:49:01 +03:00
parent b31c99da4f
commit 661a5984a3
11 changed files with 425 additions and 0 deletions

13
web-vanilla/shared.js Normal file
View File

@@ -0,0 +1,13 @@
function create_prologue() {
let back_to_index = document.createElement("a");
back_to_index.setAttribute("href", "../index.html");
back_to_index.innerHTML = "Back to index";
let title = document.createElement("h1");
title.innerText = document.title;
let body = document.getElementsByTagName("body")[0];
body.insertBefore(title, body.firstChild);
body.insertBefore(back_to_index, body.firstChild);
}