Update templates/index.html
Browse files- templates/index.html +106 -18
templates/index.html
CHANGED
@@ -17,6 +17,8 @@
|
|
17 |
.container {
|
18 |
display: flex;
|
19 |
height: 100%;
|
|
|
|
|
20 |
}
|
21 |
.terminal {
|
22 |
flex: 1;
|
@@ -71,6 +73,7 @@
|
|
71 |
border: 1px solid #0f0;
|
72 |
padding: 20px;
|
73 |
box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
|
|
|
74 |
}
|
75 |
#editor-textarea {
|
76 |
width: 100%;
|
@@ -126,34 +129,84 @@
|
|
126 |
.glitch {
|
127 |
animation: glitch 1s linear infinite;
|
128 |
}
|
129 |
-
#ai-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
position: fixed;
|
131 |
top: 50%;
|
132 |
left: 50%;
|
133 |
transform: translate(-50%, -50%);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
font-size: 48px;
|
135 |
-
|
136 |
-
|
137 |
-
|
|
|
138 |
}
|
139 |
-
@keyframes
|
140 |
-
0%, 100% {
|
141 |
-
50% {
|
142 |
}
|
143 |
-
#ai-
|
144 |
display: inline-block;
|
145 |
-
animation:
|
146 |
}
|
147 |
-
#ai-
|
148 |
-
#ai-
|
149 |
-
#ai-
|
150 |
-
#ai-sleeping span:nth-child(5) { animation-delay: 0.8s; }
|
151 |
</style>
|
152 |
</head>
|
153 |
<body>
|
154 |
-
<div id="ai-
|
155 |
-
|
156 |
-
|
|
|
157 |
</div>
|
158 |
<div class="container">
|
159 |
<div class="terminal">
|
@@ -180,7 +233,8 @@
|
|
180 |
const fileEditor = document.getElementById('file-editor');
|
181 |
const editorTextarea = document.getElementById('editor-textarea');
|
182 |
const saveButton = document.getElementById('save-button');
|
183 |
-
const
|
|
|
184 |
|
185 |
let currentEditingFile = '';
|
186 |
let isFirstInteraction = true;
|
@@ -196,7 +250,7 @@
|
|
196 |
|
197 |
function executeCode() {
|
198 |
if (isFirstInteraction) {
|
199 |
-
|
200 |
isFirstInteraction = false;
|
201 |
}
|
202 |
|
@@ -281,6 +335,40 @@
|
|
281 |
window.addEventListener('load', updateFileList);
|
282 |
window.addEventListener('beforeunload', cleanup);
|
283 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
284 |
// Initial message
|
285 |
addToOutput("Welcome to the AI-Powered Hacker's Python Terminal. Type your commands below.");
|
286 |
addToOutput("Available commands:");
|
|
|
17 |
.container {
|
18 |
display: flex;
|
19 |
height: 100%;
|
20 |
+
position: relative;
|
21 |
+
z-index: 1;
|
22 |
}
|
23 |
.terminal {
|
24 |
flex: 1;
|
|
|
73 |
border: 1px solid #0f0;
|
74 |
padding: 20px;
|
75 |
box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
|
76 |
+
z-index: 1000;
|
77 |
}
|
78 |
#editor-textarea {
|
79 |
width: 100%;
|
|
|
129 |
.glitch {
|
130 |
animation: glitch 1s linear infinite;
|
131 |
}
|
132 |
+
#ai-background {
|
133 |
+
position: fixed;
|
134 |
+
top: 0;
|
135 |
+
left: 0;
|
136 |
+
width: 100%;
|
137 |
+
height: 100%;
|
138 |
+
z-index: 0;
|
139 |
+
opacity: 0.1;
|
140 |
+
pointer-events: none;
|
141 |
+
}
|
142 |
+
@keyframes codeFlow {
|
143 |
+
0% { transform: translateY(-100%); }
|
144 |
+
100% { transform: translateY(100%); }
|
145 |
+
}
|
146 |
+
.code-line {
|
147 |
+
position: absolute;
|
148 |
+
font-size: 14px;
|
149 |
+
color: #0f0;
|
150 |
+
white-space: nowrap;
|
151 |
+
animation: codeFlow 20s linear infinite;
|
152 |
+
}
|
153 |
+
#ai-text {
|
154 |
position: fixed;
|
155 |
top: 50%;
|
156 |
left: 50%;
|
157 |
transform: translate(-50%, -50%);
|
158 |
+
font-size: 150px;
|
159 |
+
font-weight: bold;
|
160 |
+
color: transparent;
|
161 |
+
background: repeating-linear-gradient(
|
162 |
+
0deg,
|
163 |
+
#0f0 0%,
|
164 |
+
#0fa 25%,
|
165 |
+
#0f0 50%,
|
166 |
+
#0fa 75%,
|
167 |
+
#0f0 100%
|
168 |
+
);
|
169 |
+
background-size: 100% 200%;
|
170 |
+
-webkit-background-clip: text;
|
171 |
+
background-clip: text;
|
172 |
+
animation: gradientFlow 10s linear infinite;
|
173 |
+
z-index: 0;
|
174 |
+
opacity: 0.3;
|
175 |
+
pointer-events: none;
|
176 |
+
}
|
177 |
+
@keyframes gradientFlow {
|
178 |
+
0% { background-position: 0 0; }
|
179 |
+
100% { background-position: 0 -200%; }
|
180 |
+
}
|
181 |
+
#ai-sleep {
|
182 |
+
position: fixed;
|
183 |
+
top: 30%;
|
184 |
+
left: 50%;
|
185 |
+
transform: translateX(-50%);
|
186 |
font-size: 48px;
|
187 |
+
color: #0f0;
|
188 |
+
text-shadow: 0 0 10px #0f0, 0 0 20px #0f0;
|
189 |
+
z-index: 2;
|
190 |
+
pointer-events: none;
|
191 |
}
|
192 |
+
@keyframes float {
|
193 |
+
0%, 100% { transform: translateY(0) translateX(-50%); }
|
194 |
+
50% { transform: translateY(-20px) translateX(-50%); }
|
195 |
}
|
196 |
+
#ai-sleep span {
|
197 |
display: inline-block;
|
198 |
+
animation: float 2s ease-in-out infinite;
|
199 |
}
|
200 |
+
#ai-sleep span:nth-child(2) { animation-delay: 0.2s; }
|
201 |
+
#ai-sleep span:nth-child(3) { animation-delay: 0.4s; }
|
202 |
+
#ai-sleep span:nth-child(4) { animation-delay: 0.6s; }
|
|
|
203 |
</style>
|
204 |
</head>
|
205 |
<body>
|
206 |
+
<div id="ai-background"></div>
|
207 |
+
<div id="ai-text">AI</div>
|
208 |
+
<div id="ai-sleep" aria-live="polite">
|
209 |
+
<span>z</span><span>z</span><span>z</span><span>z</span>
|
210 |
</div>
|
211 |
<div class="container">
|
212 |
<div class="terminal">
|
|
|
233 |
const fileEditor = document.getElementById('file-editor');
|
234 |
const editorTextarea = document.getElementById('editor-textarea');
|
235 |
const saveButton = document.getElementById('save-button');
|
236 |
+
const aiBackground = document.getElementById('ai-background');
|
237 |
+
const aiSleep = document.getElementById('ai-sleep');
|
238 |
|
239 |
let currentEditingFile = '';
|
240 |
let isFirstInteraction = true;
|
|
|
250 |
|
251 |
function executeCode() {
|
252 |
if (isFirstInteraction) {
|
253 |
+
aiSleep.style.display = 'none';
|
254 |
isFirstInteraction = false;
|
255 |
}
|
256 |
|
|
|
335 |
window.addEventListener('load', updateFileList);
|
336 |
window.addEventListener('beforeunload', cleanup);
|
337 |
|
338 |
+
// Create flowing code background
|
339 |
+
const codeSnippets = [
|
340 |
+
"def ai_function():",
|
341 |
+
" return 'Hello, World!'",
|
342 |
+
"class AIAssistant:",
|
343 |
+
" def __init__(self):",
|
344 |
+
" self.knowledge = []",
|
345 |
+
"import tensorflow as tf",
|
346 |
+
"model = tf.keras.Sequential()",
|
347 |
+
"x = np.array([1, 2, 3, 4])",
|
348 |
+
"y = x * 2 + 1",
|
349 |
+
"plt.plot(x, y, 'r-')",
|
350 |
+
"for i in range(100):",
|
351 |
+
" train(model, data[i])"
|
352 |
+
];
|
353 |
+
|
354 |
+
function createCodeLine() {
|
355 |
+
const codeLine = document.createElement('div');
|
356 |
+
codeLine.className = 'code-line';
|
357 |
+
codeLine.style.left = `${Math.random() * 100}%`;
|
358 |
+
codeLine.style.animationDuration = `${15 + Math.random() * 10}s`;
|
359 |
+
codeLine.textContent = codeSnippets[Math.floor(Math.random() * codeSnippets.length)];
|
360 |
+
aiBackground.appendChild(codeLine);
|
361 |
+
|
362 |
+
codeLine.addEventListener('animationiteration', () => {
|
363 |
+
codeLine.style.left = `${Math.random() * 100}%`;
|
364 |
+
codeLine.textContent = codeSnippets[Math.floor(Math.random() * codeSnippets.length)];
|
365 |
+
});
|
366 |
+
}
|
367 |
+
|
368 |
+
for (let i = 0; i < 20; i++) {
|
369 |
+
createCodeLine();
|
370 |
+
}
|
371 |
+
|
372 |
// Initial message
|
373 |
addToOutput("Welcome to the AI-Powered Hacker's Python Terminal. Type your commands below.");
|
374 |
addToOutput("Available commands:");
|