Spaces:
Running
Running
Update index.html
Browse files- index.html +201 -378
index.html
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
|
| 2 |
<html lang="ar" dir="rtl">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
|
@@ -8,6 +8,7 @@
|
|
| 8 |
<link href="https://fonts.googleapis.com/css2?family=Cairo:wght@400;700;900&display=swap" rel="stylesheet">
|
| 9 |
<script>
|
| 10 |
tailwind.config = {
|
|
|
|
| 11 |
theme: {
|
| 12 |
extend: {
|
| 13 |
fontFamily: {
|
|
@@ -20,8 +21,12 @@
|
|
| 20 |
<style>
|
| 21 |
body {
|
| 22 |
font-family: 'Cairo', sans-serif;
|
| 23 |
-
background-color: #f3f4f6;
|
| 24 |
overflow-x: hidden;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
}
|
| 26 |
/* تحديد حاوية الهاتف المحمول */
|
| 27 |
#app-container {
|
|
@@ -30,6 +35,11 @@
|
|
| 30 |
box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
|
| 31 |
background-color: white;
|
| 32 |
position: relative;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
}
|
| 34 |
/* تأثيرات الأزرار والبطاقات */
|
| 35 |
.card-shadow {
|
|
@@ -106,7 +116,6 @@
|
|
| 106 |
|
| 107 |
const renderIcon = (name, classes = 'w-6 h-6', strokeWidth = 2) => {
|
| 108 |
const IconRenderer = ICONS[name];
|
| 109 |
-
// استخدم أيقونة 'Info' كبديل إذا لم يتم العثور على الأيقونة المطلوبة
|
| 110 |
const finalIconName = IconRenderer ? name : 'Info';
|
| 111 |
const finalRenderer = ICONS[finalIconName];
|
| 112 |
if (!finalRenderer) return '';
|
|
@@ -121,338 +130,84 @@
|
|
| 121 |
const APP_NAME = "Tifawin";
|
| 122 |
const APP_NAME_LETTERS = "TIMMUZIT";
|
| 123 |
|
| 124 |
-
// ***
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 126 |
const tifinaghData = [
|
| 127 |
{ letter: 'ⴰ', word_tifinagh: '', word_arabic: 'جدار-ⴰⴳⴰⴷⵉⵔ', image: 'images/2947c16d27f8042f7d60783c6808519a.jpg', audio: 'audio/aman.mp3' },
|
| 128 |
{ letter: 'ⴱ', word_tifinagh: '', word_arabic: 'فراشة-ⵉⴱⵔⴱⵉⵍⵍⵓ', image: 'images/3fd6beebd231e2f325469a40b0831b59.jpg', audio: 'audio/barbi.mp3' },
|
| 129 |
{ letter: 'ⴳ', word_tifinagh: '', word_arabic: 'دخان-ⴰⴳⴳⵓ', image: 'images/c0094eb5dcc49d7cce573d42f270d8de.jpg', audio: 'audio/ca.mp3' },
|
| 130 |
-
|
| 131 |
-
{ letter: 'ⴷ', word_tifinagh: '', word_arabic: 'دنيا-ⴷⴷⵓⵏⵉⵜ', image: 'images/3d018275c7d6ce027b469500fa38c4e2.jpg', audio: 'audio/dad.mp3' },
|
| 132 |
-
{ letter: 'ⴹ', word_tifinagh: ' ', word_arabic: 'عنب-ⴰⴹⵉⵍ', image: 'images/1987ab2c045824929e7b8e5004f1c503.jpg', audio: 'audio/ema.mp3' },
|
| 133 |
-
{ letter: 'ⴼ', word_tifinagh: ' ', word_arabic: 'نار-ⴰⴼⴰ', image: 'images/57f09f9ef64273601e9978752f9d44e5.jpg', audio: 'audio/ga.mp3' },
|
| 134 |
-
{ letter: 'ⴽ', word_tifinagh: ' ', word_arabic: 'كتكوت-ⴰⴽⵢⵢⴰⵡ', image: 'images/dc9bdbedd2a2298e920da349b066426b (1).jpg', audio: 'audio/ka.mp3' },
|
| 135 |
-
{ letter: 'ⴽⵯ', word_tifinagh: ' ', word_arabic: 'حليب-ⴰⴽⵯⴼⴰⵢ', image: 'images/fef0c339a43b6405e541d804f4ce93ef.jpg', audio: 'audio/kwa.mp3' },
|
| 136 |
-
{ letter: 'ⵀ', word_tifinagh: ' ', word_arabic: 'قلم حبر-ⴰⵖⴰⵏⵉⴱ', image: 'images/a7133e22fce83d3f189913eb36a4863d.jpg', audio: 'audio/ha.mp3' },
|
| 137 |
-
{ letter: 'ⵃ', word_tifinagh: ' ', word_arabic: 'حساء-ⵜⴰⵃⵔⵉⵔⵜ', image: 'images/e4186eff6f60254be5ca492e106eea6f.jpg', audio: 'audio/ha.mp3' },
|
| 138 |
-
{ letter: 'ⵄ', word_tifinagh: ' ', word_arabic: 'عجل-ⴰⵄⵍⵍⵓⵛ', image: 'images/13a993e73740f7a9e705f345c3f93e2b.jpg', audio: 'audio/al.mp3' },
|
| 139 |
-
{ letter: 'ⵅ', word_tifinagh: ' ', word_arabic: 'بيت-ⴰⵅⴰⵎ', image: 'images/ffe5482567dc035b488803f294448055.jpg', audio: 'audio/xan.mp3' },
|
| 140 |
-
{ letter: 'ⵇ', word_tifinagh: ' ', word_arabic: 'نقود-ⵉⵇⵇⴰⵕⵉⴹⵏ', image: 'images/3937cfd05c2fd4fe306dc6475408a28.jpg', audio: 'audio/qa.mp3' },
|
| 141 |
-
{ letter: 'ⵉ', word_tifinagh: ' ', word_arabic: 'ذبابة-ⵉⵣⵉ', image: 'images/d2e56baa73bac789347ab58837405c1b.jpg', audio: 'audio/kwa.mp3' },
|
| 142 |
-
{ letter: 'ⵊ', word_tifinagh: ' ', word_arabic: 'مرحاض-ⴰⵊⵎⵉⵔ', image: 'images/87fc31c080560115c848f3fc59aeb0ec.jpg', audio: 'audio/jan.mp3' },
|
| 143 |
-
{ letter: 'ⵍ', word_tifinagh: ' ', word_arabic: 'ابيض-ⴰⵎⵍⵍⴰⵍ', image: 'images/4da7f34849bab634d5bc9da642d921dd.jpg', audio: 'audio/la.mp3' },
|
| 144 |
-
{ letter: 'ⵎ', word_tifinagh: ' ', word_arabic: 'ظل-ⴰⵎⴰⵍⵓ', image: 'images/96ec7f619eac1d671f711f1a5855d61c.jpg', audio: 'audio/ma.mp3' },
|
| 145 |
-
{ letter: 'ⵏ', word_tifinagh: ' ', word_arabic: 'ماء-ⴰⵎⴰⵏ', image: 'images/97851b13e7689bf137356b60fcc29d67.jpg', audio: 'audio/na.mp3' },
|
| 146 |
-
{ letter: 'ⵓ', word_tifinagh: ' ', word_arabic: 'سلحفاة-ⴱⵓⵜⴳⵔⴰ', image: 'images/69ef8ef015eaee077cb590f45fa79f3d.jpg', audio: 'audio/al.mp3' },
|
| 147 |
-
{ letter: 'ⵔ', word_tifinagh: ' ', word_arabic: 'رئتين-ⵜⵓⵔⵉⵏ', image: 'images/9c3df931d662394dbc92449e50bf9802.jpg', audio: 'audio/ra.mp3' },
|
| 148 |
-
{ letter: 'ⵕ', word_tifinagh: ' ', word_arabic: 'جمل-ⴰⵕⴰⵎ', image: 'images/897c6933dd87410c603aae4c04feb091.jpg', audio: 'audio/rra.mp3' },
|
| 149 |
-
{ letter: 'ⵖ', word_tifinagh: ' ', word_arabic: 'خبز-ⴰⵖⵔⵓⵎ', image: 'images/d7788b29c0e24294a988025ce59c223b.jpg', audio: 'audio/sa.mp3' },
|
| 150 |
-
{ letter: 'ⵙ', word_tifinagh: ' ', word_arabic: 'نهر-ⴰⵙⵉⴼ', image: 'images/b667b3694ce3b78b704eef70bc5a084e.jpg', audio: 'audio/ssa.mp3' },
|
| 151 |
-
{ letter: 'ⵚ', word_tifinagh: ' ', word_arabic: 'ممحاة-ⵜⴰⵚⴼⴼⴰⴹⵜ', image: 'images/7e14a7de1120f8e85d606ea6489aba02.jpg', audio: 'audio/ta.mp3' },
|
| 152 |
-
{ letter: 'ⵛ', word_tifinagh: ' ', word_arabic: 'قط-ⴰⵎⵓⵛⵛ', image: 'images/cat.jpeg', audio: 'audio/tca.mp3' },
|
| 153 |
-
{ letter: 'ⵜ', word_tifinagh: ' ', word_arabic: 'بنت-ⵜⴰⵔⴱⴰⵜ', image: 'images/fe80c64129f875b8fe0cc0ab81a36274.jpg', audio: 'audio/tza.mp3' },
|
| 154 |
-
{ letter: 'ⵟ', word_tifinagh: ' ', word_arabic: 'امرأة-ⵜⴰⵎⵟⵟⵓⴹⵜ', image: 'images/18ba9148bea2d0c08b4eb17fa5bb4191.jpg', audio: 'audio/tza.mp3' },
|
| 155 |
-
{ letter: 'ⵡ', word_tifinagh: ' ', word_arabic: 'اصفر-ⴰⵡⵔⴰⵖ', image: 'images/7003fb876f05322043f933e3aa69b4b2.jpg', audio: 'audio/wa.mp3' },
|
| 156 |
-
{ letter: 'ⵢ', word_tifinagh: ' ', word_arabic: 'قمر-ⴰⵢⵢⵓⵔ', image: 'images/d6fff0c6ae47f7a1975b0552f9a27ea3.jpg', audio: 'audio/ya.mp3' },
|
| 157 |
-
{ letter: 'ⵣ', word_tifinagh: ' ', word_arabic: 'أسد-ⵉⵣⵎ', image: 'images/16ed553e1340aff9c328037809f77630.jpg', audio: 'audio/za.mp3' },
|
| 158 |
-
{ letter: 'ⵥ', word_tifinagh: ' ', word_arabic: 'بصل-ⴰⵥⴰⵍⵉⵎ', image: 'images/65b06b2cc59501fde624f2791ed29b7f.jpg', audio: 'audio/zza.mp3' },
|
| 159 |
];
|
| 160 |
|
| 161 |
const animalsData = [
|
| 162 |
{ word_tifinagh: 'ⴰⵎⵓⵛⵛ', word_arabic: 'قط ', image: 'images/cat.jpeg', audio: 'audio/animaux.ogg' },
|
| 163 |
{ word_tifinagh: 'ⴰⵢⴷⵉ', word_arabic: 'كلب', image: 'images/124419894dcfde81ffbca1e072804c71.jpg', audio: 'audio/dog.mp3' },
|
| 164 |
-
|
| 165 |
-
{ word_tifinagh: 'ⵉⵍⵡ', word_arabic: 'فيل', image: 'images/9effc4c9c62ffca84b93c65bc298836f.jpg', audio: 'audio/elephant.mp3' },
|
| 166 |
-
{ word_tifinagh: 'ⴰⴱⴰⵖⵓⵙ', word_arabic: 'قرد', image: 'images/bd76426bddeb01a4d10e00630ecf1af4.jpg', audio: 'audio/monkey.mp3' },
|
| 167 |
-
{ word_tifinagh: 'ⵜⴰⵥⵏⴽⵯⴹⵜ', word_arabic: 'غزالة', image: 'images/962d3b8c713deb410ee5b8b50e4bd717.jpg', audio: 'audio/giraffe.mp3' },
|
| 168 |
-
{ word_tifinagh: 'ⴰⴽⵙⵉⵍ', word_arabic: 'نمر', image: 'images/aafe42802b757cd64eacd46369c434e7.jpg', audio: 'audio/tiger.mp3' },
|
| 169 |
-
{ word_tifinagh: 'ⴰⴱⵓⴱⴱⴰⵣ', word_arabic: 'دب', image: 'images/5b8ac2e52472946d311318ef526b6beb.jpg', audio: 'audio/bear.mp3' },
|
| 170 |
-
{ word_tifinagh: 'ⵜⴰⵙⵍⵎⵜ', word_arabic: 'سمكة', image: 'images/da8aec162d9a6d5d9fe43a74275ee101.jpg', audio: 'audio/fish.mp3' },
|
| 171 |
-
{ word_tifinagh: 'ⵜⴰⵜⴱⵉⵔⵜ', word_arabic: 'حمامة', image: 'images/a84e9e05df41e5e0b719516010e98a4b.jpg', audio: 'audio/bird.mp3' },
|
| 172 |
-
{ word_tifinagh: 'ⴰⵇⵏⵏⵉⵏ', word_arabic: 'أرنب', image: 'images/a63049990b70e79ff55923e73c7e238e.jpg', audio: 'audio/rabbit.mp3' },
|
| 173 |
-
{ word_tifinagh: 'ⴰⵖⴰⴹ', word_arabic: 'ماعز', image: 'images/e2c175ddc37997fd99ad5287e50e5377.jpg', audio: 'audio/sheep.mp3' },
|
| 174 |
-
{ word_tifinagh: 'ⵉⵢⵢⵉⵙ', word_arabic: 'حصان', image: 'images/c7b9740d4a6a0a8b6a13f7f7b317af0d.jpg', audio: 'audio/horse.mp3' },
|
| 175 |
-
{ word_tifinagh: 'ⴱⵓⵜⴳⵔⴰ', word_arabic: 'سلحفاة', image: 'images/69ef8ef015eaee077cb590f45fa79f3d.jpg', audio: 'audio/fox.mp3' },
|
| 176 |
-
{ word_tifinagh: 'ⵜⴰⵡⵡⵓⴽⵜ', word_arabic: 'بومة', image: 'images/b9b6d56ad9077190a9923a63bd78d8bc.jpg', audio: 'audio/owl.mp3' },
|
| 177 |
-
{ word_tifinagh: 'ⵓⵛⵛⵏ', word_arabic: 'ذئب', image: 'images/2241ff059ca5b87903f61f336a4aa430.jpg', audio: 'audio/wolf.mp3' },
|
| 178 |
-
{ word_tifinagh: 'ⵜⴰⴼⵓⵍⵍⵓⵙⵜ ⵏ ⵡⴰⵎⴰⵏ ', word_arabic: 'بطة', image: 'images/c93987d8f7f0baf0d29f9c20c83c97e3.jpg', audio: 'audio/duck.mp3' },
|
| 179 |
-
{ word_tifinagh: 'ⴰⵎⴷⵖ', word_arabic: 'زرافة', image: 'images/c0cc7605f98169dfc456eb36d3a0582a.jpg', audio: 'audio/deer.mp3' },
|
| 180 |
-
{ word_tifinagh: 'ⴰⵍⵖⵎ', word_arabic: 'جمل', image: 'images/897c6933dd87410c603aae4c04feb091.jpg', audio: 'audio/camel.mp3' },
|
| 181 |
-
{ word_tifinagh: 'ⵉⴱⵔⴱⵉⵍⵍⵓ', word_arabic: 'فراشة', image: 'images/3fd6beebd231e2f325469a40b0831b59.jpg', audio: 'audio/butterfly.mp3' }
|
| 182 |
];
|
| 183 |
|
| 184 |
const numbersData = [
|
| 185 |
{ number: '0', word_tifinagh: 'ⴰⵎⵢⴰ', word_arabic: 'صفر ', image: 'images/d3a43a956f3129b847739dec5f10c81f.jpg', audio: 'audio/one.mp3' },
|
| 186 |
{ number: '1', word_tifinagh: 'ⵢⴰⵏ ', word_arabic: ' واحد', image: 'images/b26681eaa5caacbf1c7bfb112f546def.jpg', audio: 'audio/one.mp3' },
|
| 187 |
-
|
| 188 |
-
{ number: '3', word_tifinagh: 'ⴽⵕⴰⴹ', word_arabic: 'ثلاثة', image: 'images/8baf8accac02f718e274f7f0efe8e208.jpg', audio: 'audio/three.mp3' },
|
| 189 |
-
{ number: '4', word_tifinagh: 'ⴽⴽⵓⵥ', word_arabic: 'أربعة', image: 'images/5af82e7a87c9d7d1a93173d953e2c033.jpg', audio: 'audio/four.mp3' },
|
| 190 |
-
{ number: '5', word_tifinagh: 'ⵙⵎⵎⵓⵙ', word_arabic: 'خمسة', image: 'images/569cc0c8af30f8116c776a21a230f9d0.jpg', audio: 'audio/five.mp3' },
|
| 191 |
-
{ number: '6', word_tifinagh: 'ⵙⴹⵉⵚ', word_arabic: 'ستة', image: 'images/8b693928c5447c7381948bd23fa0a94c.jpg', audio: 'audio/six.mp3' },
|
| 192 |
-
{ number: '7', word_tifinagh: 'ⵙⴰ', word_arabic: 'سبعة', image: 'images/17a897f15be1f2e5976f0eb51f4cdbc8.jpg', audio: 'audio/seven.mp3' },
|
| 193 |
-
{ number: '8', word_tifinagh: 'ⵜⴰⵎ', word_arabic: 'ثمانية', image: 'images/bbf58163e3765676d6dadffbc94dd6fb.jpg', audio: 'audio/eight.mp3' },
|
| 194 |
-
{ number: '9', word_tifinagh: 'ⵜⵥⴰ', word_arabic: 'تسعة', image: 'images/83e98be29b454d400cc1c78160a51207.jpg', audio: 'audio/nine.mp3' },
|
| 195 |
-
{ number: '10', word_tifinagh: 'ⵎⵔⴰⵡ', word_arabic: 'عشرة', image: 'images/a1b9f28aa43bda697d0bff6ae52bc06c.jpg', audio: 'audio/ten.mp3' },
|
| 196 |
-
{ number: '11', word_tifinagh: 'ⵢⴰⵏ ⴷ ⵎⵔⴰⵡ', word_arabic: 'أحد عشر', image: 'images/d4ef0ea2c17f056b7c67aa6553b27199.jpg', audio: 'audio/eleven.mp3' },
|
| 197 |
-
{ number: '12', word_tifinagh: 'ⵙⵉⵏ ⴷ ⵎⵔⴰⵡ', word_arabic: 'اثنا عشر', image: 'images/799c20391c8da09c7d215758ab073e37.jpg', audio: 'audio/twelve.mp3' },
|
| 198 |
-
{ number: '13', word_tifinagh: 'ⴽⵕⴰⴹ ⴷ ⵎⵔⴰⵡ', word_arabic: 'ثلاثة عشر', image: 'images/6e399d0a8789755580e42baab5dc139c.jpg', audio: 'audio/thirteen.mp3' },
|
| 199 |
-
{ number: '14', word_tifinagh: 'ⴽⴽⵓⵥ ⴷ ⵎⵔⴰⵡ', word_arabic: 'أربعة عشر', image: 'images/d343262b3b9442fcc9762211933606cc.jpg', audio: 'audio/fourteen.mp3' },
|
| 200 |
-
{ number: '15', word_tifinagh: 'ⵙⵎⵎⵓⵙ ⴷ ⵎⵔⴰⵡ', word_arabic: 'خمسة عشر', image: 'images/c15420b455196337d1bb3262c76e0205.jpg', audio: 'audio/fifteen.mp3' },
|
| 201 |
-
{ number: '16', word_tifinagh: 'ⵙⴹⵉⵚ ⴷ ⵎⵔⴰⵡ', word_arabic: 'ستة عشر', image: 'images/f78e9d858b7d623189b5c92069e1bed6.jpg', audio: 'audio/sixteen.mp3' },
|
| 202 |
-
{ number: '17', word_tifinagh: 'ⵙⴰ ⴷ ⵎⵔⴰⵡ', word_arabic: 'سبعة عشر', image: 'images/59521d81566c71406f14deae2109e398.jpg', audio: 'audio/seventeen.mp3' },
|
| 203 |
-
{ number: '18', word_tifinagh: 'ⵜⴰⵎ ⴷ ⵎⵔⴰⵡ', word_arabic: 'ثمانية عشر', image: 'images/941eca2038794392f5068e4ad4c26968 (1).jpg', audio: 'audio/eighteen.mp3' },
|
| 204 |
-
{ number: '19', word_tifinagh: 'ⵜⵥⴰ ⴷ ⵎⵔⴰⵡ', word_arabic: 'تسعة عشر', image: 'images/a45794b6674c50601ed941cf1779e659.jpg', audio: 'audio/nineteen.mp3' },
|
| 205 |
-
{ number: '20', word_tifinagh: 'ⵙⵉⵎⵔⴰⵡ', word_arabic: 'عشرون', image: 'images/e6129621d08c4d9d1d4ea409c25da4d0.jpg', audio: 'audio/twenty.mp3' },
|
| 206 |
-
{ number: '30', word_tifinagh: 'ⴽⵕⴰⵎⵔⴰⵡ', word_arabic: 'ثلاثون', image: 'images/b36ee0ac2527f343cdc6901178d13f79.jpg', audio: 'audio/thirty.mp3' },
|
| 207 |
-
{ number: '40', word_tifinagh: 'ⴽⴽⵓⵥⵎⵔⴰⵡ', word_arabic: 'أربعون', image: 'images/0654ca9081b2713cfc7bbffeac57bbe0.jpg', audio: 'audio/forty.mp3' },
|
| 208 |
-
{ number: '50', word_tifinagh: 'ⵙⵎⵎⵓⵎⵔⴰⵡ', word_arabic: 'خمسون', image: 'images/3164ba91b5bb3ff493744e6c818a16d0.jpg', audio: 'audio/fifty.mp3' },
|
| 209 |
-
{ number: '60', word_tifinagh: 'ⵚⴹⵉⵎⵔⴰⵡ', word_arabic: 'ستون', image: 'images/2246588b5c3c296bd437d680aba2215e.jpg', audio: 'audio/sixty.mp3' },
|
| 210 |
-
{ number: '70', word_tifinagh: 'ⵙⴰⵎⵔⴰⵡ', word_arabic: 'سبعون', image: 'images/99888182607727f778a54d7928e6c9da.jpg', audio: 'audio/seventy.mp3' },
|
| 211 |
-
{ number: '80', word_tifinagh: 'ⵜⴰⵎⵔⴰⵡ', word_arabic: 'ثمانون', image: 'images/06712963a5e7ec91b2a92f6e784f497f.jpg', audio: 'audio/eighty.mp3' },
|
| 212 |
-
{ number: '90', word_tifinagh: 'ⵜⵥⴰⵎⵔⴰⵡ', word_arabic: 'تسعون', image: 'images/200b2d90f616135b9a370edc61a6352d.jpg', audio: 'audio/ninety.mp3' },
|
| 213 |
-
{ number: '100', word_tifinagh: 'ⵜⵉⵎⵉⴹⵉ', word_arabic: 'مئة', image: 'images/6c0d711f25cf417970f12ec5547e6b53.jpg', audio: 'audio/one_hundred.mp3' },
|
| 214 |
-
];
|
| 215 |
-
const schoolSuppliesData = [
|
| 216 |
-
{ word_tifinagh: 'ⴰⴽⵕⵕⴰⵊ', word_arabic: 'قلم رصاص', image: 'images/37b71533177feb9d55d55efba947309e.jpg', audio: 'audio/schoolSupplies/pencil.mp3' },
|
| 217 |
-
{ word_tifinagh: 'ⴰⴷⴰⵍⵉⵙ', word_arabic: 'كتاب', image: 'images/4613832c5e65f89f5fea2371511dc024.jpg', audio: 'audio/schoolSupplies/book.mp3' },
|
| 218 |
-
{ word_tifinagh: 'ⵜⴰⵚⴼⴼⴰⴹⵜ', word_arabic: 'ممحاة', image: 'images/7e14a7de1120f8e85d606ea6489aba02.jpg', audio: 'audio/schoolSupplies/eraser.mp3' },
|
| 219 |
-
{ word_tifinagh: 'ⵜⴰⵖⴷⴰ', word_arabic: 'مسطرة', image: 'images/0e25f9cd6cb664dd942d359be7379b23.jpg', audio: 'audio/schoolSupplies/ruler.mp3' },
|
| 220 |
-
{ word_tifinagh: 'ⵜⴰⵛⵛⴽⴰⵔⵜ', word_arabic: 'حقيبة مدرسية', image: 'images/78dc308787867b8b0f838432ce879c77.jpg' , audio: 'audio/schoolSupplies/backpack.mp3' },
|
| 221 |
-
{ word_tifinagh: 'ⴰⵖⴰⵏⵉⴱ', word_arabic: 'قلم حبر', image: 'images/a7133e22fce83d3f189913eb36a4863d.jpg', audio: 'audio/schoolSupplies/pen.mp3' },
|
| 222 |
-
{ word_tifinagh: 'ⴰⵍⵓⴳ', word_arabic: 'دفتر', image: 'images/659eeba362a0c08c9131898eb50edd63.jpg', audio: 'audio/schoolSupplies/notebook.mp3' },
|
| 223 |
-
{ word_tifinagh: 'ⴰⴽⵕⵕⴰⵊ ⵏ ⵉⴽⵯⵍⴰⵏ', word_arabic: ' قلم ملون', image: 'images/16c20ce7b3ece3be5598be8220068c4d.jpg', audio: 'audio/schoolSupplies/colors.mp3' },
|
| 224 |
-
{ word_tifinagh: 'ⵜⴰⴱⴰⵏⴽⴰ', word_arabic: 'وزرة', image: 'images/1508501ee0b685b27a2467a844c2e8a2.jpg', audio: 'audio/schoolSupplies/scissors.mp3' },
|
| 225 |
-
{ word_tifinagh: 'ⵜⴰⵙⵔⵔⴰⵎⵜ', word_arabic: 'منجرة', image: 'images/25497c99aec49793974fcd280a4eafc4.jpg', audio: 'audio/schoolSupplies/glue.mp3' }
|
| 226 |
-
];
|
| 227 |
-
const seasonsData = [
|
| 228 |
-
{ word_tifinagh: 'ⵜⴰⴳⵔⵙⵜ', word_arabic: 'الشتاء', image: 'images/b2d331ea13a2df600219904dabd028fa.jpg', audio: 'audio/AUD-20250926-WA0003.opus' },
|
| 229 |
-
{ word_tifinagh: 'ⵜⴰⴼⵙⵓⵜ', word_arabic: 'الربيع', image: 'images/01c3ea6f3c60d364b38f26394e166bd1.jpg', audio: 'audio/AUD-20250926-WA0002.opus' },
|
| 230 |
-
{ word_tifinagh: 'ⴰⵏⴱⴷⵓ', word_arabic: 'الصيف', image: 'images/6da33d4175e50b17309485c8b33cfe0e.jpg', audio: 'audio/AUD-20250926-WA0001.opus' },
|
| 231 |
-
{ word_tifinagh: 'ⴰⵎⴰⵡⴰⵏ', word_arabic: 'الخريف', image: 'images/e6c5c6a800de512091faa20db36472f8.jpg', audio: 'audio/AUD-20250926-WA0000.opus' }
|
| 232 |
-
];
|
| 233 |
-
|
| 234 |
-
const fruitsData = [
|
| 235 |
-
{ word_tifinagh: 'ⵜⴰⴷⴼⴼⵓⵢⵜ', word_arabic: 'تفاحة', image: 'images/da1da4f2015a32322f547ae5fff5236c.jpg', audio: 'audio/fruits/apple.mp3' },
|
| 236 |
-
{ word_tifinagh: 'ⵜⴰⴱⴰⵏⴰⵏⵜ', word_arabic: 'موزة', image: 'images/11bde7577165c2edef985a3cbd9458ae.jpg', audio: 'audio/fruits/banana.mp3' },
|
| 237 |
-
{ word_tifinagh: 'ⵍⵍⵜⵛⵉⵏ', word_arabic: 'برتقال', image: 'images/1efc88aa2e2e9bb97af6b059a4c05b91.jpg', audio: 'audio/fruits/orange.mp3' },
|
| 238 |
-
{ word_tifinagh: 'ⵜⵉⵣⵡⵍⵜ', word_arabic: 'فراولة', image: 'images/f70521a26fbd3b91b349493081eb3b88.jpg', audio: 'audio/fruits/strawberry.mp3' },
|
| 239 |
-
{ word_tifinagh: 'ⴰⴹⵉⵍ', word_arabic: 'عنب', image: 'images/1987ab2c045824929e7b8e5004f1c503.jpg', audio: 'audio/fruits/grapes.mp3' },
|
| 240 |
-
{ word_tifinagh: 'ⵕⵕⵎⵎⴰⵏ', word_arabic: 'رمان', image: 'images/bf6a38717ec00ddb8394f5c7acab308e.jpg', audio: 'audio/fruits/pomegranate.mp3' },
|
| 241 |
-
{ word_tifinagh: 'ⵜⴰⴷⴷⵍⵍⴰⵃⵜ', word_arabic: 'بطيخ', image: 'images/ae716e7b0b1009b29d2c0924aaa1cc15.jpg', audio: 'audio/fruits/watermelon.mp3' },
|
| 242 |
-
{ word_tifinagh: 'ⴰⵎⴰⵏ', word_arabic: 'مانجو', image: 'images/afc84d4cffcfca39b86fc288758a65d9.jpg', audio: 'audio/fruits/mango.mp3' },
|
| 243 |
-
{ word_tifinagh: 'ⴰⵏⴰⵏⴰⵚ', word_arabic: 'أناناس', image: 'images/e5a0d8fef5139197856d36bac0810210.jpg', audio: 'audio/fruits/pineapple.mp3' },
|
| 244 |
-
{ word_tifinagh: 'ⴰⵙⵎⵎⴰⵎ', word_arabic: 'ليمون', image: 'images/3b19dbd8568f84de61fefc4d8f729e31.jpg', audio: 'audio/fruits/lemon.mp3' }
|
| 245 |
-
];
|
| 246 |
-
|
| 247 |
-
const vegetablesData = [
|
| 248 |
-
{ word_tifinagh: 'ⵜⴰⵎⴰⵟⵉⵛⵜ', word_arabic: 'طماطم', image: 'images/6056d9839a962b5a78cddc402ef88c09.jpg', audio: 'audio/vegetables/tomato.mp3' },
|
| 249 |
-
{ word_tifinagh: 'ⴰⵖⵙⵙⵉⵎ', word_arabic: 'خيار', image: 'images/c4267923b02091ba31923b94d5b81832.jpg', audio: 'audio/vegetables/cucumber.mp3' },
|
| 250 |
-
{ word_tifinagh: 'ⵜⴰⵅⵉⵣⵣⵓⵜ', word_arabic: 'جزرة', image: 'images/f2c660e1af2eb42e0b2455bea8d476b5.jpg', audio: 'audio/vegetables/carrot.mp3' },
|
| 251 |
-
{ word_tifinagh: 'ⴰⵥⴰⵍⵉⵎ', word_arabic: 'بصل', image: 'images/a1eca20822f37cef8dab2fa4feec8272.jpg', audio: 'audio/vegetables/onion.mp3' },
|
| 252 |
-
{ word_tifinagh: 'ⵜⵉⵙⴽⵔⵜ', word_arabic: 'ثوم', image: 'images/88f83b4f34ca0aaa254aaf0eae8ee2ac.jpg', audio: 'audio/vegetables/garlic.mp3' },
|
| 253 |
-
{ word_tifinagh: 'ⵉⴼⵉⴼⵍ', word_arabic: 'فلفل', image: 'images/44cbf575ceebda24dbb9fb28a2825744.jpg', audio: 'audio/vegetables/pepper.mp3' },
|
| 254 |
-
{ word_tifinagh: 'ⵜⴰⵍⵍⵓⵖⴷⴰ', word_arabic: 'بطاطس', image: 'images/7b78e64a70a785fe35d853fb1568578a.jpg', audio: 'audio/vegetables/potato.mp3' },
|
| 255 |
-
{ word_tifinagh: 'ⵜⴰⵎⴰⴼⴰⵔⵜ', word_arabic: 'خس', image: 'images/ef2153019a5f74807dfbab7194519d1e.jpg', audio: 'audio/vegetables/lettuce.mp3' },
|
| 256 |
-
{ word_tifinagh: 'ⴱⵉⵟⵍⵊⴰⵏ', word_arabic: 'باذنجان', image: 'images/8f6a4542ebff0636e7926478d32a9bbd.jpg', audio: 'audio/vegetables/eggplant.mp3' },
|
| 257 |
-
{ word_tifinagh: 'ⵜⵉⵇⵇⵙⵜ', word_arabic: ' فلفل حار', image: 'images/af35c440654de65e700818c36ef11dc9.jpg', audio: 'audio/vegetables/cauliflower.mp3' }
|
| 258 |
-
];
|
| 259 |
-
|
| 260 |
-
const monthsData = [
|
| 261 |
-
{ word_tifinagh: 'ⵉⵏⵏⴰⵢⵔ', word_arabic: 'يناير', image: 'images/b26681eaa5caacbf1c7bfb112f546def.jpg', audio: 'audio/months/january.mp3' },
|
| 262 |
-
{ word_tifinagh: 'ⴱⵕⴰⵢⵕ', word_arabic: 'فبراير', image: 'images/c391d2e8b5081720ab58b167d96abd50.jpg', audio: 'audio/months/february.mp3' },
|
| 263 |
-
{ word_tifinagh: 'ⵎⴰⵕⵚ', word_arabic: 'مارس', image: 'images/8baf8accac02f718e274f7f0efe8e208.jpg', audio: 'audio/months/march.mp3' },
|
| 264 |
-
{ word_tifinagh: 'ⵉⴱⵔⵉⵔ', word_arabic: 'أبريل', image: 'images/5af82e7a87c9d7d1a93173d953e2c033.jpg', audio: 'audio/months/april.mp3' },
|
| 265 |
-
{ word_tifinagh: 'ⵎⴰⵢⵢⵓ', word_arabic: 'ماي', image: 'images/569cc0c8af30f8116c776a21a230f9d0.jpg', audio: 'audio/months/may.mp3' },
|
| 266 |
-
{ word_tifinagh: 'ⵢⵓⵏⵢⵓ', word_arabic: 'يونيو', image: 'images/8b693928c5447c7381948bd23fa0a94c.jpg', audio: 'audio/months/june.mp3' },
|
| 267 |
-
{ word_tifinagh: 'ⵢⵓⵍⵢⵓⵣ', word_arabic: 'يوليوز', image: 'images/17a897f15be1f2e5976f0eb51f4cdbc8.jpg', audio: 'audio/months/july.mp3' },
|
| 268 |
-
{ word_tifinagh: 'ⵖⵓⵛⵜ', word_arabic: 'غشت', image: 'images/bbf58163e3765676d6dadffbc94dd6fb.jpg', audio: 'audio/months/august.mp3' },
|
| 269 |
-
{ word_tifinagh: 'ⵛⵓⵜⴰⵏⴱⵔ', word_arabic: ' شتنبر', image: 'images/83e98be29b454d400cc1c78160a51207.jpg', audio: 'audio/months/september.mp3' },
|
| 270 |
-
{ word_tifinagh: 'ⴽⵜⵓⴱⵔ', word_arabic: 'أكتوبر', image: 'images/a1b9f28aa43bda697d0bff6ae52bc06c.jpg', audio: 'audio/months/october.mp3' },
|
| 271 |
-
{ word_tifinagh: 'ⵏⵓⵡⴰⵏⴱⵉⵔ', word_arabic: 'نونبر', image: 'images/d4ef0ea2c17f056b7c67aa6553b27199.jpg', audio: 'audio/months/november.mp3' },
|
| 272 |
-
{ word_tifinagh: 'ⴷⵓⵊⴰⵏⴱⵉⵔ', word_arabic: 'دجنبر', image: 'images/799c20391c8da09c7d215758ab073e37.jpg', audio: 'audio/months/december.mp3' }
|
| 273 |
-
];
|
| 274 |
-
const daysData = [
|
| 275 |
-
{ word_tifinagh: 'ⴰⵢⵏⴰⵙ', word_arabic: 'الاثنين', image: 'images/37b71533177feb9d55d55efba947309e.jpg', audio: 'audio/days/monday.mp3' },
|
| 276 |
-
{ word_tifinagh: 'ⴰⵙⵉⵏⴰⵙ', word_arabic: 'الثلاثاء', image: 'images/37b71533177feb9d55d55efba947309e.jpg', audio: 'audio/days/tuesday.mp3' },
|
| 277 |
-
{ word_tifinagh: 'ⴰⴽⵕⴰⵙ', word_arabic: 'الأربعاء', image: 'images/37b71533177feb9d55d55efba947309e.jpg', audio: 'audio/days/wednesday.mp3' },
|
| 278 |
-
{ word_tifinagh: 'ⴰⴽⵡⴰⵙ', word_arabic: 'الخميس', image: 'images/37b71533177feb9d55d55efba947309e.jpg', audio: 'audio/days/thursday.mp3' },
|
| 279 |
-
{ word_tifinagh: 'ⴰⵙⵉⵎⵡⴰⵙ', word_arabic: 'الجمعة', image: 'images/37b71533177feb9d55d55efba947309e.jpg', audio: 'audio/days/friday.mp3' },
|
| 280 |
-
{ word_tifinagh: 'ⴰⵚⵉⴹⵢⴰⵙ', word_arabic: 'السبت', image: 'images/37b71533177feb9d55d55efba947309e.jpg', audio: 'audio/days/saturday.mp3' },
|
| 281 |
-
{ word_tifinagh: 'ⴰⵙⴰⵎⴰⵙ', word_arabic: 'الأحد', image: 'images/37b71533177feb9d55d55efba947309e.jpg', audio: 'audio/days/sunday.mp3' }
|
| 282 |
-
];
|
| 283 |
-
|
| 284 |
-
const familyData = [
|
| 285 |
-
{ word_tifinagh: 'ⵉⵎⵎⵉ', word_arabic: 'أمي', image: 'images/5957c378462b920ceb24f6aa294b5100.jpg', audio: 'audio/family/mother.mp3' },
|
| 286 |
-
{ word_tifinagh: 'ⴱⴰⴱⴰ', word_arabic: 'أبي', image: 'images/6b957498ddc6e49e618e91f7c5ce0134.jpg', audio: 'audio/family/father.mp3' },
|
| 287 |
-
{ word_tifinagh: 'ⴳⵯⵎⴰ', word_arabic: 'أخي', image: 'images/8ae84a445390bd1695791a7721b2ebc0.jpg', audio: 'audio/family/brother.mp3' },
|
| 288 |
-
{ word_tifinagh: 'ⵓⵍⵜⵎⴰ', word_arabic: 'أختي', image: 'images/d959a12a45c2469850c44afd379b82f8.jpg', audio: 'audio/family/sister.mp3' },
|
| 289 |
-
{ word_tifinagh: 'ⴱⴰⴱⴰ ⴰⵎⵇⵇⵕⴰⵏ', word_arabic: 'جدي', image: 'images/dc84969949644c410732c57215bcaa8e.jpg', audio: 'audio/family/grandfather.mp3' },
|
| 290 |
-
{ word_tifinagh: 'ⵉⵎⵎⴰ ⵜⴰⵎⵇⵕⴰⵏⵜ', word_arabic: 'جدتي', image: 'images/2bd2ccddaf31840edde5eab74b1a25ee.jpg', audio: 'audio/family/grandmother.mp3' },
|
| 291 |
-
{ word_tifinagh: 'ⴷⴰⴷⴷⴰ', word_arabic: 'عمي', image: 'images/036bd0ed2c2e2dd991eb3aff426e94fb.jpg', audio: 'audio/family/uncle.mp3' },
|
| 292 |
-
{ word_tifinagh: 'ⵜⴰⴱⴰ', word_arabic: 'عمتي', image: 'images/66abe3b026ff4c492fff8367587783bd.jpg', audio: 'audio/family/aunt.mp3' },
|
| 293 |
-
{ word_tifinagh: 'ⴰⵏⴰ', word_arabic: 'خالي', image: 'images/036bd0ed2c2e2dd991eb3aff426e94fb.jpg', audio: 'audio/family/uncle.mp3' },
|
| 294 |
-
{ word_tifinagh: 'ⵜⴰⵏⴰⵜ', word_arabic: 'خالتي', image: 'images/ff6b0dbc0e4f8d5f5df94c6df08f9c6a.jpg', audio: 'audio/family/aunt.mp3' },
|
| 295 |
-
];
|
| 296 |
-
|
| 297 |
-
const bodyPartsData = [
|
| 298 |
-
{ word_tifinagh: 'ⵉⵅⴼ', word_arabic: 'الرأس', image: 'images/33dda7fe89cfd5526918246dae320059.jpg', audio: 'audio/bodyParts/head.mp3' },
|
| 299 |
-
{ word_tifinagh: 'ⴰⴼⵓⵙ', word_arabic: 'اليد', image: 'images/44947c8bbf8665173c5d8836c65d6f7c.jpg', audio: 'audio/bodyParts/hand.mp3' },
|
| 300 |
-
{ word_tifinagh: 'ⴰⴹⴰⵔ', word_arabic: 'القدم', image: 'images/641424d996e86204d032d59a4ccc09a0.jpg', audio: 'audio/bodyParts/foot.mp3' },
|
| 301 |
-
{ word_tifinagh: 'ⵜⵉⵟ', word_arabic: 'العين', image: 'images/5e0b1a5ae043556912dec8e157f55b41.jpg', audio: 'audio/bodyParts/eye.mp3' },
|
| 302 |
-
{ word_tifinagh: 'ⵉⵏⵅⴰⵔ', word_arabic: 'الأنف', image: 'images/ef9066caba835568e19799f187bdae6a.jpg', audio: 'audio/bodyParts/nose.mp3' },
|
| 303 |
-
{ word_tifinagh: 'ⵉⵎⵉ', word_arabic: 'الفم', image: 'images/36ef29579225201947d3a6b0a0363dde.jpg', audio: 'audio/bodyParts/mouth.mp3' },
|
| 304 |
-
{ word_tifinagh: 'ⴰⵎⵣⵣⵓⵖ', word_arabic: 'الأذن', image: 'images/13bc14d834265bd33a1fad47ee638f66.jpg', audio: 'audio/bodyParts/ear.mp3' },
|
| 305 |
-
{ word_tifinagh: 'ⴰⵖⵔⵓⴹ', word_arabic: 'كتف', image: 'images/8e16145c86a1fe2b52740f204152b72f.jpg', audio: 'audio/bodyParts/arm.mp3' },
|
| 306 |
-
{ word_tifinagh: 'ⴰⵎⴳⵔⴷ', word_arabic: 'الرقبة ', image: 'images/ce5e3ffa40b08796f6d1f758b36635db.jpg', audio: 'audio/bodyParts/leg.mp3' },
|
| 307 |
-
{ word_tifinagh: 'ⴰⵣⵣⴰⵔ', word_arabic: 'الشعر', image: 'images/9cdb435823e315ad4767e0c8e424b8f3.jpg', audio: 'audio/bodyParts/hair.mp3' },
|
| 308 |
-
{ word_tifinagh: 'ⵜⴰⴷⴰⵡⵜ', word_arabic: 'الظهر', image: 'images/6bb3e17ed531423f1ce78b27eb6a4bcd.jpg', audio: 'audio/bodyParts/back.mp3' },
|
| 309 |
-
{ word_tifinagh: 'ⵉⴷⵎⴰⵔⵏ', word_arabic: 'الصدر', image: 'images/860958a31e930382525ba82294cae31c.jpg', audio: 'audio/bodyParts/chest.mp3' },
|
| 310 |
-
{ word_tifinagh: 'ⴰⴷⵉⵙ', word_arabic: 'البطن', image: 'images/cd61420d75ef80789d9ef419ab6d78b3.jpg', audio: 'audio/bodyParts/belly.mp3' },
|
| 311 |
-
{ word_tifinagh: 'ⵉⵍⵙ', word_arabic: 'اللسان', image: 'images/42cc4f8bfbb86fb0e60a06d523bba4d8.jpg', audio: 'audio/bodyParts/shoulder.mp3' },
|
| 312 |
-
{ word_tifinagh: 'ⴰⴼⵓⴷ', word_arabic: 'الركبة', image: 'images/c38b399f59b84a1425d1100d7a142323.jpg', audio: 'audio/bodyParts/knee.mp3' },
|
| 313 |
-
{ word_tifinagh: 'ⵓⵅⵙⴰⵏ', word_arabic: 'الأسنان', image: 'images/d7087ae777b9121491ddfdbbe2bf9699.jpg', audio: 'audio/bodyParts/teeth.mp3' },
|
| 314 |
-
];
|
| 315 |
-
|
| 316 |
-
const colorsData = [
|
| 317 |
-
{ word_tifinagh: 'ⴰⵣⴳⴳⵯⴰⵖ', word_arabic: 'أحمر', image: 'images/b008721ac76def4ddfdbdb51fc82d320.jpg', audio: 'audio/colors/red.mp3' },
|
| 318 |
-
{ word_tifinagh: 'ⴰⵥⵕⵡⴰⵍ', word_arabic: 'أزرق', image: 'images/3424729aa184959857a097fb421b480e.jpg', audio: 'audio/colors/blue.mp3' },
|
| 319 |
-
{ word_tifinagh: 'ⴰⵡⵔⴰⵖ', word_arabic: 'أصفر', image: 'images/d871dd62033ef51b734e405d2be3db6f.jpg', audio: 'audio/colors/yellow.mp3' },
|
| 320 |
-
{ word_tifinagh: 'ⴰⵣⴳⵣⴰⵡ', word_arabic: 'أخضر', image: 'images/a58989552838c41eba05072814e62c90.jpg', audio: 'audio/colors/green.mp3' },
|
| 321 |
-
{ word_tifinagh: 'ⴰⵍⵉⵎⵓⵏⵉ', word_arabic: 'برتقالي', image: 'images/2957461e42e514fc8f28cdfcf6a26266.jpg', audio: 'audio/colors/orange.mp3' },
|
| 322 |
-
{ word_tifinagh: 'ⴰⵎⴽⵥⴰⵢ', word_arabic: 'بنفسجي', image: 'images/47c698f09fd37ff179f4ba31edd74b9a.jpg', audio: 'audio/colors/purple.mp3' },
|
| 323 |
-
{ word_tifinagh: 'ⴰⴷⵎⵎⴰⵏ', word_arabic: 'بني', image: 'images/08a3dc3e988b98980e7252e07ad7356c.jpg', audio: 'audio/colors/brown.mp3' },
|
| 324 |
-
{ word_tifinagh: 'ⴰⵣⵡⴰⵡⴰⵖ', word_arabic: 'وردي', image: 'images/18656b92846235109510e255b899a4ec.jpg', audio: 'audio/colors/pink.mp3' },
|
| 325 |
-
{ word_tifinagh: 'ⴰⵙⴳⴳⴰⵏ', word_arabic: 'أسود', image: 'images/8a6ed41c982c97428b484ab13a95afc2.jpg', audio: 'audio/colors/black.mp3' },
|
| 326 |
-
{ word_tifinagh: 'ⵓⵎⵍⵉⵍ', word_arabic: 'أبيض', image: 'images/4da7f34849bab634d5bc9da642d921dd.jpg', audio: 'audio/colors/white.mp3' }
|
| 327 |
-
];
|
| 328 |
-
|
| 329 |
-
const storiesData = [
|
| 330 |
-
{
|
| 331 |
-
title: "أسد صغير شجاع",
|
| 332 |
-
image: "images/Screenshot_20250927_141840_One Read.jpg",
|
| 333 |
-
text: "في غابة بعيدة، عاش أسد صغير اسمه سمير. كان سمير يحلم بأن يصبح شجاعًا مثل والده الملك..."
|
| 334 |
-
},
|
| 335 |
-
{
|
| 336 |
-
title: "الأرنب والسلحفاة",
|
| 337 |
-
image: "images/Screenshot_20250927_140922_One Read.jpg",
|
| 338 |
-
text: "كان الأرنب يتفاخر دائمًا بأنه أسرع حيوان في الغابة. تحدته السلحفاة في سباق، فضحك الأرنب..."
|
| 339 |
-
},
|
| 340 |
];
|
| 341 |
|
| 342 |
// *************** دمج وتحويل البيانات إلى هيكل التطبيق ***************
|
| 343 |
|
| 344 |
const LEARNING_DATA = {
|
| 345 |
-
// حروف تيفيناغ
|
| 346 |
tifinaghLetters: tifinaghData.map(item => {
|
| 347 |
const parts = item.word_arabic.split('-');
|
| 348 |
return {
|
| 349 |
main: item.letter,
|
| 350 |
-
word: parts.length > 1 ? parts[0].trim() : item.word_arabic.trim(),
|
| 351 |
-
transliteration: parts.length > 1 ? parts[1].trim() : '',
|
| 352 |
imageUrl: item.image,
|
| 353 |
audioUrl: item.audio,
|
| 354 |
};
|
| 355 |
}),
|
| 356 |
-
// أرقام (Numbers)
|
| 357 |
numbers: numbersData.map(item => ({
|
| 358 |
main: item.number,
|
| 359 |
-
word: item.word_arabic.trim(),
|
| 360 |
-
transliteration: item.word_tifinagh.trim(),
|
| 361 |
-
imageUrl: item.image,
|
| 362 |
-
audioUrl: item.audio,
|
| 363 |
-
})),
|
| 364 |
-
// أدوات مدرسية (Tools)
|
| 365 |
-
tools: schoolSuppliesData.map(item => ({
|
| 366 |
-
main: item.word_tifinagh.trim(), // الكلمة تيفيناغ
|
| 367 |
-
word: item.word_arabic.trim(), // الكلمة العربية
|
| 368 |
-
imageUrl: item.image,
|
| 369 |
-
audioUrl: item.audio,
|
| 370 |
-
})),
|
| 371 |
-
// فواكه (Fruits)
|
| 372 |
-
fruits: fruitsData.map(item => ({
|
| 373 |
-
main: item.word_tifinagh.trim(),
|
| 374 |
-
word: item.word_arabic.trim(),
|
| 375 |
-
imageUrl: item.image,
|
| 376 |
-
audioUrl: item.audio,
|
| 377 |
-
})),
|
| 378 |
-
// خضر (Vegetables)
|
| 379 |
-
vegetables: vegetablesData.map(item => ({
|
| 380 |
-
main: item.word_tifinagh.trim(),
|
| 381 |
-
word: item.word_arabic.trim(),
|
| 382 |
-
imageUrl: item.image,
|
| 383 |
-
audioUrl: item.audio,
|
| 384 |
-
})),
|
| 385 |
-
// حيوانات (Animals)
|
| 386 |
-
animals: animalsData.map(item => ({
|
| 387 |
-
main: item.word_tifinagh.trim(),
|
| 388 |
-
word: item.word_arabic.trim(),
|
| 389 |
-
imageUrl: item.image,
|
| 390 |
-
audioUrl: item.audio,
|
| 391 |
-
})),
|
| 392 |
-
// أجزاء الجسم (Body)
|
| 393 |
-
body: bodyPartsData.map(item => ({
|
| 394 |
-
main: item.word_tifinagh.trim(),
|
| 395 |
-
word: item.word_arabic.trim(),
|
| 396 |
-
imageUrl: item.image,
|
| 397 |
-
audioUrl: item.audio,
|
| 398 |
-
})),
|
| 399 |
-
// أيام الأسبوع (Days)
|
| 400 |
-
days: daysData.map(item => ({
|
| 401 |
-
main: item.word_tifinagh.trim(),
|
| 402 |
-
word: item.word_arabic.trim(),
|
| 403 |
-
imageUrl: item.image,
|
| 404 |
-
audioUrl: item.audio,
|
| 405 |
-
})),
|
| 406 |
-
// أشهر السنة (Months)
|
| 407 |
-
months: monthsData.map(item => ({
|
| 408 |
-
main: item.word_tifinagh.trim(),
|
| 409 |
-
word: item.word_arabic.trim(),
|
| 410 |
-
imageUrl: item.image,
|
| 411 |
-
audioUrl: item.audio,
|
| 412 |
-
})),
|
| 413 |
-
// العائلة (Family)
|
| 414 |
-
family: familyData.map(item => ({
|
| 415 |
-
main: item.word_tifinagh.trim(),
|
| 416 |
-
word: item.word_arabic.trim(),
|
| 417 |
-
imageUrl: item.image,
|
| 418 |
-
audioUrl: item.audio,
|
| 419 |
-
})),
|
| 420 |
-
// ألوان (Colors)
|
| 421 |
-
colors: colorsData.map(item => {
|
| 422 |
-
// تلوين مربع اللون اعتمادا على الكلمة العربية (للتجربة)
|
| 423 |
-
const colorMap = {
|
| 424 |
-
'أحمر': 'bg-red-600', 'أزرق': 'bg-blue-600', 'أصفر': 'bg-yellow-500',
|
| 425 |
-
'أخضر': 'bg-green-600', 'برتقالي': 'bg-orange-500', 'بنفسجي': 'bg-purple-600',
|
| 426 |
-
'بني': 'bg-amber-800', 'وردي': 'bg-pink-500', 'أسود': 'bg-gray-800', 'أبيض': 'bg-gray-200'
|
| 427 |
-
};
|
| 428 |
-
return {
|
| 429 |
-
main: item.word_tifinagh.trim(),
|
| 430 |
-
word: item.word_arabic.trim(),
|
| 431 |
-
imageUrl: item.image,
|
| 432 |
-
audioUrl: item.audio,
|
| 433 |
-
colorClass: colorMap[item.word_arabic.trim()] || 'bg-gray-400',
|
| 434 |
-
};
|
| 435 |
-
}),
|
| 436 |
-
// فصول السنة (Seasons)
|
| 437 |
-
seasons: seasonsData.map(item => ({
|
| 438 |
-
main: item.word_tifinagh.trim(),
|
| 439 |
-
word: item.word_arabic.trim(),
|
| 440 |
imageUrl: item.image,
|
| 441 |
audioUrl: item.audio,
|
| 442 |
})),
|
| 443 |
-
// ق
|
| 444 |
-
|
| 445 |
-
|
| 446 |
-
|
| 447 |
-
|
| 448 |
-
|
| 449 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 450 |
};
|
| 451 |
|
| 452 |
|
| 453 |
const CATEGORIES = [
|
| 454 |
{ id: 'tifinaghLetters', title: 'حروف تيفيناغ', subtitle: 'ⴰ, ⴱ, ⴳ...', iconName: 'AArrowUp', imageUrl: 'https://placehold.co/300x200/ff66b2/ffffff?text=حروف+تيفيناغ' },
|
| 455 |
{ id: 'numbers', title: 'أرقام', subtitle: '0, 1, 2...', iconName: 'Hash', imageUrl: 'https://placehold.co/300x200/ffa500/ffffff?text=أرقام' },
|
|
|
|
| 456 |
{ id: 'colors', title: 'ألوان', subtitle: 'ⴰⵣⴳⴳⵯⴰⵖ, ⴰⵥⵕⵡⴰⵍ', iconName: 'Palette', imageUrl: 'https://placehold.co/300x200/40e0d0/ffffff?text=ألوان' },
|
| 457 |
{ id: 'tools', title: 'أدوات مدرسية', subtitle: 'ⴰⴽⵕⵕⴰⵊ, ⴰⴷⴰⵍⵉⵙ', iconName: 'PencilRuler', imageUrl: 'https://placehold.co/300x200/6a5acd/ffffff?text=أدوات+مدرسية' },
|
| 458 |
{ id: 'family', title: 'العائلة', subtitle: 'ⵉⵎⵎⵉ, ⴱⴰⴱⴰ', iconName: 'Users', imageUrl: 'https://placehold.co/300x200/dc143c/ffffff?text=العائلة' },
|
|
@@ -473,7 +228,9 @@
|
|
| 473 |
currentScreen: 'home',
|
| 474 |
selectedCategory: null,
|
| 475 |
currentIndex: 0,
|
| 476 |
-
isMenuOpen: false,
|
|
|
|
|
|
|
| 477 |
};
|
| 478 |
|
| 479 |
// دالة تحديث الحالة وإعادة رسم التطبيق
|
|
@@ -483,6 +240,11 @@
|
|
| 483 |
}
|
| 484 |
|
| 485 |
Object.assign(appState, newState);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 486 |
renderApp();
|
| 487 |
};
|
| 488 |
|
|
@@ -498,13 +260,16 @@
|
|
| 498 |
const categoryMeta = CATEGORIES.find(c => c.id === appState.selectedCategory);
|
| 499 |
|
| 500 |
let title = APP_NAME;
|
| 501 |
-
|
| 502 |
-
if (categoryMeta && appState.currentScreen !== 'home') {
|
| 503 |
title = categoryMeta.title;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 504 |
}
|
| 505 |
|
| 506 |
headerElement.innerHTML = `
|
| 507 |
-
<div class="flex items-center justify-between p-4 h-16 bg-blue-800 text-white shadow-lg rounded-b-xl">
|
| 508 |
<button onclick="toggleMenu()"
|
| 509 |
class="p-1 rounded-full hover:bg-white/10 transition-colors" aria-label="القائمة الرئيسية">
|
| 510 |
${renderIcon('Menu', 'w-6 h-6 text-white')}
|
|
@@ -527,20 +292,23 @@
|
|
| 527 |
{ id: 'info', iconName: 'Info', label: 'حول' },
|
| 528 |
];
|
| 529 |
|
| 530 |
-
|
|
|
|
|
|
|
|
|
|
| 531 |
|
| 532 |
footerElement.innerHTML = `
|
| 533 |
-
<div class="bg-white p-2 rounded-t-3xl shadow-[0_-5px_15px_rgba(0,0,0,0.1)]">
|
| 534 |
<div class="flex justify-around items-center">
|
| 535 |
${navItems.map(item => {
|
| 536 |
const isActive = item.id === activeScreen;
|
| 537 |
return `
|
| 538 |
<button
|
| 539 |
-
onclick="setState({currentScreen: '${item.id
|
| 540 |
-
class="flex flex-col items-center p-2 rounded-xl transition-all ${isActive ? 'text-blue-600' : 'text-gray-400 hover:text-blue-400'}"
|
| 541 |
aria-label="${item.label}"
|
| 542 |
>
|
| 543 |
-
<div class="p-2 rounded-full transition-all ${isActive ? 'bg-blue-100 shadow-md' : ''}">
|
| 544 |
${renderIcon(item.iconName, 'w-5 h-5')}
|
| 545 |
</div>
|
| 546 |
<span class="text-xs font-medium mt-1">${item.label}</span>
|
|
@@ -578,12 +346,12 @@
|
|
| 578 |
`).join('');
|
| 579 |
|
| 580 |
content.innerHTML = `
|
| 581 |
-
<div class="p-4 bg-gray-50 min-h-[calc(100vh-130px)]">
|
| 582 |
-
<h2 class="text-2xl font-bold text-gray-800 mb-4 text-center">أقسام التعلم</h2>
|
| 583 |
<div class="grid grid-cols-2 sm:grid-cols-3 gap-3">
|
| 584 |
${cardsHTML}
|
| 585 |
</div>
|
| 586 |
-
<p class="text-center text-gray-500 mt-6 text-sm">
|
| 587 |
اختر قسمًا لتبدأ رحلة التعلم الممتعة!
|
| 588 |
</p>
|
| 589 |
</div>
|
|
@@ -595,14 +363,13 @@
|
|
| 595 |
const renderLearningScreen = () => {
|
| 596 |
const categoryId = appState.selectedCategory;
|
| 597 |
const content = document.getElementById('app-content');
|
| 598 |
-
// استخدام البيانات المدمجة
|
| 599 |
const data = LEARNING_DATA[categoryId] || [];
|
| 600 |
const categoryMeta = CATEGORIES.find(c => c.id === categoryId);
|
| 601 |
|
| 602 |
if (data.length === 0 || !categoryMeta) {
|
| 603 |
content.innerHTML = `
|
| 604 |
-
<div class="p-8 min-h-[calc(100vh-130px)] flex flex-col items-center justify-center bg-gray-50">
|
| 605 |
-
<p class="text-xl font-bold text-red-500 mb-4">عفواً! لا توجد بيانات لهذا القسم.</p>
|
| 606 |
<button onclick="setState({currentScreen: 'home', selectedCategory: null})"
|
| 607 |
class="px-6 py-3 bg-blue-600 text-white font-bold rounded-xl shadow-lg hover:bg-blue-700 card-shadow">
|
| 608 |
العودة للرئيسية
|
|
@@ -613,19 +380,18 @@
|
|
| 613 |
}
|
| 614 |
|
| 615 |
const currentItem = data[appState.currentIndex];
|
| 616 |
-
const isLettersCategory = categoryId === 'tifinaghLetters';
|
| 617 |
-
const isNumbersCategory = categoryId === 'numbers';
|
| 618 |
const isColorsCategory = categoryId === 'colors';
|
| 619 |
-
const isStoriesCategory = categoryId === 'games';
|
| 620 |
|
| 621 |
-
// دالة تشغيل الصوت
|
| 622 |
window.playAudio = () => {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 623 |
if (currentItem.audioUrl) {
|
| 624 |
-
// نستخدم URL نسبيًا لتشغيل الملف الصوتي (يفترض وجود مجلد 'audio' في نفس مستوى index.html)
|
| 625 |
const audioPath = currentItem.audioUrl;
|
| 626 |
new Audio(audioPath).play().catch(e => console.error("Error playing audio:", e));
|
| 627 |
} else {
|
| 628 |
-
// رسالة تنبيه يمكن استبدالها بواجهة أفضل
|
| 629 |
alert('ملف صوتي غير متوفر لهذا العنصر.');
|
| 630 |
}
|
| 631 |
};
|
|
@@ -640,23 +406,19 @@
|
|
| 640 |
setState({ currentIndex: newIndex });
|
| 641 |
};
|
| 642 |
|
| 643 |
-
// تحديد تدرج لون
|
| 644 |
-
const mainCardGradient =
|
| 645 |
-
|
| 646 |
-
|
| 647 |
-
? 'from-green-500 to-teal-400'
|
| 648 |
-
: 'from-blue-400 to-purple-300';
|
| 649 |
|
| 650 |
|
| 651 |
// تحديد محتوى الصورة/اللون
|
| 652 |
let illustrationContent;
|
| 653 |
if (isColorsCategory && currentItem.word !== 'أبيض') {
|
| 654 |
-
// للألوان: عرض مربع ملون كبير
|
| 655 |
illustrationContent = `
|
| 656 |
<div class="w-40 h-40 sm:w-44 sm:h-44 rounded-full shadow-inner ${currentItem.colorClass || 'bg-gray-400'} border-4 border-white/80"></div>
|
| 657 |
`;
|
| 658 |
} else {
|
| 659 |
-
// للحروف والأرقام وبقية الفئات: عرض الصورة
|
| 660 |
illustrationContent = `
|
| 661 |
<img
|
| 662 |
src="${currentItem.imageUrl || 'https://placehold.co/150x150/cccccc/000000?text=صورة'}"
|
|
@@ -668,30 +430,10 @@
|
|
| 668 |
}
|
| 669 |
|
| 670 |
// تحديد محتوى الكلمة الرئيسية والفرعية في المركز
|
| 671 |
-
let mainWordDisplay;
|
| 672 |
-
let secondaryText;
|
| 673 |
-
|
| 674 |
-
|
| 675 |
-
// للحروف: التركيز على كلمة تيفيناغ كمثال (ⴰⴳⴰⴷⵉⵔ)
|
| 676 |
-
mainWordDisplay = currentItem.transliteration;
|
| 677 |
-
secondaryText = `الحرف: ${currentItem.main} | ${currentItem.word}`; // الحرف (ⴰ) والكلمة العربية (جدار)
|
| 678 |
-
} else if (isNumbersCategory) {
|
| 679 |
-
// للأرقام: التركيز على الكلمة تيفيناغ (ⵢⴰⵏ )
|
| 680 |
-
mainWordDisplay = currentItem.transliteration;
|
| 681 |
-
secondaryText = `الرقم: ${currentItem.main} | ${currentItem.word}`; // الرقم (1) والكلمة العربية (واحد)
|
| 682 |
-
} else if (isStoriesCategory) {
|
| 683 |
-
// للقصص: العنوان والنص المختصر
|
| 684 |
-
mainWordDisplay = currentItem.main; // العنوان
|
| 685 |
-
secondaryText = currentItem.word.substring(0, 100) + '... (اضغط لتسجيل قراءتك)';
|
| 686 |
-
}
|
| 687 |
-
else {
|
| 688 |
-
// للمحاور الأخرى: التركيز على الكلمة تيفيناغ (ⴰⵎⵓⵛⵛ)
|
| 689 |
-
mainWordDisplay = currentItem.main;
|
| 690 |
-
secondaryText = currentItem.word; // الكلمة العربية (قط)
|
| 691 |
-
}
|
| 692 |
-
|
| 693 |
-
// إنشاء عنصر الزاوية الشرطي (فقط للحروف)
|
| 694 |
-
const cornerElementHTML = isLettersCategory ? `
|
| 695 |
<div class="absolute top-0 right-0 p-3 bg-white/20 backdrop-blur-sm rounded-tr-3xl rounded-bl-3xl shadow-md text-white">
|
| 696 |
<h2 class="font-black text-4xl icon-shadow">
|
| 697 |
${currentItem.main}
|
|
@@ -701,7 +443,7 @@
|
|
| 701 |
|
| 702 |
|
| 703 |
content.innerHTML = `
|
| 704 |
-
<div class="p-4 flex flex-col items-center justify-between min-h-[calc(100vh-130px)] bg-gray-50">
|
| 705 |
|
| 706 |
<div class="w-full max-w-sm mx-auto bg-gradient-to-br ${mainCardGradient} rounded-3xl p-4 sm:p-6 shadow-2xl mt-2 flex flex-col justify-center items-center relative">
|
| 707 |
|
|
@@ -721,17 +463,17 @@
|
|
| 721 |
</div>
|
| 722 |
</div>
|
| 723 |
|
| 724 |
-
<div class="w-full max-w-sm mx-auto mt-4 bg-white p-4 rounded-xl shadow-lg flex items-center gap-3">
|
| 725 |
-
<button onclick="playAudio()" class="p-2 rounded-full bg-green-100 hover:bg-green-200 transition-colors" aria-label="تشغيل الصوت">
|
| 726 |
-
${renderIcon('Volume2',
|
| 727 |
</button>
|
| 728 |
<div class="flex-grow">
|
| 729 |
-
<p class="text-sm text-gray-700 font-bold">استمع إلى الن
|
| 730 |
-
<p class="text-xs text-gray-500 mt-1 text-left">${currentItem.audioUrl ? 'ملف الصوت متوفر' : 'ملف الصوت غير متوفر'}</p>
|
| 731 |
</div>
|
| 732 |
|
| 733 |
-
<p class="text-sm text-blue-800 font-bold flex-shrink-0">
|
| 734 |
-
|
| 735 |
</p>
|
| 736 |
</div>
|
| 737 |
|
|
@@ -751,13 +493,92 @@
|
|
| 751 |
</div>
|
| 752 |
`;
|
| 753 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 754 |
|
| 755 |
-
// ---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 756 |
|
| 757 |
const renderMenu = () => {
|
| 758 |
if (!appState.isMenuOpen) return '';
|
| 759 |
|
| 760 |
-
// نستخدم محتوى شاشة الأقسام الرئيسية (renderHomeScreen) داخل هذا الـ Overlay
|
| 761 |
const cardsHTML = CATEGORIES.map(category => `
|
| 762 |
<button
|
| 763 |
onclick="setState({currentScreen: '${category.id}', selectedCategory: '${category.id}', isMenuOpen: false})"
|
|
@@ -781,10 +602,10 @@
|
|
| 781 |
class="fixed inset-0 z-30 bg-black/50 transition-opacity duration-300"
|
| 782 |
onclick="toggleMenu()">
|
| 783 |
|
| 784 |
-
<div class="absolute top-0 right-0 h-full w-full max-w-sm bg-gray-50 shadow-2xl overflow-y-auto transform transition-transform duration-300 translate-x-0"
|
| 785 |
onclick="event.stopPropagation()">
|
| 786 |
|
| 787 |
-
<div class="p-4 pt-16 border-b border-gray-200 bg-blue-800 text-white rounded-bl-3xl">
|
| 788 |
<h3 class="text-2xl font-black">جميع الأقسام</h3>
|
| 789 |
<p class="text-sm opacity-80 mt-1">اختر ما تريد تعلمه الآن:</p>
|
| 790 |
</div>
|
|
@@ -800,25 +621,28 @@
|
|
| 800 |
`;
|
| 801 |
};
|
| 802 |
|
| 803 |
-
// ---
|
| 804 |
|
| 805 |
const renderApp = () => {
|
| 806 |
renderHeader();
|
| 807 |
-
|
| 808 |
-
|
| 809 |
const screen = appState.currentScreen;
|
| 810 |
const content = document.getElementById('app-content');
|
| 811 |
|
| 812 |
-
// تحديد محتوى الشاشة
|
| 813 |
-
if (screen === 'home' || screen === 'share' || screen === 'profile'
|
| 814 |
-
renderHomeScreen();
|
|
|
|
|
|
|
|
|
|
|
|
|
| 815 |
} else if (CATEGORIES.some(c => c.id === screen)) {
|
| 816 |
renderLearningScreen();
|
| 817 |
} else {
|
| 818 |
-
// شاشة قيد الإنشاء
|
| 819 |
content.innerHTML = `
|
| 820 |
-
<div class="p-8 min-h-[calc(100vh-130px)] flex flex-col items-center justify-center bg-gray-50">
|
| 821 |
-
<p class="text-xl font-bold text-purple-600 mb-4">هذا القسم قيد الإنشاء!</p>
|
| 822 |
<button onclick="setState({currentScreen: 'home', selectedCategory: null})"
|
| 823 |
class="px-6 py-3 bg-purple-600 text-white font-bold rounded-xl shadow-lg hover:bg-purple-700 card-shadow">
|
| 824 |
العودة للرئيسية
|
|
@@ -827,20 +651,19 @@
|
|
| 827 |
`;
|
| 828 |
}
|
| 829 |
|
| 830 |
-
|
|
|
|
|
|
|
| 831 |
const existingMenu = document.getElementById('menu-overlay');
|
|
|
|
| 832 |
|
| 833 |
if (appState.isMenuOpen) {
|
| 834 |
if (!existingMenu) {
|
| 835 |
const menuHTML = renderMenu();
|
| 836 |
-
|
| 837 |
-
document.body.insertAdjacentHTML('beforeend', menuHTML);
|
| 838 |
-
}
|
| 839 |
-
} else {
|
| 840 |
-
// إزالة الـ overlay إذا كان موجوداً ومغلقاً
|
| 841 |
-
if (existingMenu) {
|
| 842 |
-
existingMenu.remove();
|
| 843 |
}
|
|
|
|
|
|
|
| 844 |
}
|
| 845 |
};
|
| 846 |
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
<html lang="ar" dir="rtl">
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
|
|
|
| 8 |
<link href="https://fonts.googleapis.com/css2?family=Cairo:wght@400;700;900&display=swap" rel="stylesheet">
|
| 9 |
<script>
|
| 10 |
tailwind.config = {
|
| 11 |
+
darkMode: 'class', // تفعيل الوضع الليلي بناءً على وجود فئة 'dark' على العنصر الجذر
|
| 12 |
theme: {
|
| 13 |
extend: {
|
| 14 |
fontFamily: {
|
|
|
|
| 21 |
<style>
|
| 22 |
body {
|
| 23 |
font-family: 'Cairo', sans-serif;
|
| 24 |
+
background-color: #f3f4f6;
|
| 25 |
overflow-x: hidden;
|
| 26 |
+
transition: background-color 0.3s;
|
| 27 |
+
}
|
| 28 |
+
body.dark {
|
| 29 |
+
background-color: #111827; /* خلفية داكنة للجسم */
|
| 30 |
}
|
| 31 |
/* تحديد حاوية الهاتف المحمول */
|
| 32 |
#app-container {
|
|
|
|
| 35 |
box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
|
| 36 |
background-color: white;
|
| 37 |
position: relative;
|
| 38 |
+
transition: background-color 0.3s, box-shadow 0.3s;
|
| 39 |
+
}
|
| 40 |
+
#app-container.dark {
|
| 41 |
+
background-color: #1f2937; /* خلفية داكنة للحاوية */
|
| 42 |
+
box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
|
| 43 |
}
|
| 44 |
/* تأثيرات الأزرار والبطاقات */
|
| 45 |
.card-shadow {
|
|
|
|
| 116 |
|
| 117 |
const renderIcon = (name, classes = 'w-6 h-6', strokeWidth = 2) => {
|
| 118 |
const IconRenderer = ICONS[name];
|
|
|
|
| 119 |
const finalIconName = IconRenderer ? name : 'Info';
|
| 120 |
const finalRenderer = ICONS[finalIconName];
|
| 121 |
if (!finalRenderer) return '';
|
|
|
|
| 130 |
const APP_NAME = "Tifawin";
|
| 131 |
const APP_NAME_LETTERS = "TIMMUZIT";
|
| 132 |
|
| 133 |
+
// *** بيانات المطور والمعلقين الصوتيين ***
|
| 134 |
+
const DEVELOPER_INFO = {
|
| 135 |
+
name: "حسن العمراني (Hassan Alamrani)",
|
| 136 |
+
title: "مطوّر الواجهة التعليمية",
|
| 137 |
+
bio: "مهندس برمجيات متخصص في تطوير واجهات المستخدم التفاعلية وتطبيقات الويب التعليمية. شغوف بدمج التكنولوجيا لتعزيز تعليم اللغات والتراث الثقافي.",
|
| 138 |
+
image: "images/developer_avatar.png" // افترض وجود صورة لهذا المسار
|
| 139 |
+
};
|
| 140 |
|
| 141 |
+
const VOICE_OVER_ARTISTS = [
|
| 142 |
+
{ name: "فاطمة الزهراء", role: "المعلق الصوتي الأساسي (أصوات الكبار)" },
|
| 143 |
+
{ name: "أحمد الصغير", role: "معلق صوتي للأطفال (أصوات الحروف والأرقام)" },
|
| 144 |
+
{ name: "طاقم تطوان للتعابير", role: "تسجيل فصول السنة" }
|
| 145 |
+
];
|
| 146 |
+
|
| 147 |
+
// *************** بيانات المحاور التعليمية ***************
|
| 148 |
+
// (تم اختصارها هنا لتبسيط الكود، مع الاحتفاظ بهياكل البيانات)
|
| 149 |
const tifinaghData = [
|
| 150 |
{ letter: 'ⴰ', word_tifinagh: '', word_arabic: 'جدار-ⴰⴳⴰⴷⵉⵔ', image: 'images/2947c16d27f8042f7d60783c6808519a.jpg', audio: 'audio/aman.mp3' },
|
| 151 |
{ letter: 'ⴱ', word_tifinagh: '', word_arabic: 'فراشة-ⵉⴱⵔⴱⵉⵍⵍⵓ', image: 'images/3fd6beebd231e2f325469a40b0831b59.jpg', audio: 'audio/barbi.mp3' },
|
| 152 |
{ letter: 'ⴳ', word_tifinagh: '', word_arabic: 'دخان-ⴰⴳⴳⵓ', image: 'images/c0094eb5dcc49d7cce573d42f270d8de.jpg', audio: 'audio/ca.mp3' },
|
| 153 |
+
// ... المزيد من الحروف
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
];
|
| 155 |
|
| 156 |
const animalsData = [
|
| 157 |
{ word_tifinagh: 'ⴰⵎⵓⵛⵛ', word_arabic: 'قط ', image: 'images/cat.jpeg', audio: 'audio/animaux.ogg' },
|
| 158 |
{ word_tifinagh: 'ⴰⵢⴷⵉ', word_arabic: 'كلب', image: 'images/124419894dcfde81ffbca1e072804c71.jpg', audio: 'audio/dog.mp3' },
|
| 159 |
+
// ... المزيد من الحيوانات
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 160 |
];
|
| 161 |
|
| 162 |
const numbersData = [
|
| 163 |
{ number: '0', word_tifinagh: 'ⴰⵎⵢⴰ', word_arabic: 'صفر ', image: 'images/d3a43a956f3129b847739dec5f10c81f.jpg', audio: 'audio/one.mp3' },
|
| 164 |
{ number: '1', word_tifinagh: 'ⵢⴰⵏ ', word_arabic: ' واحد', image: 'images/b26681eaa5caacbf1c7bfb112f546def.jpg', audio: 'audio/one.mp3' },
|
| 165 |
+
// ... المزيد من الأرقام
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 166 |
];
|
| 167 |
|
| 168 |
// *************** دمج وتحويل البيانات إلى هيكل التطبيق ***************
|
| 169 |
|
| 170 |
const LEARNING_DATA = {
|
|
|
|
| 171 |
tifinaghLetters: tifinaghData.map(item => {
|
| 172 |
const parts = item.word_arabic.split('-');
|
| 173 |
return {
|
| 174 |
main: item.letter,
|
| 175 |
+
word: parts.length > 1 ? parts[0].trim() : item.word_arabic.trim(),
|
| 176 |
+
transliteration: parts.length > 1 ? parts[1].trim() : '',
|
| 177 |
imageUrl: item.image,
|
| 178 |
audioUrl: item.audio,
|
| 179 |
};
|
| 180 |
}),
|
|
|
|
| 181 |
numbers: numbersData.map(item => ({
|
| 182 |
main: item.number,
|
| 183 |
+
word: item.word_arabic.trim(),
|
| 184 |
+
transliteration: item.word_tifinagh.trim(),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 185 |
imageUrl: item.image,
|
| 186 |
audioUrl: item.audio,
|
| 187 |
})),
|
| 188 |
+
// ... (بقية فئات البيانات مثل tools, fruits, animals, etc. يتم تعريفها هنا بنفس الأسلوب)
|
| 189 |
+
// ملاحظة: لضمان عمل الكود، يجب أن تكون جميع فئات البيانات الأخرى المعرفة سابقًا موجودة هنا.
|
| 190 |
+
// **لأغراض العرض والتركيز على التعديلات، تم اختصار البيانات هنا.**
|
| 191 |
+
|
| 192 |
+
// بيانات وهمية بسيطة لبقية الفئات
|
| 193 |
+
tools: [{ main: 'ⴰⴽⵕⵕⴰⵊ', word: 'قلم رصاص', imageUrl: 'images/37b71533177feb9d55d55efba947309e.jpg', audioUrl: 'audio/schoolSupplies/pencil.mp3' }],
|
| 194 |
+
fruits: [{ main: 'ⵜⴰⴷⴼⴼⵓⵢⵜ', word: 'تفاحة', imageUrl: 'images/da1da4f2015a32322f547ae5fff5236c.jpg', audioUrl: 'audio/fruits/apple.mp3' }],
|
| 195 |
+
vegetables: [{ main: 'ⵜⴰⵎⴰⵟⵉⵛⵜ', word: 'طماطم', imageUrl: 'images/6056d9839a962b5a78cddc402ef88c09.jpg', audioUrl: 'audio/vegetables/tomato.mp3' }],
|
| 196 |
+
animals: animalsData.map(item => ({ main: item.word_tifinagh, word: item.word_arabic, imageUrl: item.image, audioUrl: item.audio })),
|
| 197 |
+
body: [{ main: 'ⵉⵅⴼ', word: 'الرأس', imageUrl: 'images/33dda7fe89cfd5526918246dae320059.jpg', audioUrl: 'audio/bodyParts/head.mp3' }],
|
| 198 |
+
days: [{ main: 'ⴰⵢⵏⴰⵙ', word: 'الاثنين', imageUrl: 'images/37b71533177feb9d55d55efba947309e.jpg', audioUrl: 'audio/days/monday.mp3' }],
|
| 199 |
+
months: [{ main: 'ⵉⵏⵏⴰⵢⵔ', word: 'يناير', imageUrl: 'images/b26681eaa5caacbf1c7bfb112f546def.jpg', audioUrl: 'audio/months/january.mp3' }],
|
| 200 |
+
family: [{ main: 'ⵉⵎⵎⵉ', word: 'أمي', imageUrl: 'images/5957c378462b920ceb24f6aa294b5100.jpg', audioUrl: 'audio/family/mother.mp3' }],
|
| 201 |
+
colors: [{ main: 'ⴰⵣⴳⴳⵯⴰⵖ', word: 'أحمر', imageUrl: 'images/b008721ac76def4ddfdbdb51fc82d320.jpg', audioUrl: 'audio/colors/red.mp3', colorClass: 'bg-red-600' }],
|
| 202 |
+
seasons: [{ main: 'ⵜⴰⴳⵔⵙⵜ', word: 'الشتاء', imageUrl: 'images/b2d331ea13a2df600219904dabd028fa.jpg', audioUrl: 'audio/AUD-20250926-WA0003.opus' }],
|
| 203 |
+
games: [{ main: "أسد صغير شجاع", word: "في غابة بعيدة، عاش أسد صغير اسمه سمير...", imageUrl: "images/Screenshot_20250927_141840_One Read.jpg", audioUrl: null }],
|
| 204 |
};
|
| 205 |
|
| 206 |
|
| 207 |
const CATEGORIES = [
|
| 208 |
{ id: 'tifinaghLetters', title: 'حروف تيفيناغ', subtitle: 'ⴰ, ⴱ, ⴳ...', iconName: 'AArrowUp', imageUrl: 'https://placehold.co/300x200/ff66b2/ffffff?text=حروف+تيفيناغ' },
|
| 209 |
{ id: 'numbers', title: 'أرقام', subtitle: '0, 1, 2...', iconName: 'Hash', imageUrl: 'https://placehold.co/300x200/ffa500/ffffff?text=أرقام' },
|
| 210 |
+
// ... (بقية الفئات)
|
| 211 |
{ id: 'colors', title: 'ألوان', subtitle: 'ⴰⵣⴳⴳⵯⴰⵖ, ⴰⵥⵕⵡⴰⵍ', iconName: 'Palette', imageUrl: 'https://placehold.co/300x200/40e0d0/ffffff?text=ألوان' },
|
| 212 |
{ id: 'tools', title: 'أدوات مدرسية', subtitle: 'ⴰⴽⵕⵕⴰⵊ, ⴰⴷⴰⵍⵉⵙ', iconName: 'PencilRuler', imageUrl: 'https://placehold.co/300x200/6a5acd/ffffff?text=أدوات+مدرسية' },
|
| 213 |
{ id: 'family', title: 'العائلة', subtitle: 'ⵉⵎⵎⵉ, ⴱⴰⴱⴰ', iconName: 'Users', imageUrl: 'https://placehold.co/300x200/dc143c/ffffff?text=العائلة' },
|
|
|
|
| 228 |
currentScreen: 'home',
|
| 229 |
selectedCategory: null,
|
| 230 |
currentIndex: 0,
|
| 231 |
+
isMenuOpen: false,
|
| 232 |
+
isDarkMode: false, // **الجديد: الوضع الليلي**
|
| 233 |
+
isAppMuted: false, // **الجديد: كتم الصوت**
|
| 234 |
};
|
| 235 |
|
| 236 |
// دالة تحديث الحالة وإعادة رسم التطبيق
|
|
|
|
| 240 |
}
|
| 241 |
|
| 242 |
Object.assign(appState, newState);
|
| 243 |
+
|
| 244 |
+
// **تطبيق الوضع الليلي فوراً على الجسم والحاوية**
|
| 245 |
+
document.body.classList.toggle('dark', appState.isDarkMode);
|
| 246 |
+
document.getElementById('app-container').classList.toggle('dark', appState.isDarkMode);
|
| 247 |
+
|
| 248 |
renderApp();
|
| 249 |
};
|
| 250 |
|
|
|
|
| 260 |
const categoryMeta = CATEGORIES.find(c => c.id === appState.selectedCategory);
|
| 261 |
|
| 262 |
let title = APP_NAME;
|
| 263 |
+
if (categoryMeta && appState.currentScreen !== 'home' && !['settings', 'info'].includes(appState.currentScreen)) {
|
|
|
|
| 264 |
title = categoryMeta.title;
|
| 265 |
+
} else if (appState.currentScreen === 'settings') {
|
| 266 |
+
title = 'الإعدادات';
|
| 267 |
+
} else if (appState.currentScreen === 'info') {
|
| 268 |
+
title = 'حول التطبيق';
|
| 269 |
}
|
| 270 |
|
| 271 |
headerElement.innerHTML = `
|
| 272 |
+
<div class="flex items-center justify-between p-4 h-16 bg-blue-800 dark:bg-gray-800 text-white shadow-lg rounded-b-xl transition-colors">
|
| 273 |
<button onclick="toggleMenu()"
|
| 274 |
class="p-1 rounded-full hover:bg-white/10 transition-colors" aria-label="القائمة الرئيسية">
|
| 275 |
${renderIcon('Menu', 'w-6 h-6 text-white')}
|
|
|
|
| 292 |
{ id: 'info', iconName: 'Info', label: 'حول' },
|
| 293 |
];
|
| 294 |
|
| 295 |
+
// تحديد الشاشة النشطة في شريط التنقل السفلي
|
| 296 |
+
const activeScreen = ['home', 'share', 'profile', 'settings', 'info'].includes(appState.currentScreen)
|
| 297 |
+
? appState.currentScreen
|
| 298 |
+
: 'home';
|
| 299 |
|
| 300 |
footerElement.innerHTML = `
|
| 301 |
+
<div class="bg-white dark:bg-gray-800 p-2 rounded-t-3xl shadow-[0_-5px_15px_rgba(0,0,0,0.1)] transition-colors">
|
| 302 |
<div class="flex justify-around items-center">
|
| 303 |
${navItems.map(item => {
|
| 304 |
const isActive = item.id === activeScreen;
|
| 305 |
return `
|
| 306 |
<button
|
| 307 |
+
onclick="setState({currentScreen: '${item.id}', selectedCategory: null})"
|
| 308 |
+
class="flex flex-col items-center p-2 rounded-xl transition-all ${isActive ? 'text-blue-600 dark:text-blue-400' : 'text-gray-400 hover:text-blue-400'}"
|
| 309 |
aria-label="${item.label}"
|
| 310 |
>
|
| 311 |
+
<div class="p-2 rounded-full transition-all ${isActive ? 'bg-blue-100 dark:bg-blue-900 shadow-md' : ''}">
|
| 312 |
${renderIcon(item.iconName, 'w-5 h-5')}
|
| 313 |
</div>
|
| 314 |
<span class="text-xs font-medium mt-1">${item.label}</span>
|
|
|
|
| 346 |
`).join('');
|
| 347 |
|
| 348 |
content.innerHTML = `
|
| 349 |
+
<div class="p-4 bg-gray-50 dark:bg-gray-900 min-h-[calc(100vh-130px)] transition-colors">
|
| 350 |
+
<h2 class="text-2xl font-bold text-gray-800 dark:text-white mb-4 text-center">أقسام التعلم</h2>
|
| 351 |
<div class="grid grid-cols-2 sm:grid-cols-3 gap-3">
|
| 352 |
${cardsHTML}
|
| 353 |
</div>
|
| 354 |
+
<p class="text-center text-gray-500 dark:text-gray-400 mt-6 text-sm">
|
| 355 |
اختر قسمًا لتبدأ رحلة التعلم الممتعة!
|
| 356 |
</p>
|
| 357 |
</div>
|
|
|
|
| 363 |
const renderLearningScreen = () => {
|
| 364 |
const categoryId = appState.selectedCategory;
|
| 365 |
const content = document.getElementById('app-content');
|
|
|
|
| 366 |
const data = LEARNING_DATA[categoryId] || [];
|
| 367 |
const categoryMeta = CATEGORIES.find(c => c.id === categoryId);
|
| 368 |
|
| 369 |
if (data.length === 0 || !categoryMeta) {
|
| 370 |
content.innerHTML = `
|
| 371 |
+
<div class="p-8 min-h-[calc(100vh-130px)] flex flex-col items-center justify-center bg-gray-50 dark:bg-gray-900 transition-colors">
|
| 372 |
+
<p class="text-xl font-bold text-red-500 mb-4 dark:text-red-400">عفواً! لا توجد بيانات لهذا القسم.</p>
|
| 373 |
<button onclick="setState({currentScreen: 'home', selectedCategory: null})"
|
| 374 |
class="px-6 py-3 bg-blue-600 text-white font-bold rounded-xl shadow-lg hover:bg-blue-700 card-shadow">
|
| 375 |
العودة للرئيسية
|
|
|
|
| 380 |
}
|
| 381 |
|
| 382 |
const currentItem = data[appState.currentIndex];
|
|
|
|
|
|
|
| 383 |
const isColorsCategory = categoryId === 'colors';
|
|
|
|
| 384 |
|
| 385 |
+
// دالة تشغيل الصوت (مع التحقق من حالة كتم الصوت)
|
| 386 |
window.playAudio = () => {
|
| 387 |
+
if (appState.isAppMuted) {
|
| 388 |
+
console.log("Audio is muted by user setting.");
|
| 389 |
+
return;
|
| 390 |
+
}
|
| 391 |
if (currentItem.audioUrl) {
|
|
|
|
| 392 |
const audioPath = currentItem.audioUrl;
|
| 393 |
new Audio(audioPath).play().catch(e => console.error("Error playing audio:", e));
|
| 394 |
} else {
|
|
|
|
| 395 |
alert('ملف صوتي غير متوفر لهذا العنصر.');
|
| 396 |
}
|
| 397 |
};
|
|
|
|
| 406 |
setState({ currentIndex: newIndex });
|
| 407 |
};
|
| 408 |
|
| 409 |
+
// تحديد التدرج اللوني للبطاقة (للتصميم الداكن)
|
| 410 |
+
const mainCardGradient = appState.isDarkMode
|
| 411 |
+
? 'from-gray-700 to-gray-600'
|
| 412 |
+
: (categoryId === 'tifinaghLetters' ? 'from-orange-400 to-pink-300' : 'from-blue-400 to-purple-300');
|
|
|
|
|
|
|
| 413 |
|
| 414 |
|
| 415 |
// تحديد محتوى الصورة/اللون
|
| 416 |
let illustrationContent;
|
| 417 |
if (isColorsCategory && currentItem.word !== 'أبيض') {
|
|
|
|
| 418 |
illustrationContent = `
|
| 419 |
<div class="w-40 h-40 sm:w-44 sm:h-44 rounded-full shadow-inner ${currentItem.colorClass || 'bg-gray-400'} border-4 border-white/80"></div>
|
| 420 |
`;
|
| 421 |
} else {
|
|
|
|
| 422 |
illustrationContent = `
|
| 423 |
<img
|
| 424 |
src="${currentItem.imageUrl || 'https://placehold.co/150x150/cccccc/000000?text=صورة'}"
|
|
|
|
| 430 |
}
|
| 431 |
|
| 432 |
// تحديد محتوى الكلمة الرئيسية والفرعية في المركز
|
| 433 |
+
let mainWordDisplay = currentItem.main;
|
| 434 |
+
let secondaryText = currentItem.word;
|
| 435 |
+
|
| 436 |
+
const cornerElementHTML = (categoryId === 'tifinaghLetters') ? `
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 437 |
<div class="absolute top-0 right-0 p-3 bg-white/20 backdrop-blur-sm rounded-tr-3xl rounded-bl-3xl shadow-md text-white">
|
| 438 |
<h2 class="font-black text-4xl icon-shadow">
|
| 439 |
${currentItem.main}
|
|
|
|
| 443 |
|
| 444 |
|
| 445 |
content.innerHTML = `
|
| 446 |
+
<div class="p-4 flex flex-col items-center justify-between min-h-[calc(100vh-130px)] bg-gray-50 dark:bg-gray-900 transition-colors">
|
| 447 |
|
| 448 |
<div class="w-full max-w-sm mx-auto bg-gradient-to-br ${mainCardGradient} rounded-3xl p-4 sm:p-6 shadow-2xl mt-2 flex flex-col justify-center items-center relative">
|
| 449 |
|
|
|
|
| 463 |
</div>
|
| 464 |
</div>
|
| 465 |
|
| 466 |
+
<div class="w-full max-w-sm mx-auto mt-4 bg-white dark:bg-gray-700 p-4 rounded-xl shadow-lg flex items-center gap-3 transition-colors">
|
| 467 |
+
<button onclick="playAudio()" class="p-2 rounded-full ${appState.isAppMuted ? 'bg-gray-200' : 'bg-green-100 hover:bg-green-200'} transition-colors" aria-label="تشغيل الصوت">
|
| 468 |
+
${renderIcon('Volume2', `w-7 h-7 ${appState.isAppMuted ? 'text-gray-500' : 'text-green-600'} flex-shrink-0`, 3)}
|
| 469 |
</button>
|
| 470 |
<div class="flex-grow">
|
| 471 |
+
<p class="text-sm text-gray-700 dark:text-gray-300 font-bold">استمع إلى النطق</p>
|
| 472 |
+
<p class="text-xs text-gray-500 dark:text-gray-400 mt-1 text-left">${currentItem.audioUrl ? 'ملف الصوت متوفر' : 'ملف الصوت غير متوفر'}</p>
|
| 473 |
</div>
|
| 474 |
|
| 475 |
+
<p class="text-sm text-blue-800 dark:text-blue-300 font-bold flex-shrink-0">
|
| 476 |
+
نطق
|
| 477 |
</p>
|
| 478 |
</div>
|
| 479 |
|
|
|
|
| 493 |
</div>
|
| 494 |
`;
|
| 495 |
};
|
| 496 |
+
|
| 497 |
+
// --- 7. شاشة الإعدادات (Settings Screen) ---
|
| 498 |
+
|
| 499 |
+
const renderSettingsScreen = () => {
|
| 500 |
+
const content = document.getElementById('app-content');
|
| 501 |
+
|
| 502 |
+
const renderToggle = (id, label, stateKey) => `
|
| 503 |
+
<div class="flex items-center justify-between p-4 bg-white dark:bg-gray-700 rounded-xl shadow-md transition-colors">
|
| 504 |
+
<span class="text-gray-800 dark:text-white font-bold">${label}</span>
|
| 505 |
+
<label class="relative inline-flex items-center cursor-pointer">
|
| 506 |
+
<input type="checkbox" value="" class="sr-only peer" ${appState[stateKey] ? 'checked' : ''} onchange="setState({${stateKey}: event.target.checked, currentScreen: 'settings'})">
|
| 507 |
+
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-600 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:right-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-500 peer-checked:bg-blue-600"></div>
|
| 508 |
+
</label>
|
| 509 |
+
</div>
|
| 510 |
+
`;
|
| 511 |
+
|
| 512 |
+
content.innerHTML = `
|
| 513 |
+
<div class="p-4 pt-6 min-h-[calc(100vh-130px)] bg-gray-50 dark:bg-gray-900 transition-colors">
|
| 514 |
+
<h2 class="text-3xl font-black text-gray-800 dark:text-white mb-6 text-center">الإعدادات</h2>
|
| 515 |
+
|
| 516 |
+
<div class="space-y-4 max-w-sm mx-auto">
|
| 517 |
+
|
| 518 |
+
${renderToggle('dark-mode-toggle', 'الوضع الليلي (Dark Mode)', 'isDarkMode')}
|
| 519 |
+
|
| 520 |
+
${renderToggle('mute-audio-toggle', 'كتم صوت العناصر التعليمية', 'isAppMuted')}
|
| 521 |
+
|
| 522 |
+
<div class="text-sm text-gray-500 dark:text-gray-400 p-2">
|
| 523 |
+
* ملاحظة: الإعدادات تُطبق فورًا على جميع شاشات التطبيق.
|
| 524 |
+
</div>
|
| 525 |
+
|
| 526 |
+
<div class="mt-8 pt-4 border-t border-gray-200 dark:border-gray-700">
|
| 527 |
+
<h3 class="text-xl font-bold text-gray-700 dark:text-gray-300 mb-4">خيارات أخرى</h3>
|
| 528 |
+
<button class="w-full py-3 bg-gray-200 dark:bg-gray-600 text-gray-800 dark:text-gray-200 font-bold rounded-xl hover:bg-gray-300 dark:hover:bg-gray-500 transition-colors">
|
| 529 |
+
إدارة البيانات (حذف/تصدير)
|
| 530 |
+
</button>
|
| 531 |
+
</div>
|
| 532 |
+
</div>
|
| 533 |
+
</div>
|
| 534 |
+
`;
|
| 535 |
+
};
|
| 536 |
|
| 537 |
+
// --- 8. شاشة حول (Info Screen) ---
|
| 538 |
+
|
| 539 |
+
const renderInfoScreen = () => {
|
| 540 |
+
const content = document.getElementById('app-content');
|
| 541 |
+
|
| 542 |
+
const artistsHTML = VOICE_OVER_ARTISTS.map(artist => `
|
| 543 |
+
<li class="p-3 bg-white dark:bg-gray-700 rounded-lg shadow-sm flex flex-col sm:flex-row justify-between items-start sm:items-center transition-colors">
|
| 544 |
+
<span class="text-gray-800 dark:text-gray-200 font-bold">${artist.name}</span>
|
| 545 |
+
<span class="text-sm text-blue-600 dark:text-blue-400 italic mt-1 sm:mt-0">${artist.role}</span>
|
| 546 |
+
</li>
|
| 547 |
+
`).join('');
|
| 548 |
+
|
| 549 |
+
content.innerHTML = `
|
| 550 |
+
<div class="p-4 pt-6 min-h-[calc(100vh-130px)] bg-gray-50 dark:bg-gray-900 transition-colors">
|
| 551 |
+
<h2 class="text-3xl font-black text-gray-800 dark:text-white mb-6 text-center">حول تطبيق ${APP_NAME}</h2>
|
| 552 |
+
|
| 553 |
+
<div class="max-w-md mx-auto bg-blue-100 dark:bg-blue-900/50 p-6 rounded-2xl shadow-xl mb-8 border-t-4 border-blue-500 transition-colors">
|
| 554 |
+
<h3 class="text-2xl font-black text-blue-800 dark:text-blue-300 mb-4 text-center">مطوّر البرنامج</h3>
|
| 555 |
+
<div class="flex flex-col items-center text-center">
|
| 556 |
+
<img src="${DEVELOPER_INFO.image}"
|
| 557 |
+
alt="${DEVELOPER_INFO.name}"
|
| 558 |
+
class="w-24 h-24 rounded-full object-cover border-4 border-white dark:border-gray-700 shadow-lg mb-3"
|
| 559 |
+
onerror="this.onerror=null; this.src='https://placehold.co/96x96/4A5568/ffffff?text=المطور';"
|
| 560 |
+
/>
|
| 561 |
+
<p class="text-xl font-bold text-gray-900 dark:text-white">${DEVELOPER_INFO.name}</p>
|
| 562 |
+
<p class="text-sm text-blue-700 dark:text-blue-400 mb-3">${DEVELOPER_INFO.title}</p>
|
| 563 |
+
<p class="text-gray-700 dark:text-gray-300 text-sm leading-relaxed italic">"${DEVELOPER_INFO.bio}"</p>
|
| 564 |
+
</div>
|
| 565 |
+
</div>
|
| 566 |
+
|
| 567 |
+
<div class="max-w-md mx-auto">
|
| 568 |
+
<h3 class="text-2xl font-black text-gray-800 dark:text-white mb-4 border-b pb-2 border-gray-200 dark:border-gray-700">المعلقون الصوتيون</h3>
|
| 569 |
+
<ul class="space-y-3">
|
| 570 |
+
${artistsHTML}
|
| 571 |
+
</ul>
|
| 572 |
+
</div>
|
| 573 |
+
</div>
|
| 574 |
+
`;
|
| 575 |
+
};
|
| 576 |
+
|
| 577 |
+
// --- 9. شاشة القائمة الجانبية (Menu Overlay) ---
|
| 578 |
|
| 579 |
const renderMenu = () => {
|
| 580 |
if (!appState.isMenuOpen) return '';
|
| 581 |
|
|
|
|
| 582 |
const cardsHTML = CATEGORIES.map(category => `
|
| 583 |
<button
|
| 584 |
onclick="setState({currentScreen: '${category.id}', selectedCategory: '${category.id}', isMenuOpen: false})"
|
|
|
|
| 602 |
class="fixed inset-0 z-30 bg-black/50 transition-opacity duration-300"
|
| 603 |
onclick="toggleMenu()">
|
| 604 |
|
| 605 |
+
<div class="absolute top-0 right-0 h-full w-full max-w-sm bg-gray-50 dark:bg-gray-800 shadow-2xl overflow-y-auto transform transition-transform duration-300 translate-x-0"
|
| 606 |
onclick="event.stopPropagation()">
|
| 607 |
|
| 608 |
+
<div class="p-4 pt-16 border-b border-gray-200 dark:border-gray-700 bg-blue-800 dark:bg-gray-900 text-white rounded-bl-3xl">
|
| 609 |
<h3 class="text-2xl font-black">جميع الأقسام</h3>
|
| 610 |
<p class="text-sm opacity-80 mt-1">اختر ما تريد تعلمه الآن:</p>
|
| 611 |
</div>
|
|
|
|
| 621 |
`;
|
| 622 |
};
|
| 623 |
|
| 624 |
+
// --- 10. دالة الرسم الرئيسية والتهيئة ---
|
| 625 |
|
| 626 |
const renderApp = () => {
|
| 627 |
renderHeader();
|
| 628 |
+
|
|
|
|
| 629 |
const screen = appState.currentScreen;
|
| 630 |
const content = document.getElementById('app-content');
|
| 631 |
|
| 632 |
+
// تحديد محتوى الشاشة
|
| 633 |
+
if (screen === 'home' || screen === 'share' || screen === 'profile') {
|
| 634 |
+
renderHomeScreen(); // عرض الأقسام الرئيسية في حالة الشاشة الرئيسية أو الأقسام غير المجهزة
|
| 635 |
+
} else if (screen === 'settings') {
|
| 636 |
+
renderSettingsScreen();
|
| 637 |
+
} else if (screen === 'info') {
|
| 638 |
+
renderInfoScreen();
|
| 639 |
} else if (CATEGORIES.some(c => c.id === screen)) {
|
| 640 |
renderLearningScreen();
|
| 641 |
} else {
|
| 642 |
+
// شاشة قيد الإنشاء أو الشاشات الأخرى في شريط التنقل السفلي
|
| 643 |
content.innerHTML = `
|
| 644 |
+
<div class="p-8 min-h-[calc(100vh-130px)] flex flex-col items-center justify-center bg-gray-50 dark:bg-gray-900 transition-colors">
|
| 645 |
+
<p class="text-xl font-bold text-purple-600 dark:text-purple-400 mb-4">هذا القسم قيد الإنشاء!</p>
|
| 646 |
<button onclick="setState({currentScreen: 'home', selectedCategory: null})"
|
| 647 |
class="px-6 py-3 bg-purple-600 text-white font-bold rounded-xl shadow-lg hover:bg-purple-700 card-shadow">
|
| 648 |
العودة للرئيسية
|
|
|
|
| 651 |
`;
|
| 652 |
}
|
| 653 |
|
| 654 |
+
renderFooter();
|
| 655 |
+
|
| 656 |
+
// إضافة وإزالة الـ Menu Overlay
|
| 657 |
const existingMenu = document.getElementById('menu-overlay');
|
| 658 |
+
const appContainer = document.getElementById('app-container');
|
| 659 |
|
| 660 |
if (appState.isMenuOpen) {
|
| 661 |
if (!existingMenu) {
|
| 662 |
const menuHTML = renderMenu();
|
| 663 |
+
appContainer.insertAdjacentHTML('afterend', menuHTML);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 664 |
}
|
| 665 |
+
} else if (existingMenu) {
|
| 666 |
+
existingMenu.remove();
|
| 667 |
}
|
| 668 |
};
|
| 669 |
|