Spaces:
Running
Running
Update index.html
Browse files- index.html +130 -14
index.html
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
<!DOCTYPE html>
|
| 2 |
<html lang="ar" dir="rtl">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
|
@@ -23,10 +23,7 @@
|
|
| 23 |
align-items: center;
|
| 24 |
padding: 0;
|
| 25 |
touch-action: pan-x pan-y;
|
| 26 |
-
|
| 27 |
-
}
|
| 28 |
-
body.blur-background {
|
| 29 |
-
filter: blur(5px);
|
| 30 |
}
|
| 31 |
.container {
|
| 32 |
max-width: 100%;
|
|
@@ -188,7 +185,89 @@
|
|
| 188 |
z-index: 5;
|
| 189 |
border-radius: 1.5rem;
|
| 190 |
}
|
| 191 |
-
/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 192 |
#game-container {
|
| 193 |
display: flex;
|
| 194 |
flex-direction: column;
|
|
@@ -446,6 +525,24 @@
|
|
| 446 |
<div id="message-box" class="message-box">
|
| 447 |
<div id="message-content"></div>
|
| 448 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 449 |
|
| 450 |
<audio id="sound-player" preload="auto"></audio>
|
| 451 |
<audio id="story-audio" controls style="display:none;"></audio>
|
|
@@ -736,23 +833,20 @@
|
|
| 736 |
}
|
| 737 |
|
| 738 |
function showMessage(htmlContent, duration = 2500) {
|
| 739 |
-
const body = document.body;
|
| 740 |
const msgBox = document.getElementById('message-box');
|
| 741 |
const msgContent = document.getElementById('message-content');
|
| 742 |
|
| 743 |
msgContent.innerHTML = htmlContent;
|
| 744 |
|
| 745 |
-
//
|
| 746 |
-
body.classList.add('blur-background');
|
| 747 |
msgBox.style.display = 'block';
|
| 748 |
setTimeout(() => {
|
| 749 |
msgBox.classList.add('visible');
|
| 750 |
}, 10);
|
| 751 |
|
| 752 |
-
// Hide message box
|
| 753 |
setTimeout(() => {
|
| 754 |
msgBox.classList.remove('visible');
|
| 755 |
-
body.classList.remove('blur-background');
|
| 756 |
setTimeout(() => {
|
| 757 |
msgBox.style.display = 'none';
|
| 758 |
}, 500); // 500ms transition duration
|
|
@@ -776,6 +870,15 @@
|
|
| 776 |
renderPage();
|
| 777 |
}
|
| 778 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 779 |
function renderPage() {
|
| 780 |
const appContainer = document.getElementById('app-container');
|
| 781 |
appContainer.innerHTML = ''; // Clear previous content
|
|
@@ -826,9 +929,9 @@
|
|
| 826 |
header.className = 'header';
|
| 827 |
header.innerHTML = `
|
| 828 |
<div class="header-item">
|
| 829 |
-
<button class="text-white" onclick="
|
| 830 |
-
<svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 text-white" viewBox="0 0 24 24"
|
| 831 |
-
<path
|
| 832 |
</svg>
|
| 833 |
</button>
|
| 834 |
</div>
|
|
@@ -887,6 +990,14 @@
|
|
| 887 |
</a>
|
| 888 |
`;
|
| 889 |
container.appendChild(mainContent);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 890 |
}
|
| 891 |
|
| 892 |
// Tifinagh Letters Page
|
|
@@ -1253,6 +1364,11 @@
|
|
| 1253 |
}
|
| 1254 |
}
|
| 1255 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1256 |
// Main app control
|
| 1257 |
function setPage(page) {
|
| 1258 |
currentPage = page;
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
<html lang="ar" dir="rtl">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
|
|
|
| 23 |
align-items: center;
|
| 24 |
padding: 0;
|
| 25 |
touch-action: pan-x pan-y;
|
| 26 |
+
overflow-x: hidden; /* Prevent horizontal scroll */
|
|
|
|
|
|
|
|
|
|
| 27 |
}
|
| 28 |
.container {
|
| 29 |
max-width: 100%;
|
|
|
|
| 185 |
z-index: 5;
|
| 186 |
border-radius: 1.5rem;
|
| 187 |
}
|
| 188 |
+
/* Sidebar Styles */
|
| 189 |
+
.sidebar {
|
| 190 |
+
height: 100%;
|
| 191 |
+
width: 0;
|
| 192 |
+
position: fixed;
|
| 193 |
+
z-index: 1001;
|
| 194 |
+
top: 0;
|
| 195 |
+
right: 0;
|
| 196 |
+
background-color: #263238;
|
| 197 |
+
overflow-x: hidden;
|
| 198 |
+
transition: 0.5s;
|
| 199 |
+
padding-top: 60px;
|
| 200 |
+
box-shadow: -4px 0 8px rgba(0, 0, 0, 0.2);
|
| 201 |
+
}
|
| 202 |
+
.sidebar a {
|
| 203 |
+
padding: 8px 8px 8px 32px;
|
| 204 |
+
text-decoration: none;
|
| 205 |
+
font-size: 20px;
|
| 206 |
+
color: #818181;
|
| 207 |
+
display: block;
|
| 208 |
+
transition: 0.3s;
|
| 209 |
+
}
|
| 210 |
+
.sidebar a:hover {
|
| 211 |
+
color: #f1f1f1;
|
| 212 |
+
}
|
| 213 |
+
.sidebar .closebtn {
|
| 214 |
+
position: absolute;
|
| 215 |
+
top: 0;
|
| 216 |
+
left: 25px;
|
| 217 |
+
font-size: 36px;
|
| 218 |
+
margin-left: 50px;
|
| 219 |
+
cursor: pointer;
|
| 220 |
+
}
|
| 221 |
+
|
| 222 |
+
.sidebar-links {
|
| 223 |
+
list-style-type: none;
|
| 224 |
+
padding: 0;
|
| 225 |
+
}
|
| 226 |
+
|
| 227 |
+
.sidebar-links li {
|
| 228 |
+
padding: 1rem;
|
| 229 |
+
text-align: right;
|
| 230 |
+
border-bottom: 1px solid #444;
|
| 231 |
+
transition: background-color 0.2s;
|
| 232 |
+
}
|
| 233 |
+
|
| 234 |
+
.sidebar-links li:hover {
|
| 235 |
+
background-color: #37474F;
|
| 236 |
+
}
|
| 237 |
+
|
| 238 |
+
.sidebar-links li a {
|
| 239 |
+
color: white;
|
| 240 |
+
text-decoration: none;
|
| 241 |
+
font-size: 1.25rem;
|
| 242 |
+
}
|
| 243 |
+
|
| 244 |
+
.bottom-buttons {
|
| 245 |
+
display: flex;
|
| 246 |
+
flex-direction: column;
|
| 247 |
+
gap: 1.5rem;
|
| 248 |
+
padding: 1.5rem;
|
| 249 |
+
width: 100%;
|
| 250 |
+
max-width: 400px;
|
| 251 |
+
}
|
| 252 |
+
|
| 253 |
+
.bottom-button {
|
| 254 |
+
background-color: #FFB74D;
|
| 255 |
+
color: #263238;
|
| 256 |
+
padding: 1rem;
|
| 257 |
+
border-radius: 1rem;
|
| 258 |
+
font-weight: bold;
|
| 259 |
+
text-align: center;
|
| 260 |
+
cursor: pointer;
|
| 261 |
+
transition: transform 0.2s, box-shadow 0.2s;
|
| 262 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
| 263 |
+
}
|
| 264 |
+
|
| 265 |
+
.bottom-button:hover {
|
| 266 |
+
transform: translateY(-3px);
|
| 267 |
+
box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
|
| 268 |
+
}
|
| 269 |
+
|
| 270 |
+
/* Game specific styles (keep existing) */
|
| 271 |
#game-container {
|
| 272 |
display: flex;
|
| 273 |
flex-direction: column;
|
|
|
|
| 525 |
<div id="message-box" class="message-box">
|
| 526 |
<div id="message-content"></div>
|
| 527 |
</div>
|
| 528 |
+
|
| 529 |
+
<div id="sidebar" class="sidebar">
|
| 530 |
+
<a href="javascript:void(0)" class="closebtn" onclick="closeSidebar()">×</a>
|
| 531 |
+
<ul class="sidebar-links">
|
| 532 |
+
<li><a href="#" onclick="setPage('tifinagh'); closeSidebar();">تعلم الحروف</a></li>
|
| 533 |
+
<li><a href="#" onclick="setPage('numbers'); closeSidebar();">تعلم الأرقام</a></li>
|
| 534 |
+
<li><a href="#" onclick="setPage('animals'); closeSidebar();">الحيوانات</a></li>
|
| 535 |
+
<li><a href="#" onclick="setPage('schoolSupplies'); closeSidebar();">أدوات مدرسية</a></li>
|
| 536 |
+
<li><a href="#" onclick="setPage('colors'); closeSidebar();">الألوان</a></li>
|
| 537 |
+
<li><a href="#" onclick="setPage('family'); closeSidebar();">العائلة</a></li>
|
| 538 |
+
<li><a href="#" onclick="setPage('bodyParts'); closeSidebar();">أجزاء الجسم</a></li>
|
| 539 |
+
<li><a href="#" onclick="setPage('seasons'); closeSidebar();">فصول السنة</a></li>
|
| 540 |
+
<li><a href="#" onclick="setPage('fruits'); closeSidebar();">الفواكه</a></li>
|
| 541 |
+
<li><a href="#" onclick="setPage('vegetables'); closeSidebar();">الخضروات</a></li>
|
| 542 |
+
<li><a href="#" onclick="setPage('months'); closeSidebar();">الشهور</a></li>
|
| 543 |
+
<li><a href="#" onclick="setPage('gameMenu'); closeSidebar();">ألعاب تعليمية</a></li>
|
| 544 |
+
</ul>
|
| 545 |
+
</div>
|
| 546 |
|
| 547 |
<audio id="sound-player" preload="auto"></audio>
|
| 548 |
<audio id="story-audio" controls style="display:none;"></audio>
|
|
|
|
| 833 |
}
|
| 834 |
|
| 835 |
function showMessage(htmlContent, duration = 2500) {
|
|
|
|
| 836 |
const msgBox = document.getElementById('message-box');
|
| 837 |
const msgContent = document.getElementById('message-content');
|
| 838 |
|
| 839 |
msgContent.innerHTML = htmlContent;
|
| 840 |
|
| 841 |
+
// Show message box
|
|
|
|
| 842 |
msgBox.style.display = 'block';
|
| 843 |
setTimeout(() => {
|
| 844 |
msgBox.classList.add('visible');
|
| 845 |
}, 10);
|
| 846 |
|
| 847 |
+
// Hide message box after duration
|
| 848 |
setTimeout(() => {
|
| 849 |
msgBox.classList.remove('visible');
|
|
|
|
| 850 |
setTimeout(() => {
|
| 851 |
msgBox.style.display = 'none';
|
| 852 |
}, 500); // 500ms transition duration
|
|
|
|
| 870 |
renderPage();
|
| 871 |
}
|
| 872 |
|
| 873 |
+
// Sidebar functions
|
| 874 |
+
function openSidebar() {
|
| 875 |
+
document.getElementById("sidebar").style.width = "250px";
|
| 876 |
+
}
|
| 877 |
+
|
| 878 |
+
function closeSidebar() {
|
| 879 |
+
document.getElementById("sidebar").style.width = "0";
|
| 880 |
+
}
|
| 881 |
+
|
| 882 |
function renderPage() {
|
| 883 |
const appContainer = document.getElementById('app-container');
|
| 884 |
appContainer.innerHTML = ''; // Clear previous content
|
|
|
|
| 929 |
header.className = 'header';
|
| 930 |
header.innerHTML = `
|
| 931 |
<div class="header-item">
|
| 932 |
+
<button class="text-white" onclick="openSidebar()">
|
| 933 |
+
<svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 text-white" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
| 934 |
+
<path stroke-linecap="round" stroke-linejoin="round" d="M4 6h16M4 12h16M4 18h16" />
|
| 935 |
</svg>
|
| 936 |
</button>
|
| 937 |
</div>
|
|
|
|
| 990 |
</a>
|
| 991 |
`;
|
| 992 |
container.appendChild(mainContent);
|
| 993 |
+
|
| 994 |
+
const bottomButtons = document.createElement('div');
|
| 995 |
+
bottomButtons.className = 'bottom-buttons';
|
| 996 |
+
bottomButtons.innerHTML = `
|
| 997 |
+
<div class="bottom-button" onclick="showDeveloperInfo()">حول المطور</div>
|
| 998 |
+
<div class="bottom-button" onclick="showFeedbackMessage()">رأيك يهمنا</div>
|
| 999 |
+
`;
|
| 1000 |
+
container.appendChild(bottomButtons);
|
| 1001 |
}
|
| 1002 |
|
| 1003 |
// Tifinagh Letters Page
|
|
|
|
| 1364 |
}
|
| 1365 |
}
|
| 1366 |
|
| 1367 |
+
// About & Feedback functions
|
| 1368 |
+
function showFeedbackMessage() {
|
| 1369 |
+
showMessage('<div class="text-xl font-bold">شكراً لاهتمامك!</div><p>رأيك يهمنا لمساعدتنا في تحسين التطبيق.</p>', 4000);
|
| 1370 |
+
}
|
| 1371 |
+
|
| 1372 |
// Main app control
|
| 1373 |
function setPage(page) {
|
| 1374 |
currentPage = page;
|