مولّد الإنتاج الكتابي للأطفال body { font-family: 'Arial', sans-serif; background: #f5f5fa; padding: 2rem; text-align: center; direction: rtl; } h1 { color: #2c3e50; margin-bottom: 1rem; } textarea, select, button { width: 80%; margin: 1rem auto; display: block; padding: 1rem; font-size: 1rem; border-radius: 8px; border: 1px solid #ccc; } .output { background: #fff; padding: 1rem; margin-top: 2rem; border-radius: 10px; box-shadow: 0 0 10px #ccc; text-align: left; direction: ltr; } .btn { background: #3498db; color: white; border: none; cursor: pointer; } .btn:hover { background: #2980b9; } ✍️ أداة إنتاج كتابي مبسط للأطفال العربية Français English 🪄 أنشئ الإنتاج 📝 النص بالفرنسية: 📘 الترجمة بالعربية: 📄 تحميل TXT const prompts = { fr: { "أحكِ عن يوم في المدرسة": "Aujourd'hui, je vais raconter ma journée à l'école. J'ai appris de nouvelles choses, joué avec mes amis et mangé à la cantine.", "صف حيوانك الأليف": "Mon animal de compagnie est un petit chat. Il s'appelle Mimi. Il est doux, gentil et il aime jouer avec moi.", "اكتب عن العطلة الصيفية": "Pendant les vacances d'été, je suis allé chez mes grands-parents. On a visité la plage, mangé des glaces et joué beaucoup." }, ar: { "أحكِ عن يوم في المدرسة": "اليوم سأحكي عن يومي في المدرسة. تعلمت أشياء جديدة، ولعبت مع أصدقائي، وتناولت الطعام في المطعم المدرسي.", "صف حيوانك الأليف": "حيواني الأليف هو قطة صغيرة اسمها ميمي. إنها لطيفة وتحب اللعب معي.", "اكتب عن العطلة الصيفية": "في العطلة الصيفية زرت أجدادي، وذهبنا إلى الشاطئ، وأكلنا المثلجات، ولعبنا كثيرًا." } }; function setLang(lang) { document.body.dir = lang === 'ar' ? 'rtl' : 'ltr'; } function generate() { const input = document.getElementById("inputText").value.trim(); const fr = prompts.fr[input] || "Je suis un élève curieux. J'aime écrire des histoires simples."; const ar = prompts.ar[input] || "أنا تلميذ فضولي. أحب كتابة قصص بسيطة."; document.getElementById("fr_output").textContent = fr; document.getElementById("ar_output").textContent = ar; document.getElementById("output").style.display = "block"; } function exportTxt() { const fr = document.getElementById("fr_output").textContent; const ar = document.getElementById("ar_output").textContent; const content = `Texte français:\n${fr}\n\nTraduction arabe:\n${ar}`; const blob = new Blob([content], {type: "text/plain;charset=utf-8"}); const link = document.createElement("a"); link.href = URL.createObjectURL(blob); link.download = "production.txt"; link.click(); }