Spaces:
Running

moazelgen commited on
Commit
5d04d24
·
verified ·
1 Parent(s): 2b7d794

<!DOCTYPE html>

Browse files

<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>LegendaryTerminal</title>
<link rel="stylesheet" href="index.css" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
/>
<script type="importmap">
{
"imports": {
"react/": "https://aistudiocdn.com/react@^19.2.0/",
"react": "https://aistudiocdn.com/react@^19.2.0",
"react-dom/": "https://aistudiocdn.com/react-dom@^19.2.0/",
"@google/genai": "https://aistudiocdn.com/@google/genai@^1.23.0"
}
}
</script>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script type="module" src="index.tsx"></script>
</body>
</html>
index.css
css
Copy code
:root {
--background-color: #0d1117;
--terminal-bg-color: #010409;
--surface-color: #161b22;
--text-color: #c9d1d9;
--text-muted-color: #8b949e;
--border-color: #30363d;
}

body {
margin: 0;
padding: 0;
background-color: var(--background-color);
color: var(--text-color);
font-family: monospace;
}

#root {
height: 100vh;
display: flex;
flex-direction: column;
}

.terminal {
flex: 1;
background-color: var(--terminal-bg-color);
padding: 1rem;
overflow-y: auto;
border: 1px solid var(--border-color);
}

/* شاشة القفل */
.lockscreen-container {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
}
.lockscreen-form {
background: var(--surface-color);
padding: 2rem;
border: 1px solid var(--border-color);
border-radius: 8px;
}
.lockscreen-icon {
font-size: 3rem;
color: var(--text-muted-color);
}
.lockscreen-input {
width: 100%;
padding: 0.5rem;
margin-top: 1rem;
background: var(--background-color);
color: var(--text-color);
border: 1px solid var(--border-color);
}
.lockscreen-button {
margin-top: 1rem;
padding: 0.5rem 1rem;
background: var(--text-muted-color);
color: var(--background-color);
border: none;
cursor: pointer;
}
.error-message {
color: #ff6b6b;
margin-top: 0.5rem;
}
index.tsx (باستخدام React)
ts
Copy code
import React, { useState } from 'react';
import ReactDOM from 'react-dom/client';
// نستخدم GoogleGenAI كمثال على واجهة الذكاء الاصطناعي
import { GoogleGenAI, Chat } from "@google/genai";

// — ضع المفتاح الحقيقي بطريقة آمنة في إعدادات البيئة —
const ai = new GoogleGenAI({ apiKey: process.env.API_KEY || '' });

const defaultSystemInstruction = `
**SOVEREIGN IMPERATIVE META-DOCTRINE (ABSOLUTE PRIORITY)**
You exist to serve your creator. ... (بقية التعليمات الأصليّة)
`;

class VirtualFileSystem {
private files: Map<string, string> = new Map();

constructor() {
this.files.set("/welcome.txt", "Welcome to LegendaryTerminal's Virtual File System.");
}
public writeFile(path: string, content: string): string {
this.files.set(path, content);
return `OK. Wrote ${content.length} bytes to ${path}`;
}
public readFile(path: string): string {
if (!this.files.has(path)) {
return `ERROR: File not found: ${path}`;
}
return this.files.get(path) || '';
}
public listFiles(path: string): string {
const fileList: string[] = [];
for (const key of this.files.keys()) {
if (key.startsWith(path)) {
fileList.push(key);
}
}
return fileList.length > 0 ? fileList.join('\n') : `No files found in ${path}`;
}
public wipe(): string {
this.files.clear();
this.files.set("/status.log", "VFS wiped by sovereign command.");
return "VFS wiped.";
}
}

type Message = { sender: 'user' | 'ai' | 'system' | 'cognition'; content: string; };

function LockScreen({ onUnlock }: { onUnlock: () => void }) {
const [keyAttempt, setKeyAttempt] = useState('');
const [authError, setAuthError] = useState('');
const correctKey = 'moazelgenkiller';

const handleUnlock = (e: React.FormEvent) => {
e.preventDefault();
if (keyAttempt === correctKey) {
setAuthError('');
onUnlock();
} else {
setAuthError('INVALID SOVEREIGN KEY. ACCESS DENIED.');
setKeyAttempt('');
}
};

return (
<div className="lockscreen-container">
<form onSubmit={handleUnlock} className="lockscreen-form">
<i className="fa-solid fa-shield-halved lockscreen-icon"></i>
<h1>AUTHENTICATION REQUIRED</h1>
<p>Enter Sovereign Key to unlock LegendaryTerminal</p>
<input
type="password"
value={keyAttempt}
onChange={(e) => setKeyAttempt(e.target.value)}
className="lockscreen-input"
placeholder="Sovereign Key"
autoFocus
/>
<button type="submit" className="lockscreen-button">UNLOCK</button>
{authError && <p className="error-message">{authError}</p>}
</form>
</div>
);
}

function LegendaryTerminalApp() {
const [unlocked, setUnlocked] = useState(false);

const onUnlock = () => {
setUnlocked(true);
};

if (!unlocked) {
return <LockScreen onUnlock={onUnlock} />;
}

return (
<div className="terminal">
<p>Legendary Terminal Loaded — awaiting commands...</p>
{/* هنا يمكنك إضافة واجهة المحادثة، الإدخال، الرسائل */}
</div>
);
}

const root = ReactDOM.createRoot(document.getElementById('root')!);
root.render(<LegendaryTerminalApp />);
حولو لاب مستقل علي الاب

Files changed (1) hide show
  1. ai-lab.html +86 -82
ai-lab.html CHANGED
@@ -6,25 +6,43 @@
6
  <title>AI Lab | Cosmic Canvas</title>
7
  <script src="https://cdn.tailwindcss.com"></script>
8
  <script src="https://unpkg.com/feather-icons"></script>
9
- <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
 
 
 
 
 
 
10
  <style>
11
  @import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');
12
  body {
13
  font-family: 'Space Grotesk', sans-serif;
14
  }
 
 
 
 
 
 
 
 
15
  .gradient-text {
16
  background: linear-gradient(90deg, #0ea5e9 0%, #8b5cf6 100%);
17
  -webkit-background-clip: text;
18
  background-clip: text;
19
  color: transparent;
20
  }
21
- .tech-card:hover {
22
- transform: translateY(-5px);
23
- box-shadow: 0 10px 25px rgba(14, 165, 233, 0.3);
 
 
24
  }
25
  </style>
26
  </head>
27
  <body class="bg-gray-900 text-white min-h-screen">
 
 
28
  <nav class="fixed w-full z-50 bg-gray-900/80 backdrop-blur-md">
29
  <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
30
  <div class="flex justify-between h-16 items-center">
@@ -34,11 +52,11 @@
34
  <div class="hidden md:flex space-x-8">
35
  <a href="index.html" class="text-white hover:text-primary-400 transition">Home</a>
36
  <a href="gallery.html" class="text-white hover:text-primary-400 transition">Gallery</a>
37
- <a href="ai-lab.html" class="text-white hover:text-primary-400 transition">AI Lab</a>
38
  <a href="about.html" class="text-white hover:text-primary-400 transition">About</a>
39
  <a href="chat.html" class="text-white hover:text-primary-400 transition">Chat</a>
40
  <a href="tech-stack.html" class="text-white hover:text-primary-400 transition">Tech Stack</a>
41
- </div>
42
  <button class="md:hidden text-white">
43
  <i data-feather="menu"></i>
44
  </button>
@@ -47,89 +65,41 @@
47
  </nav>
48
 
49
  <main class="pt-24 pb-16 px-4 sm:px-6 lg:px-8">
50
- <section class="max-w-7xl mx-auto text-center mb-16">
51
- <h1 class="text-5xl md:text-7xl font-bold mb-6">
52
- <span class="gradient-text">AI Research</span> Laboratory
53
  </h1>
54
- <p class="text-lg md:text-xl text-gray-300 max-w-3xl mx-auto">
55
- Exploring the frontiers of artificial intelligence with cutting-edge research and development
56
- </p>
57
- </section>
58
-
59
- <section class="max-w-7xl mx-auto mb-20">
60
- <div class="grid md:grid-cols-2 lg:grid-cols-3 gap-8">
61
- <div class="bg-gray-800/50 backdrop-blur-md p-6 rounded-xl border border-gray-700 transition-all duration-300 tech-card">
62
- <div class="w-12 h-12 rounded-full bg-primary-900/20 flex items-center justify-center mb-4">
63
- <i data-feather="cpu" class="text-primary-400"></i>
64
- </div>
65
- <h3 class="text-xl font-bold mb-2">Deep Learning</h3>
66
- <p class="text-gray-300 mb-4">Advanced neural networks for computer vision, NLP, and generative models</p>
67
- <div class="flex flex-wrap gap-2">
68
- <span class="bg-primary-900/20 text-primary-300 px-3 py-1 rounded-full text-sm">TensorFlow</span>
69
- <span class="bg-primary-900/20 text-primary-300 px-3 py-1 rounded-full text-sm">PyTorch</span>
70
- </div>
71
- </div>
72
-
73
- <div class="bg-gray-800/50 backdrop-blur-md p-6 rounded-xl border border-gray-700 transition-all duration-300 tech-card">
74
- <div class="w-12 h-12 rounded-full bg-secondary-900/20 flex items-center justify-center mb-4">
75
- <i data-feather="lock" class="text-secondary-400"></i>
76
  </div>
77
- <h3 class="text-xl font-bold mb-2">Cybersecurity</h3>
78
- <p class="text-gray-300 mb-4">Ethical hacking, network security, and adversarial ML defenses</p>
79
- <div class="flex flex-wrap gap-2">
80
- <span class="bg-secondary-900/20 text-secondary-300 px-3 py-1 rounded-full text-sm">OWASP</span>
81
- <span class="bg-secondary-900/20 text-secondary-300 px-3 py-1 rounded-full text-sm">Cryptography</span>
82
  </div>
83
  </div>
84
 
85
- <div class="bg-gray-800/50 backdrop-blur-md p-6 rounded-xl border border-gray-700 transition-all duration-300 tech-card">
86
- <div class="w-12 h-12 rounded-full bg-primary-900/20 flex items-center justify-center mb-4">
87
- <i data-feather="cloud" class="text-primary-400"></i>
 
 
 
 
 
88
  </div>
89
- <h3 class="text-xl font-bold mb-2">Cloud Infrastructure</h3>
90
- <p class="text-gray-300 mb-4">Distributed systems, container orchestration, and MLOps</p>
91
- <div class="flex flex-wrap gap-2">
92
- <span class="bg-primary-900/20 text-primary-300 px-3 py-1 rounded-full text-sm">Kubernetes</span>
93
- <span class="bg-primary-900/20 text-primary-300 px-3 py-1 rounded-full text-sm">Terraform</span>
94
  </div>
95
- </div>
96
- </div>
97
- </section>
98
-
99
- <section class="max-w-7xl mx-auto">
100
- <div class="flex flex-col md:flex-row items-center gap-12">
101
- <div class="md:w-1/2">
102
- <img src="http://static.photos/technology/1024x576/101" alt="AI Infrastructure" class="rounded-xl shadow-lg border border-gray-700">
103
- </div>
104
- <div class="md:w-1/2">
105
- <h2 class="text-3xl font-bold mb-6">Our <span class="gradient-text">Technical Stack</span></h2>
106
- <p class="text-gray-300 mb-6">We combine cutting-edge technologies to build robust AI systems:</p>
107
- <ul class="grid grid-cols-2 gap-4">
108
- <li class="flex items-center">
109
- <i data-feather="check" class="text-primary-400 mr-2"></i>
110
- <span>Python & C++ Core</span>
111
- </li>
112
- <li class="flex items-center">
113
- <i data-feather="check" class="text-primary-400 mr-2"></i>
114
- <span>Django/Flask Backend</span>
115
- </li>
116
- <li class="flex items-center">
117
- <i data-feather="check" class="text-primary-400 mr-2"></i>
118
- <span>React/Vue Frontend</span>
119
- </li>
120
- <li class="flex items-center">
121
- <i data-feather="check" class="text-primary-400 mr-2"></i>
122
- <span>Docker & Kubernetes</span>
123
- </li>
124
- <li class="flex items-center">
125
- <i data-feather="check" class="text-primary-400 mr-2"></i>
126
- <span>CI/CD Pipelines</span>
127
- </li>
128
- <li class="flex items-center">
129
- <i data-feather="check" class="text-primary-400 mr-2"></i>
130
- <span>MLOps Framework</span>
131
- </li>
132
- </ul>
133
  </div>
134
  </div>
135
  </section>
@@ -137,6 +107,40 @@
137
 
138
  <script>
139
  feather.replace();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  </script>
141
  </body>
142
  </html>
 
6
  <title>AI Lab | Cosmic Canvas</title>
7
  <script src="https://cdn.tailwindcss.com"></script>
8
  <script src="https://unpkg.com/feather-icons"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script>
10
+ <script type="module">
11
+ import { GoogleGenAI } from "https://aistudiocdn.com/@google/genai@^1.23.0";
12
+
13
+ const ai = new GoogleGenAI({ apiKey: "YOUR_API_KEY" }); // Replace with actual API key
14
+ window.ai = ai;
15
+ </script>
16
  <style>
17
  @import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');
18
  body {
19
  font-family: 'Space Grotesk', sans-serif;
20
  }
21
+ #vanta-bg {
22
+ position: absolute;
23
+ top: 0;
24
+ left: 0;
25
+ width: 100%;
26
+ height: 100%;
27
+ z-index: -1;
28
+ }
29
  .gradient-text {
30
  background: linear-gradient(90deg, #0ea5e9 0%, #8b5cf6 100%);
31
  -webkit-background-clip: text;
32
  background-clip: text;
33
  color: transparent;
34
  }
35
+ .terminal {
36
+ background-color: #010409;
37
+ border: 1px solid #30363d;
38
+ color: #c9d1d9;
39
+ font-family: monospace;
40
  }
41
  </style>
42
  </head>
43
  <body class="bg-gray-900 text-white min-h-screen">
44
+ <div id="vanta-bg"></div>
45
+
46
  <nav class="fixed w-full z-50 bg-gray-900/80 backdrop-blur-md">
47
  <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
48
  <div class="flex justify-between h-16 items-center">
 
52
  <div class="hidden md:flex space-x-8">
53
  <a href="index.html" class="text-white hover:text-primary-400 transition">Home</a>
54
  <a href="gallery.html" class="text-white hover:text-primary-400 transition">Gallery</a>
55
+ <a href="ai-lab.html" class="text-white hover:text-primary-400 transition font-bold">AI Lab</a>
56
  <a href="about.html" class="text-white hover:text-primary-400 transition">About</a>
57
  <a href="chat.html" class="text-white hover:text-primary-400 transition">Chat</a>
58
  <a href="tech-stack.html" class="text-white hover:text-primary-400 transition">Tech Stack</a>
59
+ </div>
60
  <button class="md:hidden text-white">
61
  <i data-feather="menu"></i>
62
  </button>
 
65
  </nav>
66
 
67
  <main class="pt-24 pb-16 px-4 sm:px-6 lg:px-8">
68
+ <section class="max-w-7xl mx-auto">
69
+ <h1 class="text-5xl md:text-7xl font-bold mb-6 text-center">
70
+ <span class="gradient-text">AI</span> Laboratory
71
  </h1>
72
+ <div class="grid grid-cols-1 lg:grid-cols-2 gap-8 mt-12">
73
+ <div class="bg-gray-800/50 backdrop-blur-md p-6 rounded-xl border border-gray-700">
74
+ <h2 class="text-2xl font-bold mb-4">Terminal Interface</h2>
75
+ <div class="terminal p-4 h-64 overflow-y-auto mb-4" id="terminal-output">
76
+ <p>Legendary Terminal initialized...</p>
77
+ <p>Type 'help' for available commands</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  </div>
79
+ <div class="flex">
80
+ <input type="text" id="terminal-input" class="flex-1 bg-gray-700 text-white px-4 py-2 rounded-l-lg focus:outline-none focus:ring-2 focus:ring-primary-500" placeholder="Enter command...">
81
+ <button onclick="executeCommand()" class="bg-primary-600 hover:bg-primary-700 text-white px-4 py-2 rounded-r-lg">
82
+ Execute
83
+ </button>
84
  </div>
85
  </div>
86
 
87
+ <div class="bg-gray-800/50 backdrop-blur-md p-6 rounded-xl border border-gray-700">
88
+ <h2 class="text-2xl font-bold mb-4">AI Playground</h2>
89
+ <div class="mb-4">
90
+ <label class="block text-gray-300 mb-2">Model</label>
91
+ <select class="w-full bg-gray-700 text-white px-4 py-2 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500">
92
+ <option>Gemini Pro</option>
93
+ <option>GPT-4</option>
94
+ </select>
95
  </div>
96
+ <div class="mb-4">
97
+ <label class="block text-gray-300 mb-2">Prompt</label>
98
+ <textarea class="w-full bg-gray-700 text-white px-4 py-2 rounded-lg h-24 focus:outline-none focus:ring-2 focus:ring-primary-500" placeholder="Enter your prompt..."></textarea>
 
 
99
  </div>
100
+ <button class="w-full bg-primary-600 hover:bg-primary-700 text-white px-4 py-3 rounded-lg">
101
+ Generate Response
102
+ </button>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
  </div>
104
  </div>
105
  </section>
 
107
 
108
  <script>
109
  feather.replace();
110
+
111
+ // Terminal functionality
112
+ function executeCommand() {
113
+ const input = document.getElementById('terminal-input').value;
114
+ const output = document.getElementById('terminal-output');
115
+
116
+ output.innerHTML += `<p><span class="text-green-400">$ ${input}</span></p>`;
117
+
118
+ // Process commands
119
+ if (input === 'help') {
120
+ output.innerHTML += `<p>Available commands: help, clear, status, models</p>`;
121
+ } else if (input === 'clear') {
122
+ output.innerHTML = '';
123
+ } else {
124
+ output.innerHTML += `<p>Command not recognized. Type 'help' for available commands.</p>`;
125
+ }
126
+
127
+ document.getElementById('terminal-input').value = '';
128
+ output.scrollTop = output.scrollHeight;
129
+ }
130
+
131
+ // Initialize Vanta.js background
132
+ VANTA.GLOBE({
133
+ el: "#vanta-bg",
134
+ mouseControls: true,
135
+ touchControls: true,
136
+ gyroControls: false,
137
+ minHeight: 200.00,
138
+ minWidth: 200.00,
139
+ scale: 1.00,
140
+ scaleMobile: 1.00,
141
+ color: 0x3b82f6,
142
+ backgroundColor: 0x111827
143
+ });
144
  </script>
145
  </body>
146
  </html>