Spaces:
Running
Running
Update index.html
Browse files- index.html +46 -28
index.html
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
<!DOCTYPE html>
|
| 2 |
<html lang="ar" dir="rtl">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
|
@@ -76,6 +76,30 @@
|
|
| 76 |
.animate-pulse {
|
| 77 |
animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
| 78 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
</style>
|
| 80 |
</head>
|
| 81 |
<body class="flex justify-center">
|
|
@@ -294,7 +318,6 @@
|
|
| 294 |
|
| 295 |
|
| 296 |
// --- 4. مكونات الواجهة المشتركة (رأس الصفحة وتذييلها) ---
|
| 297 |
-
// ... (renderHeader, renderFooter remain the same for brevity) ...
|
| 298 |
const renderHeader = () => {
|
| 299 |
const headerElement = document.getElementById('app-header');
|
| 300 |
const categoryMeta = CATEGORIES.find(c => c.id === appState.selectedCategory);
|
|
@@ -374,61 +397,58 @@
|
|
| 374 |
const renderWelcomeScreen = () => {
|
| 375 |
const content = document.getElementById('app-content');
|
| 376 |
|
| 377 |
-
|
| 378 |
-
|
| 379 |
-
|
| 380 |
-
|
|
|
|
| 381 |
</div>
|
| 382 |
-
<h1 class="text-6xl font-extrabold text-
|
| 383 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 384 |
</div>
|
| 385 |
`;
|
| 386 |
|
| 387 |
const copyrightText = "TIFIWIN-AZIZIJAOUAD@2025";
|
| 388 |
|
| 389 |
-
// 🚨 حقل الإدخال وزر الإرسال
|
| 390 |
const usernameFormHTML = `
|
| 391 |
<div id="welcome-form-container" class="w-full max-w-xs mb-6" style="display: ${appState.isUsernameSubmitted ? 'none' : 'block'};">
|
| 392 |
-
<p class="text-lg font-bold text-gray-700 dark:text-gray-200 mb-3 mt-8">أدخل اسمك لتبدأ:</p>
|
| 393 |
-
<input type="text" id="usernameInput" placeholder="ا
|
| 394 |
-
class="w-full p-3 mb-
|
| 395 |
-
onkeypress="if(event.key === 'Enter') { submitUsername(); }">
|
| 396 |
|
| 397 |
<button onclick="submitUsername()"
|
| 398 |
-
class="w-full py-3 bg-blue-600 hover:bg-blue-700 text-white text-lg font-bold rounded-full shadow-xl shadow-blue-400/50 transition-all card-shadow">
|
| 399 |
تسجيل الاسم
|
| 400 |
</button>
|
| 401 |
</div>
|
| 402 |
`;
|
| 403 |
|
| 404 |
-
// 🚨 زر "هيا نبدأ" المشروط
|
| 405 |
const startButtonHTML = `
|
| 406 |
<div id="start-button-container" class="w-full max-w-xs" style="display: ${appState.isUsernameSubmitted ? 'block' : 'none'};">
|
| 407 |
<button onclick="setState({currentScreen: 'home'})"
|
| 408 |
-
class="w-full py-4 bg-green-500 hover:bg-green-600 text-white text-xl font-bold rounded-full shadow-2xl shadow-green-400/50 transition-all card-shadow mb-6">
|
| 409 |
هيا نبدأ!
|
| 410 |
</button>
|
| 411 |
</div>
|
| 412 |
`;
|
| 413 |
|
| 414 |
content.innerHTML = `
|
| 415 |
-
<div class="flex flex-col items-center justify-between min-h-
|
| 416 |
|
| 417 |
-
<div class="flex-grow flex flex-col items-center justify-center text-center w-full">
|
| 418 |
-
${
|
| 419 |
-
|
| 420 |
-
<p class="text-lg text-gray-500 dark:text-gray-400 mt-10 max-w-xs">
|
| 421 |
-
انطلق في رحلة ممتعة لاستكشاف حروف وألوان ومفردات اللغة الأمازيغية.
|
| 422 |
-
</p>
|
| 423 |
|
| 424 |
${usernameFormHTML}
|
| 425 |
|
| 426 |
${startButtonHTML}
|
| 427 |
|
| 428 |
</div>
|
| 429 |
-
|
| 430 |
|
| 431 |
-
<p class="text-xs text-gray-
|
| 432 |
${copyrightText}
|
| 433 |
</p>
|
| 434 |
</div>
|
|
@@ -497,7 +517,6 @@
|
|
| 497 |
};
|
| 498 |
|
| 499 |
// --- 7. شاشة 3 و 4: شاشة التعلم العامة (Learning Screen) (...) ---
|
| 500 |
-
// ... (renderLearningScreen remains the same for brevity) ...
|
| 501 |
const renderLearningScreen = () => {
|
| 502 |
const categoryId = appState.selectedCategory;
|
| 503 |
const content = document.getElementById('app-content');
|
|
@@ -631,7 +650,6 @@
|
|
| 631 |
</div>
|
| 632 |
`;
|
| 633 |
};
|
| 634 |
-
// ... (renderSettingsScreen, renderInfoScreen, renderAppDefinitionScreen remain the same for brevity) ...
|
| 635 |
const renderSettingsScreen = () => {
|
| 636 |
const content = document.getElementById('app-content');
|
| 637 |
|
|
@@ -784,7 +802,7 @@
|
|
| 784 |
</div>
|
| 785 |
<div class="text-right text-white">
|
| 786 |
<span class="text-lg font-black leading-tight drop-shadow-md">${category.title}</span>
|
| 787 |
-
<span class="text-xs opacity-80 mt-1 block">${
|
| 788 |
</div>
|
| 789 |
</div>
|
| 790 |
</div>
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
<html lang="ar" dir="rtl">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
|
|
|
| 76 |
.animate-pulse {
|
| 77 |
animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
| 78 |
}
|
| 79 |
+
|
| 80 |
+
/* 🚨 NEW: Welcome Screen specific styles */
|
| 81 |
+
.welcome-bg-gradient {
|
| 82 |
+
background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%); /* Light blue gradient */
|
| 83 |
+
}
|
| 84 |
+
.dark .welcome-bg-gradient {
|
| 85 |
+
background: linear-gradient(135deg, #1f2937 0%, #374151 100%); /* Dark gradient */
|
| 86 |
+
}
|
| 87 |
+
.welcome-illustration-container {
|
| 88 |
+
width: 100%;
|
| 89 |
+
max-width: 400px; /* Adjust max-width as needed */
|
| 90 |
+
height: auto;
|
| 91 |
+
border-radius: 1.5rem; /* Rounded corners for the image container */
|
| 92 |
+
overflow: hidden;
|
| 93 |
+
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); /* Soft shadow */
|
| 94 |
+
}
|
| 95 |
+
.dark .welcome-illustration-container {
|
| 96 |
+
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
|
| 97 |
+
}
|
| 98 |
+
.welcome-illustration-container img {
|
| 99 |
+
width: 100%;
|
| 100 |
+
height: auto;
|
| 101 |
+
display: block; /* Ensure no extra space below image */
|
| 102 |
+
}
|
| 103 |
</style>
|
| 104 |
</head>
|
| 105 |
<body class="flex justify-center">
|
|
|
|
| 318 |
|
| 319 |
|
| 320 |
// --- 4. مكونات الواجهة المشتركة (رأس الصفحة وتذييلها) ---
|
|
|
|
| 321 |
const renderHeader = () => {
|
| 322 |
const headerElement = document.getElementById('app-header');
|
| 323 |
const categoryMeta = CATEGORIES.find(c => c.id === appState.selectedCategory);
|
|
|
|
| 397 |
const renderWelcomeScreen = () => {
|
| 398 |
const content = document.getElementById('app-content');
|
| 399 |
|
| 400 |
+
// 🚨 الصورة الجديدة بدلاً من الشعار النصي
|
| 401 |
+
const illustrationAndTitleHTML = `
|
| 402 |
+
<div class="flex flex-col items-center mb-6">
|
| 403 |
+
<div class="welcome-illustration-container mb-6">
|
| 404 |
+
<img src="images/welcome_illustration.png" alt="شعار تيفاوين - تعلم الأمازيغية" />
|
| 405 |
</div>
|
| 406 |
+
<h1 class="text-5xl md:text-6xl font-extrabold text-blue-700 dark:text-blue-300 mb-2 leading-tight text-center drop-shadow-md">
|
| 407 |
+
مرحباً في <span class="text-orange-500 dark:text-orange-300">Tifawin</span>
|
| 408 |
+
</h1>
|
| 409 |
+
<p class="text-lg md:text-xl font-medium text-gray-700 dark:text-gray-300 text-center max-w-sm">
|
| 410 |
+
انطلق في رحلة ممتعة لاستكشاف حروف ومفردات اللغة الأمازيغية.
|
| 411 |
+
</p>
|
| 412 |
</div>
|
| 413 |
`;
|
| 414 |
|
| 415 |
const copyrightText = "TIFIWIN-AZIZIJAOUAD@2025";
|
| 416 |
|
|
|
|
| 417 |
const usernameFormHTML = `
|
| 418 |
<div id="welcome-form-container" class="w-full max-w-xs mb-6" style="display: ${appState.isUsernameSubmitted ? 'none' : 'block'};">
|
| 419 |
+
<p class="text-lg font-bold text-gray-700 dark:text-gray-200 mb-3 mt-8 text-center">أدخل اسمك لتبدأ المغامرة:</p>
|
| 420 |
+
<input type="text" id="usernameInput" placeholder="اسمك هنا (مثل: جواد أو فاطمة)" required
|
| 421 |
+
class="w-full p-3 mb-4 border-2 border-blue-400 dark:border-blue-600 rounded-xl focus:outline-none focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-700 text-center text-lg text-gray-800 dark:text-gray-100 dark:bg-gray-700 placeholder-gray-500 dark:placeholder-gray-400 transition-all duration-300 ease-in-out">
|
|
|
|
| 422 |
|
| 423 |
<button onclick="submitUsername()"
|
| 424 |
+
class="w-full py-3 bg-blue-600 hover:bg-blue-700 text-white text-lg font-bold rounded-full shadow-xl shadow-blue-400/50 transition-all duration-300 ease-in-out card-shadow">
|
| 425 |
تسجيل الاسم
|
| 426 |
</button>
|
| 427 |
</div>
|
| 428 |
`;
|
| 429 |
|
|
|
|
| 430 |
const startButtonHTML = `
|
| 431 |
<div id="start-button-container" class="w-full max-w-xs" style="display: ${appState.isUsernameSubmitted ? 'block' : 'none'};">
|
| 432 |
<button onclick="setState({currentScreen: 'home'})"
|
| 433 |
+
class="w-full py-4 bg-green-500 hover:bg-green-600 text-white text-xl font-bold rounded-full shadow-2xl shadow-green-400/50 transition-all duration-300 ease-in-out card-shadow mb-6">
|
| 434 |
هيا نبدأ!
|
| 435 |
</button>
|
| 436 |
</div>
|
| 437 |
`;
|
| 438 |
|
| 439 |
content.innerHTML = `
|
| 440 |
+
<div class="flex flex-col items-center justify-between min-h-screen p-6 welcome-bg-gradient dark:welcome-bg-gradient transition-colors">
|
| 441 |
|
| 442 |
+
<div class="flex-grow flex flex-col items-center justify-center text-center w-full mt-4">
|
| 443 |
+
${illustrationAndTitleHTML}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 444 |
|
| 445 |
${usernameFormHTML}
|
| 446 |
|
| 447 |
${startButtonHTML}
|
| 448 |
|
| 449 |
</div>
|
|
|
|
| 450 |
|
| 451 |
+
<p class="text-xs text-gray-500 dark:text-gray-400 font-mono tracking-wider mt-8">
|
| 452 |
${copyrightText}
|
| 453 |
</p>
|
| 454 |
</div>
|
|
|
|
| 517 |
};
|
| 518 |
|
| 519 |
// --- 7. شاشة 3 و 4: شاشة التعلم العامة (Learning Screen) (...) ---
|
|
|
|
| 520 |
const renderLearningScreen = () => {
|
| 521 |
const categoryId = appState.selectedCategory;
|
| 522 |
const content = document.getElementById('app-content');
|
|
|
|
| 650 |
</div>
|
| 651 |
`;
|
| 652 |
};
|
|
|
|
| 653 |
const renderSettingsScreen = () => {
|
| 654 |
const content = document.getElementById('app-content');
|
| 655 |
|
|
|
|
| 802 |
</div>
|
| 803 |
<div class="text-right text-white">
|
| 804 |
<span class="text-lg font-black leading-tight drop-shadow-md">${category.title}</span>
|
| 805 |
+
<span class="text-xs opacity-80 mt-1 block">${isComingSoon ? '(قريباً)' : category.subtitle}</span>
|
| 806 |
</div>
|
| 807 |
</div>
|
| 808 |
</div>
|