Jaouadart commited on
Commit
e972da8
·
verified ·
1 Parent(s): 2c7f72a

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +32 -30
index.html CHANGED
@@ -21,11 +21,12 @@
21
  display: flex;
22
  flex-direction: column;
23
  align-items: center;
24
- padding: 1rem;
25
  }
26
  .container {
27
- max-width: 480px;
28
  width: 100%;
 
29
  }
30
  .header {
31
  background-color: #3F51B5;
@@ -36,12 +37,15 @@
36
  display: flex;
37
  align-items: center;
38
  justify-content: space-between;
 
 
39
  }
40
  .grid-container {
41
  display: grid;
42
  grid-template-columns: repeat(2, 1fr);
43
- gap: 1rem;
44
  margin-top: 1.5rem;
 
45
  }
46
  .card, .alphabet-card {
47
  padding: 1rem;
@@ -53,7 +57,7 @@
53
  flex-direction: column;
54
  align-items: center;
55
  text-align: center;
56
- min-height: 12rem;
57
  position: relative;
58
  background-color: #FFB74D;
59
  }
@@ -61,22 +65,22 @@
61
  transform: scale(1.05);
62
  }
63
  .card-image {
64
- width: 100px;
65
- height: 100px;
66
  margin-bottom: 0.5rem;
67
  object-fit: contain;
68
  position: absolute;
69
- top: 1.5rem;
70
  }
71
  .card-text {
72
  font-size: 1.25rem;
73
  font-weight: bold;
74
  color: #333;
75
  position: absolute;
76
- bottom: 1.5rem;
77
  }
78
  .alphabet-card {
79
- background-color: #B2DFDB;
80
  min-height: 15rem;
81
  }
82
  .alphabet-card .tifinagh-letter {
@@ -95,7 +99,7 @@
95
  font-family: 'Tifinagh', sans-serif;
96
  font-size: 1.2rem;
97
  margin-top: 1rem;
98
- direction: ltr; /* Tifinagh is LTR */
99
  }
100
  .red-letter {
101
  color: red;
@@ -133,7 +137,6 @@
133
  </div>
134
 
135
  <script>
136
- // Data for the Tifinagh alphabet page, based on the provided image
137
  const tifinaghData = [
138
  { letter: 'ⵓ', word: 'ⴰⴳⴰⵍ', image: 'https://placehold.co/150x150/F57C00/FFFFFF?text=🧱' },
139
  { letter: 'ⵔ', word: 'ⴰⵔⴳⴰⵣ', image: 'https://placehold.co/150x150/F57C00/FFFFFF?text=🚶' },
@@ -155,15 +158,14 @@
155
  { letter: 'ⵠ', word: 'ⴰⵠⵉⵍ', image: 'https://placehold.co/150x150/F57C00/FFFFFF?text=🪶' },
156
  { letter: 'ⴹ', word: 'ⴹⵓ', image: 'https://placehold.co/150x150/F57C00/FFFFFF?text=☀️' },
157
  { letter: 'ⵄ', word: 'ⵄⴰ', image: 'https://placehold.co/150x150/F57C00/FFFFFF?text=🌱' },
158
- { letter: 'ⴳ', word: 'ⴳⴰ', image: 'https://placehold.co/150x150/F57C00/FFFFFF?text=🐓' },
159
- { letter: 'ⵗ', word: 'ⵗⵔⴰ', image: 'https://placehold.co/150x150/F57C00/FFFFFF?text=🌵' },
160
- { letter: 'ⵕ', word: 'ⵕⴰ', image: 'https://placehold.co/150x150/F57C00/FFFFFF?text=🥖' },
161
- { letter: 'ⵣ', word: 'ⵣⵉ', image: 'https://placehold.co/150x150/F57C00/FFFFFF?text=🌕' },
162
- { letter: 'ⵣ', word: 'ⵣⴰ', image: 'https://placehold.co/150x150/F57C00/FFFFFF?text=🪵' },
163
- { letter: 'ⴱ', word: 'ⴱⴰ', image: 'https://placehold.co/150x150/F57C00/FFFFFF?text=🧅' }
164
  ];
165
 
166
- // Function to create alphabet page content
167
  function createAlphabetPage() {
168
  let content = `
169
  <div class="container">
@@ -179,7 +181,7 @@
179
  tifinaghData.forEach(item => {
180
  const highlightedWord = `<span class="red-letter">${item.word[0]}</span>${item.word.slice(1)}`;
181
  content += `
182
- <div class="alphabet-card bg-orange-200" onclick="speak('${item.letter}', '${item.word}')">
183
  <div class="tifinagh-letter">${item.letter}</div>
184
  <img src="${item.image}" alt="${item.word}" class="card-image-small">
185
  <div class="word text-xl mt-2">${highlightedWord}</div>
@@ -196,7 +198,7 @@
196
  function speak(letter, word) {
197
  if ('speechSynthesis' in window) {
198
  const message = new SpeechSynthesisUtterance(`${letter} ${word}`);
199
- message.lang = 'ar-MA'; // Using a common dialect for demonstration
200
  window.speechSynthesis.speak(message);
201
  } else {
202
  showMessage("متصفحك لا يدعم خاصية النطق الصوتي.");
@@ -228,43 +230,43 @@
228
  </header>
229
  <main class="grid-container">
230
  <a href="#" onclick="showPage('other')" class="card bg-orange-200">
231
- <img src="https://placehold.co/100x100/F57C00/FFFFFF?text=🎒" alt="أدوات مدرسية" class="card-image">
232
  <span class="card-text">أدوات مدرسية</span>
233
  </a>
234
  <a href="#" onclick="showPage('alphabet')" class="card bg-green-200">
235
- <img src="https://placehold.co/100x100/388E3C/FFFFFF?text=🅰️" alt="حروف و كلمات" class="card-image">
236
  <span class="card-text">حروف و كلمات</span>
237
  </a>
238
  <a href="#" onclick="showPage('other')" class="card bg-orange-200">
239
- <img src="https://placehold.co/100x100/F57C00/FFFFFF?text=🍂" alt="فصول السنة" class="card-image">
240
  <span class="card-text">فصول السنة</span>
241
  </a>
242
  <a href="#" onclick="showPage('other')" class="card bg-green-200">
243
- <img src="https://placehold.co/100x100/388E3C/FFFFFF?text=🔢" alt="الأرقام" class="card-image">
244
  <span class="card-text">الأرقام</span>
245
  </a>
246
  <a href="#" onclick="showPage('other')" class="card bg-blue-200">
247
- <img src="https://placehold.co/100x100/00ACC1/FFFFFF?text=🍎" alt="خضر وفواكه" class="card-image">
248
  <span class="card-text">خضر وفواكه</span>
249
  </a>
250
  <a href="#" onclick="showPage('other')" class="card bg-orange-200">
251
- <img src="https://placehold.co/100x100/F57C00/FFFFFF?text=🦁" alt="حيوانات" class="card-image">
252
  <span class="card-text">حيوانات</span>
253
  </a>
254
  <a href="#" onclick="showPage('other')" class="card bg-green-200">
255
- <img src="https://placehold.co/100x100/388E3C/FFFFFF?text=👨‍👩‍👧‍👦" alt="العائلة" class="card-image">
256
  <span class="card-text">العائلة</span>
257
  </a>
258
  <a href="#" onclick="showPage('other')" class="card bg-blue-200">
259
- <img src="https://placehold.co/100x100/00ACC1/FFFFFF?text=🗓️" alt="أشهر السنة" class="card-image">
260
  <span class="card-text">أشهر السنة</span>
261
  </a>
262
  <a href="#" onclick="showPage('other')" class="card bg-orange-200">
263
- <img src="https://placehold.co/100x100/F57C00/FFFFFF?text=🧍" alt="أعضاء" class="card-image">
264
  <span class="card-text">أعضاء</span>
265
  </a>
266
  <a href="#" onclick="showPage('other')" class="card bg-green-200">
267
- <img src="https://placehold.co/100x100/388E3C/FFFFFF?text=🎮" alt="ألعاب تعليمية" class="card-image">
268
  <span class="card-text">ألعاب تعليمية</span>
269
  </a>
270
  </main>
 
21
  display: flex;
22
  flex-direction: column;
23
  align-items: center;
24
+ padding: 0;
25
  }
26
  .container {
27
+ max-width: 100%;
28
  width: 100%;
29
+ padding: 1rem;
30
  }
31
  .header {
32
  background-color: #3F51B5;
 
37
  display: flex;
38
  align-items: center;
39
  justify-content: space-between;
40
+ width: 95%;
41
+ margin: 0 auto;
42
  }
43
  .grid-container {
44
  display: grid;
45
  grid-template-columns: repeat(2, 1fr);
46
+ gap: 0.5rem; /* Reduced gap */
47
  margin-top: 1.5rem;
48
+ padding: 0 0.25rem; /* Reduced padding */
49
  }
50
  .card, .alphabet-card {
51
  padding: 1rem;
 
57
  flex-direction: column;
58
  align-items: center;
59
  text-align: center;
60
+ min-height: 14rem; /* Increased min height */
61
  position: relative;
62
  background-color: #FFB74D;
63
  }
 
65
  transform: scale(1.05);
66
  }
67
  .card-image {
68
+ width: 150px; /* Increased size */
69
+ height: 150px; /* Increased size */
70
  margin-bottom: 0.5rem;
71
  object-fit: contain;
72
  position: absolute;
73
+ top: 1rem;
74
  }
75
  .card-text {
76
  font-size: 1.25rem;
77
  font-weight: bold;
78
  color: #333;
79
  position: absolute;
80
+ bottom: 1rem;
81
  }
82
  .alphabet-card {
83
+ background-color: white;
84
  min-height: 15rem;
85
  }
86
  .alphabet-card .tifinagh-letter {
 
99
  font-family: 'Tifinagh', sans-serif;
100
  font-size: 1.2rem;
101
  margin-top: 1rem;
102
+ direction: ltr;
103
  }
104
  .red-letter {
105
  color: red;
 
137
  </div>
138
 
139
  <script>
 
140
  const tifinaghData = [
141
  { letter: 'ⵓ', word: 'ⴰⴳⴰⵍ', image: 'https://placehold.co/150x150/F57C00/FFFFFF?text=🧱' },
142
  { letter: 'ⵔ', word: 'ⴰⵔⴳⴰⵣ', image: 'https://placehold.co/150x150/F57C00/FFFFFF?text=🚶' },
 
158
  { letter: 'ⵠ', word: 'ⴰⵠⵉⵍ', image: 'https://placehold.co/150x150/F57C00/FFFFFF?text=🪶' },
159
  { letter: 'ⴹ', word: 'ⴹⵓ', image: 'https://placehold.co/150x150/F57C00/FFFFFF?text=☀️' },
160
  { letter: 'ⵄ', word: 'ⵄⴰ', image: 'https://placehold.co/150x150/F57C00/FFFFFF?text=🌱' },
161
+ { letter: 'ⴳ', word: 'ⴳⴰ', image: 'https://placehold.co/100x100/388E3C/FFFFFF?text=🐓' },
162
+ { letter: 'ⵗ', word: 'ⵗⵔⴰ', image: 'https://placehold.co/100x100/388E3C/FFFFFF?text=🌵' },
163
+ { letter: 'ⵕ', word: 'ⵕⴰ', image: 'https://placehold.co/100x100/388E3C/FFFFFF?text=🥖' },
164
+ { letter: 'ⵣ', word: 'ⵣⵉ', image: 'https://placehold.co/100x100/388E3C/FFFFFF?text=🌕' },
165
+ { letter: 'ⵣ', word: 'ⵣⴰ', image: 'https://placehold.co/100x100/388E3C/FFFFFF?text=🪵' },
166
+ { letter: 'ⴱ', word: 'ⴱⴰ', image: 'https://placehold.co/100x100/388E3C/FFFFFF?text=🧅' }
167
  ];
168
 
 
169
  function createAlphabetPage() {
170
  let content = `
171
  <div class="container">
 
181
  tifinaghData.forEach(item => {
182
  const highlightedWord = `<span class="red-letter">${item.word[0]}</span>${item.word.slice(1)}`;
183
  content += `
184
+ <div class="alphabet-card" onclick="speak('${item.letter}', '${item.word}')">
185
  <div class="tifinagh-letter">${item.letter}</div>
186
  <img src="${item.image}" alt="${item.word}" class="card-image-small">
187
  <div class="word text-xl mt-2">${highlightedWord}</div>
 
198
  function speak(letter, word) {
199
  if ('speechSynthesis' in window) {
200
  const message = new SpeechSynthesisUtterance(`${letter} ${word}`);
201
+ message.lang = 'ar-MA';
202
  window.speechSynthesis.speak(message);
203
  } else {
204
  showMessage("متصفحك لا يدعم خاصية النطق الصوتي.");
 
230
  </header>
231
  <main class="grid-container">
232
  <a href="#" onclick="showPage('other')" class="card bg-orange-200">
233
+ <img src="https://placehold.co/150x150/F57C00/FFFFFF?text=🎒" alt="أدوات مدرسية" class="card-image">
234
  <span class="card-text">أدوات مدرسية</span>
235
  </a>
236
  <a href="#" onclick="showPage('alphabet')" class="card bg-green-200">
237
+ <img src="https://placehold.co/150x150/388E3C/FFFFFF?text=🅰️" alt="حروف و كلمات" class="card-image">
238
  <span class="card-text">حروف و كلمات</span>
239
  </a>
240
  <a href="#" onclick="showPage('other')" class="card bg-orange-200">
241
+ <img src="https://placehold.co/150x150/F57C00/FFFFFF?text=🍂" alt="فصول السنة" class="card-image">
242
  <span class="card-text">فصول السنة</span>
243
  </a>
244
  <a href="#" onclick="showPage('other')" class="card bg-green-200">
245
+ <img src="https://placehold.co/150x150/388E3C/FFFFFF?text=🔢" alt="الأرقام" class="card-image">
246
  <span class="card-text">الأرقام</span>
247
  </a>
248
  <a href="#" onclick="showPage('other')" class="card bg-blue-200">
249
+ <img src="https://placehold.co/150x150/00ACC1/FFFFFF?text=🍎" alt="خضر وفواكه" class="card-image">
250
  <span class="card-text">خضر وفواكه</span>
251
  </a>
252
  <a href="#" onclick="showPage('other')" class="card bg-orange-200">
253
+ <img src="https://placehold.co/150x150/F57C00/FFFFFF?text=🦁" alt="حيوانات" class="card-image">
254
  <span class="card-text">حيوانات</span>
255
  </a>
256
  <a href="#" onclick="showPage('other')" class="card bg-green-200">
257
+ <img src="https://placehold.co/150x150/388E3C/FFFFFF?text=👨‍👩‍👧‍👦" alt="العائلة" class="card-image">
258
  <span class="card-text">العائلة</span>
259
  </a>
260
  <a href="#" onclick="showPage('other')" class="card bg-blue-200">
261
+ <img src="https://placehold.co/150x150/00ACC1/FFFFFF?text=🗓️" alt="أشهر السنة" class="card-image">
262
  <span class="card-text">أشهر السنة</span>
263
  </a>
264
  <a href="#" onclick="showPage('other')" class="card bg-orange-200">
265
+ <img src="https://placehold.co/150x150/F57C00/FFFFFF?text=🧍" alt="أعضاء" class="card-image">
266
  <span class="card-text">أعضاء</span>
267
  </a>
268
  <a href="#" onclick="showPage('other')" class="card bg-green-200">
269
+ <img src="https://placehold.co/150x150/388E3C/FFFFFF?text=🎮" alt="ألعاب تعليمية" class="card-image">
270
  <span class="card-text">ألعاب تعليمية</span>
271
  </a>
272
  </main>