-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
237 lines (196 loc) · 6.13 KB
/
index.html
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="https://kit.fontawesome.com/e0999f435a.js" crossorigin="anonymous"></script>
<style>
body {
font-family: 'Roboto', sans-serif;
background-color: #6C7A86;
}
#menu {
z-index: 2;
}
#menu-bar {
width: 45px;
height: 40px;
margin: 30px 0 20px 20px;
cursor: pointer;
}
.bar {
height: 5px;
width: 90%;
background-color: #2505dc;
display: block;
border-radius: 5px;
transition: 0.3s ease;
}
#bar1 {
transform: translateY(-4px);
}
#bar3 {
transform: translateY(4px);
}
.nav {
transition: 0.3s ease;
display: none;
}
.nav ul {
padding: 0 22px;
}
.nav li {
list-style: none;
padding: 10px 0;
}
.nav li a {
color: white;
font-size: 20px;
text-decoration: none;
}
.nav li a:hover {
font-weight: bold;
}
.menu-bg,
#menu {
top: 35%;
left: 0;
position: absolute;
}
.menu-bg {
z-index: 1;
width: 0;
height: 0;
margin: 30px 0 20px 20px;
background: radial-gradient(circle, #2505dc, #2505dc);
border-radius: 50%;
transition: 0.3s ease;
}
.change {
display: block;
}
.change .bar {
background-color: white;
}
.change #bar1 {
transform: translateY(4px) rotateZ(-45deg);
}
.change #bar2 {
opacity: 0;
}
.change #bar3 {
transform: translateY(-6px) rotateZ(45deg);
}
.change-bg {
width: 650px;
height: 820px;
transform: translate(-58%, -25%);
}
i {
white-space: nowrap !important;
}
</style>
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#328bc0">
<meta name="msapplication-TileColor" content="#328bc0">
<meta name="theme-color" content="#328bc0">
<title>Drehmal.cyou</title>
</head>
<body>
<iframe src="home.html" id="frameContainer" style="position:fixed; top:0; left:0; bottom:0; right:0; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; ">
Your browser doesn't support iframes :(
</iframe>
<div id="menu">
<div id="menu-bar" onclick="menuOnClick()">
<div id="bar1" class="bar"></div>
<div id="bar2" class="bar"></div>
<div id="bar3" class="bar"></div>
</div>
<nav class="nav" id="nav">
<ul>
<li><a href="#home" onclick="loadPage('home')"><i class="fa-solid fa-house"></i> Home</a></li>
<li><a href="#about" onclick="loadPage('about')"><i class="fa-solid fa-question"></i> About this</a></li>
<li>
<div class="bar"></div>
</li>
<li><a href="#game" onclick="loadPage('game')"><i class="fa-solid fa-gamepad"></i> Game Maps</a></li>
<li><a href="#iso" onclick="loadPage('iso')"><i class="fa-solid fa-layer-group"></i> Isometric Map</a></li>
<li><a href="#2d" onclick="loadPage('2d')"><i class="fa-regular fa-map"></i> 2D Map</a></li>
<li><a href="#3d" onclick="loadPage('3d')"><i class="fa-solid fa-earth-europe"></i> 3D Map</a></li>
<li>
<div class="bar"></div>
</li>
<li><a href="https://www.drehmal.net/" title=" Official Website"><i class="fa-solid fa-arrow-up-right-from-square fa-bounce"></i> Official Website</a></li>
<li><a href="https://discord.com/invite/eBE3c3dz"><i class="fa-brands fa-discord"></i> Official Discord</a></li>
<li><a href="https://www.planetminecraft.com/project/drehmal-v2-prim-rdial-12k-x-12k-survival-adventure-map/"><i class="fa-regular fa-thumbs-up"></i> Planet Minecraft</a></li>
</ul>
</nav>
</div>
<div class="menu-bg" id="menu-bg"></div>
<script>
let current_page = "";
console.log("Current-Page:" + current_page);
function url_map(page) {
console.log("URL_MAP:" + page)
switch (page) {
case "home":
return "home.html";
case "about":
return "about.html";
case "iso":
return "iso\/index.html";
case "2d":
return "2d\/index.html";
case "3d":
return "3d\/index.html";
case "game":
return "game\/index.html"
default:
return "home.html";
}
}
onload = function() {
console.log("Onload")
// load page based on url
var url = window.location.href;
console.log("URL:" + url);
console.log("URL_SPLIT:" + url.split('#'));
var page = url.split('#')[1];
var path = page.slice(page.indexOf('/') + 1);
page = page.split('/')[0]
console.log("PAGE:" + page);
current_page = page;
console.log("PATH:" + path);
// set url
console.log("RECONSTRUCTED:" + url_map(page) + "#" + path)
document.getElementById("frameContainer").src = url_map(page) + "#" + path;
}
// log iframe url changes including hash changes
setInterval(function() {
console.log("Get-Hash-Interval")
//do stuff with 'window.location.hash'
var hash = document.getElementById("frameContainer").contentWindow.location.href.split('#')[1];
if (hash == undefined) {
hash = "";
}
//get current page
var page = window.location.href.split('#')[1];
//append hash to existing hash
window.history.replaceState(null, null, "#" + current_page + "/" + hash);
}, 1000);
function menuOnClick() {
console.log("menuOnClick")
document.getElementById("menu-bar").classList.toggle("change");
document.getElementById("nav").classList.toggle("change");
document.getElementById("menu-bg").classList.toggle("change-bg");
}
function loadPage(page) {
console.log("loadPage:" + page);
current_page = page;
document.getElementById("frameContainer").src = url_map(page);
}
</script>
</body>
</html>