psy191190 commited on
Commit
0ed97a7
Β·
verified Β·
1 Parent(s): c4b0648

Make me a chatbot that works with a hugging face URL for requests...it should be one combined html doc....titled Crypton.Agi

Browse files
Files changed (7) hide show
  1. README.md +8 -5
  2. chatbot.html +333 -0
  3. components/footer.js +49 -0
  4. components/navbar.js +54 -0
  5. index.html +100 -19
  6. script.js +22 -0
  7. style.css +24 -18
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Crypton Agi Quantum Chatbot Wizardry
3
- emoji: πŸƒ
4
- colorFrom: indigo
5
- colorTo: red
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: Crypton.Agi - Quantum Chatbot Wizardry πŸ§™β€β™‚οΈ
3
+ colorFrom: pink
4
+ colorTo: gray
5
+ emoji: 🐳
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite-v3
10
  ---
11
 
12
+ # Welcome to your new DeepSite project!
13
+ This project was created with [DeepSite](https://huggingface.co/deepsite).
chatbot.html ADDED
@@ -0,0 +1,333 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>Crypton.Agi - Quantum Chatbot Wizardry</title>
7
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
8
+ <style>
9
+ :root {
10
+ --primary: #6e48aa;
11
+ --secondary: #9d50bb;
12
+ --accent: #4776E6;
13
+ --dark: #1a1a2e;
14
+ --light: #f8f9fa;
15
+ --success: #4BB543;
16
+ --warning: #FFCC00;
17
+ --danger: #FF3333;
18
+ }
19
+
20
+ * {
21
+ margin: 0;
22
+ padding: 0;
23
+ box-sizing: border-box;
24
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
25
+ }
26
+
27
+ body {
28
+ background: linear-gradient(135deg, var(--dark) 0%, #16213e 100%);
29
+ color: var(--light);
30
+ min-height: 100vh;
31
+ display: flex;
32
+ flex-direction: column;
33
+ }
34
+
35
+ .container {
36
+ max-width: 1200px;
37
+ margin: 0 auto;
38
+ padding: 2rem;
39
+ flex: 1;
40
+ }
41
+
42
+ header {
43
+ text-align: center;
44
+ margin-bottom: 2rem;
45
+ animation: fadeIn 1s ease-out;
46
+ }
47
+
48
+ h1 {
49
+ font-size: 2.5rem;
50
+ margin-bottom: 0.5rem;
51
+ background: linear-gradient(to right, var(--primary), var(--secondary));
52
+ -webkit-background-clip: text;
53
+ background-clip: text;
54
+ color: transparent;
55
+ }
56
+
57
+ .subtitle {
58
+ font-size: 1.1rem;
59
+ opacity: 0.8;
60
+ }
61
+
62
+ .chat-container {
63
+ background: rgba(255, 255, 255, 0.05);
64
+ backdrop-filter: blur(10px);
65
+ border-radius: 1rem;
66
+ padding: 1.5rem;
67
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
68
+ height: 60vh;
69
+ display: flex;
70
+ flex-direction: column;
71
+ }
72
+
73
+ .chat-messages {
74
+ flex: 1;
75
+ overflow-y: auto;
76
+ padding: 1rem;
77
+ margin-bottom: 1rem;
78
+ display: flex;
79
+ flex-direction: column;
80
+ gap: 1rem;
81
+ }
82
+
83
+ .message {
84
+ max-width: 80%;
85
+ padding: 0.8rem 1.2rem;
86
+ border-radius: 1rem;
87
+ animation: fadeIn 0.3s ease-out;
88
+ }
89
+
90
+ .user-message {
91
+ align-self: flex-end;
92
+ background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
93
+ color: white;
94
+ border-bottom-right-radius: 0.2rem;
95
+ }
96
+
97
+ .bot-message {
98
+ align-self: flex-start;
99
+ background: rgba(255, 255, 255, 0.1);
100
+ border-bottom-left-radius: 0.2rem;
101
+ }
102
+
103
+ .typing-indicator {
104
+ display: flex;
105
+ align-items: center;
106
+ gap: 0.5rem;
107
+ padding: 0.8rem 1.2rem;
108
+ background: rgba(255, 255, 255, 0.1);
109
+ border-radius: 1rem;
110
+ width: fit-content;
111
+ margin-bottom: 1rem;
112
+ }
113
+
114
+ .typing-dot {
115
+ width: 8px;
116
+ height: 8px;
117
+ background-color: var(--light);
118
+ border-radius: 50%;
119
+ opacity: 0.6;
120
+ animation: typingAnimation 1.4s infinite ease-in-out;
121
+ }
122
+
123
+ .typing-dot:nth-child(1) { animation-delay: 0s; }
124
+ .typing-dot:nth-child(2) { animation-delay: 0.2s; }
125
+ .typing-dot:nth-child(3) { animation-delay: 0.4s; }
126
+
127
+ .chat-input {
128
+ display: flex;
129
+ gap: 1rem;
130
+ }
131
+
132
+ #messageInput {
133
+ flex: 1;
134
+ padding: 0.8rem 1.2rem;
135
+ border: none;
136
+ border-radius: 2rem;
137
+ background: rgba(255, 255, 255, 0.1);
138
+ color: var(--light);
139
+ font-size: 1rem;
140
+ outline: none;
141
+ transition: all 0.3s ease;
142
+ }
143
+
144
+ #messageInput:focus {
145
+ background: rgba(255, 255, 255, 0.2);
146
+ box-shadow: 0 0 0 2px var(--primary);
147
+ }
148
+
149
+ #sendButton {
150
+ background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
151
+ color: white;
152
+ border: none;
153
+ border-radius: 2rem;
154
+ padding: 0 1.5rem;
155
+ cursor: pointer;
156
+ transition: all 0.3s ease;
157
+ display: flex;
158
+ align-items: center;
159
+ justify-content: center;
160
+ }
161
+
162
+ #sendButton:hover {
163
+ transform: translateY(-2px);
164
+ box-shadow: 0 5px 15px rgba(110, 72, 170, 0.4);
165
+ }
166
+
167
+ #sendButton:active {
168
+ transform: translateY(0);
169
+ }
170
+
171
+ .model-info {
172
+ margin-top: 1rem;
173
+ font-size: 0.9rem;
174
+ opacity: 0.7;
175
+ text-align: center;
176
+ }
177
+
178
+ @keyframes fadeIn {
179
+ from { opacity: 0; transform: translateY(10px); }
180
+ to { opacity: 1; transform: translateY(0); }
181
+ }
182
+
183
+ @keyframes typingAnimation {
184
+ 0%, 60%, 100% { transform: translateY(0); opacity: 0.6; }
185
+ 30% { transform: translateY(-5px); opacity: 1; }
186
+ }
187
+
188
+ /* Responsive */
189
+ @media (max-width: 768px) {
190
+ .container {
191
+ padding: 1rem;
192
+ }
193
+
194
+ h1 {
195
+ font-size: 2rem;
196
+ }
197
+
198
+ .chat-container {
199
+ height: 70vh;
200
+ }
201
+
202
+ .message {
203
+ max-width: 90%;
204
+ }
205
+ }
206
+ </style>
207
+ </head>
208
+ <body>
209
+ <div class="container">
210
+ <header>
211
+ <h1>Crypton.Agi</h1>
212
+ <p class="subtitle">Your quantum-powered AI assistant</p>
213
+ </header>
214
+
215
+ <div class="chat-container">
216
+ <div class="chat-messages" id="chatMessages">
217
+ <div class="message bot-message">
218
+ Hello! I'm Crypton.Agi, your AI assistant. How can I help you today?
219
+ </div>
220
+ </div>
221
+
222
+ <div class="chat-input">
223
+ <input type="text" id="messageInput" placeholder="Type your message here..." autocomplete="off">
224
+ <button id="sendButton">
225
+ <i class="fas fa-paper-plane"></i>
226
+ </button>
227
+ </div>
228
+
229
+ <p class="model-info">Powered by Hugging Face Transformers</p>
230
+ </div>
231
+ </div>
232
+
233
+ <script>
234
+ document.addEventListener('DOMContentLoaded', () => {
235
+ const chatMessages = document.getElementById('chatMessages');
236
+ const messageInput = document.getElementById('messageInput');
237
+ const sendButton = document.getElementById('sendButton');
238
+
239
+ // Replace with your Hugging Face API endpoint
240
+ const API_URL = 'https://api-inference.huggingface.co/models/';
241
+ const MODEL_NAME = 'gpt2'; // Change to your preferred model
242
+
243
+ // Add a message to the chat
244
+ function addMessage(text, isUser) {
245
+ const messageDiv = document.createElement('div');
246
+ messageDiv.classList.add('message');
247
+ messageDiv.classList.add(isUser ? 'user-message' : 'bot-message');
248
+ messageDiv.textContent = text;
249
+ chatMessages.appendChild(messageDiv);
250
+ chatMessages.scrollTop = chatMessages.scrollHeight;
251
+ }
252
+
253
+ // Show typing indicator
254
+ function showTyping() {
255
+ const typingDiv = document.createElement('div');
256
+ typingDiv.classList.add('typing-indicator');
257
+ typingDiv.id = 'typingIndicator';
258
+
259
+ for (let i = 0; i < 3; i++) {
260
+ const dot = document.createElement('div');
261
+ dot.classList.add('typing-dot');
262
+ typingDiv.appendChild(dot);
263
+ }
264
+
265
+ chatMessages.appendChild(typingDiv);
266
+ chatMessages.scrollTop = chatMessages.scrollHeight;
267
+ }
268
+
269
+ // Hide typing indicator
270
+ function hideTyping() {
271
+ const typingIndicator = document.getElementById('typingIndicator');
272
+ if (typingIndicator) {
273
+ typingIndicator.remove();
274
+ }
275
+ }
276
+
277
+ // Send message to Hugging Face API
278
+ async function sendMessage() {
279
+ const message = messageInput.value.trim();
280
+ if (!message) return;
281
+
282
+ // Add user message to chat
283
+ addMessage(message, true);
284
+ messageInput.value = '';
285
+
286
+ // Show typing indicator
287
+ showTyping();
288
+
289
+ try {
290
+ // Replace with your actual API call
291
+ // This is a placeholder - you'll need to implement proper authentication
292
+ const response = await fetch(`${API_URL}${MODEL_NAME}`, {
293
+ method: 'POST',
294
+ headers: {
295
+ 'Content-Type': 'application/json',
296
+ 'Authorization': 'Bearer YOUR_HUGGING_FACE_TOKEN' // Replace with your token
297
+ },
298
+ body: JSON.stringify({ inputs: message })
299
+ });
300
+
301
+ if (!response.ok) {
302
+ throw new Error(`API request failed with status ${response.status}`);
303
+ }
304
+
305
+ const data = await response.json();
306
+
307
+ // Hide typing indicator
308
+ hideTyping();
309
+
310
+ // Add bot response to chat
311
+ if (data && data[0] && data[0].generated_text) {
312
+ addMessage(data[0].generated_text.replace(message, '').trim(), false);
313
+ } else {
314
+ addMessage("I received your message but couldn't process it properly.", false);
315
+ }
316
+ } catch (error) {
317
+ hideTyping();
318
+ addMessage(`Sorry, I encountered an error: ${error.message}`, false);
319
+ console.error('API Error:', error);
320
+ }
321
+ }
322
+
323
+ // Event listeners
324
+ sendButton.addEventListener('click', sendMessage);
325
+ messageInput.addEventListener('keypress', (e) => {
326
+ if (e.key === 'Enter') {
327
+ sendMessage();
328
+ }
329
+ });
330
+ });
331
+ </script>
332
+ </body>
333
+ </html>
components/footer.js ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomFooter extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ footer {
7
+ background: linear-gradient(135deg, rgba(14,165,233,0.1) 0%, rgba(139,92,246,0.1) 100%);
8
+ }
9
+ .social-icon {
10
+ transition: all 0.3s ease;
11
+ }
12
+ .social-icon:hover {
13
+ transform: translateY(-3px);
14
+ }
15
+ </style>
16
+ <footer class="py-12 mt-16">
17
+ <div class="container mx-auto px-6">
18
+ <div class="flex flex-col md:flex-row justify-between items-center">
19
+ <div class="mb-8 md:mb-0">
20
+ <h3 class="text-2xl font-bold text-primary-600 mb-4">Chromatic Canvas</h3>
21
+ <p class="text-gray-600 max-w-md">Bringing color to your digital experiences with carefully crafted palettes and design systems.</p>
22
+ </div>
23
+
24
+ <div class="flex space-x-6">
25
+ <a href="#" class="social-icon text-gray-600 hover:text-primary-600">
26
+ <i data-feather="twitter"></i>
27
+ </a>
28
+ <a href="#" class="social-icon text-gray-600 hover:text-primary-600">
29
+ <i data-feather="instagram"></i>
30
+ </a>
31
+ <a href="#" class="social-icon text-gray-600 hover:text-primary-600">
32
+ <i data-feather="github"></i>
33
+ </a>
34
+ <a href="#" class="social-icon text-gray-600 hover:text-primary-600">
35
+ <i data-feather="linkedin"></i>
36
+ </a>
37
+ </div>
38
+ </div>
39
+
40
+ <div class="border-t border-gray-200 mt-12 pt-8 text-center text-gray-500">
41
+ <p>Β© ${new Date().getFullYear()} Chromatic Canvas. All rights reserved.</p>
42
+ </div>
43
+ </div>
44
+ </footer>
45
+ `;
46
+ }
47
+ }
48
+
49
+ customElements.define('custom-footer', CustomFooter);
components/navbar.js ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomNavbar extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ nav {
7
+ transition: all 0.3s ease;
8
+ }
9
+ .nav-link {
10
+ position: relative;
11
+ }
12
+ .nav-link:after {
13
+ content: '';
14
+ position: absolute;
15
+ width: 0;
16
+ height: 2px;
17
+ bottom: -2px;
18
+ left: 0;
19
+ background-color: currentColor;
20
+ transition: width 0.3s ease;
21
+ }
22
+ .nav-link:hover:after {
23
+ width: 100%;
24
+ }
25
+ </style>
26
+ <nav class="bg-white shadow-sm py-4 px-6">
27
+ <div class="container mx-auto flex justify-between items-center">
28
+ <a href="/" class="text-2xl font-bold text-primary-600 flex items-center">
29
+ <i data-feather="palette" class="mr-2"></i>
30
+ Chromatic
31
+ </a>
32
+
33
+ <div class="hidden md:flex space-x-8">
34
+ <a href="#" class="nav-link text-gray-600 hover:text-primary-600">Home</a>
35
+ <a href="#" class="nav-link text-gray-600 hover:text-primary-600">Colors</a>
36
+ <a href="#" class="nav-link text-gray-600 hover:text-primary-600">Palettes</a>
37
+ <a href="#" class="nav-link text-gray-600 hover:text-primary-600">About</a>
38
+ </div>
39
+
40
+ <div class="flex items-center space-x-4">
41
+ <button id="colorSchemeToggle" class="p-2 rounded-full hover:bg-gray-100">
42
+ <i data-feather="moon"></i>
43
+ </button>
44
+ <button class="md:hidden p-2 rounded-full hover:bg-gray-100">
45
+ <i data-feather="menu"></i>
46
+ </button>
47
+ </div>
48
+ </div>
49
+ </nav>
50
+ `;
51
+ }
52
+ }
53
+
54
+ customElements.define('custom-navbar', CustomNavbar);
index.html CHANGED
@@ -1,19 +1,100 @@
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>Chromatic Canvas Delight</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ <script src="https://unpkg.com/feather-icons"></script>
11
+ <script>
12
+ tailwind.config = {
13
+ theme: {
14
+ extend: {
15
+ colors: {
16
+ primary: {
17
+ 50: '#f0f9ff',
18
+ 100: '#e0f2fe',
19
+ 200: '#bae6fd',
20
+ 300: '#7dd3fc',
21
+ 400: '#38bdf8',
22
+ 500: '#0ea5e9',
23
+ 600: '#0284c7',
24
+ 700: '#0369a1',
25
+ 800: '#075985',
26
+ 900: '#0c4a6e',
27
+ },
28
+ secondary: {
29
+ 50: '#f5f3ff',
30
+ 100: '#ede9fe',
31
+ 200: '#ddd6fe',
32
+ 300: '#c4b5fd',
33
+ 400: '#a78bfa',
34
+ 500: '#8b5cf6',
35
+ 600: '#7c3aed',
36
+ 700: '#6d28d9',
37
+ 800: '#5b21b6',
38
+ 900: '#4c1d95',
39
+ }
40
+ }
41
+ }
42
+ }
43
+ }
44
+ </script>
45
+ </head>
46
+ <body class="bg-gray-50 min-h-screen">
47
+ <custom-navbar></custom-navbar>
48
+
49
+ <main class="container mx-auto px-4 py-12">
50
+ <section class="text-center mb-16">
51
+ <h1 class="text-5xl font-bold text-primary-700 mb-4">Chromatic Canvas</h1>
52
+ <p class="text-xl text-gray-600 max-w-2xl mx-auto">A vibrant playground of colors and design</p>
53
+ </section>
54
+
55
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
56
+ <div class="bg-white rounded-xl shadow-lg overflow-hidden transition-all hover:shadow-xl hover:-translate-y-1">
57
+ <div class="h-48 bg-gradient-to-r from-primary-400 to-secondary-500"></div>
58
+ <div class="p-6">
59
+ <h3 class="text-xl font-semibold text-gray-800 mb-2">Color Harmony</h3>
60
+ <p class="text-gray-600">Explore beautiful color combinations that work perfectly together.</p>
61
+ </div>
62
+ </div>
63
+
64
+ <div class="bg-white rounded-xl shadow-lg overflow-hidden transition-all hover:shadow-xl hover:-translate-y-1">
65
+ <div class="h-48 bg-gradient-to-r from-secondary-400 to-primary-500"></div>
66
+ <div class="p-6">
67
+ <h3 class="text-xl font-semibold text-gray-800 mb-2">Dynamic Design</h3>
68
+ <p class="text-gray-600">Interactive elements that respond to your every move.</p>
69
+ </div>
70
+ </div>
71
+
72
+ <div class="bg-white rounded-xl shadow-lg overflow-hidden transition-all hover:shadow-xl hover:-translate-y-1">
73
+ <div class="h-48 bg-gradient-to-r from-primary-300 to-secondary-600"></div>
74
+ <div class="p-6">
75
+ <h3 class="text-xl font-semibold text-gray-800 mb-2">Visual Delight</h3>
76
+ <p class="text-gray-600">A feast for the eyes with carefully crafted aesthetics.</p>
77
+ </div>
78
+ </div>
79
+ </div>
80
+
81
+ <section class="mt-20 bg-gradient-to-r from-primary-100 to-secondary-100 rounded-2xl p-8 md:p-12">
82
+ <div class="max-w-4xl mx-auto text-center">
83
+ <h2 class="text-3xl font-bold text-gray-800 mb-6">Ready to explore?</h2>
84
+ <p class="text-lg text-gray-700 mb-8">Join our colorful journey and discover the perfect palette for your next project.</p>
85
+ <button class="bg-primary-600 hover:bg-primary-700 text-white font-medium py-3 px-8 rounded-full transition-all shadow-md hover:shadow-lg">
86
+ Get Started
87
+ </button>
88
+ </div>
89
+ </section>
90
+ </main>
91
+
92
+ <custom-footer></custom-footer>
93
+
94
+ <script src="components/navbar.js"></script>
95
+ <script src="components/footer.js"></script>
96
+ <script src="script.js"></script>
97
+ <script>feather.replace();</script>
98
+ <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
99
+ </body>
100
+ </html>
script.js ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ document.addEventListener('DOMContentLoaded', () => {
2
+ // Initialize animations
3
+ const animateElements = document.querySelectorAll('.fade-in');
4
+
5
+ const observer = new IntersectionObserver((entries) => {
6
+ entries.forEach(entry => {
7
+ if (entry.isIntersecting) {
8
+ entry.target.classList.add('animate-fadeIn');
9
+ }
10
+ });
11
+ }, { threshold: 0.1 });
12
+
13
+ animateElements.forEach(el => observer.observe(el));
14
+
15
+ // Color scheme toggle
16
+ const colorSchemeToggle = document.getElementById('colorSchemeToggle');
17
+ if (colorSchemeToggle) {
18
+ colorSchemeToggle.addEventListener('click', () => {
19
+ document.documentElement.classList.toggle('dark');
20
+ });
21
+ }
22
+ });
style.css CHANGED
@@ -1,28 +1,34 @@
 
 
1
  body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
 
 
 
 
 
4
  }
5
 
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
9
  }
10
 
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
16
  }
17
 
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
24
  }
25
 
26
- .card p:last-child {
27
- margin-bottom: 0;
 
28
  }
 
 
 
 
 
 
1
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
2
+
3
  body {
4
+ font-family: 'Inter', sans-serif;
5
+ }
6
+
7
+ /* Custom scrollbar */
8
+ ::-webkit-scrollbar {
9
+ width: 8px;
10
+ height: 8px;
11
  }
12
 
13
+ ::-webkit-scrollbar-track {
14
+ background: #f1f1f1;
 
15
  }
16
 
17
+ ::-webkit-scrollbar-thumb {
18
+ background: #888;
19
+ border-radius: 4px;
 
 
20
  }
21
 
22
+ ::-webkit-scrollbar-thumb:hover {
23
+ background: #555;
 
 
 
 
24
  }
25
 
26
+ /* Animation classes */
27
+ .fade-in {
28
+ animation: fadeIn 0.5s ease-in-out;
29
  }
30
+
31
+ @keyframes fadeIn {
32
+ from { opacity: 0; transform: translateY(10px); }
33
+ to { opacity: 1; transform: translateY(0); }
34
+ }