-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
217 lines (192 loc) · 7.75 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta content="Kurozora" name="Author">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Kurozora — Living in the Database</title>
<link rel="shortcut icon" href="favicon.ico">
<!-- Open Graph meta tags -->
<meta property="og:title" content="Kurozora — Living in the Database">
<meta property="og:description" content="Wo-oh">
<meta property="og:type" content="website">
<meta property="og:url" content="https://database.kurozora.app">
<meta property="og:image" content="https://database.kurozora.app/images/database.jpg">
<!-- Twitter Card meta tags -->
<meta name="twitter:site" content="@KurozoraApp">
<meta name="twitter:title" content="Kurozora — Living in the Database">
<meta name="twitter:description" content="Wo-oh">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="https://database.kurozora.app/images/database.jpg">
<style>
body, html {
margin: 0;
padding: 0;
height: 100%;
overflow: hidden;
font-family: Arial, sans-serif;
background: black;
}
#background-audio {
display: none;
}
#gif-container {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
#counter {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
color: white;
font-size: 36px;
font-weight: bold;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
background-color: rgba(0, 0, 0, 0.5);
padding: 10px 20px;
border-radius: 10px;
z-index: 9999;
}
#dim-button {
position: fixed;
top: 10px;
right: 10px;
padding: 10px 20px;
background-color: #FF9300;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
z-index: 9999;
}
.overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.6);
z-index: 9998;
display: none;
}
.modal {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: white;
padding: 20px;
border-radius: 10px;
text-align: center;
z-index: 9999;
display: none;
}
.modal h2 {
margin-top: 0;
}
.modal button {
padding: 10px 20px;
background-color: #FF9300;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}
#logo-container {
position: fixed;
top: 10px;
left: 10px;
z-index: 9999;
}
#logo-link {
text-decoration: none;
}
.gif {
position: absolute;
width: 300px;
height: 169px;
background-size: cover;
object-fit: cover;
}
</style>
</head>
<body>
<div id="gif-container"></div>
<div id="counter">You've been in the database for: <span id="timer">0:00</span></div>
<button id="dim-button">Dim</button>
<div class="overlay"></div>
<div class="modal" id="warning-modal">
<h2>Seizure Warning</h2>
<p>This website contains flashing lights that may trigger seizures for people with photosensitive epilepsy. Please use the "Dim" button in the top-right corner before continuing.</p>
<button id="continue-button">Continue</button>
</div>
<div id="logo-container">
<a id="logo-link" href="https://kurozora.app" target="_blank">
<img src="images/logo.svg" alt="Kurozora Logo" width="36" height="36">
</a>
</div>
<script>
const gifs = ["images/1.gif", "images/2.gif", "images/3.gif", "images/4.gif", "images/5.gif"];
const gifContainer = document.getElementById("gif-container");
const counter = document.getElementById("timer");
const overlay = document.querySelector(".overlay");
const dimButton = document.getElementById("dim-button");
const warningModal = document.getElementById("warning-modal");
const continueButton = document.getElementById("continue-button");
let seconds = 0;
let isDimmed = false;
// Function to display gifs on the page
function displayGifs() {
const windowHeight = window.innerHeight;
const windowWidth = window.innerWidth;
const numGifs = Math.ceil(windowHeight / 169) * Math.ceil(windowWidth / 300);
for (let i = 0; i < numGifs; i++) {
const randomGif = gifs[Math.floor(Math.random() * gifs.length)];
const gifElement = document.createElement("div");
gifElement.classList.add("gif");
gifElement.style.left = (i % Math.ceil(windowWidth / 300)) * 300 + "px";
gifElement.style.top = Math.floor(i / Math.ceil(windowWidth / 300)) * 169 + "px";
gifElement.style.backgroundImage = `url(${randomGif})`;
gifContainer.appendChild(gifElement);
}
}
// Function to update the timer
function updateTimer() {
seconds++;
const minutes = Math.floor(seconds / 60);
const remainingSeconds = seconds % 60;
counter.textContent = `${minutes}:${remainingSeconds < 10 ? '0' : ''}${remainingSeconds}`;
}
// Function to dim GIFs
function dimGifs() {
overlay.style.display = isDimmed ? "none" : "block";
isDimmed = !isDimmed;
dimButton.textContent = isDimmed ? "Undim" : "Dim";
}
// Event listener for dim button
dimButton.addEventListener("click", dimGifs);
// Function to show warning modal
function showWarningModal() {
warningModal.style.display = "block";
}
// Function to hide warning modal and start the page content
function hideWarningModal() {
warningModal.style.display = "none";
// Start playing audio, displaying gifs, and updating timer when the warning is acknowledged
const audio = new Audio("audios/database.webm");
audio.loop = true;
audio.play();
displayGifs();
setInterval(updateTimer, 1000);
}
// Event listener for continue button
continueButton.addEventListener("click", hideWarningModal);
// Show warning modal when the page loads
window.onload = showWarningModal;
</script>
</body>
</html>