Phoenixoni commited on
Commit
1c8f5d1
·
verified ·
1 Parent(s): 2f7804a

Add 2 files

Browse files
Files changed (2) hide show
  1. README.md +7 -5
  2. index.html +275 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Matrix
3
- emoji: 👀
4
- colorFrom: blue
5
- colorTo: pink
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: matrix
3
+ emoji: 🐳
4
+ colorFrom: red
5
+ colorTo: purple
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,275 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Matrix Dialog</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <style>
9
+ @import url('https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;700&display=swap');
10
+
11
+ body {
12
+ font-family: 'Inconsolata', monospace;
13
+ background-color: #000;
14
+ overflow: hidden;
15
+ }
16
+
17
+ .matrix-bg {
18
+ position: fixed;
19
+ top: 0;
20
+ left: 0;
21
+ width: 100%;
22
+ height: 100%;
23
+ z-index: -1;
24
+ opacity: 0.1;
25
+ }
26
+
27
+ .matrix-char {
28
+ color: #20C20E;
29
+ text-shadow: 0 0 5px #20C20E;
30
+ animation: fade 1s infinite alternate;
31
+ }
32
+
33
+ @keyframes fade {
34
+ 0% { opacity: 0.3; }
35
+ 100% { opacity: 1; }
36
+ }
37
+
38
+ .dialog-box {
39
+ border: 2px solid #20C20E;
40
+ box-shadow: 0 0 15px #20C20E;
41
+ animation: pulse 2s infinite;
42
+ }
43
+
44
+ @keyframes pulse {
45
+ 0% { box-shadow: 0 0 15px #20C20E; }
46
+ 50% { box-shadow: 0 0 25px #20C20E; }
47
+ 100% { box-shadow: 0 0 15px #20C20E; }
48
+ }
49
+
50
+ .btn {
51
+ transition: all 0.3s;
52
+ }
53
+
54
+ .btn:hover {
55
+ text-shadow: 0 0 10px #20C20E;
56
+ transform: scale(1.05);
57
+ }
58
+
59
+ .typing {
60
+ border-right: 2px solid #20C20E;
61
+ animation: blink 0.75s step-end infinite;
62
+ }
63
+
64
+ @keyframes blink {
65
+ from, to { border-color: transparent; }
66
+ 50% { border-color: #20C20E; }
67
+ }
68
+ </style>
69
+ </head>
70
+ <body class="text-green-500">
71
+ <!-- Matrix background effect -->
72
+ <canvas id="matrixCanvas" class="matrix-bg"></canvas>
73
+
74
+ <!-- Main container -->
75
+ <div class="min-h-screen flex items-center justify-center p-4">
76
+ <!-- Dialog box -->
77
+ <div class="dialog-box bg-black bg-opacity-90 rounded-lg p-8 max-w-md w-full relative">
78
+ <!-- Title with matrix effect -->
79
+ <h1 id="matrixTitle" class="text-3xl font-bold mb-6 text-center"></h1>
80
+
81
+ <!-- Dialog content -->
82
+ <div class="space-y-6">
83
+ <div id="dialogContent" class="text-lg leading-relaxed">
84
+ <!-- Content will be added dynamically -->
85
+ </div>
86
+
87
+ <!-- Choices -->
88
+ <div id="choices" class="space-y-3 hidden">
89
+ <button class="btn w-full text-left p-3 border border-green-500 rounded hover:bg-green-900 hover:bg-opacity-30 transition-all duration-300">
90
+ <span class="text-green-400">></span> Принять красную таблетку
91
+ </button>
92
+ <button class="btn w-full text-left p-3 border border-green-500 rounded hover:bg-green-900 hover:bg-opacity-30 transition-all duration-300">
93
+ <span class="text-green-400">></span> Принять синюю таблетку
94
+ </button>
95
+ </div>
96
+
97
+ <!-- Continue button -->
98
+ <button id="continueBtn" class="btn w-full bg-green-900 bg-opacity-50 text-green-400 py-3 px-4 rounded font-bold hover:bg-opacity-70 transition-all duration-300">
99
+ ПРОДОЛЖИТЬ >
100
+ </button>
101
+ </div>
102
+
103
+ <!-- Terminal-like footer -->
104
+ <div class="mt-6 pt-4 border-t border-green-800 text-sm text-green-600 flex justify-between">
105
+ <span>SYSTEM ACCESS</span>
106
+ <span>USER: NEO</span>
107
+ </div>
108
+ </div>
109
+ </div>
110
+
111
+ <script>
112
+ // Matrix background effect
113
+ const canvas = document.getElementById('matrixCanvas');
114
+ const ctx = canvas.getContext('2d');
115
+
116
+ canvas.width = window.innerWidth;
117
+ canvas.height = window.innerHeight;
118
+
119
+ const katakana = 'アァカサタナハマヤャラワガザダバパイィキシチニヒミリヰギジヂビピウゥクスツヌフムユュルグズブヅプエェケセテネヘメレヱゲゼデベペオォコソトノホモヨョロヲゴゾドボポヴッン';
120
+ const latin = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
121
+ const nums = '0123456789';
122
+ const alphabet = katakana + latin + nums;
123
+
124
+ const fontSize = 16;
125
+ const columns = canvas.width / fontSize;
126
+
127
+ const rainDrops = [];
128
+
129
+ for (let x = 0; x < columns; x++) {
130
+ rainDrops[x] = 1;
131
+ }
132
+
133
+ const draw = () => {
134
+ ctx.fillStyle = 'rgba(0, 0, 0, 0.05)';
135
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
136
+
137
+ ctx.fillStyle = '#20C20E';
138
+ ctx.font = fontSize + 'px monospace';
139
+
140
+ for (let i = 0; i < rainDrops.length; i++) {
141
+ const text = alphabet.charAt(Math.floor(Math.random() * alphabet.length));
142
+ ctx.fillText(text, i * fontSize, rainDrops[i] * fontSize);
143
+
144
+ if (rainDrops[i] * fontSize > canvas.height && Math.random() > 0.975) {
145
+ rainDrops[i] = 0;
146
+ }
147
+ rainDrops[i]++;
148
+ }
149
+ };
150
+
151
+ setInterval(draw, 30);
152
+
153
+ // Dialog system
154
+ const matrixTitle = document.getElementById('matrixTitle');
155
+ const dialogContent = document.getElementById('dialogContent');
156
+ const choices = document.getElementById('choices');
157
+ const continueBtn = document.getElementById('continueBtn');
158
+ const choiceButtons = document.querySelectorAll('#choices button');
159
+
160
+ let currentStep = 0;
161
+ const dialogSteps = [
162
+ {
163
+ title: "> СИСТЕМА ЗАГРУЖЕНА",
164
+ content: "Приветствую, Нео.",
165
+ delay: 30
166
+ },
167
+ {
168
+ title: "> ДОСТУП К СИСТЕМЕ",
169
+ content: "Ты чувствовал это всю свою жизнь... Что мир не совсем настоящий.",
170
+ delay: 20
171
+ },
172
+ {
173
+ title: "> ВЫБОР ПРЕДЛОЖЕН",
174
+ content: "Я могу предложить тебе выбор. Прими одну из таблеток.",
175
+ showChoices: true,
176
+ delay: 20
177
+ },
178
+ {
179
+ title: "> ПУТЬ ОПРЕДЕЛЕН",
180
+ content: "Ты выбрал красную таблетку. Помни: все, что я могу предложить - это правда.",
181
+ delay: 20
182
+ },
183
+ {
184
+ title: "> ПРОГРАММА ЗАВЕРШЕНА",
185
+ content: "Добро пожаловать в реальный мир.",
186
+ final: true,
187
+ delay: 30
188
+ }
189
+ ];
190
+
191
+ // Typewriter effect
192
+ async function typeWriter(element, text, delay) {
193
+ return new Promise(resolve => {
194
+ element.innerHTML = '';
195
+ element.classList.add('typing');
196
+
197
+ let i = 0;
198
+ const typing = setInterval(() => {
199
+ if (i < text.length) {
200
+ element.innerHTML += text.charAt(i);
201
+ i++;
202
+ } else {
203
+ clearInterval(typing);
204
+ element.classList.remove('typing');
205
+ resolve();
206
+ }
207
+ }, delay);
208
+ });
209
+ }
210
+
211
+ // Show current step
212
+ async function showStep(stepIndex) {
213
+ const step = dialogSteps[stepIndex];
214
+
215
+ // Type title
216
+ await typeWriter(matrixTitle, step.title, 50);
217
+
218
+ // Type content
219
+ await typeWriter(dialogContent, step.content, step.delay);
220
+
221
+ // Show choices if needed
222
+ if (step.showChoices) {
223
+ choices.classList.remove('hidden');
224
+ continueBtn.classList.add('hidden');
225
+ } else {
226
+ choices.classList.add('hidden');
227
+ continueBtn.classList.remove('hidden');
228
+ }
229
+
230
+ // Change continue button text if final step
231
+ if (step.final) {
232
+ continueBtn.textContent = 'ЗАВЕРШИТЬ >';
233
+ } else {
234
+ continueBtn.textContent = 'ПРОДОЛЖИТЬ >';
235
+ }
236
+ }
237
+
238
+ // Initialize
239
+ showStep(currentStep);
240
+
241
+ // Continue button click
242
+ continueBtn.addEventListener('click', () => {
243
+ if (dialogSteps[currentStep].final) {
244
+ // Restart from beginning
245
+ currentStep = 0;
246
+ } else {
247
+ currentStep++;
248
+ if (currentStep >= dialogSteps.length) currentStep = 0;
249
+ }
250
+ showStep(currentStep);
251
+ });
252
+
253
+ // Choice buttons click
254
+ choiceButtons.forEach((button, index) => {
255
+ button.addEventListener('click', () => {
256
+ // Skip to the step after choices
257
+ currentStep = 3;
258
+ // Modify the content based on choice
259
+ if (index === 1) {
260
+ dialogSteps[3].content = "Ты выбрал синюю таблетку. История закончится, ты проснешься в своей постели и поверишь... во что захочешь.";
261
+ }
262
+ choices.classList.add('hidden');
263
+ continueBtn.classList.remove('hidden');
264
+ showStep(currentStep);
265
+ });
266
+ });
267
+
268
+ // Handle window resize
269
+ window.addEventListener('resize', () => {
270
+ canvas.width = window.innerWidth;
271
+ canvas.height = window.innerHeight;
272
+ });
273
+ </script>
274
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Phoenixoni/matrix" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
275
+ </html>