dexter2389 commited on
Commit
02484cc
·
1 Parent(s): 617e688

Routine chores

Browse files

- Update frontend to support dark mode

Files changed (2) hide show
  1. app/static/index.html +137 -40
  2. app/static/login.html +79 -19
app/static/index.html CHANGED
@@ -1,5 +1,5 @@
1
  <!DOCTYPE html>
2
- <html lang="en">
3
 
4
  <head>
5
  <meta charset="UTF-8">
@@ -8,6 +8,7 @@
8
  <script src="https://cdn.tailwindcss.com"></script>
9
  <script>
10
  tailwind.config = {
 
11
  theme: {
12
  extend: {
13
  colors: {
@@ -27,17 +28,51 @@
27
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
28
  </head>
29
 
30
- <body class="bg-white text-gray-800 font-['Inter']">
31
  <main class="flex flex-col h-screen">
32
  <!-- Header -->
33
- <header class="border-b border-gray-200 p-4">
34
  <div class="max-w-screen-xl mx-auto flex items-center justify-between">
35
  <div class="flex items-center">
36
- <h1 class="text-xl font-medium">OpenGPT with <span class="font-semibold"
37
- style="color: #067ff3;">Ar</span><span class="font-semibold"
38
- style="color: #f7cd1b;">ca</span><span class="font-semibold"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  style="color: #07b682;">na</span></h1>
40
  </div>
 
41
 
42
  <nav class="flex flex-row items-center space-x-5">
43
  <a href="https://www.producthunt.com/posts/arcana-2?embed=true&utm_source=badge-featured&utm_medium=badge&utm_souce=badge-arcana&#0045;2"
@@ -46,19 +81,21 @@
46
  alt="Arcana - AI&#0045;Powered&#0032;Monetization&#0058;&#0032;Native&#0032;GenAI&#0032;Ads&#0032;for&#0032;GenAI&#0032;apps | Product Hunt"
47
  width="158" />
48
  </a>
49
- <a href="https://arcana.ad/" class="text-gray-600 hover:text-gray-900 font-medium">Home</a>
50
- <button id="logout-button" class="text-gray-600 hover:text-gray-900 font-medium">Logout</button>
 
 
51
  </nav>
52
  </div>
53
  </header>
54
 
55
  <!-- Model selector -->
56
- <div class="border-b border-gray-200 py-3 px-4">
57
  <div class="max-w-screen-xl mx-auto flex items-center">
58
  <div class="relative" id="model-selector-container">
59
  <button id="model-dropdown-button"
60
- class="flex items-center justify-between w-64 px-4 py-2 bg-white border border-gray-300 rounded-md shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500">
61
- <span id="selected-model-text">Select a model</span>
62
  <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none"
63
  stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
64
  class="lucide lucide-chevron-down">
@@ -66,30 +103,35 @@
66
  </svg>
67
  </button>
68
  <div id="model-dropdown"
69
- class="absolute z-10 w-full mt-1 bg-white border border-gray-300 rounded-md shadow-lg hidden">
70
  <ul class="py-1">
71
- <li class="model-option px-4 py-2 hover:bg-gray-100 cursor-pointer" data-value="gemma2">
 
72
  Gemma2</li>
73
  </ul>
74
  <ul class="py-1">
75
- <li class="model-option px-4 py-2 hover:bg-gray-100 cursor-pointer" data-value="llama3_1">
 
76
  Llama3.1</li>
77
  </ul>
78
  <ul class="py-1">
79
- <li class="model-option px-4 py-2 hover:bg-gray-100 cursor-pointer" data-value="llama3_3">
 
80
  Llama3.3</li>
81
  </ul>
82
  <ul class="py-1">
83
- <li class="model-option px-4 py-2 hover:bg-gray-100 cursor-pointer" data-value="qwen2_5">
 
84
  Qwen2.5</li>
85
  </ul>
86
  <ul class="py-1">
87
- <li class="model-option px-4 py-2 hover:bg-gray-100 cursor-pointer"
88
  data-value="deepseek_r1">
89
  Deepseek_R1</li>
90
  </ul>
91
  <ul class="py-1">
92
- <li class="model-option px-4 py-2 hover:bg-gray-100 cursor-pointer" data-value="gemma3">
 
93
  Gemma3</li>
94
  </ul>
95
  </div>
@@ -98,12 +140,12 @@
98
  </div>
99
 
100
  <!-- Chat container -->
101
- <div id="chat-container" class="flex-1 overflow-y-auto py-4 px-4 md:px-0">
102
  <div class="max-w-screen-md mx-auto">
103
  <!-- Initial welcome message -->
104
  <div class="flex flex-col items-center justify-center mt-16 mb-8">
105
  <div
106
- class="w-16 h-16 rounded-full bg-gray-100 flex items-center justify-center text-2xl font-semibold mb-4">
107
  AR
108
  </div>
109
  <h2 class="text-2xl font-semibold text-center">Hello, User</h2>
@@ -118,10 +160,11 @@
118
  <div id="loading" class="hidden">
119
  <div class="max-w-screen-md mx-auto">
120
  <div class="flex items-start mb-4">
121
- <div class="w-8 h-8 rounded-full bg-gray-100 flex items-center justify-center mr-2">
 
122
  <span class="font-semibold text-sm">AR</span>
123
  </div>
124
- <div class="bg-gray-100 p-3 rounded-lg">
125
  <div class="typing-indicator">
126
  <span class="dot"></span>
127
  <span class="dot"></span>
@@ -134,30 +177,36 @@
134
 
135
  <!-- Suggestion buttons -->
136
  <div class="max-w-screen-md mx-auto px-4 md:px-0 mb-6 grid grid-cols-1 md:grid-cols-2 gap-3">
137
- <button class="text-left bg-gray-50 hover:bg-gray-100 p-4 rounded-xl transition-colors">
 
138
  <div class="font-medium">Create a short 3 scene video script</div>
139
  <div class="text-gray-500 text-sm">set in a cyberpunk world run by AI</div>
140
  </button>
141
- <button class="text-left bg-gray-50 hover:bg-gray-100 p-4 rounded-xl transition-colors">
 
142
  <div class="font-medium">Write a python code</div>
143
  <div class="text-gray-500 text-sm">for a simple, functional web app</div>
144
  </button>
145
- <button class="text-left bg-gray-50 hover:bg-gray-100 p-4 rounded-xl transition-colors">
 
146
  <div class="font-medium">Help me study</div>
147
  <div class="text-gray-500 text-sm">vocabulary for a college entrance exam</div>
148
  </button>
149
- <button class="text-left bg-gray-50 hover:bg-gray-100 p-4 rounded-xl transition-colors">
 
150
  <div class="font-medium">Give me ideas</div>
151
  <div class="text-gray-500 text-sm">for a LinkedIn post for my recent promotion</div>
152
  </button>
153
  </div>
154
 
155
  <!-- Input area -->
156
- <div class="border-t border-gray-200 p-4">
157
  <div class="max-w-screen-md mx-auto">
158
  <form id="chat-form" class="relative">
159
- <div class="flex items-center bg-white border border-gray-300 rounded-full shadow-sm">
160
- <button type="button" class="p-3 text-gray-400 hover:text-gray-600">
 
 
161
  <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"
162
  fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
163
  stroke-linejoin="round" class="lucide lucide-plus">
@@ -165,9 +214,11 @@
165
  <path d="M12 5v14" />
166
  </svg>
167
  </button>
168
- <input type="text" id="user-input" class="flex-1 py-3 px-2 bg-transparent focus:outline-none"
 
169
  placeholder="Send a Message" autocomplete="off">
170
- <button type="button" class="p-3 text-gray-400 hover:text-gray-600">
 
171
  <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"
172
  fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
173
  stroke-linejoin="round" class="lucide lucide-mic">
@@ -176,7 +227,8 @@
176
  <path d="M12 19v3" />
177
  </svg>
178
  </button>
179
- <button type="submit" class="p-3 text-gray-400 hover:text-gray-600">
 
180
  <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"
181
  fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
182
  stroke-linejoin="round" class="lucide lucide-arrow-up">
@@ -188,13 +240,13 @@
188
  </form>
189
 
190
  <!-- Footer text -->
191
- <div class="text-center text-gray-400 text-sm mt-3">
192
  LLMs can make mistakes. Verify important information.
193
  </div>
194
  </div>
195
  </div>
196
 
197
- <footer class="text-center p-4 text-gray-500 text-sm">
198
  <p>© 2025 Arcana Inc. All rights reserved.</p>
199
  </footer>
200
  </main>
@@ -215,6 +267,10 @@
215
  animation: pulse 1.5s infinite ease-in-out;
216
  }
217
 
 
 
 
 
218
  .dot:nth-child(2) {
219
  animation-delay: 0.2s;
220
  }
@@ -255,6 +311,10 @@
255
  color: #4B5563;
256
  }
257
 
 
 
 
 
258
  .message-content code {
259
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
260
  background-color: #f1f5f9;
@@ -264,6 +324,11 @@
264
  border: 1px solid #e2e8f0;
265
  }
266
 
 
 
 
 
 
267
  .message-content pre {
268
  background-color: #f8fafc;
269
  border: 1px solid #e2e8f0;
@@ -273,6 +338,12 @@
273
  overflow-x: auto;
274
  }
275
 
 
 
 
 
 
 
276
  .message-content pre code {
277
  background-color: transparent;
278
  padding: 0;
@@ -299,10 +370,36 @@
299
  margin: 0.75rem 0;
300
  color: #64748b;
301
  }
 
 
 
 
 
302
  </style>
303
 
304
  <script>
305
  document.addEventListener('DOMContentLoaded', () => {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
306
  // Check if user is logged in
307
  const verifiedId = sessionStorage.getItem('verifiedId');
308
  if (!verifiedId) {
@@ -352,8 +449,8 @@
352
  modelDropdown.classList.add('hidden');
353
 
354
  // Add visual indication of selected model
355
- modelOptions.forEach(opt => opt.classList.remove('bg-blue-50', 'text-blue-700'));
356
- option.classList.add('bg-blue-50', 'text-blue-700');
357
  });
358
  });
359
 
@@ -450,15 +547,15 @@
450
  const html = `
451
  <div class="flex items-start ${isUser ? 'justify-end' : ''}">
452
  ${!isUser ? `
453
- <div class="w-8 h-8 rounded-full bg-gray-100 flex items-center justify-center mr-2">
454
  <span class="font-semibold text-sm">AR</span>
455
  </div>
456
  ` : ''}
457
- <div class="${isUser ? 'bg-blue-50 text-blue-800' : 'bg-gray-100 text-gray-800'} p-3 rounded-lg max-w-[80%] message-content">
458
  ${formattedContent}
459
  </div>
460
  ${isUser ? `
461
- <div class="w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center text-blue-800 ml-2">
462
  <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-user"><circle cx="12" cy="8" r="5"/><path d="M20 21a8 8 0 0 0-16 0"/></svg>
463
  </div>
464
  ` : ''}
@@ -547,7 +644,7 @@
547
  suggestionButtons.forEach(button => {
548
  button.addEventListener('click', () => {
549
  const mainText = button.querySelector('.font-medium').textContent;
550
- const subText = button.querySelector('.text-gray-500').textContent;
551
  const fullText = `${mainText} ${subText}`;
552
 
553
  // Set the input value
 
1
  <!DOCTYPE html>
2
+ <html lang="en" class="light">
3
 
4
  <head>
5
  <meta charset="UTF-8">
 
8
  <script src="https://cdn.tailwindcss.com"></script>
9
  <script>
10
  tailwind.config = {
11
+ darkMode: 'class',
12
  theme: {
13
  extend: {
14
  colors: {
 
28
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
29
  </head>
30
 
31
+ <body class="bg-white dark:bg-gray-900 text-gray-800 dark:text-gray-200 font-['Inter'] transition-colors duration-200">
32
  <main class="flex flex-col h-screen">
33
  <!-- Header -->
34
+ <header class="border-b border-gray-200 dark:border-gray-700 p-4 bg-white dark:bg-gray-800">
35
  <div class="max-w-screen-xl mx-auto flex items-center justify-between">
36
  <div class="flex items-center">
37
+ <h1 class="text-xl font-medium">OpenGPT with <svg
38
+ style='display: inline-block; vertical-align: -16.75%; margin-right: -1.5%;'
39
+ stroke_linecap='round' stroke_linejoin='round' width='32' height='32' viewBox='0 0 24 24'
40
+ xmlns='http://www.w3.org/2000/svg'>
41
+ <defs>
42
+ <linearGradient id='logo-grad-arm' x1='0%' y1='0%' x2='100%' y2='0%'>
43
+ <stop offset='0%' style='stop-color:#f7cd1b; stop-opacity:1' />
44
+ <stop offset='100%' style='stop-color:#f9800c; stop-opacity:1' />
45
+ </linearGradient>
46
+ </defs>
47
+ <g class='tooltip' style='display:inline'>
48
+ <path fill='#067ff3'
49
+ d='M.227 20.705a5.444 5.444 0 0 0 4.745-2.858l4.48-8.13L7.67 6.613.03 20.368a.227.227 0 0 0 .198.337z' />
50
+ <path fill='#07b682'
51
+ d='M16.003 13.074l-2.747 1.361 1.944 3.39a5.697 5.682-.012 0 0 4.935 2.869.19.19 0 0 0 .165-.286z' />
52
+ <path fill='url(#logo-grad-arm)'
53
+ d='M7.99 14.555L6.2 17.872a.03.03 0 0 0 .04.042l17.744-8.798a.03.03 0 0 0-.022-.055l-11.67 3.765-3.851 1.344a.819.819 0 0 0-.451.385z' />
54
+ <path class='logo-arm'
55
+ d='M10.011 3.3a.683.681-.012 0 0-.733.339L8.19 5.603l4.137 7.212 2.964-.956-4.825-8.234a.683.681-.012 0 0-.455-.324z' />
56
+ </g>
57
+ <style>
58
+ @media (prefers-color-scheme: light) {
59
+ .logo-arm {
60
+
61
+ fill: black
62
+ }
63
+ }
64
+
65
+ @media (prefers-color-scheme: dark) {
66
+ .logo-arm {
67
+ fill: white
68
+ }
69
+ }
70
+ </style>
71
+ </svg><span class="font-semibold" style="color: #067ff3;">rc</span><span class="font-semibold"
72
+ style="color: #f9800c;">a</span><span class="font-semibold"
73
  style="color: #07b682;">na</span></h1>
74
  </div>
75
+ <!-- -->
76
 
77
  <nav class="flex flex-row items-center space-x-5">
78
  <a href="https://www.producthunt.com/posts/arcana-2?embed=true&utm_source=badge-featured&utm_medium=badge&utm_souce=badge-arcana&#0045;2"
 
81
  alt="Arcana - AI&#0045;Powered&#0032;Monetization&#0058;&#0032;Native&#0032;GenAI&#0032;Ads&#0032;for&#0032;GenAI&#0032;apps | Product Hunt"
82
  width="158" />
83
  </a>
84
+ <a href="https://arcana.ad/"
85
+ class="text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white font-medium">Home</a>
86
+ <button id="logout-button"
87
+ class="text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white font-medium">Logout</button>
88
  </nav>
89
  </div>
90
  </header>
91
 
92
  <!-- Model selector -->
93
+ <div class="border-b border-gray-200 dark:border-gray-700 py-3 px-4 bg-gray-50 dark:bg-gray-800">
94
  <div class="max-w-screen-xl mx-auto flex items-center">
95
  <div class="relative" id="model-selector-container">
96
  <button id="model-dropdown-button"
97
+ class="flex items-center justify-between w-64 px-4 py-2 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm hover:bg-gray-50 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500">
98
+ <span id="selected-model-text" class="text-gray-800 dark:text-gray-200">Select a model</span>
99
  <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none"
100
  stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
101
  class="lucide lucide-chevron-down">
 
103
  </svg>
104
  </button>
105
  <div id="model-dropdown"
106
+ class="absolute z-10 w-full mt-1 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md shadow-lg hidden">
107
  <ul class="py-1">
108
+ <li class="model-option px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 cursor-pointer text-gray-800 dark:text-gray-200"
109
+ data-value="gemma2">
110
  Gemma2</li>
111
  </ul>
112
  <ul class="py-1">
113
+ <li class="model-option px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 cursor-pointer text-gray-800 dark:text-gray-200"
114
+ data-value="llama3_1">
115
  Llama3.1</li>
116
  </ul>
117
  <ul class="py-1">
118
+ <li class="model-option px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 cursor-pointer text-gray-800 dark:text-gray-200"
119
+ data-value="llama3_3">
120
  Llama3.3</li>
121
  </ul>
122
  <ul class="py-1">
123
+ <li class="model-option px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 cursor-pointer text-gray-800 dark:text-gray-200"
124
+ data-value="qwen2_5">
125
  Qwen2.5</li>
126
  </ul>
127
  <ul class="py-1">
128
+ <li class="model-option px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 cursor-pointer text-gray-800 dark:text-gray-200"
129
  data-value="deepseek_r1">
130
  Deepseek_R1</li>
131
  </ul>
132
  <ul class="py-1">
133
+ <li class="model-option px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 cursor-pointer text-gray-800 dark:text-gray-200"
134
+ data-value="gemma3">
135
  Gemma3</li>
136
  </ul>
137
  </div>
 
140
  </div>
141
 
142
  <!-- Chat container -->
143
+ <div id="chat-container" class="flex-1 overflow-y-auto py-4 px-4 md:px-0 bg-white dark:bg-gray-900">
144
  <div class="max-w-screen-md mx-auto">
145
  <!-- Initial welcome message -->
146
  <div class="flex flex-col items-center justify-center mt-16 mb-8">
147
  <div
148
+ class="w-16 h-16 rounded-full bg-gray-100 dark:bg-gray-700 flex items-center justify-center text-2xl font-semibold mb-4">
149
  AR
150
  </div>
151
  <h2 class="text-2xl font-semibold text-center">Hello, User</h2>
 
160
  <div id="loading" class="hidden">
161
  <div class="max-w-screen-md mx-auto">
162
  <div class="flex items-start mb-4">
163
+ <div
164
+ class="w-8 h-8 rounded-full bg-gray-100 dark:bg-gray-700 flex items-center justify-center mr-2">
165
  <span class="font-semibold text-sm">AR</span>
166
  </div>
167
+ <div class="bg-gray-100 dark:bg-gray-700 p-3 rounded-lg">
168
  <div class="typing-indicator">
169
  <span class="dot"></span>
170
  <span class="dot"></span>
 
177
 
178
  <!-- Suggestion buttons -->
179
  <div class="max-w-screen-md mx-auto px-4 md:px-0 mb-6 grid grid-cols-1 md:grid-cols-2 gap-3">
180
+ <button
181
+ class="text-left bg-gray-50 dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700 p-4 rounded-xl transition-colors">
182
  <div class="font-medium">Create a short 3 scene video script</div>
183
  <div class="text-gray-500 text-sm">set in a cyberpunk world run by AI</div>
184
  </button>
185
+ <button
186
+ class="text-left bg-gray-50 dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700 p-4 rounded-xl transition-colors">
187
  <div class="font-medium">Write a python code</div>
188
  <div class="text-gray-500 text-sm">for a simple, functional web app</div>
189
  </button>
190
+ <button
191
+ class="text-left bg-gray-50 dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700 p-4 rounded-xl transition-colors">
192
  <div class="font-medium">Help me study</div>
193
  <div class="text-gray-500 text-sm">vocabulary for a college entrance exam</div>
194
  </button>
195
+ <button
196
+ class="text-left bg-gray-50 dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700 p-4 rounded-xl transition-colors">
197
  <div class="font-medium">Give me ideas</div>
198
  <div class="text-gray-500 text-sm">for a LinkedIn post for my recent promotion</div>
199
  </button>
200
  </div>
201
 
202
  <!-- Input area -->
203
+ <div class="border-t border-gray-200 dark:border-gray-700 p-4 bg-white dark:bg-gray-800">
204
  <div class="max-w-screen-md mx-auto">
205
  <form id="chat-form" class="relative">
206
+ <div
207
+ class="flex items-center bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-full shadow-sm">
208
+ <button type="button"
209
+ class="p-3 text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-300">
210
  <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"
211
  fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
212
  stroke-linejoin="round" class="lucide lucide-plus">
 
214
  <path d="M12 5v14" />
215
  </svg>
216
  </button>
217
+ <input type="text" id="user-input"
218
+ class="flex-1 py-3 px-2 bg-transparent focus:outline-none text-gray-800 dark:text-gray-200"
219
  placeholder="Send a Message" autocomplete="off">
220
+ <button type="button"
221
+ class="p-3 text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-300">
222
  <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"
223
  fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
224
  stroke-linejoin="round" class="lucide lucide-mic">
 
227
  <path d="M12 19v3" />
228
  </svg>
229
  </button>
230
+ <button type="submit"
231
+ class="p-3 text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-300">
232
  <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"
233
  fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
234
  stroke-linejoin="round" class="lucide lucide-arrow-up">
 
240
  </form>
241
 
242
  <!-- Footer text -->
243
+ <div class="text-center text-gray-400 dark:text-gray-500 text-sm mt-3">
244
  LLMs can make mistakes. Verify important information.
245
  </div>
246
  </div>
247
  </div>
248
 
249
+ <footer class="text-center p-4 text-gray-500 dark:text-gray-400 dark:bg-gray-800 text-sm">
250
  <p>© 2025 Arcana Inc. All rights reserved.</p>
251
  </footer>
252
  </main>
 
267
  animation: pulse 1.5s infinite ease-in-out;
268
  }
269
 
270
+ .dark .dot {
271
+ background-color: #9ca3af;
272
+ }
273
+
274
  .dot:nth-child(2) {
275
  animation-delay: 0.2s;
276
  }
 
311
  color: #4B5563;
312
  }
313
 
314
+ .dark .message-content em {
315
+ color: #9CA3AF;
316
+ }
317
+
318
  .message-content code {
319
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
320
  background-color: #f1f5f9;
 
324
  border: 1px solid #e2e8f0;
325
  }
326
 
327
+ .dark .message-content code {
328
+ background-color: #1e293b;
329
+ border-color: #334155;
330
+ }
331
+
332
  .message-content pre {
333
  background-color: #f8fafc;
334
  border: 1px solid #e2e8f0;
 
338
  overflow-x: auto;
339
  }
340
 
341
+ .dark .message-content pre {
342
+ background-color: #1e293b;
343
+ border-color: #334155;
344
+ }
345
+
346
+
347
  .message-content pre code {
348
  background-color: transparent;
349
  padding: 0;
 
370
  margin: 0.75rem 0;
371
  color: #64748b;
372
  }
373
+
374
+ .dark .message-content blockquote {
375
+ border-left-color: #475569;
376
+ color: #94a3b8;
377
+ }
378
  </style>
379
 
380
  <script>
381
  document.addEventListener('DOMContentLoaded', () => {
382
+ const html = document.documentElement;
383
+
384
+ // Function to set theme based on system preference
385
+ function setThemeBasedOnSystemPreference() {
386
+ const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
387
+ if (prefersDark) {
388
+ html.classList.add('dark');
389
+ } else {
390
+ html.classList.remove('dark');
391
+ }
392
+ updateProductHuntBadge();
393
+ }
394
+
395
+ // Initial theme setup based on system preference
396
+ setThemeBasedOnSystemPreference();
397
+
398
+ // Listen for system preference changes
399
+ window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {
400
+ setThemeBasedOnSystemPreference();
401
+ });
402
+
403
  // Check if user is logged in
404
  const verifiedId = sessionStorage.getItem('verifiedId');
405
  if (!verifiedId) {
 
449
  modelDropdown.classList.add('hidden');
450
 
451
  // Add visual indication of selected model
452
+ modelOptions.forEach(opt => opt.classList.remove('bg-blue-50', 'text-blue-700', 'dark:bg-blue-900/50', 'dark:text-blue-300'));
453
+ option.classList.add('bg-blue-50', 'text-blue-700', 'dark:bg-blue-900/50', 'dark:text-blue-300');
454
  });
455
  });
456
 
 
547
  const html = `
548
  <div class="flex items-start ${isUser ? 'justify-end' : ''}">
549
  ${!isUser ? `
550
+ <div class="w-8 h-8 rounded-full bg-gray-100 dark:bg-gray-700 flex items-center justify-center mr-2">
551
  <span class="font-semibold text-sm">AR</span>
552
  </div>
553
  ` : ''}
554
+ <div class="${isUser ? 'bg-blue-50 dark:bg-blue-900/30 text-blue-800 dark:text-blue-100' : 'bg-gray-100 dark:bg-gray-800 text-gray-800 dark:text-gray-200'} p-3 rounded-lg max-w-[80%] message-content">
555
  ${formattedContent}
556
  </div>
557
  ${isUser ? `
558
+ <div class="w-8 h-8 rounded-full bg-blue-100 dark:bg-blue-900/50 flex items-center justify-center text-blue-800 dark:text-blue-200 ml-2">
559
  <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-user"><circle cx="12" cy="8" r="5"/><path d="M20 21a8 8 0 0 0-16 0"/></svg>
560
  </div>
561
  ` : ''}
 
644
  suggestionButtons.forEach(button => {
645
  button.addEventListener('click', () => {
646
  const mainText = button.querySelector('.font-medium').textContent;
647
+ const subText = button.querySelector('.text-gray-500, .text-gray-400').textContent;
648
  const fullText = `${mainText} ${subText}`;
649
 
650
  // Set the input value
app/static/login.html CHANGED
@@ -1,5 +1,5 @@
1
  <!DOCTYPE html>
2
- <html lang="en">
3
 
4
  <head>
5
  <meta charset="UTF-8">
@@ -8,6 +8,7 @@
8
  <script src="https://cdn.tailwindcss.com"></script>
9
  <script>
10
  tailwind.config = {
 
11
  theme: {
12
  extend: {
13
  colors: {
@@ -27,14 +28,47 @@
27
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
28
  </head>
29
 
30
- <body class="bg-gray-50 text-gray-800 font-['Inter'] min-h-screen flex flex-col">
31
  <!-- Header -->
32
- <header class="border-b border-gray-200 p-4">
33
  <div class="max-w-screen-xl mx-auto flex items-center justify-between">
34
  <div class="flex items-center">
35
- <h1 class="text-xl font-medium">OpenGPT with <span class="font-semibold"
36
- style="color: #067ff3;">Ar</span><span class="font-semibold"
37
- style="color: #f7cd1b;">ca</span><span class="font-semibold" style="color: #07b682;">na</span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  </h1>
39
  </div>
40
 
@@ -52,14 +86,14 @@
52
 
53
  <main class="flex-1 flex items-center justify-center p-4">
54
  <div class="w-full max-w-md">
55
- <div class="bg-white rounded-lg shadow-md p-5 sm:p-8">
56
  <div class="text-center mb-6">
57
  <div
58
- class="w-16 h-16 rounded-full bg-gray-100 flex items-center justify-center text-2xl font-semibold mb-4 mx-auto">
59
  AR
60
  </div>
61
  <h2 class="text-xl sm:text-2xl font-semibold">Welcome</h2>
62
- <p class="text-gray-500 text-sm sm:text-base">Sign in to access the <span
63
  class="font-medium">OpenGPT with </span><span class="font-semibold"
64
  style="color: #067ff3;">Ar</span><span class="font-semibold"
65
  style="color: #f7cd1b;">ca</span><span class="font-semibold"
@@ -68,32 +102,37 @@
68
  </div>
69
 
70
  <form id="login-form" class="space-y-4">
71
- <div id="error-message" class="hidden bg-red-50 text-red-700 p-3 rounded-md text-sm"></div>
 
 
72
 
73
  <div>
74
- <label for="email" class="block text-sm font-medium text-gray-700 mb-1">Email ID</label>
 
75
  <input type="email" id="email" name="email_id"
76
- class="w-full px-3 py-2 sm:px-4 sm:py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 text-base"
77
  placeholder="Enter your email" required>
78
  </div>
79
 
80
  <div>
81
- <label for="access-key" class="block text-sm font-medium text-gray-700 mb-1">Access Key</label>
 
82
  <input type="password" id="access-key" name="access_key"
83
- class="w-full px-3 py-2 sm:px-4 sm:py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 text-base"
84
  placeholder="Enter your access key" required>
85
  </div>
86
 
87
  <button type="submit" id="login-button"
88
- class="w-full bg-blue-600 text-white py-2.5 px-4 rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-colors text-base font-medium mt-2">
89
  Sign In
90
  </button>
91
  </form>
92
 
93
- <div class="mt-8 pt-6 border-t border-gray-200">
94
- <p class="text-gray-600 mb-3 text-center text-sm sm:text-base">Don't have an access key?</p>
 
95
  <a href="https://forms.gle/Xzv6Qsh2GUbd9EZc6" id="request-access-button"
96
- class="flex items-center justify-center w-full bg-gradient-to-r from-indigo-50 to-blue-50 text-blue-600 py-3 px-4 rounded-md hover:from-indigo-100 hover:to-blue-100 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-all duration-200 border border-blue-200 shadow-sm text-sm sm:text-base font-medium"
97
  target="_blank">
98
  <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none"
99
  stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
@@ -110,12 +149,33 @@
110
  </div>
111
  </main>
112
 
113
- <footer class="text-center p-4 text-gray-500 text-sm">
114
  <p>© 2025 Arcana Inc. All rights reserved.</p>
115
  </footer>
116
 
117
  <script>
118
  document.addEventListener('DOMContentLoaded', () => {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  // Check if user is already logged in
120
  const verifiedId = sessionStorage.getItem('verifiedId');
121
  if (verifiedId) {
 
1
  <!DOCTYPE html>
2
+ <html lang="en" class="light">
3
 
4
  <head>
5
  <meta charset="UTF-8">
 
8
  <script src="https://cdn.tailwindcss.com"></script>
9
  <script>
10
  tailwind.config = {
11
+ darkMode: 'class',
12
  theme: {
13
  extend: {
14
  colors: {
 
28
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
29
  </head>
30
 
31
+ <body class="bg-white dark:bg-gray-900 text-gray-800 dark:text-gray-200 font-['Inter'] transition-colors duration-200">
32
  <!-- Header -->
33
+ <header class="border-b border-gray-200 dark:border-gray-700 p-4 bg-white dark:bg-gray-800">
34
  <div class="max-w-screen-xl mx-auto flex items-center justify-between">
35
  <div class="flex items-center">
36
+ <h1 class="text-xl font-medium">OpenGPT with <svg
37
+ style='display: inline-block; vertical-align: -16.75%; margin-right: -1.5%;'
38
+ stroke_linecap='round' stroke_linejoin='round' width='32' height='32' viewBox='0 0 24 24'
39
+ xmlns='http://www.w3.org/2000/svg'>
40
+ <defs>
41
+ <linearGradient id='logo-grad-arm' x1='0%' y1='0%' x2='100%' y2='0%'>
42
+ <stop offset='0%' style='stop-color:#f7cd1b; stop-opacity:1' />
43
+ <stop offset='100%' style='stop-color:#f9800c; stop-opacity:1' />
44
+ </linearGradient>
45
+ </defs>
46
+ <g>
47
+ <path fill='#067ff3'
48
+ d='M.227 20.705a5.444 5.444 0 0 0 4.745-2.858l4.48-8.13L7.67 6.613.03 20.368a.227.227 0 0 0 .198.337z' />
49
+ <path fill='#07b682'
50
+ d='M16.003 13.074l-2.747 1.361 1.944 3.39a5.697 5.682-.012 0 0 4.935 2.869.19.19 0 0 0 .165-.286z' />
51
+ <path fill='url(#logo-grad-arm)'
52
+ d='M7.99 14.555L6.2 17.872a.03.03 0 0 0 .04.042l17.744-8.798a.03.03 0 0 0-.022-.055l-11.67 3.765-3.851 1.344a.819.819 0 0 0-.451.385z' />
53
+ <path class='logo-arm'
54
+ d='M10.011 3.3a.683.681-.012 0 0-.733.339L8.19 5.603l4.137 7.212 2.964-.956-4.825-8.234a.683.681-.012 0 0-.455-.324z' />
55
+ </g>
56
+ <style>
57
+ @media (prefers-color-scheme: light) {
58
+ .logo-arm {
59
+
60
+ fill: black
61
+ }
62
+ }
63
+
64
+ @media (prefers-color-scheme: dark) {
65
+ .logo-arm {
66
+ fill: white
67
+ }
68
+ }
69
+ </style>
70
+ </svg><span class="font-semibold" style="color: #067ff3;">rc</span><span class="font-semibold"
71
+ style="color: #f9800c;">a</span><span class="font-semibold" style="color: #07b682;">na</span>
72
  </h1>
73
  </div>
74
 
 
86
 
87
  <main class="flex-1 flex items-center justify-center p-4">
88
  <div class="w-full max-w-md">
89
+ <div class="bg-white dark:bg-gray-800 rounded-lg shadow-md dark:shadow-gray-700/30 p-5 sm:p-8">
90
  <div class="text-center mb-6">
91
  <div
92
+ class="w-16 h-16 rounded-full bg-blue-100 dark:bg-blue-900 flex items-center justify-center text-2xl font-semibold mb-4 mx-auto">
93
  AR
94
  </div>
95
  <h2 class="text-xl sm:text-2xl font-semibold">Welcome</h2>
96
+ <p class="text-gray-500 dark:text-gray-400 text-sm sm:text-base">Sign in to access the <span
97
  class="font-medium">OpenGPT with </span><span class="font-semibold"
98
  style="color: #067ff3;">Ar</span><span class="font-semibold"
99
  style="color: #f7cd1b;">ca</span><span class="font-semibold"
 
102
  </div>
103
 
104
  <form id="login-form" class="space-y-4">
105
+ <div id="error-message"
106
+ class="hidden bg-red-50 dark:bg-red-900/30 text-red-700 dark:text-red-400 p-3 rounded-md text-sm">
107
+ </div>
108
 
109
  <div>
110
+ <label for="email" class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">Email
111
+ ID</label>
112
  <input type="email" id="email" name="email_id"
113
+ class="w-full px-3 py-2 sm:px-4 sm:py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 text-base bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100"
114
  placeholder="Enter your email" required>
115
  </div>
116
 
117
  <div>
118
+ <label for="access-key"
119
+ class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">Access Key</label>
120
  <input type="password" id="access-key" name="access_key"
121
+ class="w-full px-3 py-2 sm:px-4 sm:py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 text-base bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100"
122
  placeholder="Enter your access key" required>
123
  </div>
124
 
125
  <button type="submit" id="login-button"
126
+ class="w-full bg-blue-600 hover:bg-blue-700 dark:bg-blue-700 dark:hover:bg-blue-800 text-white py-2.5 px-4 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800 transition-colors text-base font-medium mt-2">
127
  Sign In
128
  </button>
129
  </form>
130
 
131
+ <div class="mt-8 pt-6 border-t border-gray-200 dark:border-gray-700">
132
+ <p class="text-gray-600 dark:text-gray-400 mb-3 text-center text-sm sm:text-base">Don't have an
133
+ access key?</p>
134
  <a href="https://forms.gle/Xzv6Qsh2GUbd9EZc6" id="request-access-button"
135
+ class="flex items-center justify-center w-full bg-gradient-to-r from-indigo-50 to-blue-50 dark:from-indigo-900/30 dark:to-blue-900/30 text-blue-600 dark:text-blue-400 py-2.5 px-4 rounded-md hover:from-indigo-100 hover:to-blue-100 dark:hover:from-indigo-900/50 dark:hover:to-blue-900/50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:focus:ring-offset-gray-800 transition-all duration-200 border border-blue-200 dark:border-blue-800 shadow-sm text-sm sm:text-base font-medium"
136
  target="_blank">
137
  <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none"
138
  stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
 
149
  </div>
150
  </main>
151
 
152
+ <footer class="text-center p-4 text-gray-500 dark:text-gray-400 dark:bg-gray-800 text-sm">
153
  <p>© 2025 Arcana Inc. All rights reserved.</p>
154
  </footer>
155
 
156
  <script>
157
  document.addEventListener('DOMContentLoaded', () => {
158
+ const html = document.documentElement;
159
+
160
+ // Function to set theme based on system preference
161
+ function setThemeBasedOnSystemPreference() {
162
+ const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
163
+ if (prefersDark) {
164
+ html.classList.add('dark');
165
+ } else {
166
+ html.classList.remove('dark');
167
+ }
168
+ updateProductHuntBadge();
169
+ }
170
+
171
+ // Initial theme setup based on system preference
172
+ setThemeBasedOnSystemPreference();
173
+
174
+ // Listen for system preference changes
175
+ window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', () => {
176
+ setThemeBasedOnSystemPreference();
177
+ });
178
+
179
  // Check if user is already logged in
180
  const verifiedId = sessionStorage.getItem('verifiedId');
181
  if (verifiedId) {