feat: menu sheet, first-visit language picker, social sign-in, profile progress, history page

- Header keeps logo, links, bell/avatar or Get started; theme, language and feedback move into
  a menu sheet (native dialog) with large numbered links
- First visit asks for a language, prompt shown in all four
- Sign-in: Google / Apple / Telegram / Facebook buttons (simulated, like the phone code)
- One footer on every page (compact variant removed)
- Profile: identity header, stats, per-course progress with Continue and the lesson/quiz list,
  recent activity; /progress now opens the profile
- History page: dated timeline of lessons, purchases and reports

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
kirukib 2026-10-20 14:16:11 +03:00
parent e8f6a59d04
commit 4a3561bcb5
7 changed files with 322 additions and 51 deletions

View File

@ -71,6 +71,8 @@ export function StudentApp() {
const section = route[1] ?? '';
const unread = signedIn ? inbox.filter((n) => !n.readAt).length : 0;
const mainRef = useRef<HTMLElement>(null);
const sheet = useRef<HTMLDialogElement>(null);
const closeSheet = () => sheet.current?.close();
const [scrolled, setScrolled] = useState(false);
useEffect(() => {
const on = () => setScrolled(scrollY > 24);
@ -80,7 +82,7 @@ export function StudentApp() {
const go = (p: string) => nav(`/${locale}${p}`);
const tabs: [string, string, string][] = [['', 'home', t('nav.home')], ['courses', 'grid', t('nav.courses')], ['my', 'book', t('nav.myCourses')], ['help', 'help', t('nav.help')], ['profile', 'user', t('nav.profile')]];
const links = tabs.filter(([p]) => p !== 'profile' && (p !== 'my' || signedIn));
const current = (s: string) => (s === section || (s === 'courses' && (section === 'course')) || (s === 'my' && section === 'progress') ? 'page' : undefined);
const current = (s: string) => (s === section || (s === 'courses' && (section === 'course')) || (s === 'profile' && (section === 'progress' || section === 'history')) ? 'page' : undefined);
return (
<div lang={locale}>
@ -91,18 +93,33 @@ export function StudentApp() {
{links.map(([p, , label]) => <button key={p} aria-current={current(p)} onClick={() => go(p ? '/' + p : '')}>{label}</button>)}
</nav>
<div className="s-actions">
<FeedbackButton label={t('common.feedback')} target={() => mainRef.current} />
<ThemeToggle label={t('common.theme')} />
<LangPick />
{signedIn ? <>
<button className="icon-btn" aria-label={`${t('nav.notifications')}${unread ? ` (${unread})` : ''}`} onClick={() => go('/notifications')}><Icon name="bell" />{unread > 0 && <span className="dot">{unread}</span>}</button>
<UserMenu />
</> : <>
<button className="btn btn-accent btn-sm" onClick={() => go('/signin')}>{t('nav.getStarted')}</button>
</>}
<button className="icon-btn menu-btn" aria-label={t('nav.menu')} aria-haspopup="dialog" onClick={() => sheet.current?.showModal()}><Icon name="menu" size={22} /></button>
</div>
</div>
</header>
{/* Menu sheet: the main links set large, then the preferences that used to crowd the header. */}
<dialog ref={sheet} className="sheet" aria-label={t('nav.menu')} onClick={(e) => { if (e.target === sheet.current) closeSheet(); }}>
<div className="sheet-in">
<div className="sheet-top"><Logo size={30} /><button className="icon-btn" aria-label={t('common.close')} onClick={closeSheet}><Icon name="x" size={22} /></button></div>
<nav className="sheet-nav" aria-label="Main">
{tabs.filter(([p]) => signedIn || (p !== 'my' && p !== 'profile')).map(([p, , label], k) => <button key={p} aria-current={current(p)} onClick={() => { closeSheet(); go(p ? '/' + p : ''); }}><span className="num">{String(k + 1).padStart(2, '0')}</span>{label}</button>)}
{signedIn && <button aria-current={section === 'history' ? 'page' : undefined} onClick={() => { closeSheet(); go('/history'); }}><span className="num">{String(tabs.length + 1).padStart(2, '0')}</span>{t('nav.history')}</button>}
</nav>
<div className="sheet-prefs">
<div className="sheet-row"><span>{t('common.theme')}</span><ThemeToggle label={t('common.theme')} /></div>
<div className="sheet-row"><span>{t('common.language')}</span><LangPick /></div>
<div className="sheet-row" onClickCapture={closeSheet}><span>{t('common.feedback')}</span><FeedbackButton label={t('common.feedback')} target={() => mainRef.current} /></div>
</div>
<p className="sheet-foot"><a href={settings.telegramLink} target="_blank" rel="noreferrer">{t('help.telegram')}</a><span className="num">{settings.supportPhone}</span></p>
</div>
</dialog>
<LangWelcome />
<main className="s-main" ref={mainRef}>
{settings.maintenanceBanner && <div className="banner small" role="status">{settings.maintenanceBanner}</div>}
<StudentRoutes />
@ -127,6 +144,33 @@ function LangPick() {
);
}
// First visit: ask for a language before anything else. Shown in every language, since we don't know theirs yet.
const LANG_PROMPT: Record<string, string> = { en: 'Choose your language', am: 'ቋንቋ ይምረጡ', om: 'Afaan filadhu', ti: 'ቋንቋ ምረጽ' };
function LangWelcome() {
const { locale, setLocale } = useApp();
const ref = useRef<HTMLDialogElement>(null);
useEffect(() => {
let seen = true;
try { seen = !!localStorage.getItem('lms.langChosen'); } catch { /* storage blocked: don't nag */ }
if (!seen) ref.current?.showModal();
}, []);
const pick = (l: Locale) => {
try { localStorage.setItem('lms.langChosen', '1'); } catch {}
if (l !== locale) setLocale(l);
ref.current?.close();
};
return (
<dialog ref={ref} className="lang-welcome" aria-labelledby="lw-h" onCancel={() => pick(locale)}>
<img src="/photos/habesha-bride.jpg" alt="" />
<div className="lw-body">
<Logo size={30} />
<div><h2 id="lw-h" lang="en">{LANG_PROMPT.en}</h2><p>{LOCALES.filter((l) => l !== 'en').map((l) => <span key={l} lang={l}>{LANG_PROMPT[l]}</span>)}</p></div>
<div className="lw-list">{LOCALES.map((l) => <button key={l} lang={l} aria-current={l === locale} autoFocus={l === locale} onClick={() => pick(l)}><span>{LOCALE_NAMES[l]}</span><Icon name="chevron" size={18} /></button>)}</div>
</div>
</dialog>
);
}
// The choice lives in localStorage; apps/demo/app/layout.tsx applies it before first paint.
function ThemeToggle({ label }: { label: string }) {
const [dark, setDark] = useState(false);
@ -159,7 +203,7 @@ function UserMenu() {
<div className="menu-pop">
<div className="menu-head"><strong>{name}</strong>{(me?.phone || me?.email) && <span className="small muted">{me?.phone || me?.email}</span>}</div>
<button onClick={() => go(`/${locale}/profile`)}><Icon name="user" size={16} />{t('nav.profile')}</button>
<button onClick={() => go(`/${locale}/progress`)}><Icon name="chart" size={16} />{t('nav.progress')}</button>
<button onClick={() => go(`/${locale}/history`)}><Icon name="clock" size={16} />{t('nav.history')}</button>
<button onClick={() => go(`/${locale}/help`)}><Icon name="help" size={16} />{t('nav.help')}</button>
<button onClick={() => { signOut(); go(`/${locale}/signin`); }}><Icon name="logout" size={16} />{t('nav.signOut')}</button>
</div>
@ -171,19 +215,7 @@ function Footer() {
const t = useTranslations();
const { settings, locale, nav, categories, courses, signedIn, me, route } = useApp();
// Big marketing footer on the landing page and catalog only; app screens get one quiet line (audit 2026-10-16, Q1).
const full = (route[1] === undefined && !signedIn) || route[1] === 'courses';
const langs = <LangPick />;
if (!full) return (
<footer className="foot foot-compact">
<div className="foot-base">
<Logo size={22} mark /><span>© {new Date().getFullYear()} {settings.brandName}</span>
<a href={settings.telegramLink} target="_blank" rel="noreferrer">{t('help.telegram')}</a>
<span className="num">{settings.supportPhone}</span>
<div className="foot-langs">{langs}</div>
</div>
<p className="powered">{t.rich('footer.poweredBy', { name: () => <a className="shine" href="https://yaltopia.com" target="_blank" rel="noreferrer">Yaltopia Tech</a> })}</p>
</footer>
);
const go = (p: string) => nav(`/${locale}${p}`);
const kit: [string, string][] = [['foundation', 'kit1'], ['brush', 'kit2'], ['brow', 'kit3'], ['lipstick', 'kit4']];
return (
@ -203,7 +235,7 @@ function Footer() {
<div><h3>{t('nav.courses')}</h3>{categories.filter((c) => c.isActive).map((c) => <button key={c.id} onClick={() => go(`/courses/${c.slug}`)}>{tr(c.translations, locale)?.name}</button>)}</div>
<div><h3>{t('footer.learn')}</h3>
<button onClick={() => go('/courses')}>{t('catalog.title')}</button>
{signedIn && <button onClick={() => go('/progress')}>{t('nav.progress')}</button>}
{signedIn && <button onClick={() => go('/history')}>{t('nav.history')}</button>}
<button onClick={() => go('/help')}>{t('nav.help')}</button>
<a href="/waitlist">{t('footer.waitlist')}</a>
</div>
@ -254,7 +286,8 @@ function StudentRoutes() {
case 'pay': return <SignInGate><ProviderSim orderId={a} /></SignInGate>;
case 'orders': return <SignInGate><OrderStatusPage orderId={a} /></SignInGate>;
case 'my': return <SignInGate><MyCourses /></SignInGate>;
case 'progress': return <SignInGate><MyProgress /></SignInGate>;
case 'progress': return <SignInGate><Profile /></SignInGate>; // progress lives on the profile
case 'history': return <SignInGate><History /></SignInGate>;
case 'notifications': return <SignInGate><Inbox /></SignInGate>;
case 'help': return <Help />;
case 'profile': return <SignInGate><Profile /></SignInGate>;
@ -1024,22 +1057,47 @@ function MyCourses() {
);
}
function MyProgress() {
const t = useTranslations();
const { me, courses, locale, nav } = useApp();
const mine = courses.filter((c) => owns(me, c.id) && !c.isTest);
// Everything a student did, newest first: lessons finished or started, purchases, reports.
type Activity = { at: string; icon: string; text: string; link?: string };
function activity(me: Student, courses: Course[], locale: Locale, t: ReturnType<typeof useTranslations>): Activity[] {
const out: Activity[] = [];
for (const [lid, pr] of Object.entries(me.progress ?? {})) {
const c = courses.find((x) => x.id === pr.courseId);
const l = c?.chapters.flatMap((ch) => ch.lessons).find((x) => x.id === lid);
if (!c || !l) continue;
out.push({ at: pr.completedAt ?? pr.updatedAt, icon: pr.completedAt ? 'check' : 'play', text: t(pr.completedAt ? 'history.done' : 'history.watched', { lesson: lessonTitle(l, locale), course: ct(c, locale).title }), link: `/${locale}/learn/${c.slug}/${lid}` });
}
for (const o of Object.values(me.orders ?? {})) {
const c = courses.find((x) => x.id === o.courseId);
if (o.paidAt && c) out.push({ at: o.paidAt, icon: 'cart', text: t('history.paid', { course: ct(c, locale).title }), link: `/${locale}/course/${c.slug}` });
}
for (const i of Object.values(me.issues ?? {})) out.push({ at: i.createdAt, icon: 'flag', text: t('history.report', { subject: i.subject }), link: `/${locale}/help` });
return out.sort((a, b) => b.at.localeCompare(a.at));
}
function Timeline({ items, grouped }: { items: Activity[]; grouped?: boolean }) {
const { nav } = useApp();
return (
<section className="stack">
<h1 style={{ fontSize: 'var(--fs-2xl)' }}>{t('my.progressTitle')}</h1>
{!mine.length && <Empty action={<button className="btn" onClick={() => nav(`/${locale}/courses`)}>{t('landing.browse')}</button>}>{t('my.empty')}</Empty>}
{mine.map((c) => (
<div key={c.id} className="card stack-sm">
<div className="row prog-head"><Ring pct={courseProgress(c, me).pct} /><div className="grow"><h2 style={{ fontSize: 'var(--fs-lg)' }}>{ct(c, locale).title}</h2></div>
<button className="btn btn-ghost btn-sm" onClick={() => nav(`/${locale}/course/${c.slug}`)}>{t('course.content')}</button></div>
{[...c.chapters].sort((a, b) => a.sortOrder - b.sortOrder).map((ch) => <div key={ch.id}><p className="small" style={{ fontWeight: 700, padding: '8px 4px 2px' }}>{tr(ch.translations, locale)?.title}</p>{ch.lessons.filter((l) => l.isPublished).sort((a, b) => a.sortOrder - b.sortOrder).map((l) => <LessonRow key={l.id} c={c} l={l} />)}</div>)}
{!!c.assessments?.length && <div><p className="small" style={{ fontWeight: 700, padding: '8px 4px 2px' }}>{t('assess.title')}</p>{c.assessments.map((a) => <AssessmentRow key={a.id} c={c} a={a} />)}</div>}
</div>
))}
<ol className="tl">{items.map((a, k) => <li key={k}>
{grouped && (k === 0 || fmtDate(items[k - 1].at) !== fmtDate(a.at)) && <h3 className="tl-day">{fmtDate(a.at)}</h3>}
<button className="tl-row" disabled={!a.link} onClick={() => a.link && nav(a.link)}>
<span className={`tl-ic tl-${a.icon}`}><Icon name={a.icon} size={16} /></span>
<span className="tl-txt">{a.text}{!grouped && <time className="small muted">{fmtDate(a.at)}</time>}</span>
{a.link && <Icon name="chevron" size={16} />}
</button>
</li>)}</ol>
);
}
function History() {
const t = useTranslations();
const { me, courses, locale } = useApp();
if (!me) return null;
const items = activity(me, courses, locale, t);
return (
<section className="pf">
<header className="pf-head"><h1>{t('history.title')}</h1><p className="muted">{t('history.lead')}</p></header>
{items.length ? <Timeline items={items} grouped /> : <Empty>{t('history.empty')}</Empty>}
</section>
);
}
@ -1175,10 +1233,9 @@ function SignIn() {
<div className="auth-main">
{!viewer?.id ? <Empty>{t('auth.noIdentity')}</Empty> : step === 'start' ? <form className="stack" onSubmit={(e) => { e.preventDefault(); send(); }}>
<div className="stack-sm"><h1>{t('auth.welcome')}</h1><p className="muted">{t('auth.welcomeLead')}</p></div>
{me && !me.deletedAt && <>
<button type="button" className="btn btn-accent btn-block btn-lg" onClick={() => { signIn(); nav(`/${locale}`); }}>{t('auth.continueAs', { name: me.name.split(' ')[0] })}</button>
<div className="or"><span>{t('auth.or')}</span></div>
</>}
{me && !me.deletedAt && <button type="button" className="btn btn-accent btn-block btn-lg" onClick={() => { signIn(); nav(`/${locale}`); }}>{t('auth.continueAs', { name: me.name.split(' ')[0] })}</button>}
<SocialLogins onPick={() => { if (me && !me.deletedAt) { signIn(); nav(`/${locale}`); } else setStep('setup'); }} />
<div className="or"><span>{t('auth.or')}</span></div>
<h2 className="auth-h2">{mode === 'phone' ? t('auth.phoneTitle') : t('auth.emailTitle')}</h2>
{mode === 'phone' ? (
<label className="field"><span>{t('auth.phoneLabel')}</span>
@ -1206,6 +1263,24 @@ function SignIn() {
);
}
// Simulated like the phone code: any provider signs the demo viewer in (or starts profile setup).
const SOCIAL: [string, string, ReactNode][] = [
['google', 'Google', <><path fill="#FFC107" d="M43.6 20.1H42V20H24v8h11.3C33.7 32.7 29.2 36 24 36c-6.6 0-12-5.4-12-12s5.4-12 12-12c3.1 0 5.8 1.2 7.9 3.1l5.7-5.7C34 6.1 29.3 4 24 4 12.9 4 4 12.9 4 24s8.9 20 20 20 20-8.9 20-20c0-1.3-.1-2.6-.4-3.9z" /><path fill="#FF3D00" d="M6.3 14.7l6.6 4.8C14.7 15.1 19 12 24 12c3.1 0 5.8 1.2 7.9 3.1l5.7-5.7C34 6.1 29.3 4 24 4 16.3 4 9.7 8.3 6.3 14.7z" /><path fill="#4CAF50" d="M24 44c5.2 0 9.9-2 13.4-5.2l-6.2-5.2C29.2 35.1 26.7 36 24 36c-5.2 0-9.6-3.3-11.3-7.9l-6.5 5C9.5 39.6 16.2 44 24 44z" /><path fill="#1976D2" d="M43.6 20.1H42V20H24v8h11.3c-.8 2.2-2.2 4.2-4.1 5.6l6.2 5.2C37 39.2 44 34 44 24c0-1.3-.1-2.6-.4-3.9z" /></>],
['apple', 'Apple', <path fill="currentColor" transform="scale(2)" d="M12.15 6.9c-.95 0-2.42-1.08-3.96-1.04-2.04.03-3.91 1.18-4.96 3.01-2.12 3.68-.55 9.1 1.52 12.09 1.01 1.45 2.2 3.09 3.79 3.04 1.52-.07 2.09-.99 3.94-.99 1.83 0 2.35.99 3.96.95 1.64-.03 2.68-1.48 3.68-2.95 1.16-1.69 1.64-3.33 1.66-3.42-.04-.01-3.18-1.22-3.22-4.86-.03-3.04 2.48-4.49 2.6-4.56-1.43-2.09-3.62-2.32-4.39-2.38-2-.16-3.68 1.09-4.62 1.09zm3.38-3.07c.84-1.01 1.4-2.43 1.25-3.83-1.21.05-2.66.8-3.53 1.82-.78.9-1.45 2.34-1.27 3.71 1.34.1 2.71-.69 3.55-1.7z" />],
['telegram', 'Telegram', <><circle cx="24" cy="24" r="24" fill="#26A5E4" /><path fill="#fff" d="M10.8 23.6l23.2-9c1-.4 1.9.2 1.6 1.9l-4 18.6c-.3 1.3-1.1 1.6-2.1 1l-6-4.4-2.9 2.8c-.3.3-.6.6-1.2.6l.4-6.1 11.2-10.1c.5-.4-.1-.7-.8-.3l-13.8 8.7-6-1.9c-1.3-.4-1.3-1.3.4-1.8z" /></>],
['facebook', 'Facebook', <path fill="#1877F2" transform="scale(2)" d="M24 12.07C24 5.41 18.63 0 12 0S0 5.4 0 12.07C0 18.1 4.39 23.1 10.13 24v-8.44H7.08v-3.49h3.04V9.41c0-3.02 1.8-4.7 4.54-4.7 1.31 0 2.68.24 2.68.24v2.97h-1.5c-1.5 0-1.96.93-1.96 1.89v2.26h3.32l-.53 3.5h-2.8V24C19.62 23.1 24 18.1 24 12.07" />],
];
function SocialLogins({ onPick }: { onPick(provider: string): void }) {
const t = useTranslations();
return (
<div className="social" role="group" aria-label={t('auth.socialLabel')}>
{SOCIAL.map(([id, name, mark]) => <button key={id} type="button" className="social-btn" aria-label={t('auth.continueWith', { name })} onClick={() => onPick(id)}>
<svg viewBox="0 0 48 48" width="20" height="20" aria-hidden>{mark}</svg>{name}
</button>)}
</div>
);
}
export function LocationFields({ country, city, onCountry, onCity, labels }: { country: string; city: string; onCountry(v: string): void; onCity(v: string): void; labels: { country: string; city: string; pick: string; type: string } }) {
return <>
<label className="field"><span>{labels.country}</span>
@ -1255,7 +1330,7 @@ const NOTIF_TYPES = ['PAYMENT', 'NEW_LESSON', 'ISSUE', 'ANNOUNCEMENT'] as const;
function Profile() {
const t = useTranslations();
const { me, ds, write, courses, locale, setLocale, signOut, nav } = useApp();
const { me, ds, write, courses, categories, locale, setLocale, signOut, nav } = useApp();
const [name, setName] = useState(me?.name ?? '');
const [phone, setPhone] = useState(me?.phone ?? '');
const [email, setEmail] = useState(me?.email ?? '');
@ -1275,9 +1350,50 @@ function Profile() {
const pref = (type: string, ch: 'EMAIL' | 'SMS') => me.notificationPrefs?.[type]?.[ch] !== false;
const orders = Object.values(me.orders ?? {}).sort((a, b) => b.createdAt.localeCompare(a.createdAt));
const courseTitle = (id: string) => { const c = courses.find((x) => x.id === id); return c ? ct(c, locale).title : id; };
const mine = courses.filter((c) => owns(me, c.id) && !c.isTest);
const finished = Object.values(me.progress ?? {}).filter((x) => x.completedAt).length;
const watched = Object.values(me.watchSec ?? {}).reduce((a, b) => a + b, 0);
const recent = activity(me, courses, locale, t).slice(0, 5);
const where = [me.city, COUNTRIES.find(([code]) => code === me.country)?.[1]].filter(Boolean).join(', ');
return (
<section className="stack">
<h1 style={{ fontSize: 'var(--fs-2xl)' }}>{t('profile.title')}</h1>
<section className="pf">
<header className="pf-hero">
<span className="pf-avatar" aria-hidden>{initials(me.name)}</span>
<div className="pf-id"><h1>{me.name}</h1><p>{where && <>{where} · </>}{t('profile.since', { date: fmtDate(me.createdAt) })}</p></div>
</header>
<dl className="pf-stats">
<div><dt>{t('profile.statCourses')}</dt><dd className="num">{mine.length}</dd></div>
<div><dt>{t('profile.statLessons')}</dt><dd className="num">{finished}</dd></div>
<div><dt>{t('profile.statTime')}</dt><dd className="num">{formatDuration(watched)}</dd></div>
</dl>
<section className="pf-sec" id="progress">
<h2>{t('my.progressTitle')}</h2>
{mine.length ? <ul className="pf-courses">{mine.map((c) => {
const pr = courseProgress(c, me);
const r = resumePoint(c, me);
return <li key={c.id} className="pf-course">
<img src={c.coverAssetId ? ds.assetUrl(c.coverAssetId) : coursePhoto(c, categories.map((k) => k.id))} alt="" loading="lazy" />
<div className="pf-c-main">
<strong>{ct(c, locale).title}</strong>
<div className="bar"><i style={{ width: `${pr.pct}%` }} /></div>
<span className="small muted num">{t('my.lessonsDone', { done: pr.done, total: pr.total })} · {pr.pct}%</span>
</div>
{r && <button className={`btn btn-sm ${pr.pct === 100 ? 'btn-ghost' : 'btn-accent'}`} onClick={() => nav(`/${locale}/learn/${c.slug}/${r.lesson.id}`)}>{pr.pct === 100 ? t('course.watchAgain') : t('course.continue', { n: r.index + 1 })}</button>}
<details className="pf-more"><summary>{t('profile.lessonsList')}<Icon name="down" size={16} /></summary>
{[...c.chapters].sort((a, b) => a.sortOrder - b.sortOrder).map((ch) => <div key={ch.id}><p className="small" style={{ fontWeight: 700, padding: '8px 4px 2px' }}>{tr(ch.translations, locale)?.title}</p>{ch.lessons.filter((l) => l.isPublished).sort((a, b) => a.sortOrder - b.sortOrder).map((l) => <LessonRow key={l.id} c={c} l={l} />)}</div>)}
{!!c.assessments?.length && <div><p className="small" style={{ fontWeight: 700, padding: '8px 4px 2px' }}>{t('assess.title')}</p>{c.assessments.map((a) => <AssessmentRow key={a.id} c={c} a={a} />)}</div>}
</details>
</li>;
})}</ul> : <Empty action={<button className="btn" onClick={() => nav(`/${locale}/courses`)}>{t('landing.browse')}</button>}>{t('my.empty')}</Empty>}
</section>
<section className="pf-sec">
<div className="row-between"><h2>{t('history.title')}</h2>{recent.length > 0 && <button className="btn btn-ghost btn-sm" onClick={() => nav(`/${locale}/history`)}>{t('history.seeAll')}</button>}</div>
{recent.length ? <Timeline items={recent} /> : <p className="muted">{t('history.empty')}</p>}
</section>
<h2 className="pf-h">{t('profile.account')}</h2>
<div className="two-col">
<form className="card stack" onSubmit={save}>
<h2 style={{ fontSize: 'var(--fs-lg)' }}>{t('profile.details')}</h2>

View File

@ -557,10 +557,6 @@ fieldset[disabled] .quiz-opt { cursor: default; }
/* ================= v6: audit 2026-10-16 phases 2–3 ================= */
/* Q1: compact footer on app screens */
.foot-compact { margin-top: 32px; padding-top: 20px; padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 900px) { .foot-compact { padding-bottom: 20px; } }
.foot-compact .foot-base { max-width: 1200px; margin: 0 auto; padding-top: 0; border-top: 0; letter-spacing: normal; text-transform: none; font-size: var(--fs-sm); }
.foot-compact a { color: var(--ink-2); text-decoration: none; } .foot-compact a:hover { color: var(--accent); }
.foot-langs { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-left: auto; }
.foot-langs button { background: none; border: 0; padding: 4px 0; cursor: pointer; color: var(--ink-2); font-size: var(--fs-sm); }
.foot-langs button[aria-current="true"] { color: var(--ink); font-weight: 700; }
@ -868,8 +864,6 @@ fieldset[disabled] .quiz-opt { cursor: default; }
.statbar > div { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 10px; }
.statbar .stat-ic { width: 36px; height: 36px; border-radius: 10px; }
}
/* narrow phones: header actions must fit 360-390px signed out (feedback, theme, language, Get started) */
@media (max-width: 420px) { .s-actions { gap: 2px; } .s-actions .lang-pick > svg { display: none; } .s-actions .lang-pick { padding-left: 8px; } .s-top-in { gap: 6px; } }
/* "Powered by Yaltopia Tech": a light band sweeps across the name every few seconds */
.powered { text-align: center; font-size: 12px; color: var(--ink-3); padding: 18px 16px 4px; letter-spacing: .04em; }
.shine { font-weight: 700; text-decoration: none; color: transparent; background: linear-gradient(110deg, var(--ink-2) 40%, #fff 50%, var(--ink-2) 60%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; animation: shine 3.2s linear infinite; }
@ -934,3 +928,83 @@ fieldset[disabled] .quiz-opt { cursor: default; }
.help-faq summary svg { flex: none; color: var(--ink-3); transition: transform 200ms var(--ease-out); }
.help-faq details[open] summary svg { transform: rotate(45deg); }
@media (max-width: 760px) { .cd-head { min-height: 560px; } .cd-hero-img { height: 62%; object-position: center 20%; } .cd-head::after { background: linear-gradient(180deg, rgba(10, 10, 10, .5), transparent 25%, rgba(10, 10, 10, .2) 42%, #0A0A0A 62%); } }
/* ---------- menu sheet 2026-10-20: quiet header, preferences behind the menu button ---------- */
.s-actions { gap: 6px; }
.sheet { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(440px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; padding: 0; border: 0; border-left: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.sheet::backdrop { background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px); }
.sheet[open] { animation: sheet-in 320ms var(--ease-out); }
.sheet[open]::backdrop { animation: fade-in 320ms ease; }
@keyframes sheet-in { from { transform: translateX(32px); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
.sheet-in { height: 100%; display: flex; flex-direction: column; gap: 28px; padding: 16px 20px calc(24px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; }
.sheet-top { display: flex; align-items: center; justify-content: space-between; }
.sheet-nav { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.sheet-nav button { display: flex; align-items: baseline; gap: 16px; padding: 18px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink-2); font-family: var(--f-head); font-size: clamp(28px, 8vw, 36px); font-weight: 600; letter-spacing: -.035em; text-align: left; cursor: pointer; transition: color 160ms, padding 240ms var(--ease-out); }
.sheet-nav button .num { font-size: 12px; font-weight: 600; letter-spacing: .12em; color: var(--ink-3); width: 24px; flex: none; }
.sheet-nav button:hover, .sheet-nav button[aria-current="page"] { color: var(--ink); padding-left: 6px; }
.sheet-nav button[aria-current="page"]::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); align-self: center; margin-left: auto; }
.sheet-prefs { display: flex; flex-direction: column; gap: 4px; margin-top: auto; }
.sheet-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 6px 4px; border-bottom: 1px solid var(--line); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.sheet-row:has(.feedback-btn:empty), .sheet-row:not(:has(button, select)) { display: none; }
.sheet-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: var(--fs-sm); color: var(--ink-3); }
.sheet-foot a { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .sheet[open], .sheet[open]::backdrop { animation: none; } }
/* ---------- profile + history (mobile first) ---------- */
.pf { display: flex; flex-direction: column; gap: 28px; }
.pf-hero { display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: 24px; background: linear-gradient(135deg, var(--mist), transparent 70%); border: 1px solid var(--line); }
.pf-avatar { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); font-family: var(--f-head); font-size: 22px; font-weight: 700; letter-spacing: -.02em; box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--line); }
.pf-id { min-width: 0; }
.pf-id h1, .pf-head h1 { font-size: clamp(26px, 5vw, 44px); letter-spacing: -.04em; line-height: 1.05; }
.pf-id p { color: var(--ink-3); font-size: var(--fs-sm); margin-top: 4px; }
.pf-head { display: flex; flex-direction: column; gap: 6px; }
.pf-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border-block: 1px solid var(--line); }
.pf-stats > div { padding: 16px 12px; display: flex; flex-direction: column-reverse; gap: 4px; min-width: 0; }
.pf-stats > div + div { border-left: 1px solid var(--line); }
.pf-stats dt { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.pf-stats dd { margin: 0; font-size: clamp(24px, 5vw, 44px); font-weight: 700; letter-spacing: -.04em; line-height: 1; white-space: nowrap; }
.pf-sec { display: flex; flex-direction: column; gap: 14px; }
.pf-sec h2, .pf-h { font-size: var(--fs-xl); letter-spacing: -.02em; }
.pf-courses { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 900px) { .pf-courses { grid-template-columns: 1fr 1fr; } }
.pf-course { display: grid; grid-template-columns: 72px minmax(0, 1fr); grid-template-areas: "img main" "btn btn" "more more"; gap: 12px 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); }
.pf-course > img { grid-area: img; width: 72px; height: 88px; object-fit: cover; object-position: center 20%; border-radius: 14px; }
.pf-c-main { grid-area: main; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pf-course > .btn { grid-area: btn; border-radius: 999px; min-height: 44px; }
.pf-more { grid-area: more; border-top: 1px solid var(--line); padding-top: 4px; }
.pf-more summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 8px 4px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); cursor: pointer; }
.pf-more summary::-webkit-details-marker { display: none; }
.pf-more summary svg { transition: transform 200ms var(--ease-out); }
.pf-more[open] summary svg { transform: rotate(180deg); }
.tl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tl-day { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding: 18px 0 6px; }
.tl li:first-child .tl-day { padding-top: 0; }
.tl-row { width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); text-align: left; cursor: pointer; min-height: 56px; }
.tl-row:disabled { cursor: default; }
.tl-row > svg { color: var(--ink-3); flex: none; }
.tl-ic { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--mist); color: var(--ink-2); }
.tl-check { background: var(--ink); color: var(--paper); }
.tl-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-sm); line-height: 1.4; }
/* ---------- social sign-in ---------- */
.social { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.social-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-weight: 600; font-size: var(--fs-sm); cursor: pointer; transition: background 160ms, border-color 160ms; }
.social-btn:hover { background: var(--mist); border-color: var(--ink-3); }
.social-btn svg { flex: none; }
/* first-visit language picker */
.lang-welcome { width: min(760px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line); border-radius: 28px; background: var(--paper); color: var(--ink); overflow: hidden; }
.lang-welcome[open] { display: grid; grid-template-columns: 1fr; animation: sheet-in 360ms var(--ease-out); }
.lang-welcome::backdrop { background: rgba(0, 0, 0, .7); backdrop-filter: blur(8px); }
.lang-welcome > img { width: 100%; height: 160px; object-fit: cover; object-position: center 22%; }
.lw-body { display: flex; flex-direction: column; gap: 20px; padding: 20px 20px 24px; }
.lw-body h2 { font-size: clamp(28px, 6vw, 40px); letter-spacing: -.04em; line-height: 1.05; }
.lw-body p { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; color: var(--ink-3); font-size: var(--fs-sm); }
.lw-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.lw-list button { display: flex; justify-content: space-between; align-items: center; min-height: 56px; padding: 0 4px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font-size: var(--fs-lg); font-weight: 600; cursor: pointer; transition: padding 240ms var(--ease-out); }
.lw-list button:hover, .lw-list button:focus-visible { padding-left: 10px; }
.lw-list button[aria-current="true"] svg { color: var(--ink); } .lw-list button svg { color: var(--ink-3); }
@media (min-width: 700px) { .lang-welcome[open] { grid-template-columns: 1fr 1.2fr; } .lang-welcome > img { height: 100%; min-height: 460px; } .lw-body { padding: 32px; justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .lang-welcome[open] { animation: none; } }

View File

@ -15,6 +15,7 @@
"theme": "ጨለማ ገጽታ"
},
"nav": {
"history": "ታሪክ",
"home": "መነሻ",
"courses": "ኮርሶች",
"myCourses": "የእኔ ኮርሶች",
@ -25,7 +26,8 @@
"signOut": "ውጣ",
"getStarted": "ይጀምሩ",
"account": "መለያ",
"progress": "የእኔ እድገት"
"progress": "የእኔ እድገት",
"menu": "ማውጫ"
},
"landing": {
"title": "ከሥራ ላይ ካሉ ባለሙያዎች ሙያዊ ሜካፕ ይማሩ",
@ -63,6 +65,8 @@
"waitPill": "በቅርቡ ይከፈታል · የተጠባባቂ ዝርዝሩን ይቀላቀሉ"
},
"auth": {
"socialLabel": "በሌላ መለያ ይግቡ",
"continueWith": "በ{name} ይቀጥሉ",
"phoneTitle": "በስልክዎ ይግቡ",
"phoneLabel": "ስልክ ቁጥር",
"sendCode": "ኮድ ላክ",
@ -252,6 +256,12 @@
"required": "ርዕሱንና የተፈጠረውን ይሙሉ።"
},
"profile": {
"lessonsList": "ትምህርቶችና ፈተናዎች",
"account": "የመለያ ቅንብሮች",
"statTime": "የታየ ጊዜ",
"statLessons": "የተጠናቀቁ ትምህርቶች",
"statCourses": "ኮርሶች",
"since": "ከ{date} ጀምሮ አባል",
"title": "መገለጫ",
"details": "የእርስዎ መረጃ",
"phone": "ስልክ",
@ -357,5 +367,15 @@
"workTitle": "የተማሪዎች ሥራ",
"workSub": "በሲርኩል ተማሪዎች የተሠሩ",
"credits": "የፎቶ ምንጮች"
},
"history": {
"title": "ታሪክ",
"lead": "ያዩት፣ የጨረሱትና የገዙት ሁሉ።",
"done": "“{lesson}” ጨርሰዋል · {course}",
"watched": "“{lesson}” አይተዋል · {course}",
"paid": "{course} ገዝተዋል",
"report": "ሪፖርት ልከዋል፦ {subject}",
"empty": "እስካሁን ምንም የለም። ትምህርት ሲጀምሩ እዚህ ይታያል።",
"seeAll": "ሁሉንም ይመልከቱ"
}
}

View File

@ -15,6 +15,7 @@
"theme": "Dark mode"
},
"nav": {
"history": "History",
"home": "Home",
"courses": "Courses",
"myCourses": "My courses",
@ -25,7 +26,8 @@
"signOut": "Sign out",
"getStarted": "Get started",
"account": "Account",
"progress": "My progress"
"progress": "My progress",
"menu": "Menu"
},
"landing": {
"title": "Learn professional makeup from working artists",
@ -63,6 +65,8 @@
"waitPill": "Opening soon · Join the waitlist"
},
"auth": {
"socialLabel": "Sign in with another account",
"continueWith": "Continue with {name}",
"phoneTitle": "Sign in with your phone",
"phoneLabel": "Phone number",
"sendCode": "Send code",
@ -252,6 +256,12 @@
"required": "Fill in the subject and what happened."
},
"profile": {
"lessonsList": "Lessons and quizzes",
"account": "Account settings",
"statTime": "Watch time",
"statLessons": "Lessons finished",
"statCourses": "Courses",
"since": "Member since {date}",
"title": "Profile",
"details": "Your details",
"phone": "Phone",
@ -357,5 +367,15 @@
"workTitle": "Student work",
"workSub": "Looks by Sirkul students",
"credits": "Photo credits"
},
"history": {
"title": "History",
"lead": "Everything you've watched, finished and bought.",
"done": "Finished “{lesson}” · {course}",
"watched": "Watched “{lesson}” · {course}",
"paid": "Bought {course}",
"report": "Sent a report: {subject}",
"empty": "Nothing yet. Start a lesson and it shows up here.",
"seeAll": "See all"
}
}

View File

@ -15,6 +15,7 @@
"theme": "Haala dukkanaa"
},
"nav": {
"history": "Seenaa",
"home": "Mana",
"courses": "Koorsiiwwan",
"myCourses": "Koorsiiwwan koo",
@ -25,7 +26,8 @@
"signOut": "Ba'i",
"getStarted": "Get started",
"account": "Account",
"progress": "My progress"
"progress": "My progress",
"menu": "Baafata"
},
"landing": {
"title": "Ogeeyyii hojii irra jiran irraa meekaappii ogummaa baradhu",
@ -63,6 +65,8 @@
"waitPill": "Dhiyootti banama · Tarree eegdotaatti makami"
},
"auth": {
"socialLabel": "Herrega biraatiin seeni",
"continueWith": "{name}n itti fufi",
"phoneTitle": "Bilbila keetiin seeni",
"phoneLabel": "Lakkoofsa bilbilaa",
"sendCode": "Koodii ergi",
@ -252,6 +256,12 @@
"required": "Mata-duree fi waan uumame guuti."
},
"profile": {
"lessonsList": "Barnootaa fi qormaata",
"account": "Qindaa'ina herregaa",
"statTime": "Yeroo ilaalame",
"statLessons": "Barnoota xumuraman",
"statCourses": "Koorsiiwwan",
"since": "Miseensa {date} irraa",
"title": "Piroofaayilii",
"details": "Odeeffannoo kee",
"phone": "Bilbila",
@ -357,5 +367,15 @@
"workTitle": "Hojii barattootaa",
"workSub": "Kan barattoota Sirkul",
"credits": "Madda suuraalee"
},
"history": {
"title": "Seenaa",
"lead": "Waan ilaalte, xumurte fi bitte hunda.",
"done": "“{lesson}” xumurte · {course}",
"watched": "“{lesson}” ilaalte · {course}",
"paid": "{course} bitte",
"report": "Gabaasa ergite: {subject}",
"empty": "Ammaaf homaa hin jiru. Barnoota jalqabi, asitti mul'ata.",
"seeAll": "Hunda ilaali"
}
}

View File

@ -15,6 +15,7 @@
"theme": "ጸልማት ገጽ"
},
"nav": {
"history": "ታሪኽ",
"home": "መበገሲ",
"courses": "ኮርሳት",
"myCourses": "ናተይ ኮርሳት",
@ -25,7 +26,8 @@
"signOut": "ውጻእ",
"getStarted": "Get started",
"account": "Account",
"progress": "My progress"
"progress": "My progress",
"menu": "መውጽኢ"
},
"landing": {
"title": "ካብ ኣብ ስራሕ ዘለዉ ሞያውያን ሞያዊ ሜካፕ ተማሃር",
@ -63,6 +65,8 @@
"waitPill": "ቀልጢፉ ይኽፈት · ናብ ዝርዝር ተጸበይቲ ተጸንበር"
},
"auth": {
"socialLabel": "ብካልእ ሕሳብ እቶ",
"continueWith": "ብ{name} ቀጽል",
"phoneTitle": "ብተሌፎንካ እቶ",
"phoneLabel": "ቁጽሪ ተሌፎን",
"sendCode": "ኮድ ስደድ",
@ -252,6 +256,12 @@
"required": "ኣርእስትን ዘጋጠመን ምላእ።"
},
"profile": {
"lessonsList": "ትምህርትታትን ፈተናታትን",
"account": "ምድላው ሕሳብ",
"statTime": "ዝተራእየ ግዜ",
"statLessons": "ዝተወድኡ ትምህርትታት",
"statCourses": "ኮርሳት",
"since": "ካብ {date} ኣባል",
"title": "ፕሮፋይል",
"details": "ሓበሬታኻ",
"phone": "ተሌፎን",
@ -357,5 +367,15 @@
"workTitle": "ስራሕ ተምሃሮ",
"workSub": "ብተምሃሮ ሲርኩል ዝተሰርሑ",
"credits": "ምንጪ ስእልታት"
},
"history": {
"title": "ታሪኽ",
"lead": "ዝረኣኻዮ፣ ዝወዳእካዮን ዝገዛእካዮን ኩሉ።",
"done": "“{lesson}” ወዲእካ · {course}",
"watched": "“{lesson}” ርኢኻ · {course}",
"paid": "{course} ገዚእካ",
"report": "ጸብጻብ ሰዲድካ፦ {subject}",
"empty": "ገና የለን። ትምህርቲ ጀምር፣ ኣብዚ ክርአ እዩ።",
"seeAll": "ኩሉ ርአ"
}
}

View File

@ -21,6 +21,7 @@ async function worker(list) {
let errs = []; p.on('pageerror', (e) => errs.push(e.message));
await p.evaluateOnNewDocument((s) => { window.__SEED__ = s; }, seed);
await p.evaluateOnNewDocument(mock);
await p.evaluateOnNewDocument(() => { try { localStorage.setItem('lms.langChosen', '1'); } catch {} });
for (const [hash, signedOut] of list) {
await p.evaluateOnNewDocument((so) => { try { so ? localStorage.setItem('lms.signedOut', '1') : localStorage.removeItem('lms.signedOut'); } catch {} }, !!signedOut);
await open(p, hash, signedOut);