Spaces:
Running

moazelgen commited on
Commit
f9746fe
·
verified ·
1 Parent(s): 207a58d

عايزو يبقا من بره وجهت محادثه عشان اكلمه

Browse files
Files changed (3) hide show
  1. ai-lab.html +1 -0
  2. external-chat.html +168 -0
  3. index.html +1 -0
ai-lab.html CHANGED
@@ -57,6 +57,7 @@
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
  <a href="tasks.html" class="text-white hover:text-primary-400 transition">Tasks</a>
 
60
  </div>
61
  <button class="md:hidden text-white">
62
  <i data-feather="menu"></i>
 
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
  <a href="tasks.html" class="text-white hover:text-primary-400 transition">Tasks</a>
60
+ <a href="external-chat.html" class="text-white hover:text-primary-400 transition">External Chat</a>
61
  </div>
62
  <button class="md:hidden text-white">
63
  <i data-feather="menu"></i>
external-chat.html ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en" class="scroll-smooth">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>External Chat | 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
+ <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
+ #vanta-bg {
16
+ position: absolute;
17
+ top: 0;
18
+ left: 0;
19
+ width: 100%;
20
+ height: 100%;
21
+ z-index: -1;
22
+ }
23
+ .gradient-text {
24
+ background: linear-gradient(90deg, #0ea5e9 0%, #8b5cf6 100%);
25
+ -webkit-background-clip: text;
26
+ background-clip: text;
27
+ color: transparent;
28
+ }
29
+ .chat-container {
30
+ height: calc(100vh - 200px);
31
+ }
32
+ </style>
33
+ </head>
34
+ <body class="bg-gray-900 text-white min-h-screen">
35
+ <div id="vanta-bg"></div>
36
+
37
+ <nav class="fixed w-full z-50 bg-gray-900/80 backdrop-blur-md">
38
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
39
+ <div class="flex justify-between h-16 items-center">
40
+ <div class="flex items-center">
41
+ <span class="text-2xl font-bold gradient-text">Cosmic Canvas</span>
42
+ </div>
43
+ <div class="hidden md:flex space-x-8">
44
+ <a href="index.html" class="text-white hover:text-primary-400 transition">Home</a>
45
+ <a href="gallery.html" class="text-white hover:text-primary-400 transition">Gallery</a>
46
+ <a href="ai-lab.html" class="text-white hover:text-primary-400 transition">AI Lab</a>
47
+ <a href="about.html" class="text-white hover:text-primary-400 transition">About</a>
48
+ <a href="chat.html" class="text-white hover:text-primary-400 transition">Chat</a>
49
+ <a href="external-chat.html" class="text-white hover:text-primary-400 transition font-bold">External Chat</a>
50
+ <a href="tech-stack.html" class="text-white hover:text-primary-400 transition">Tech Stack</a>
51
+ <a href="tasks.html" class="text-white hover:text-primary-400 transition">Tasks</a>
52
+ </div>
53
+ <button class="md:hidden text-white">
54
+ <i data-feather="menu"></i>
55
+ </button>
56
+ </div>
57
+ </div>
58
+ </nav>
59
+
60
+ <main class="pt-24 pb-16 px-4 sm:px-6 lg:px-8">
61
+ <section class="max-w-7xl mx-auto">
62
+ <h1 class="text-5xl md:text-7xl font-bold mb-6 text-center">
63
+ <span class="gradient-text">External</span> Chat
64
+ </h1>
65
+
66
+ <div class="bg-gray-800/50 backdrop-blur-md rounded-xl border border-gray-700 p-6 chat-container">
67
+ <div class="flex flex-col h-full">
68
+ <div id="chat-messages" class="flex-1 overflow-y-auto mb-4 space-y-4">
69
+ <div class="flex justify-start">
70
+ <div class="max-w-xs md:max-w-md bg-gray-700 rounded-lg p-3">
71
+ <p>Welcome to external chat! Here you can connect with various chat services.</p>
72
+ </div>
73
+ </div>
74
+ </div>
75
+
76
+ <div class="flex flex-col space-y-4">
77
+ <div class="flex space-x-4">
78
+ <select id="chat-service" class="flex-1 bg-gray-700 text-white px-4 py-2 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500">
79
+ <option value="whatsapp">WhatsApp</option>
80
+ <option value="telegram">Telegram</option>
81
+ <option value="messenger">Messenger</option>
82
+ <option value="discord">Discord</option>
83
+ </select>
84
+ <button id="connect-btn" class="bg-primary-600 hover:bg-primary-700 text-white px-6 py-2 rounded-lg">
85
+ Connect
86
+ </button>
87
+ </div>
88
+
89
+ <div class="flex">
90
+ <input type="text" id="chat-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="Type your message...">
91
+ <button id="send-btn" class="bg-secondary-600 hover:bg-secondary-700 text-white px-4 py-2 rounded-r-lg">
92
+ Send
93
+ </button>
94
+ </div>
95
+ </div>
96
+ </div>
97
+ </div>
98
+ </section>
99
+ </main>
100
+
101
+ <script>
102
+ feather.replace();
103
+
104
+ // Initialize Vanta.js background
105
+ VANTA.GLOBE({
106
+ el: "#vanta-bg",
107
+ mouseControls: true,
108
+ touchControls: true,
109
+ gyroControls: false,
110
+ minHeight: 200.00,
111
+ minWidth: 200.00,
112
+ scale: 1.00,
113
+ scaleMobile: 1.00,
114
+ color: 0x3b82f6,
115
+ backgroundColor: 0x111827
116
+ });
117
+
118
+ // Chat functionality
119
+ const chatMessages = document.getElementById('chat-messages');
120
+ const chatInput = document.getElementById('chat-input');
121
+ const sendBtn = document.getElementById('send-btn');
122
+ const connectBtn = document.getElementById('connect-btn');
123
+ const chatService = document.getElementById('chat-service');
124
+
125
+ function addMessage(text, isUser = false) {
126
+ const messageDiv = document.createElement('div');
127
+ messageDiv.className = `flex ${isUser ? 'justify-end' : 'justify-start'}`;
128
+
129
+ const bubbleDiv = document.createElement('div');
130
+ bubbleDiv.className = `max-w-xs md:max-w-md rounded-lg p-3 ${isUser ? 'bg-primary-600' : 'bg-gray-700'}`;
131
+ bubbleDiv.innerHTML = `<p>${text}</p>`;
132
+
133
+ messageDiv.appendChild(bubbleDiv);
134
+ chatMessages.appendChild(messageDiv);
135
+ chatMessages.scrollTop = chatMessages.scrollHeight;
136
+ }
137
+
138
+ connectBtn.addEventListener('click', function() {
139
+ const service = chatService.value;
140
+ addMessage(`Connecting to ${service}...`);
141
+
142
+ // Simulate connection
143
+ setTimeout(() => {
144
+ addMessage(`Connected to ${service}! You can now send messages.`);
145
+ }, 1500);
146
+ });
147
+
148
+ sendBtn.addEventListener('click', function() {
149
+ const message = chatInput.value.trim();
150
+ if (message) {
151
+ addMessage(message, true);
152
+ chatInput.value = '';
153
+
154
+ // Simulate response
155
+ setTimeout(() => {
156
+ addMessage(`This is a simulated response from the external chat service.`);
157
+ }, 1000);
158
+ }
159
+ });
160
+
161
+ chatInput.addEventListener('keypress', function(e) {
162
+ if (e.key === 'Enter') {
163
+ sendBtn.click();
164
+ }
165
+ });
166
+ </script>
167
+ </body>
168
+ </html>
index.html CHANGED
@@ -82,6 +82,7 @@
82
  <a href="chat.html" class="text-white hover:text-primary-400 transition">Chat</a>
83
  <a href="tech-stack.html" class="text-white hover:text-primary-400 transition">Tech Stack</a>
84
  <a href="tasks.html" class="text-white hover:text-primary-400 transition">Tasks</a>
 
85
  </div>
86
  <button class="md:hidden text-white">
87
  <i data-feather="menu"></i>
 
82
  <a href="chat.html" class="text-white hover:text-primary-400 transition">Chat</a>
83
  <a href="tech-stack.html" class="text-white hover:text-primary-400 transition">Tech Stack</a>
84
  <a href="tasks.html" class="text-white hover:text-primary-400 transition">Tasks</a>
85
+ <a href="external-chat.html" class="text-white hover:text-primary-400 transition">External Chat</a>
86
  </div>
87
  <button class="md:hidden text-white">
88
  <i data-feather="menu"></i>