Add B1 Meister: OeSD B1 exam trainer (German-Arabic)

Next.js app with Hoeren, Lesen, Schreiben, Sprechen, Grammatik and Wortschatz sections, flashcards with spaced repetition, speaking chat, XP/streaks/badges, daily reminders (PWA) and Docker Compose setup for Coolify.
This commit is contained in:
X4Lo committed 2026-11-05 19:11:46 +00:00
commit 1f1d28a34d
42 files changed
+8879

No files matched your search

+33
View File
@@ -0,0 +1,33 @@
"use client";
import { useState } from "react";
import { useProgress } from "@/lib/progress";
/** Arabische Übersetzung. Wenn „Arabisch ausblenden“ aktiv ist, erscheint sie erst nach Antippen. */
export default function Ar({ children, block = false, always = false }: { children: React.ReactNode; block?: boolean; always?: boolean }) {
const { showArabic } = useProgress();
const [revealed, setRevealed] = useState(false);
const Tag = block ? "div" : "span";
if (!showArabic && !always && !revealed) {
return (
<Tag>
<button
type="button"
onClick={(e) => {
e.stopPropagation();
setRevealed(true);
}}
className="pill purple"
style={{ border: "none", cursor: "pointer" }}
>
👁 عربي
</button>
</Tag>
);
}
return (
<Tag className="ar" lang="ar" dir="rtl" style={block ? { display: "block" } : undefined}>
{children}
</Tag>
);
}