-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshared.js
More file actions
51 lines (43 loc) · 1.32 KB
/
shared.js
File metadata and controls
51 lines (43 loc) · 1.32 KB
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
// Navigation
const navigation = document.createElement('nav');
navigation.classList.add('navigation');
navigation.appendChild(createLink('index.html', 'Home'));
navigation.appendChild(createLink('objToLua.html', 'OBJ to Lua (OLD)'));
navigation.appendChild(createLink('objToLua2.html', 'OBJ to Lua'));
navigation.appendChild(createLink('texturePainter.html', 'Texture Painter'));
navigation.appendChild(createLink('modelGenerator.html', 'Model Viewer'));
document.body.appendChild(navigation);
function createLink(href, text) {
const link = document.createElement('a');
link.href = href;
link.textContent = text;
link.classList.add('button');
return link;
}
const styles = `
/* Styling for the navigation and buttons */
.navigation {
display: flex;
justify-content: center;
margin-bottom: 20px;
}
.button {
display: inline-block;
padding: 10px 20px;
margin: 0 10px;
background-color: #3498db;
color: #fff;
text-decoration: none;
border-radius: 4px;
transition: background-color 0.3s ease;
}
.button:hover {
background-color: #2980b9;
}
.button.active {
background-color: #2980b9;
}
`;
const styleTag = document.createElement('style');
styleTag.textContent = styles;
document.head.appendChild(styleTag);