-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindexold.html
More file actions
172 lines (165 loc) · 5.65 KB
/
Copy pathindexold.html
File metadata and controls
172 lines (165 loc) · 5.65 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
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
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Home</title>
<style>
html, body {
height: 100%;
margin: 0;
display: flex;
flex-direction: column;
overflow: hidden;
}
.background-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
}
.background-container img {
position: absolute;
width: 100%;
height: 100%;
object-fit: cover;
opacity: 0;
transition: opacity 1.5s ease-in-out;
}
header {
background-color: rgba(211, 211, 211, 0.8);
padding: 20px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
text-align: center;
font-family: Verdana, sans-serif;
position: relative;
z-index: 2;
transition: opacity 1s ease-in-out;
}
header.hidden {
opacity: 0;
pointer-events: none;
}
header img {
position: absolute;
left: 20px;
top: 50%;
transform: translateY(-50%);
height: 100px;
border-radius: 15px;
}
.menu-icon {
position: absolute;
top: 50%;
right: 40px; /* Verschiebt das Menü näher zur Mitte */
transform: translateY(-50%);
cursor: pointer;
z-index: 3;
}
.menu-icon div {
width: 30px;
height: 4px;
background-color: black;
margin: 6px 0;
}
.menu {
display: none;
position: absolute;
top: 60px;
right: 20px;
background-color: white;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
border-radius: 8px;
z-index: 3;
}
.menu a {
display: block;
padding: 10px 20px;
text-decoration: none;
color: black;
font-family: Verdana, sans-serif;
border-bottom: 1px solid #ddd;
}
.menu a:last-child {
border-bottom: none;
}
.menu a:hover {
background-color: #f0f0f0;
}
</style>
</head>
<body onclick="showElements()">
<div class="background-container">
<img src="lamacraft/bg1.png" alt="Background 1">
<img src="lamacraft/bg2.png" alt="Background 2">
<img src="lamacraft/bg3.png" alt="Background 3">
<img src="lamacraft/bg4.png" alt="Background 4">
<img src="lamacraft/bg5.png" alt="Background 5">
<img src="lamacraft/bg6.png" alt="Background 6">
<img src="lamacraft/bg7.png" alt="Background 7">
<img src="lamacraft/bg8.png" alt="Background 8">
<img src="lamacraft/bg9.png" alt="Background 9">
<img src="lamacraft/bg10.png" alt="Background 10">
<img src="lamacraft/bg11.png" alt="Background 11">
<img src="lamacraft/bg12.png" alt="Background 12">
<img src="lamacraft/bg13.png" alt="Background 13">
<img src="lamacraft/bg14.png" alt="Background 14">
<img src="lamacraft/bg15.png" alt="Background 15">
<img src="lamacraft/bg16.png" alt="Background 16">
<img src="lamacraft/bg17.png" alt="Background 17">
<img src="lamacraft/bg18.png" alt="Background 18">
<img src="lamacraft/bg19.png" alt="Background 19">
<img src="lamacraft/bg20.png" alt="Background 20">
<img src="lamacraft/bg21.png" alt="Background 21">
<img src="lamacraft/bg22.png" alt="Background 22">
<img src="lamacraft/bg23.png" alt="Background 23">
</div>
<header id="header">
<img src="lamacraft/logo.jpg" alt="Logo">
<h1>Home</h1>
<div class="menu-icon" onclick="toggleMenu(event)">
<div></div>
<div></div>
<div></div>
</div>
<div class="menu" id="menu">
<a href="lamacraft/index.html">Go to Lamacraft</a>
<a href="https://discord.com/invite/WbDGbAGYcH">Discord</a>
<a href="lamacraft/mods.html">Mods</a>
</div>
</header>
<script>
const images = document.querySelectorAll('.background-container img');
let index = 0;
let hideTimeout;
function changeBackground() {
images.forEach(img => img.style.opacity = '0');
images[index].style.opacity = '1';
index = (index + 1) % images.length;
}
setInterval(changeBackground, 4500);
changeBackground();
// Hide header and menu
function hideElements() {
document.getElementById('header').classList.add('hidden');
document.getElementById('menu').style.display = 'none';
}
// Show header and reset the hide timer
function showElements() {
document.getElementById('header').classList.remove('hidden');
clearTimeout(hideTimeout);
hideTimeout = setTimeout(hideElements, 20000); // Hide again after 20 seconds
}
// Toggle menu visibility
function toggleMenu(event) {
event.stopPropagation(); // Prevent triggering the body click event
const menu = document.getElementById('menu');
menu.style.display = menu.style.display === 'block' ? 'none' : 'block';
}
// Initial hide after 20 seconds
hideTimeout = setTimeout(hideElements, 20000);
</script>
</body>
</html>