-
Notifications
You must be signed in to change notification settings - Fork 0
/
menuBar.js
53 lines (49 loc) · 1.73 KB
/
menuBar.js
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
document.head.innerHTML += `
<meta name="keywords" content="Björn Sundin, programming, music production, game development, coding, games, c++, c#, SFML, javascript">
<meta name="description" content="I'm Björn Sundin! I program stuff and make games and music.">
<meta charset="utf-8">
<style>
body {
margin: 0;
background-color: white;
text-align: center;
}
a {
transition: 0.3s;
text-decoration: none;
color: #00bcd4;
}
a:hover {
color: #f06292;
}
.menuItems {
margin: 0px;
transition: 0.3s;
font-size: 53px;
color: #00bcd4;
}
.menuItems:hover {
color: #f06292;
}
</style>`;
document.body.innerHTML += `
<div style="white-space: nowrap; text-align: center;">
<a href="../info/index.html" style="display: inline-block; margin-top: 30px; color: #f06292;"><h1 style="font-size: 100px; margin: 0px;">Björn Sundin</h1></a>
</div>
<div style="white-space: nowrap; text-align: center; margin-top: 10px; margin-bottom: 60px;">
<a href="../projects/index.html" style="display: inline-block;"><h3 class="menuItems">PROJECTS</h2></a>
<a href="../index.html" style="display: inline-block; margin-left: 30px;"><h3 class="menuItems">INFO</h2></a>
</div>
`;
function addCenteredLink(text, href, fontSize = "30px", className = ""){
var container = document.createElement("div");
container.style.textAlign = "center";
document.body.appendChild(container);
var link = document.createElement("a");
link.style.display = "inline-block";
link.innerHTML = text;
link.href = href;
link.className = className;
link.style.fontSize = fontSize;
container.appendChild(link);
}