Spaces:
Running
Running
🎨 Redesign from AnyCoder
#1
by samirerty - opened
- index.html +593 -241
index.html
CHANGED
|
@@ -7,304 +7,656 @@
|
|
| 7 |
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
|
| 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://cdn.jsdelivr.net/npm/animejs/lib/anime.iife.min.js"></script>
|
| 11 |
<script>
|
| 12 |
tailwind.config = {
|
| 13 |
theme: {
|
| 14 |
extend: {
|
| 15 |
fontFamily: {
|
| 16 |
-
|
| 17 |
},
|
| 18 |
colors: {
|
| 19 |
primary: {
|
| 20 |
-
50: '#
|
| 21 |
-
100: '#
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
}
|
| 26 |
}
|
| 27 |
}
|
| 28 |
}
|
| 29 |
}
|
| 30 |
</script>
|
| 31 |
-
<link href="https://cdn.jsdelivr.net/gh/rastikerdar/
|
| 32 |
<style>
|
| 33 |
-
|
| 34 |
-
|
|
|
|
| 35 |
}
|
| 36 |
-
|
| 37 |
-
|
|
|
|
|
|
|
| 38 |
}
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
border-radius: 18px 18px 4px 18px;
|
| 43 |
}
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
border-radius:
|
| 48 |
}
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
}
|
| 55 |
</style>
|
| 56 |
</head>
|
| 57 |
-
<body class="bg-
|
| 58 |
-
<!--
|
| 59 |
-
<
|
| 60 |
-
<div class="max-w-
|
| 61 |
-
<div class="flex
|
| 62 |
-
<
|
| 63 |
-
|
| 64 |
-
|
|
|
|
| 65 |
</div>
|
| 66 |
-
<
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
</
|
| 74 |
-
|
| 75 |
-
<
|
| 76 |
-
|
| 77 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
</button>
|
| 79 |
-
<button
|
| 80 |
-
ورود
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
</button>
|
| 82 |
</div>
|
| 83 |
</div>
|
| 84 |
</div>
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
<
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
</
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
</div>
|
| 100 |
</div>
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
<
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
</div>
|
| 109 |
</div>
|
| 110 |
-
</div>
|
| 111 |
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 120 |
</div>
|
| 121 |
-
<span class="text-sm text-gray-500">پارسگوی</span>
|
| 122 |
</div>
|
| 123 |
-
<p class="text-
|
| 124 |
</div>
|
| 125 |
</div>
|
| 126 |
</div>
|
| 127 |
|
| 128 |
-
<!--
|
| 129 |
-
<div
|
| 130 |
-
<div class="
|
| 131 |
-
<div class="flex-
|
| 132 |
-
<
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
rows="3"
|
| 137 |
-
></textarea>
|
| 138 |
-
</div>
|
| 139 |
-
<div class="flex flex-col space-y-2">
|
| 140 |
-
<button id="sendMessage" class="bg-primary-500 hover:bg-primary-600 text-white p-3 rounded-lg transition-colors">
|
| 141 |
-
<i data-feather="send"></i>
|
| 142 |
-
</button>
|
| 143 |
-
<button id="attachFile" class="text-gray-500 hover:text-primary-600 p-3 rounded-lg border border-gray-300 hover:border-primary-500">
|
| 144 |
-
<i data-feather="paperclip"></i>
|
| 145 |
-
</button>
|
| 146 |
-
</div>
|
| 147 |
-
</div>
|
| 148 |
-
<div class="mt-3 flex items-center justify-between text-sm text-gray-500">
|
| 149 |
-
<div class="flex items-center space-x-2 space-x-reverse">
|
| 150 |
-
<button id="regenerateBtn" class="hover:text-primary-600">
|
| 151 |
-
<i data-feather="refresh-cw" class="w-4 h-4"></i>
|
| 152 |
-
تولید مجدد
|
| 153 |
</button>
|
| 154 |
</div>
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
<
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
<div class="flex justify-between items-center mb-4">
|
| 166 |
-
<h3 class="text-lg font-semibold">ورود / ثبتنام</h3>
|
| 167 |
-
<button id="closeAuthModal" class="text-gray-500 hover:text-gray-700">
|
| 168 |
-
<i data-feather="x"></i>
|
| 169 |
-
</button>
|
| 170 |
-
</div>
|
| 171 |
-
<form id="authForm" class="space-y-4">
|
| 172 |
-
<div>
|
| 173 |
-
<label class="block text-sm font-medium text-gray-700 mb-1">ایمیل</label>
|
| 174 |
-
<input type="email" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-transparent" required>
|
| 175 |
</div>
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 179 |
</div>
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
<
|
| 183 |
-
|
| 184 |
-
|
|
|
|
|
|
|
| 185 |
</div>
|
| 186 |
-
</
|
| 187 |
</div>
|
| 188 |
-
</div>
|
| 189 |
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
document.body.classList.toggle('dark');
|
| 198 |
-
const icon = themeToggle.querySelector('i');
|
| 199 |
-
if (document.body.classList.contains('dark')) {
|
| 200 |
-
document.body.classList.add('bg-gray-900', 'text-white');
|
| 201 |
-
icon.setAttribute('data-feather', 'sun');
|
| 202 |
-
} else {
|
| 203 |
-
document.body.classList.remove('bg-gray-900', 'text-white');
|
| 204 |
-
icon.setAttribute('data-feather', 'moon');
|
| 205 |
-
}
|
| 206 |
-
feather.replace();
|
| 207 |
-
});
|
| 208 |
-
|
| 209 |
-
// Auth Modal
|
| 210 |
-
const authButton = document.getElementById('authButton');
|
| 211 |
-
const authModal = document.getElementById('authModal');
|
| 212 |
-
const closeAuthModal = document.getElementById('closeAuthModal');
|
| 213 |
-
|
| 214 |
-
authButton.addEventListener('click', () => {
|
| 215 |
-
authModal.classList.remove('hidden');
|
| 216 |
-
});
|
| 217 |
-
|
| 218 |
-
closeAuthModal.addEventListener('click', () => {
|
| 219 |
-
authModal.classList.add('hidden');
|
| 220 |
-
});
|
| 221 |
-
|
| 222 |
-
// Chat Functionality
|
| 223 |
-
const messageInput = document.getElementById('messageInput');
|
| 224 |
-
const sendMessage = document.getElementById('sendMessage');
|
| 225 |
-
const chatMessages = document.getElementById('chatMessages');
|
| 226 |
-
const charCount = document.getElementById('charCount');
|
| 227 |
-
|
| 228 |
-
messageInput.addEventListener('input', () => {
|
| 229 |
-
charCount.textContent = `${messageInput.value.length}/4000`;
|
| 230 |
-
});
|
| 231 |
-
|
| 232 |
-
sendMessage.addEventListener('click', sendChatMessage);
|
| 233 |
-
|
| 234 |
-
messageInput.addEventListener('keydown', (e) => {
|
| 235 |
-
if (e.key === 'Enter' && !e.shiftKey) {
|
| 236 |
-
e.preventDefault();
|
| 237 |
-
sendChatMessage();
|
| 238 |
-
}
|
| 239 |
-
});
|
| 240 |
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 244 |
|
| 245 |
-
|
| 246 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 247 |
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 251 |
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 257 |
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 270 |
</div>
|
| 271 |
-
<span class="text-sm ${sender === 'user' ? 'text-blue-100' : 'text-gray-500'}">
|
| 272 |
-
${sender === 'user' ? 'شما' : 'پارسگوی'}
|
| 273 |
-
</span>
|
| 274 |
</div>
|
| 275 |
-
<p class="${sender === 'user' ? 'text-white' : 'text-gray-800'}">${text}</p>
|
| 276 |
</div>
|
| 277 |
-
|
| 278 |
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 282 |
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
|
| 290 |
-
|
| 291 |
-
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
|
| 295 |
-
<div class="
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 299 |
</div>
|
| 300 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 301 |
</div>
|
| 302 |
-
<p class="text-gray-800">سلام! من پارسگوی هستم، دستیار هوشمند فارسی شما. چگونه میتوانم کمکتان کنم؟</p>
|
| 303 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 304 |
</div>
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
<
|
| 310 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
|
| 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>
|
| 11 |
tailwind.config = {
|
| 12 |
theme: {
|
| 13 |
extend: {
|
| 14 |
fontFamily: {
|
| 15 |
+
sans: ['Vazirmatn', 'system-ui', '-apple-system', 'sans-serif'],
|
| 16 |
},
|
| 17 |
colors: {
|
| 18 |
primary: {
|
| 19 |
+
50: '#f0fdf4',
|
| 20 |
+
100: '#dcfce7',
|
| 21 |
+
200: '#bbf7d0',
|
| 22 |
+
300: '#86efac',
|
| 23 |
+
400: '#4ade80',
|
| 24 |
+
500: '#22c55e',
|
| 25 |
+
600: '#16a34a',
|
| 26 |
+
700: '#15803d',
|
| 27 |
+
800: '#166534',
|
| 28 |
+
900: '#14532d',
|
| 29 |
+
},
|
| 30 |
+
accent: {
|
| 31 |
+
50: '#faf5ff',
|
| 32 |
+
100: '#f3e8ff',
|
| 33 |
+
200: '#e9d5ff',
|
| 34 |
+
300: '#d8b4fe',
|
| 35 |
+
400: '#c084fc',
|
| 36 |
+
500: '#a855f7',
|
| 37 |
+
600: '#9333ea',
|
| 38 |
+
700: '#7c3aed',
|
| 39 |
}
|
| 40 |
}
|
| 41 |
}
|
| 42 |
}
|
| 43 |
}
|
| 44 |
</script>
|
| 45 |
+
<link href="https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-font-face.css" rel="stylesheet">
|
| 46 |
<style>
|
| 47 |
+
* {
|
| 48 |
+
scrollbar-width: thin;
|
| 49 |
+
scrollbar-color: #cbd5e1 transparent;
|
| 50 |
}
|
| 51 |
+
|
| 52 |
+
*::-webkit-scrollbar {
|
| 53 |
+
width: 6px;
|
| 54 |
+
height: 6px;
|
| 55 |
}
|
| 56 |
+
|
| 57 |
+
*::-webkit-scrollbar-track {
|
| 58 |
+
background: transparent;
|
|
|
|
| 59 |
}
|
| 60 |
+
|
| 61 |
+
*::-webkit-scrollbar-thumb {
|
| 62 |
+
background: #cbd5e1;
|
| 63 |
+
border-radius: 3px;
|
| 64 |
}
|
| 65 |
+
|
| 66 |
+
*::-webkit-scrollbar-thumb:hover {
|
| 67 |
+
background: #94a3b8;
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
.message-enter {
|
| 71 |
+
animation: messageSlide 0.3s ease-out;
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
@keyframes messageSlide {
|
| 75 |
+
from {
|
| 76 |
+
opacity: 0;
|
| 77 |
+
transform: translateY(8px);
|
| 78 |
+
}
|
| 79 |
+
to {
|
| 80 |
+
opacity: 1;
|
| 81 |
+
transform: translateY(0);
|
| 82 |
+
}
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
.typing-dot {
|
| 86 |
+
animation: typingBounce 1.4s infinite ease-in-out both;
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
|
| 90 |
+
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
|
| 91 |
+
|
| 92 |
+
@keyframes typingBounce {
|
| 93 |
+
0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
|
| 94 |
+
40% { transform: scale(1); opacity: 1; }
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
.glass {
|
| 98 |
+
background: rgba(255, 255, 255, 0.85);
|
| 99 |
+
backdrop-filter: blur(12px);
|
| 100 |
+
-webkit-backdrop-filter: blur(12px);
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
.dark .glass {
|
| 104 |
+
background: rgba(15, 23, 42, 0.85);
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
.gradient-text {
|
| 108 |
+
background: linear-gradient(135deg, #16a34a 0%, #9333ea 100%);
|
| 109 |
+
-webkit-background-clip: text;
|
| 110 |
+
-webkit-text-fill-color: transparent;
|
| 111 |
+
background-clip: text;
|
| 112 |
+
}
|
| 113 |
+
|
| 114 |
+
.page {
|
| 115 |
+
display: none;
|
| 116 |
+
animation: fadeIn 0.25s ease-out;
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
+
.page.active {
|
| 120 |
+
display: block;
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
@keyframes fadeIn {
|
| 124 |
+
from { opacity: 0; }
|
| 125 |
+
to { opacity: 1; }
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
.nav-item {
|
| 129 |
+
position: relative;
|
| 130 |
+
}
|
| 131 |
+
|
| 132 |
+
.nav-item::after {
|
| 133 |
+
content: '';
|
| 134 |
+
position: absolute;
|
| 135 |
+
bottom: -2px;
|
| 136 |
+
left: 50%;
|
| 137 |
+
right: 50%;
|
| 138 |
+
height: 2px;
|
| 139 |
+
background: linear-gradient(90deg, #16a34a, #9333ea);
|
| 140 |
+
transition: all 0.2s ease;
|
| 141 |
+
border-radius: 1px;
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
.nav-item:hover::after,
|
| 145 |
+
.nav-item.active::after {
|
| 146 |
+
left: 0;
|
| 147 |
+
right: 0;
|
| 148 |
+
}
|
| 149 |
+
|
| 150 |
+
.input-focus-ring:focus-within {
|
| 151 |
+
box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
.card-hover {
|
| 155 |
+
transition: all 0.2s ease;
|
| 156 |
+
}
|
| 157 |
+
|
| 158 |
+
.card-hover:hover {
|
| 159 |
+
transform: translateY(-2px);
|
| 160 |
+
box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
.btn-primary {
|
| 164 |
+
background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
|
| 165 |
+
transition: all 0.2s ease;
|
| 166 |
+
}
|
| 167 |
+
|
| 168 |
+
.btn-primary:hover {
|
| 169 |
+
transform: translateY(-1px);
|
| 170 |
+
box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
.btn-primary:active {
|
| 174 |
+
transform: translateY(0);
|
| 175 |
}
|
| 176 |
</style>
|
| 177 |
</head>
|
| 178 |
+
<body class="bg-slate-50 text-slate-800 font-sans antialiased dark:bg-slate-900 dark:text-slate-100 transition-colors duration-200">
|
| 179 |
+
<!-- Header -->
|
| 180 |
+
<header class="fixed top-0 left-0 right-0 z-50 glass border-b border-slate-200/50 dark:border-slate-700/50">
|
| 181 |
+
<div class="max-w-5xl mx-auto px-4 sm:px-6">
|
| 182 |
+
<div class="flex items-center justify-between h-14">
|
| 183 |
+
<!-- Logo -->
|
| 184 |
+
<a href="#" onclick="showPage('chat')" class="flex items-center gap-2 group">
|
| 185 |
+
<div class="w-8 h-8 rounded-xl bg-gradient-to-br from-primary-500 to-accent-600 flex items-center justify-center text-white text-sm font-bold group-hover:scale-105 transition-transform">
|
| 186 |
+
پ
|
| 187 |
</div>
|
| 188 |
+
<span class="font-bold text-lg hidden sm:block">پارسگوی</span>
|
| 189 |
+
</a>
|
| 190 |
+
|
| 191 |
+
<!-- Navigation -->
|
| 192 |
+
<nav class="hidden md:flex items-center gap-6">
|
| 193 |
+
<a href="#" onclick="showPage('chat')" class="nav-item text-sm font-medium text-slate-600 hover:text-slate-900 dark:text-slate-400 dark:hover:text-slate-100 py-1 active" id="nav-chat">چت</a>
|
| 194 |
+
<a href="#" onclick="showPage('history')" class="nav-item text-sm font-medium text-slate-600 hover:text-slate-900 dark:text-slate-400 dark:hover:text-slate-100 py-1" id="nav-history">تاریخچه</a>
|
| 195 |
+
<a href="#" onclick="showPage('personas')" class="nav-item text-sm font-medium text-slate-600 hover:text-slate-900 dark:text-slate-400 dark:hover:text-slate-100 py-1" id="nav-personas">شخصیتها</a>
|
| 196 |
+
<a href="#" onclick="showPage('profile')" class="nav-item text-sm font-medium text-slate-600 hover:text-slate-900 dark:text-slate-400 dark:hover:text-slate-100 py-1" id="nav-profile">پروفایل</a>
|
| 197 |
+
</nav>
|
| 198 |
+
|
| 199 |
+
<!-- Actions -->
|
| 200 |
+
<div class="flex items-center gap-2">
|
| 201 |
+
<button onclick="toggleTheme()" class="p-2 rounded-lg text-slate-500 hover:text-slate-700 hover:bg-slate-100 dark:text-slate-400 dark:hover:text-slate-200 dark:hover:bg-slate-800 transition-colors" aria-label="تغییر تم">
|
| 202 |
+
<i data-feather="moon" class="w-5 h-5 dark:hidden"></i>
|
| 203 |
+
<i data-feather="sun" class="w-5 h-5 hidden dark:block"></i>
|
| 204 |
</button>
|
| 205 |
+
<button onclick="showPage('login')" class="btn-primary text-white text-sm font-medium px-4 py-2 rounded-lg hidden sm:block">
|
| 206 |
+
ورود
|
| 207 |
+
</button>
|
| 208 |
+
|
| 209 |
+
<!-- Mobile menu button -->
|
| 210 |
+
<button onclick="toggleMobileMenu()" class="md:hidden p-2 rounded-lg text-slate-500 hover:bg-slate-100 dark:hover:bg-slate-800">
|
| 211 |
+
<i data-feather="menu" class="w-5 h-5"></i>
|
| 212 |
</button>
|
| 213 |
</div>
|
| 214 |
</div>
|
| 215 |
</div>
|
| 216 |
+
|
| 217 |
+
<!-- Mobile Navigation -->
|
| 218 |
+
<div id="mobileMenu" class="hidden md:hidden border-t border-slate-200 dark:border-slate-700 glass">
|
| 219 |
+
<nav class="flex flex-col p-4 gap-2">
|
| 220 |
+
<a href="#" onclick="showPage('chat'); toggleMobileMenu()" class="flex items-center gap-3 px-3 py-2 rounded-lg text-slate-600 hover:bg-slate-100 dark:text-slate-400 dark:hover:bg-slate-800">
|
| 221 |
+
<i data-feather="message-circle" class="w-4 h-4"></i>
|
| 222 |
+
<span>چت</span>
|
| 223 |
+
</a>
|
| 224 |
+
<a href="#" onclick="showPage('history'); toggleMobileMenu()" class="flex items-center gap-3 px-3 py-2 rounded-lg text-slate-600 hover:bg-slate-100 dark:text-slate-400 dark:hover:bg-slate-800">
|
| 225 |
+
<i data-feather="clock" class="w-4 h-4"></i>
|
| 226 |
+
<span>تاریخچه</span>
|
| 227 |
+
</a>
|
| 228 |
+
<a href="#" onclick="showPage('personas'); toggleMobileMenu()" class="flex items-center gap-3 px-3 py-2 rounded-lg text-slate-600 hover:bg-slate-100 dark:text-slate-400 dark:hover:bg-slate-800">
|
| 229 |
+
<i data-feather="users" class="w-4 h-4"></i>
|
| 230 |
+
<span>شخصیتها</span>
|
| 231 |
+
</a>
|
| 232 |
+
<a href="#" onclick="showPage('profile'); toggleMobileMenu()" class="flex items-center gap-3 px-3 py-2 rounded-lg text-slate-600 hover:bg-slate-100 dark:text-slate-400 dark:hover:bg-slate-800">
|
| 233 |
+
<i data-feather="user" class="w-4 h-4"></i>
|
| 234 |
+
<span>پروفایل</span>
|
| 235 |
+
</a>
|
| 236 |
+
</nav>
|
| 237 |
+
</div>
|
| 238 |
+
</header>
|
| 239 |
+
|
| 240 |
+
<!-- Main Content -->
|
| 241 |
+
<main class="pt-14 min-h-screen">
|
| 242 |
+
|
| 243 |
+
<!-- Chat Page -->
|
| 244 |
+
<div id="page-chat" class="page active h-[calc(100vh-3.5rem)] flex flex-col">
|
| 245 |
+
<!-- Chat Messages -->
|
| 246 |
+
<div id="chatMessages" class="flex-1 overflow-y-auto px-4 py-4 space-y-4">
|
| 247 |
+
<!-- Welcome -->
|
| 248 |
+
<div class="flex justify-center py-8">
|
| 249 |
+
<div class="text-center max-w-sm">
|
| 250 |
+
<div class="w-16 h-16 mx-auto mb-4 rounded-2xl bg-gradient-to-br from-primary-100 to-accent-100 dark:from-primary-900/30 dark:to-accent-900/30 flex items-center justify-center">
|
| 251 |
+
<span class="text-3xl">🧠</span>
|
| 252 |
+
</div>
|
| 253 |
+
<h2 class="text-xl font-bold mb-2">سلام! من پارسگوی هستم</h2>
|
| 254 |
+
<p class="text-sm text-slate-500 dark:text-slate-400">دستیار هوشمند فارسی شما. هر سوالی دارید بپرسید، در خدمتم.</p>
|
| 255 |
</div>
|
| 256 |
</div>
|
| 257 |
+
|
| 258 |
+
<!-- AI Message -->
|
| 259 |
+
<div class="flex gap-3 message-enter">
|
| 260 |
+
<div class="w-8 h-8 rounded-xl bg-gradient-to-br from-primary-500 to-accent-600 flex items-center justify-center text-white text-xs font-bold shrink-0">
|
| 261 |
+
پ
|
| 262 |
+
</div>
|
| 263 |
+
<div class="flex-1 max-w-[85%] sm:max-w-[75%]">
|
| 264 |
+
<div class="bg-white dark:bg-slate-800 rounded-2xl rounded-tl-sm px-4 py-3 shadow-sm border border-slate-100 dark:border-slate-700">
|
| 265 |
+
<p class="text-sm leading-relaxed">سلام! چطور میتوانم کمکتان کنم؟ میتوانید درباره هر موضوعی سوال بپرسید: برنامهنویسی، نوشتن، یادگیری، یا هر چیز دیگری.</p>
|
| 266 |
+
</div>
|
| 267 |
+
</div>
|
| 268 |
</div>
|
| 269 |
</div>
|
|
|
|
| 270 |
|
| 271 |
+
<!-- Input Area -->
|
| 272 |
+
<div class="border-t border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-900 p-4">
|
| 273 |
+
<div class="max-w-3xl mx-auto">
|
| 274 |
+
<div class="relative input-focus-ring rounded-2xl bg-slate-100 dark:bg-slate-800 transition-shadow">
|
| 275 |
+
<textarea
|
| 276 |
+
id="messageInput"
|
| 277 |
+
placeholder="پیام خود را بنویسید..."
|
| 278 |
+
class="w-full bg-transparent px-4 py-3 pr-12 text-sm resize-none outline-none min-h-[52px] max-h-32"
|
| 279 |
+
rows="1"
|
| 280 |
+
oninput="autoResize(this)"
|
| 281 |
+
onkeydown="handleKeydown(event)"
|
| 282 |
+
></textarea>
|
| 283 |
+
|
| 284 |
+
<div class="absolute left-2 bottom-2 flex items-center gap-1">
|
| 285 |
+
<button onclick="attachFile()" class="p-2 text-slate-400 hover:text-slate-600 dark:hover:text-slate-300 rounded-lg hover:bg-slate-200 dark:hover:bg-slate-700 transition-colors" title="پیوست">
|
| 286 |
+
<i data-feather="paperclip" class="w-4 h-4"></i>
|
| 287 |
+
</button>
|
| 288 |
+
<button onclick="toggleVoice()" id="voiceBtn" class="p-2 text-slate-400 hover:text-slate-600 dark:hover:text-slate-300 rounded-lg hover:bg-slate-200 dark:hover:bg-slate-700 transition-colors" title="گفتار">
|
| 289 |
+
<i data-feather="mic" class="w-4 h-4"></i>
|
| 290 |
+
</button>
|
| 291 |
+
<button onclick="sendMessage()" class="p-2 bg-primary-500 hover:bg-primary-600 text-white rounded-lg transition-colors shadow-sm" title="ارسال">
|
| 292 |
+
<i data-feather="send" class="w-4 h-4"></i>
|
| 293 |
+
</button>
|
| 294 |
</div>
|
|
|
|
| 295 |
</div>
|
| 296 |
+
<p class="text-xs text-center text-slate-400 mt-2">پارسگوی ممکن است اطلاعات نادرست تولید کند. مهم پاسخها را بررسی کنید.</p>
|
| 297 |
</div>
|
| 298 |
</div>
|
| 299 |
</div>
|
| 300 |
|
| 301 |
+
<!-- History Page -->
|
| 302 |
+
<div id="page-history" class="page">
|
| 303 |
+
<div class="max-w-3xl mx-auto px-4 py-6">
|
| 304 |
+
<div class="flex items-center justify-between mb-6">
|
| 305 |
+
<h1 class="text-2xl font-bold">تاریخچه مکالمات</h1>
|
| 306 |
+
<button onclick="clearAllHistory()" class="text-sm text-red-500 hover:text-red-600 flex items-center gap-1">
|
| 307 |
+
<i data-feather="trash-2" class="w-4 h-4"></i>
|
| 308 |
+
پاک کردن همه
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 309 |
</button>
|
| 310 |
</div>
|
| 311 |
+
|
| 312 |
+
<!-- Search -->
|
| 313 |
+
<div class="relative mb-6">
|
| 314 |
+
<i data-feather="search" class="absolute right-4 top-1/2 -translate-y-1/2 w-5 h-5 text-slate-400"></i>
|
| 315 |
+
<input
|
| 316 |
+
type="text"
|
| 317 |
+
placeholder="جستجو در تاریخچه..."
|
| 318 |
+
class="w-full pr-12 pl-4 py-3 rounded-xl bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 text-sm focus:outline-none focus:ring-2 focus:ring-primary-500/20 focus:border-primary-500"
|
| 319 |
+
oninput="searchHistory(this.value)"
|
| 320 |
+
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 321 |
</div>
|
| 322 |
+
|
| 323 |
+
<!-- History List -->
|
| 324 |
+
<div id="historyList" class="space-y-3">
|
| 325 |
+
<div class="bg-white dark:bg-slate-800 rounded-xl p-4 border border-slate-200 dark:border-slate-700 card-hover cursor-pointer group" onclick="loadChat('1')">
|
| 326 |
+
<div class="flex items-start justify-between gap-4">
|
| 327 |
+
<div class="flex-1 min-w-0">
|
| 328 |
+
<h3 class="font-medium text-slate-900 dark:text-slate-100 truncate">برنامهنویسی پایتون</h3>
|
| 329 |
+
<p class="text-sm text-slate-500 dark:text-slate-400 mt-1 line-clamp-2">چگونه میتوانم یک API REST با FastAPI بسازم؟</p>
|
| 330 |
+
</div>
|
| 331 |
+
<div class="flex flex-col items-end gap-2 shrink-0">
|
| 332 |
+
<span class="text-xs text-slate-400">۲ ساعت پیش</span>
|
| 333 |
+
<button onclick="event.stopPropagation(); deleteHistory('1')" class="opacity-0 group-hover:opacity-100 p-1.5 text-slate-400 hover:text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 rounded-lg transition-all">
|
| 334 |
+
<i data-feather="trash-2" class="w-4 h-4"></i>
|
| 335 |
+
</button>
|
| 336 |
+
</div>
|
| 337 |
+
</div>
|
| 338 |
+
</div>
|
| 339 |
+
|
| 340 |
+
<div class="bg-white dark:bg-slate-800 rounded-xl p-4 border border-slate-200 dark:border-slate-700 card-hover cursor-pointer group" onclick="loadChat('2')">
|
| 341 |
+
<div class="flex items-start justify-between gap-4">
|
| 342 |
+
<div class="flex-1 min-w-0">
|
| 343 |
+
<h3 class="font-medium text-slate-900 dark:text-slate-100 truncate">نوشتن مقاله علمی</h3>
|
| 344 |
+
<p class="text-sm text-slate-500 dark:text-slate-400 mt-1 line-clamp-2">کمک در نوشتن مقدمه مقاله درباره یادگیری عمیق</p>
|
| 345 |
+
</div>
|
| 346 |
+
<div class="flex flex-col items-end gap-2 shrink-0">
|
| 347 |
+
<span class="text-xs text-slate-400">دیروز</span>
|
| 348 |
+
<button onclick="event.stopPropagation(); deleteHistory('2')" class="opacity-0 group-hover:opacity-100 p-1.5 text-slate-400 hover:text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 rounded-lg transition-all">
|
| 349 |
+
<i data-feather="trash-2" class="w-4 h-4"></i>
|
| 350 |
+
</button>
|
| 351 |
+
</div>
|
| 352 |
+
</div>
|
| 353 |
+
</div>
|
| 354 |
+
|
| 355 |
+
<div class="bg-white dark:bg-slate-800 rounded-xl p-4 border border-slate-200 dark:border-slate-700 card-hover cursor-pointer group" onclick="loadChat('3')">
|
| 356 |
+
<div class="flex items-start justify-between gap-4">
|
| 357 |
+
<div class="flex-1 min-w-0">
|
| 358 |
+
<h3 class="font-medium text-slate-900 dark:text-slate-100 truncate">ترجمه انگلیسی به فارسی</h3>
|
| 359 |
+
<p class="text-sm text-slate-500 dark:text-slate-400 mt-1 line-clamp-2">ترجمه متن یک مقاله ۵۰۰ کلمهای</p>
|
| 360 |
+
</div>
|
| 361 |
+
<div class="flex flex-col items-end gap-2 shrink-0">
|
| 362 |
+
<span class="text-xs text-slate-400">۳ روز پیش</span>
|
| 363 |
+
<button onclick="event.stopPropagation(); deleteHistory('3')" class="opacity-0 group-hover:opacity-100 p-1.5 text-slate-400 hover:text-red-500 hover:bg-red-50 dark:hover:bg-red-900/20 rounded-lg transition-all">
|
| 364 |
+
<i data-feather="trash-2" class="w-4 h-4"></i>
|
| 365 |
+
</button>
|
| 366 |
+
</div>
|
| 367 |
+
</div>
|
| 368 |
+
</div>
|
| 369 |
</div>
|
| 370 |
+
|
| 371 |
+
<!-- Empty State -->
|
| 372 |
+
<div id="historyEmpty" class="hidden text-center py-12">
|
| 373 |
+
<div class="w-16 h-16 mx-auto mb-4 rounded-2xl bg-slate-100 dark:bg-slate-800 flex items-center justify-center">
|
| 374 |
+
<i data-feather="inbox" class="w-8 h-8 text-slate-400"></i>
|
| 375 |
+
</div>
|
| 376 |
+
<p class="text-slate-500 dark:text-slate-400">تاریخچهای یافت نشد</p>
|
| 377 |
</div>
|
| 378 |
+
</div>
|
| 379 |
</div>
|
|
|
|
| 380 |
|
| 381 |
+
<!-- Personas Page -->
|
| 382 |
+
<div id="page-personas" class="page">
|
| 383 |
+
<div class="max-w-4xl mx-auto px-4 py-6">
|
| 384 |
+
<div class="text-center mb-8">
|
| 385 |
+
<h1 class="text-2xl font-bold mb-2">شخصیتهای هوش مصنوعی</h1>
|
| 386 |
+
<p class="text-slate-500 dark:text-slate-400 text-sm">یک شخصیت متناسب با نیاز خود انتخاب کنید</p>
|
| 387 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 388 |
|
| 389 |
+
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4">
|
| 390 |
+
<!-- Default -->
|
| 391 |
+
<div class="bg-white dark:bg-slate-800 rounded-2xl p-5 border-2 border-primary-500 relative card-hover cursor-pointer" onclick="selectPersona('default')">
|
| 392 |
+
<div class="absolute top-3 left-3">
|
| 393 |
+
<span class="inline-flex items-center gap-1 px-2 py-1 rounded-full bg-primary-100 dark:bg-primary-900/30 text-primary-700 dark:text-primary-300 text-xs font-medium">
|
| 394 |
+
<i data-feather="check" class="w-3 h-3"></i>
|
| 395 |
+
فعال
|
| 396 |
+
</span>
|
| 397 |
+
</div>
|
| 398 |
+
<div class="w-12 h-12 rounded-xl bg-gradient-to-br from-primary-500 to-accent-600 flex items-center justify-center text-white text-xl mb-4">
|
| 399 |
+
🧠
|
| 400 |
+
</div>
|
| 401 |
+
<h3 class="font-bold text-slate-900 dark:text-slate-100 mb-1">پارسگوی</h3>
|
| 402 |
+
<p class="text-sm text-slate-500 dark:text-slate-400 mb-4">دستیار همهکاره هوشمند برای پاسخ به انواع سوالات</p>
|
| 403 |
+
<button class="w-full py-2 rounded-lg bg-primary-50 dark:bg-primary-900/20 text-primary-600 dark:text-primary-400 text-sm font-medium">
|
| 404 |
+
انتخاب شده
|
| 405 |
+
</button>
|
| 406 |
+
</div>
|
| 407 |
|
| 408 |
+
<!-- Teacher -->
|
| 409 |
+
<div class="bg-white dark:bg-slate-800 rounded-2xl p-5 border border-slate-200 dark:border-slate-700 card-hover cursor-pointer" onclick="selectPersona('teacher')">
|
| 410 |
+
<div class="w-12 h-12 rounded-xl bg-gradient-to-br from-blue-500 to-cyan-500 flex items-center justify-center text-white text-xl mb-4">
|
| 411 |
+
👨🏫
|
| 412 |
+
</div>
|
| 413 |
+
<h3 class="font-bold text-slate-900 dark:text-slate-100 mb-1">معلم خصوصی</h3>
|
| 414 |
+
<p class="text-sm text-slate-500 dark:text-slate-400 mb-4">آموزش مفاهیم پیچیده با زبانی ساده و قابل فهم</p>
|
| 415 |
+
<button class="w-full py-2 rounded-lg bg-slate-100 dark:bg-slate-700 hover:bg-primary-50 dark:hover:bg-primary-900/20 text-slate-600 dark:text-slate-300 hover:text-primary-600 dark:hover:text-primary-400 text-sm font-medium transition-colors">
|
| 416 |
+
انتخاب
|
| 417 |
+
</button>
|
| 418 |
+
</div>
|
| 419 |
|
| 420 |
+
<!-- Developer -->
|
| 421 |
+
<div class="bg-white dark:bg-slate-800 rounded-2xl p-5 border border-slate-200 dark:border-slate-700 card-hover cursor-pointer" onclick="selectPersona('developer')">
|
| 422 |
+
<div class="w-12 h-12 rounded-xl bg-gradient-to-br from-purple-500 to-pink-500 flex items-center justify-center text-white text-xl mb-4">
|
| 423 |
+
💻
|
| 424 |
+
</div>
|
| 425 |
+
<h3 class="font-bold text-slate-900 dark:text-slate-100 mb-1">برنامهنویس</h3>
|
| 426 |
+
<p class="text-sm text-slate-500 dark:text-slate-400 mb-4">کمک در کدنویسی، دیباگ و معماری نرمافزار</p>
|
| 427 |
+
<button class="w-full py-2 rounded-lg bg-slate-100 dark:bg-slate-700 hover:bg-primary-50 dark:hover:bg-primary-900/20 text-slate-600 dark:text-slate-300 hover:text-primary-600 dark:hover:text-primary-400 text-sm font-medium transition-colors">
|
| 428 |
+
انتخاب
|
| 429 |
+
</button>
|
| 430 |
+
</div>
|
| 431 |
|
| 432 |
+
<!-- Writer -->
|
| 433 |
+
<div class="bg-white dark:bg-slate-800 rounded-2xl p-5 border border-slate-200 dark:border-slate-700 card-hover cursor-pointer" onclick="selectPersona('writer')">
|
| 434 |
+
<div class="w-12 h-12 rounded-xl bg-gradient-to-br from-amber-500 to-orange-500 flex items-center justify-center text-white text-xl mb-4">
|
| 435 |
+
✍️
|
| 436 |
+
</div>
|
| 437 |
+
<h3 class="font-bold text-slate-900 dark:text-slate-100 mb-1">نویسنده خلاق</h3>
|
| 438 |
+
<p class="text-sm text-slate-500 dark:text-slate-400 mb-4">نوشتن داستان، شعر و محتوای ادبی</p>
|
| 439 |
+
<button class="w-full py-2 rounded-lg bg-slate-100 dark:bg-slate-700 hover:bg-primary-50 dark:hover:bg-primary-900/20 text-slate-600 dark:text-slate-300 hover:text-primary-600 dark:hover:text-primary-400 text-sm font-medium transition-colors">
|
| 440 |
+
انتخاب
|
| 441 |
+
</button>
|
| 442 |
+
</div>
|
| 443 |
|
| 444 |
+
<!-- Analyst -->
|
| 445 |
+
<div class="bg-white dark:bg-slate-800 rounded-2xl p-5 border border-slate-200 dark:border-slate-700 card-hover cursor-pointer" onclick="selectPersona('analyst')">
|
| 446 |
+
<div class="w-12 h-12 rounded-xl bg-gradient-to-br from-emerald-500 to-teal-500 flex items-center justify-center text-white text-xl mb-4">
|
| 447 |
+
📊
|
| 448 |
+
</div>
|
| 449 |
+
<h3 class="font-bold text-slate-900 dark:text-slate-100 mb-1">تحلیلگر داده</h3>
|
| 450 |
+
<p class="text-sm text-slate-500 dark:text-slate-400 mb-4">تحلیل دادهها و ارائه بینشهای کاربردی</p>
|
| 451 |
+
<button class="w-full py-2 rounded-lg bg-slate-100 dark:bg-slate-700 hover:bg-primary-50 dark:hover:bg-primary-900/20 text-slate-600 dark:text-slate-300 hover:text-primary-600 dark:hover:text-primary-400 text-sm font-medium transition-colors">
|
| 452 |
+
انتخاب
|
| 453 |
+
</button>
|
| 454 |
+
</div>
|
| 455 |
+
|
| 456 |
+
<!-- Custom -->
|
| 457 |
+
<div class="bg-gradient-to-br from-slate-50 to-slate-100 dark:from-slate-800 dark:to-slate-700/50 rounded-2xl p-5 border-2 border-dashed border-slate-300 dark:border-slate-600 card-hover cursor-pointer" onclick="createCustomPersona()">
|
| 458 |
+
<div class="w-12 h-12 rounded-xl bg-slate-200 dark:bg-slate-600 flex items-center justify-center text-slate-500 dark:text-slate-400 text-xl mb-4">
|
| 459 |
+
<i data-feather="plus" class="w-6 h-6"></i>
|
| 460 |
+
</div>
|
| 461 |
+
<h3 class="font-bold text-slate-900 dark:text-slate-100 mb-1">شخصیت سفارشی</h3>
|
| 462 |
+
<p class="text-sm text-slate-500 dark:text-slate-400 mb-4">یک شخصیت با ویژگیهای دلخواه بسازید</p>
|
| 463 |
+
<button class="w-full py-2 rounded-lg bg-white dark:bg-slate-700 text-slate-600 dark:text-slate-300 text-sm font-medium">
|
| 464 |
+
ساختن
|
| 465 |
+
</button>
|
| 466 |
</div>
|
|
|
|
|
|
|
|
|
|
| 467 |
</div>
|
|
|
|
| 468 |
</div>
|
| 469 |
+
</div>
|
| 470 |
|
| 471 |
+
<!-- Profile Page -->
|
| 472 |
+
<div id="page-profile" class="page">
|
| 473 |
+
<div class="max-w-2xl mx-auto px-4 py-6">
|
| 474 |
+
<h1 class="text-2xl font-bold mb-6">پروفایل کاربری</h1>
|
| 475 |
+
|
| 476 |
+
<!-- Profile Card -->
|
| 477 |
+
<div class="bg-white dark:bg-slate-800 rounded-2xl p-6 border border-slate-200 dark:border-slate-700 mb-6">
|
| 478 |
+
<div class="flex items-center gap-4 mb-6">
|
| 479 |
+
<div class="relative">
|
| 480 |
+
<div class="w-20 h-20 rounded-2xl bg-gradient-to-br from-primary-500 to-accent-600 flex items-center justify-center text-white text-2xl font-bold">
|
| 481 |
+
ک
|
| 482 |
+
</div>
|
| 483 |
+
<button class="absolute -bottom-1 -right-1 w-8 h-8 bg-white dark:bg-slate-700 rounded-full border-2 border-slate-100 dark:border-slate-600 flex items-center justify-center text-slate-500 hover:text-primary-500 transition-colors shadow-sm">
|
| 484 |
+
<i data-feather="camera" class="w-4 h-4"></i>
|
| 485 |
+
</button>
|
| 486 |
+
</div>
|
| 487 |
+
<div>
|
| 488 |
+
<h2 class="font-bold text-lg">کاربر نمونه</h2>
|
| 489 |
+
<p class="text-sm text-slate-500 dark:text-slate-400">عضو از ۱۴۰۲/۰۱/۱۵</p>
|
| 490 |
+
</div>
|
| 491 |
+
</div>
|
| 492 |
+
|
| 493 |
+
<form onsubmit="saveProfile(event)" class="space-y-4">
|
| 494 |
+
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
| 495 |
+
<div>
|
| 496 |
+
<label class="block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1.5">نام</label>
|
| 497 |
+
<input type="text" value="کاربر نمونه" class="w-full px-4 py-2.5 rounded-xl bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 text-sm focus:outline-none focus:ring-2 focus:ring-primary-500/20 focus:border-primary-500">
|
| 498 |
+
</div>
|
| 499 |
+
<div>
|
| 500 |
+
<label class="block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1.5">ایمیل</label>
|
| 501 |
+
<input type="email" value="user@example.com" class="w-full px-4 py-2.5 rounded-xl bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 text-sm focus:outline-none focus:ring-2 focus:ring-primary-500/20 focus:border-primary-500">
|
| 502 |
+
</div>
|
| 503 |
+
</div>
|
| 504 |
+
<div>
|
| 505 |
+
<label class="block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1.5">بیوگرافی</label>
|
| 506 |
+
<textarea rows="3" class="w-full px-4 py-2.5 rounded-xl bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 text-sm focus:outline-none focus:ring-2 focus:ring-primary-500/20 focus:border-primary-500 resize-none">علاقهمند به تکنولوژی و هوش مصنوعی</textarea>
|
| 507 |
+
</div>
|
| 508 |
+
<div class="flex justify-end">
|
| 509 |
+
<button type="submit" class="btn-primary text-white px-6 py-2.5 rounded-xl text-sm font-medium">
|
| 510 |
+
ذخیره تغییرات
|
| 511 |
+
</button>
|
| 512 |
+
</div>
|
| 513 |
+
</form>
|
| 514 |
+
</div>
|
| 515 |
|
| 516 |
+
<!-- Stats -->
|
| 517 |
+
<div class="grid grid-cols-3 gap-4 mb-6">
|
| 518 |
+
<div class="bg-white dark:bg-slate-800 rounded-xl p-4 text-center border border-slate-200 dark:border-slate-700">
|
| 519 |
+
<div class="text-2xl font-bold gradient-text">۴۷</div>
|
| 520 |
+
<div class="text-xs text-slate-500 dark:text-slate-400 mt-1">مکالمه</div>
|
| 521 |
+
</div>
|
| 522 |
+
<div class="bg-white dark:bg-slate-800 rounded-xl p-4 text-center border border-slate-200 dark:border-slate-700">
|
| 523 |
+
<div class="text-2xl font-bold gradient-text">۱.۲K</div>
|
| 524 |
+
<div class="text-xs text-slate-500 dark:text-slate-400 mt-1">پیام</div>
|
| 525 |
+
</div>
|
| 526 |
+
<div class="bg-white dark:bg-slate-800 rounded-xl p-4 text-center border border-slate-200 dark:border-slate-700">
|
| 527 |
+
<div class="text-2xl font-bold gradient-text">۱۵</div>
|
| 528 |
+
<div class="text-xs text-slate-500 dark:text-slate-400 mt-1">روز فعال</div>
|
| 529 |
+
</div>
|
| 530 |
+
</div>
|
| 531 |
+
|
| 532 |
+
<!-- Settings -->
|
| 533 |
+
<div class="bg-white dark:bg-slate-800 rounded-2xl border border-slate-200 dark:border-slate-700 overflow-hidden">
|
| 534 |
+
<div class="p-4 border-b border-slate-200 dark:border-slate-700">
|
| 535 |
+
<h3 class="font-medium">تنظیمات</h3>
|
| 536 |
+
</div>
|
| 537 |
+
<div class="divide-y divide-slate-200 dark:divide-slate-700">
|
| 538 |
+
<label class="flex items-center justify-between p-4 cursor-pointer hover:bg-slate-50 dark:hover:bg-slate-700/50 transition-colors">
|
| 539 |
+
<div class="flex items-center gap-3">
|
| 540 |
+
<div class="w-10 h-10 rounded-xl bg-primary-100 dark:bg-primary-900/30 flex items-center justify-center text-primary-600 dark:text-primary-400">
|
| 541 |
+
<i data-feather="bell" class="w-5 h-5"></i>
|
| 542 |
+
</div>
|
| 543 |
+
<div>
|
| 544 |
+
<div class="font-medium text-sm">اعلانها</div>
|
| 545 |
+
<div class="text-xs text-slate-500 dark:text-slate-400">دریافت اعلان در مرورگر</div>
|
| 546 |
+
</div>
|
| 547 |
+
</div>
|
| 548 |
+
<input type="checkbox" checked class="w-5 h-5 rounded-lg border-slate-300 text-primary-500 focus:ring-primary-500">
|
| 549 |
+
</label>
|
| 550 |
+
<label class="flex items-center justify-between p-4 cursor-pointer hover:bg-slate-50 dark:hover:bg-slate-700/50 transition-colors">
|
| 551 |
+
<div class="flex items-center gap-3">
|
| 552 |
+
<div class="w-10 h-10 rounded-xl bg-accent-100 dark:bg-accent-900/30 flex items-center justify-center text-accent-600 dark:text-accent-400">
|
| 553 |
+
<i data-feather="volume-2" class="w-5 h-5"></i>
|
| 554 |
+
</div>
|
| 555 |
+
<div>
|
| 556 |
+
<div class="font-medium text-sm">خواندن پاسخ</div>
|
| 557 |
+
<div class="text-xs text-slate-500 dark:text-slate-400">پخش صوتی پاسخها</div>
|
| 558 |
+
</div>
|
| 559 |
+
</div>
|
| 560 |
+
<input type="checkbox" class="w-5 h-5 rounded-lg border-slate-300 text-primary-500 focus:ring-primary-500">
|
| 561 |
+
</label>
|
| 562 |
+
<button onclick="exportData()" class="w-full flex items-center justify-between p-4 hover:bg-slate-50 dark:hover:bg-slate-700/50 transition-colors text-right">
|
| 563 |
+
<div class="flex items-center gap-3">
|
| 564 |
+
<div class="w-10 h-10 rounded-xl bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center text-blue-600 dark:text-blue-400">
|
| 565 |
+
<i data-feather="download" class="w-5 h-5"></i>
|
| 566 |
</div>
|
| 567 |
+
<div>
|
| 568 |
+
<div class="font-medium text-sm">خروجی دادهها</div>
|
| 569 |
+
<div class="text-xs text-slate-500 dark:text-slate-400">دانلود تمام مکالمات</div>
|
| 570 |
+
</div>
|
| 571 |
+
</div>
|
| 572 |
+
<i data-feather="chevron-left" class="w-5 h-5 text-slate-400"></i>
|
| 573 |
+
</button>
|
| 574 |
+
<button onclick="deleteAccount()" class="w-full flex items-center justify-between p-4 hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors text-right text-red-600">
|
| 575 |
+
<div class="flex items-center gap-3">
|
| 576 |
+
<div class="w-10 h-10 rounded-xl bg-red-100 dark:bg-red-900/30 flex items-center justify-center">
|
| 577 |
+
<i data-feather="trash-2" class="w-5 h-5"></i>
|
| 578 |
+
</div>
|
| 579 |
+
<div>
|
| 580 |
+
<div class="font-medium text-sm">حذف حساب</div>
|
| 581 |
+
<div class="text-xs text-red-400">غیرقابل بازگشت</div>
|
| 582 |
+
</div>
|
| 583 |
+
</div>
|
| 584 |
+
<i data-feather="chevron-left" class="w-5 h-5"></i>
|
| 585 |
+
</button>
|
| 586 |
+
</div>
|
| 587 |
+
</div>
|
| 588 |
+
</div>
|
| 589 |
+
</div>
|
| 590 |
+
|
| 591 |
+
<!-- Login Page -->
|
| 592 |
+
<div id="page-login" class="page">
|
| 593 |
+
<div class="min-h-[calc(100vh-3.5rem)] flex items-center justify-center p-4">
|
| 594 |
+
<div class="w-full max-w-sm">
|
| 595 |
+
<div class="text-center mb-8">
|
| 596 |
+
<div class="w-16 h-16 mx-auto rounded-2xl bg-gradient-to-br from-primary-500 to-accent-600 flex items-center justify-center text-white text-2xl font-bold mb-4">
|
| 597 |
+
پ
|
| 598 |
+
</div>
|
| 599 |
+
<h1 class="text-2xl font-bold">خوش آمدید</h1>
|
| 600 |
+
<p class="text-sm text-slate-500 dark:text-slate-400 mt-2">برای ادامه وارد شوید یا حساب بسازید</p>
|
| 601 |
+
</div>
|
| 602 |
+
|
| 603 |
+
<div class="bg-white dark:bg-slate-800 rounded-2xl p-6 border border-slate-200 dark:border-slate-700">
|
| 604 |
+
<form onsubmit="handleLogin(event)" class="space-y-4">
|
| 605 |
+
<div>
|
| 606 |
+
<label class="block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1.5">ایمیل</label>
|
| 607 |
+
<input type="email" required class="w-full px-4 py-2.5 rounded-xl bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 text-sm focus:outline-none focus:ring-2 focus:ring-primary-500/20 focus:border-primary-500" placeholder="your@email.com">
|
| 608 |
+
</div>
|
| 609 |
+
<div>
|
| 610 |
+
<label class="block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1.5">رمز عبور</label>
|
| 611 |
+
<input type="password" required class="w-full px-4 py-2.5 rounded-xl bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 text-sm focus:outline-none focus:ring-2 focus:ring-primary-500/20 focus:border-primary-500" placeholder="••••••••">
|
| 612 |
+
</div>
|
| 613 |
+
<div class="flex items-center justify-between text-sm">
|
| 614 |
+
<label class="flex items-center gap-2 cursor-pointer">
|
| 615 |
+
<input type="checkbox" class="rounded border-slate-300 text-primary-500 focus:ring-primary-500">
|
| 616 |
+
<span class="text-slate-600 dark:text-slate-400">مرا به خاطر بسپار</span>
|
| 617 |
+
</label>
|
| 618 |
+
<a href="#" class="text-primary-600 hover:text-primary-700">فراموشی رمز؟</a>
|
| 619 |
+
</div>
|
| 620 |
+
<button type="submit" class="w-full btn-primary text-white py-2.5 rounded-xl font-medium">
|
| 621 |
+
ورود به حساب
|
| 622 |
+
</button>
|
| 623 |
+
</form>
|
| 624 |
+
|
| 625 |
+
<div class="relative my-6">
|
| 626 |
+
<div class="absolute inset-0 flex items-center">
|
| 627 |
+
<div class="w-full border-t border-slate-200 dark:border-slate-700"></div>
|
| 628 |
+
</div>
|
| 629 |
+
<div class="relative flex justify-center text-sm">
|
| 630 |
+
<span class="px-2 bg-white dark:bg-slate-800 text-slate-500">یا</span>
|
| 631 |
</div>
|
|
|
|
| 632 |
</div>
|
| 633 |
+
|
| 634 |
+
<button class="w-full flex items-center justify-center gap-2 py-2.5 rounded-xl border border-slate-200 dark:border-slate-700 hover:bg-slate-50 dark:hover:bg-slate-700 transition-colors">
|
| 635 |
+
<svg class="w-5 h-5" viewBox="0 0 24 24">
|
| 636 |
+
<path fill="currentColor" d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"/>
|
| 637 |
+
<path fill="currentColor" d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"/>
|
| 638 |
+
<path fill="currentColor" d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"/>
|
| 639 |
+
<path fill="currentColor" d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"/>
|
| 640 |
+
</svg>
|
| 641 |
+
<span class="text-sm font-medium">ورود با گوگل</span>
|
| 642 |
+
</button>
|
| 643 |
+
|
| 644 |
+
<p class="text-center text-sm text-slate-500 dark:text-slate-400 mt-6">
|
| 645 |
+
حساب ندارید؟
|
| 646 |
+
<a href="#" onclick="showPage('register')" class="text-primary-600 hover:text-primary-700 font-medium">ثبتنام کنید</a>
|
| 647 |
+
</p>
|
| 648 |
</div>
|
| 649 |
+
</div>
|
| 650 |
+
</div>
|
| 651 |
+
</div>
|
| 652 |
+
|
| 653 |
+
<!-- Register Page -->
|
| 654 |
+
<div id="page-register" class="page">
|
| 655 |
+
<div class="min-h-[calc(100vh-3.5rem)] flex items-center justify-center p-4">
|
| 656 |
+
<div class="w-full max-w-sm">
|
| 657 |
+
<div class="text-center mb-8">
|
| 658 |
+
<div class="w-16 h-16 mx-auto rounded-2xl bg-gradient-to-br from-primary-500 to-accent-600 flex items-center justify-center text-white text-2xl font-bold mb-4">
|
| 659 |
+
پ
|
| 660 |
+
</div>
|
| 661 |
+
<h1 class="text-2xl font-bold">ایجاد حساب</h1>
|
| 662 |
+
<p class="text-sm text-slate-500 dark:text-slate-400 mt-2
|