feat(demo): cleaner UI, sign-in page with student/admin switch, English default
- Navbar: brand | links | language, notifications, account menu - Landing and course page redesigned (hero, stats bar, categories, breadcrumb course page with chapter accordion sidebar) - Sign-in page with Student and Admin tabs; admin screens need an admin sign-in on top of edit access - Admin dashboard: 4 stat cards, the rest in tabs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
e0f569dca9
commit
afa77f5cca
|
|
@ -10,12 +10,12 @@ const css = readFileSync(join(process.cwd(), '../../packages/features/src/styles
|
|||
|
||||
export default function RootLayout({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
<html lang="am">
|
||||
<html lang="en">
|
||||
<head>
|
||||
{/* next/font emits separate files, so fonts come from Google Fonts (allowed by the artifact CSP, §18.5) */}
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="" />
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&family=Noto+Sans+Ethiopic:wght@400;700&family=Noto+Serif+Ethiopic:wght@500;700&display=swap" />
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&family=Plus+Jakarta+Sans:wght@600;700;800&family=Noto+Sans+Ethiopic:wght@400;700&family=Noto+Serif+Ethiopic:wght@500;700&display=swap" />
|
||||
<style dangerouslySetInnerHTML={{ __html: css }} />
|
||||
</head>
|
||||
<body>{children}</body>
|
||||
|
|
|
|||
|
|
@ -49,8 +49,10 @@ function useNames(ids: string[]) {
|
|||
// ---------------------------------------------------------------- shell
|
||||
|
||||
export function AdminApp() {
|
||||
const { viewer, ready } = useApp();
|
||||
if (!ready) return <div className="a-main"><Skeleton h={120} n={3} /></div>;
|
||||
const { viewer, ready, role, nav, locale } = useApp();
|
||||
const needsSignIn = ready && !!viewer?.canEdit && role !== 'admin';
|
||||
useEffect(() => { if (needsSignIn) nav(`/${locale}/signin/admin`); }, [needsSignIn, nav, locale]);
|
||||
if (!ready || needsSignIn) return <div className="a-main"><Skeleton h={120} n={3} /></div>;
|
||||
if (!viewer?.canEdit) return <NoAccess />;
|
||||
return <AdminDataProvider><AdminShell /></AdminDataProvider>;
|
||||
}
|
||||
|
|
@ -62,7 +64,7 @@ function NoAccess() {
|
|||
|
||||
function AdminShell() {
|
||||
const app = useApp();
|
||||
const { route, nav, adminRole, setAdminRole, viewer, settings, locale } = app;
|
||||
const { route, nav, adminRole, setAdminRole, viewer, settings, locale, setRole } = app;
|
||||
const { students } = useAdminData();
|
||||
const [open, setOpen] = useState(false);
|
||||
const mainRef = useRef<HTMLElement>(null);
|
||||
|
|
@ -86,7 +88,8 @@ function AdminShell() {
|
|||
<div className="row" style={{ flexWrap: 'nowrap' }}>{viewer?.avatarUrl && <img src={viewer.avatarUrl} alt="" width={32} height={32} style={{ borderRadius: '50%' }} />}<div className="grow"><strong style={{ display: 'block' }}>{viewer?.name || 'You'}</strong><span className="small" style={{ opacity: .8 }}>{ROLE_LABEL[adminRole]}</span></div></div>
|
||||
{viewer?.isOwner && <label className="stack-sm small"><span style={{ opacity: .8 }}>View as (preview a role's navigation)</span>
|
||||
<select id="viewas" value={adminRole} onChange={(e) => { setAdminRole(e.target.value as AdminRole); nav('/admin'); }}>{(Object.keys(ROLE_LABEL) as AdminRole[]).map((r) => <option key={r} value={r}>{ROLE_LABEL[r]}</option>)}</select></label>}
|
||||
<button className="btn btn-accent btn-sm" onClick={() => nav(`/${locale}`)}>Open student app</button>
|
||||
<div className="row" style={{ gap: 8 }}><button className="btn btn-accent btn-sm grow" onClick={() => nav(`/${locale}`)}>Student app</button>
|
||||
<button className="btn btn-sm a-out" onClick={() => { setRole('student'); nav(`/${locale}/signin/admin`); }}><Icon name="logout" size={14} />Sign out</button></div>
|
||||
</div>
|
||||
</aside>
|
||||
<div style={{ minWidth: 0 }}>
|
||||
|
|
@ -146,6 +149,7 @@ function Dashboard() {
|
|||
const { courses, adminRole, nav, viewer } = useApp();
|
||||
const { students, auditLog, loaded } = useAdminData();
|
||||
const [p, setP] = useState<Period>({ kind: 'all' });
|
||||
const [tabSel, setTab] = useState('');
|
||||
const m = useMemo(() => dashboardMetrics(students, courses, p), [students, courses, p]);
|
||||
const name = useNames(auditLog.slice(0, 8).map((a) => a.adminId));
|
||||
if (!loaded) return <Skeleton h={120} n={3} />;
|
||||
|
|
@ -153,31 +157,37 @@ function Dashboard() {
|
|||
const content = adminRole === 'CONTENT_MANAGER';
|
||||
const pendingOrders = students.flatMap((s) => Object.values(s.orders ?? {}).map((o) => ({ s, o }))).filter(({ o }) => effectiveStatus(o) === 'PENDING' && (o.flaggedReason || Date.now() - Date.parse(o.createdAt) > 10 * 60_000));
|
||||
const issues = students.flatMap((s) => Object.values(s.issues ?? {}).map((i) => ({ s, i }))).filter(({ i }) => i.status === 'OPEN' || i.status === 'IN_PROGRESS').sort((a, b) => b.i.createdAt.localeCompare(a.i.createdAt));
|
||||
const stats = [
|
||||
!content && <Stat key="total" label="Total students" value={m.totalStudents} note="Active or deactivated accounts created in this period." />,
|
||||
!content && <Stat key="active" label="Active students" value={m.activeStudents} note="Watched at least one lesson in this period." />,
|
||||
revenue && <Stat key="rev" label="Revenue (ETB)" value={formatMoney(m.revenue.ETB, 'ETB')} note={`Paid minus refunded, test courses excluded. USD kept separate: ${formatMoney(m.revenue.USD, 'USD')}.`} />,
|
||||
<Stat key="issues" now label="Open issues" value={m.openIssues} note="Open or in progress." tone={m.openIssues ? 'bad' : undefined} />,
|
||||
revenue && <Stat key="paying" label="Paying students" value={m.payingStudents} note="At least one paid order in this period." />,
|
||||
!content && <Stat key="orders" now label="Orders needing attention" value={m.ordersNeedingAttention} note="Pending over 10 minutes, or flagged." tone={m.ordersNeedingAttention ? 'bad' : undefined} />,
|
||||
<Stat key="videos" now label="Videos processing / failed" value={`${m.videosProcessing} / ${m.videosFailed}`} note={m.videosFailed ? 'Retry failed uploads in the course editor.' : 'No failed videos.'} tone={m.videosFailed ? 'bad' : undefined} />,
|
||||
].filter(Boolean);
|
||||
const top = stats.slice(0, 4), more = stats.slice(4);
|
||||
const tabs = ([
|
||||
['attention', 'Needs attention', issues.length + pendingOrders.length],
|
||||
...(more.length ? [['metrics', 'More metrics', 0]] : []),
|
||||
['activity', 'Recent activity', 0],
|
||||
['content', 'Content', 0],
|
||||
] as [string, string, number][]).filter(([k]) => !(content && k === 'attention'));
|
||||
const tab = tabs.some(([k]) => k === tabSel) ? tabSel : tabs[0][0];
|
||||
return (
|
||||
<>
|
||||
<Head eyebrow="Dashboard" title={`Welcome back${viewer?.name ? ', ' + viewer.name.split(' ')[0] : ''}`} desc={AREA_BLURB.dashboard} actions={<PeriodPicker value={p} onChange={setP} />} />
|
||||
<div className="stats">
|
||||
{!content && <Stat label="Total students" value={m.totalStudents} note="Active or deactivated accounts created in this period." />}
|
||||
{!content && <Stat label="Active students" value={m.activeStudents} note="Watched at least one lesson in this period." />}
|
||||
{revenue && <Stat label="Paying students" value={m.payingStudents} note="At least one paid order in this period." />}
|
||||
{revenue && <Stat label="Revenue (ETB)" value={formatMoney(m.revenue.ETB, 'ETB')} note={`Paid minus refunded, test courses excluded. USD kept separate: ${formatMoney(m.revenue.USD, 'USD')}.`} />}
|
||||
{!content && <Stat now label="Orders needing attention" value={m.ordersNeedingAttention} note="Pending over 10 minutes, or flagged." tone={m.ordersNeedingAttention ? 'bad' : undefined} />}
|
||||
<Stat now label="Videos processing / failed" value={`${m.videosProcessing} / ${m.videosFailed}`} note={m.videosFailed ? 'Retry failed uploads in the course editor.' : 'No failed videos.'} tone={m.videosFailed ? 'bad' : undefined} />
|
||||
<Stat now label="Open issues" value={m.openIssues} note="Open or in progress." tone={m.openIssues ? 'bad' : undefined} />
|
||||
</div>
|
||||
<div className="a-grid-2">
|
||||
<div className="stack">
|
||||
{!content && <div className="a-card"><div className="row-between"><h2>Needs attention</h2><button className="link" onClick={() => nav('/admin/issues')}>All issues</button></div>
|
||||
{issues.length + pendingOrders.length === 0 ? <p className="muted">Nothing waiting. New issues and stuck payments show up here.</p> : <div className="tbl-wrap" style={{ border: 0 }}><table className="tbl"><tbody>
|
||||
{pendingOrders.slice(0, 5).map(({ s, o }) => <tr key={o.id} className="click" onClick={() => nav('/admin/orders')}><td><StatusPill status="PENDING" label={o.flaggedReason ? 'Flagged' : 'Pending'} /></td><td>{studentName(s)}</td><td className="num r">{formatMoney(o.amountMinor, o.currency)}</td></tr>)}
|
||||
{issues.slice(0, 6).map(({ s, i }) => <tr key={i.id} className="click" onClick={() => nav('/admin/issues')}><td><StatusPill status={i.status} /></td><td>{i.subject}<div className="small muted">{studentName(s)}</div></td><td className="small muted r">{fmtDate(i.createdAt)}</td></tr>)}
|
||||
</tbody></table></div>}
|
||||
</div>}
|
||||
<ContentSnapshot />
|
||||
</div>
|
||||
<div className="a-card"><div className="row-between"><h2>Recent activity</h2>{adminRole === 'SUPER_ADMIN' && <button className="link" onClick={() => nav('/admin/audit')}>Audit log</button>}</div>
|
||||
{auditLog.length ? <ol className="timeline">{auditLog.slice(0, 8).map((a) => <li key={a.id}><div><strong className="small">{describeAction(a.action)}</strong><div className="small muted">{name(a.adminId)} · {fmtDateTime(a.createdAt)}</div></div></li>)}</ol> : <p className="muted">Admin changes will appear here.</p>}
|
||||
</div>
|
||||
<div className="stats stats-4">{top}</div>
|
||||
<div className="a-card a-tabs">
|
||||
<div className="tabs" role="tablist">{tabs.map(([k, label, n]) => <button key={k} role="tab" className="tab" aria-selected={tab === k} onClick={() => setTab(k)}>{label}{n ? <span className="tab-n">{n}</span> : null}</button>)}</div>
|
||||
{tab === 'attention' && (issues.length + pendingOrders.length === 0 ? <p className="muted">Nothing waiting. New issues and stuck payments show up here.</p> : <div className="tbl-wrap" style={{ border: 0 }}><table className="tbl"><tbody>
|
||||
{pendingOrders.slice(0, 5).map(({ s, o }) => <tr key={o.id} className="click" onClick={() => nav('/admin/orders')}><td><StatusPill status="PENDING" label={o.flaggedReason ? 'Flagged' : 'Pending'} /></td><td>{studentName(s)}</td><td className="num r">{formatMoney(o.amountMinor, o.currency)}</td></tr>)}
|
||||
{issues.slice(0, 6).map(({ s, i }) => <tr key={i.id} className="click" onClick={() => nav('/admin/issues')}><td><StatusPill status={i.status} /></td><td>{i.subject}<div className="small muted">{studentName(s)}</div></td><td className="small muted r">{fmtDate(i.createdAt)}</td></tr>)}
|
||||
</tbody></table></div>)}
|
||||
{tab === 'metrics' && <div className="stats">{more}</div>}
|
||||
{tab === 'activity' && (auditLog.length ? <><ol className="timeline">{auditLog.slice(0, 8).map((a) => <li key={a.id}><div><strong className="small">{describeAction(a.action)}</strong><div className="small muted">{name(a.adminId)} · {fmtDateTime(a.createdAt)}</div></div></li>)}</ol>
|
||||
{adminRole === 'SUPER_ADMIN' && <button className="link" style={{ alignSelf: 'flex-start' }} onClick={() => nav('/admin/audit')}>Open audit log</button>}</> : <p className="muted">Admin changes will appear here.</p>)}
|
||||
{tab === 'content' && <ContentSnapshot />}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@ interface Ctx {
|
|||
/** Serialized writes: the db wants one write at a time per document. */
|
||||
write(fn: () => Promise<void>, okMsg?: string): Promise<boolean>;
|
||||
signIn(): void; signOut(): void;
|
||||
/** Demo login role: admin screens need canEdit AND an admin sign-in from the login page. */
|
||||
role: 'student' | 'admin'; setRole(r: 'student' | 'admin'): void;
|
||||
adminRole: AdminRole; setAdminRole(r: AdminRole): void;
|
||||
audit(action: string, entity: string, entityId: string, before?: unknown, after?: unknown): Promise<void>;
|
||||
notify(studentId: string, item: Omit<InboxItem, 'id' | 'createdAt'>): Promise<void>;
|
||||
|
|
@ -57,9 +59,10 @@ export function AppProvider({ ds, children }: { ds: DataSource; children: ReactN
|
|||
const [meLoaded, setMeLoaded] = useState(false);
|
||||
const [inbox, setInbox] = useState<InboxItem[]>([]);
|
||||
const [route, setRoute] = useState<string[]>([]);
|
||||
const [locale, setLocaleState] = useState<Locale>('am');
|
||||
const [locale, setLocaleState] = useState<Locale>('en');
|
||||
const [toastMsg, setToastMsg] = useState<string | null>(null);
|
||||
const [signedOut, setSignedOut] = useState(false);
|
||||
const [role, setRoleState] = useState<'student' | 'admin'>('student');
|
||||
const [adminRole, setAdminRoleState] = useState<AdminRole>('SUPER_ADMIN');
|
||||
const chain = useRef<Promise<unknown>>(Promise.resolve());
|
||||
const toastTimer = useRef<ReturnType<typeof setTimeout> | null>(null);
|
||||
|
|
@ -68,10 +71,11 @@ export function AppProvider({ ds, children }: { ds: DataSource; children: ReactN
|
|||
useEffect(() => {
|
||||
const r = parseRoute(location.hash);
|
||||
const saved = store.get('locale') as Locale | null;
|
||||
const loc = (LOCALES as string[]).includes(r[0]) ? (r[0] as Locale) : saved && LOCALES.includes(saved) ? saved : 'am';
|
||||
const loc = (LOCALES as string[]).includes(r[0]) ? (r[0] as Locale) : saved && LOCALES.includes(saved) ? saved : 'en';
|
||||
setLocaleState(loc);
|
||||
setRoute(r.length ? r : [loc]);
|
||||
setSignedOut(store.get('signedOut') === '1');
|
||||
if (store.get('role') === 'admin') setRoleState('admin');
|
||||
const role = store.get('viewAs') as AdminRole | null;
|
||||
if (role) setAdminRoleState(role);
|
||||
const onHash = () => setRoute(parseRoute(location.hash));
|
||||
|
|
@ -148,6 +152,7 @@ export function AppProvider({ ds, children }: { ds: DataSource; children: ReactN
|
|||
locale, setLocale, route, nav, toast, write,
|
||||
signIn: () => { store.set('signedOut', null); setSignedOut(false); },
|
||||
signOut: () => { store.set('signedOut', '1'); setSignedOut(true); },
|
||||
role, setRole: (r) => { setRoleState(r); store.set('role', r === 'admin' ? r : null); },
|
||||
adminRole: viewer?.isOwner ? adminRole : 'SUPER_ADMIN',
|
||||
setAdminRole: (r) => { setAdminRoleState(r); store.set('viewAs', r); },
|
||||
audit, notify, msg,
|
||||
|
|
|
|||
|
|
@ -29,18 +29,23 @@ const lessonTitle = (l: Lesson, loc: Locale) => tr(l.translations, loc)?.title ?
|
|||
const lessonNumber = (c: Course, id: string) => publishedLessons(c).findIndex((l) => l.id === id) + 1;
|
||||
|
||||
function CourseCard({ c }: { c: Course }) {
|
||||
const { locale, nav, me } = useApp();
|
||||
const { locale, nav, me, signedIn } = useApp();
|
||||
const t = useTranslations();
|
||||
const { catName } = useCatalog();
|
||||
const p = courseProgress(c, me);
|
||||
const mine = owns(me, c.id);
|
||||
const mine = signedIn && owns(me, c.id);
|
||||
return (
|
||||
<button className="ccard" onClick={() => nav(`/${locale}/course/${c.slug}`)}>
|
||||
<Cover course={c} locale={locale} badge={<span className="pill">{catName(c.categoryId)}</span>} />
|
||||
<h3>{ct(c, locale).title}</h3>
|
||||
<span className="meta">{c.instructorName} · {t('course.lessons', { n: p.total })} · {formatDuration(courseDuration(c))}</span>
|
||||
{mine ? <div className="bar" aria-label={`${p.pct}%`}><i style={{ width: `${p.pct}%` }} /></div>
|
||||
: c.prices.ETB != null && <strong className="num">{formatMoney(c.prices.ETB, 'ETB')}</strong>}
|
||||
<div className="ccard-body">
|
||||
<h3>{ct(c, locale).title}</h3>
|
||||
<span className="meta"><span><Icon name="video" size={14} />{t('course.lessons', { n: p.total })}</span><span><Icon name="clock" size={14} />{formatDuration(courseDuration(c))}</span></span>
|
||||
<span className="ccard-by">{t('course.by', { name: c.instructorName })}</span>
|
||||
<div className="ccard-foot">
|
||||
{mine ? <><div className="bar grow" aria-label={`${p.pct}%`}><i style={{ width: `${p.pct}%` }} /></div><span className="small num">{p.pct}%</span></>
|
||||
: <>{c.prices.ETB != null ? <strong className="num">{formatMoney(c.prices.ETB, 'ETB')}</strong> : <span />}<span className="ccard-cta">{t('course.viewDetails')}</span></>}
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
);
|
||||
}
|
||||
|
|
@ -55,13 +60,13 @@ function SignInGate({ children }: { children: ReactNode }) {
|
|||
|
||||
export function StudentApp() {
|
||||
const t = useTranslations();
|
||||
const app = useApp();
|
||||
const { route, locale, nav, signedIn, inbox, viewer, settings, setLocale } = app;
|
||||
const { route, locale, nav, signedIn, inbox, settings, setLocale } = useApp();
|
||||
const section = route[1] ?? '';
|
||||
const unread = signedIn ? inbox.filter((n) => !n.readAt).length : 0;
|
||||
const mainRef = useRef<HTMLElement>(null);
|
||||
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);
|
||||
|
||||
return (
|
||||
|
|
@ -71,19 +76,22 @@ export function StudentApp() {
|
|||
<div className="s-top-in">
|
||||
<button className="brand" onClick={() => go('')}><span className="brand-mark" aria-hidden>ሜ</span><span>{settings.brandName}</span></button>
|
||||
<nav className="s-nav" aria-label="Main">
|
||||
{tabs.slice(0, 4).map(([p, , label]) => <button key={p} aria-current={current(p)} onClick={() => go(p ? '/' + p : '')}>{label}</button>)}
|
||||
{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} />
|
||||
<label className="sr-only" htmlFor="lang">{t('common.language')}</label>
|
||||
<select id="lang" className="lang-select" value={locale} onChange={(e) => setLocale(e.target.value as Locale)}>
|
||||
{LOCALES.map((l) => <option key={l} value={l}>{LOCALE_NAMES[l]}{(DRAFT_LOCALES as readonly string[]).includes(l) ? ' (draft)' : ''}</option>)}
|
||||
</select>
|
||||
<label className="lang-pick" title={t('common.language')}><Icon name="globe" size={16} /><span className="sr-only">{t('common.language')}</span>
|
||||
<select id="lang" value={locale} onChange={(e) => setLocale(e.target.value as Locale)}>
|
||||
{LOCALES.map((l) => <option key={l} value={l}>{LOCALE_NAMES[l]}{(DRAFT_LOCALES as readonly string[]).includes(l) ? ' (draft)' : ''}</option>)}
|
||||
</select>
|
||||
</label>
|
||||
{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>
|
||||
<button className="icon-btn" aria-label={t('nav.profile')} onClick={() => go('/profile')}>{viewer?.avatarUrl ? <img src={viewer.avatarUrl} alt="" width={30} height={30} style={{ borderRadius: '50%' }} /> : <Icon name="user" />}</button>
|
||||
</> : <button className="btn btn-sm" onClick={() => go('/signin')}>{t('nav.signIn')}</button>}
|
||||
{viewer?.canEdit && <button className="btn btn-ghost btn-sm hide-sm" onClick={() => nav('/admin')}>{t('nav.admin')}</button>}
|
||||
<UserMenu />
|
||||
</> : <>
|
||||
<button className="btn btn-quiet btn-sm hide-sm" onClick={() => go('/signin')}>{t('nav.signIn')}</button>
|
||||
<button className="btn btn-sm" onClick={() => go('/signin')}>{t('nav.getStarted')}</button>
|
||||
</>}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
|
@ -99,6 +107,34 @@ export function StudentApp() {
|
|||
);
|
||||
}
|
||||
|
||||
const initials = (name: string) => name.split(/\s+/).filter(Boolean).slice(0, 2).map((w) => w[0]).join('').toUpperCase() || '?';
|
||||
|
||||
function UserMenu() {
|
||||
const t = useTranslations();
|
||||
const { me, viewer, locale, nav, signOut } = useApp();
|
||||
const ref = useRef<HTMLDetailsElement>(null);
|
||||
useEffect(() => {
|
||||
const close = (e: MouseEvent) => { if (ref.current && !ref.current.contains(e.target as Node)) ref.current.open = false; };
|
||||
addEventListener('click', close);
|
||||
return () => removeEventListener('click', close);
|
||||
}, []);
|
||||
const name = me?.name || viewer?.name || '';
|
||||
const go = (p: string) => { if (ref.current) ref.current.open = false; nav(p); };
|
||||
return (
|
||||
<details className="menu" ref={ref}>
|
||||
<summary className="avatar" aria-label={t('nav.account')}>{viewer?.avatarUrl ? <img src={viewer.avatarUrl} alt="" /> : initials(name)}</summary>
|
||||
<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}/help`)}><Icon name="help" size={16} />{t('nav.help')}</button>
|
||||
{viewer?.canEdit && <button onClick={() => go(`/${locale}/signin/admin`)}><Icon name="shield" size={16} />{t('nav.adminSignIn')}</button>}
|
||||
<button onClick={() => { signOut(); go(`/${locale}/signin`); }}><Icon name="logout" size={16} />{t('nav.signOut')}</button>
|
||||
</div>
|
||||
</details>
|
||||
);
|
||||
}
|
||||
|
||||
function Footer() {
|
||||
const t = useTranslations();
|
||||
const { settings, locale, nav, setLocale, categories, viewer } = useApp();
|
||||
|
|
@ -135,13 +171,15 @@ function StudentRoutes() {
|
|||
case 'notifications': return <SignInGate><Inbox /></SignInGate>;
|
||||
case 'help': return <Help />;
|
||||
case 'profile': return <SignInGate><Profile /></SignInGate>;
|
||||
case 'signin': return signedIn ? <Home /> : <SignIn />;
|
||||
case 'signin': return a === 'admin' || !signedIn ? <SignIn tab={a} /> : <Home />;
|
||||
default: return <Landing />;
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------- landing + home
|
||||
|
||||
const CAT_LOOK: [string, string][] = [['brush', 'rose'], ['sparkle', 'plum'], ['shield', 'sage'], ['book', 'sand']];
|
||||
|
||||
function Landing() {
|
||||
const t = useTranslations();
|
||||
const { locale, nav, catalogLoaded, categories } = useApp();
|
||||
|
|
@ -150,37 +188,71 @@ function Landing() {
|
|||
const lead = featured[0];
|
||||
const preview = lead && publishedLessons(lead).find((l) => l.isPreview);
|
||||
const minPrice = Math.min(...visible.map((c) => c.prices.ETB ?? Infinity));
|
||||
const lessons = visible.reduce((s, c) => s + publishedLessons(c).length, 0);
|
||||
const total = visible.reduce((s, c) => s + courseDuration(c), 0);
|
||||
const cats = categories.filter((c) => c.isActive);
|
||||
const watch = () => { if (lead) nav(preview ? `/${locale}/learn/${lead.slug}/${preview.id}` : `/${locale}/course/${lead.slug}`); };
|
||||
const stats: [string, ReactNode, string][] = [['grid', visible.length, 'statCourses'], ['video', lessons, 'statLessons'], ['clock', formatDuration(total), 'statHours'], ['globe', LOCALES.length, 'statLanguages']];
|
||||
return (
|
||||
<>
|
||||
<section className="hero">
|
||||
<div className="hero-copy">
|
||||
<h1>{t('landing.title')}</h1>
|
||||
<p className="lead">{t('landing.lead')}</p>
|
||||
<div className="row">
|
||||
<button className="btn btn-accent" onClick={() => nav(`/${locale}/courses`)}>{t('landing.browse')}</button>
|
||||
<button className="btn btn-ghost" onClick={() => nav(`/${locale}/signin`)}>{t('landing.start')}</button>
|
||||
<section className="l-hero">
|
||||
<div className="l-hero-in">
|
||||
<div className="hero-copy">
|
||||
<span className="eyebrow-pill"><Icon name="sparkle" size={14} />{t('landing.eyebrow')}</span>
|
||||
<h1>{t('landing.title')}</h1>
|
||||
<p className="lead">{t('landing.lead')}</p>
|
||||
<div className="row">
|
||||
<button className="btn btn-lg" onClick={() => nav(`/${locale}/courses`)}>{t('landing.browse')}</button>
|
||||
{lead && <button className="btn btn-ghost btn-lg" onClick={watch}><span className="play-dot"><Icon name="play" size={12} /></span>{t('course.watchPreview')}</button>}
|
||||
</div>
|
||||
<ul className="facts">{['fact1', 'fact2', 'fact3'].map((k) => <li key={k}><Icon name="check" size={16} />{t(`landing.${k}`)}</li>)}</ul>
|
||||
</div>
|
||||
<ul className="facts">{['fact1', 'fact2', 'fact3'].map((k) => <li key={k}><Icon name="check" size={16} />{t(`landing.${k}`)}</li>)}</ul>
|
||||
{!catalogLoaded ? <Skeleton h={340} /> : lead ? (
|
||||
<div className="hero-art">
|
||||
<button className="hero-frame" onClick={watch} aria-label={t('course.watchPreview')}>
|
||||
<Cover course={lead} locale={locale} />
|
||||
<span className="play-big" aria-hidden><Icon name="play" size={22} /></span>
|
||||
</button>
|
||||
<div className="float float-a"><strong className="num">{lessons}</strong><span>{t('landing.statLessons')}</span></div>
|
||||
<div className="float float-b"><span className="small muted">{t('course.by', { name: lead.instructorName })}</span><strong>{ct(lead, locale).title}</strong>{lead.prices.ETB != null && <span className="num small">{formatMoney(lead.prices.ETB, 'ETB')}</span>}</div>
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
{!catalogLoaded ? <Skeleton h={320} /> : lead ? (
|
||||
<div className="hero-card">
|
||||
<Cover course={lead} locale={locale} />
|
||||
<div className="row-between"><strong style={{ fontSize: 'var(--fs-lg)' }}>{ct(lead, locale).title}</strong>{lead.prices.ETB != null && <span className="num" style={{ fontWeight: 700 }}>{formatMoney(lead.prices.ETB, 'ETB')}</span>}</div>
|
||||
<span className="small muted">{t('course.by', { name: lead.instructorName })} · {t('course.lessons', { n: publishedLessons(lead).length })} · {formatDuration(courseDuration(lead))}</span>
|
||||
<button className="btn btn-block" onClick={() => nav(preview ? `/${locale}/learn/${lead.slug}/${preview.id}` : `/${locale}/course/${lead.slug}`)}><Icon name="play" size={16} />{preview ? t('course.watchPreview') : ct(lead, locale).title}</button>
|
||||
</div>
|
||||
) : null}
|
||||
</section>
|
||||
<section className="stack">
|
||||
<div className="section-h"><h2>{t('landing.featured')}</h2>{Number.isFinite(minPrice) && <span className="small muted num">{t('landing.from', { price: formatMoney(minPrice, 'ETB') })}</span>}</div>
|
||||
|
||||
<section className="statbar">
|
||||
{stats.map(([icon, n, k]) => <div key={k}><span className="stat-ic"><Icon name={icon} size={20} /></span><div><strong className="num">{n}</strong><span>{t(`landing.${k}`)}</span></div></div>)}
|
||||
</section>
|
||||
|
||||
{cats.length > 0 && <section className="stack-lg">
|
||||
<div className="section-c"><h2>{t('landing.catTitle')}</h2><p>{t('landing.catLead')}</p></div>
|
||||
<div className="cat-grid">{cats.map((c, i) => {
|
||||
const [icon, tone] = CAT_LOOK[i % CAT_LOOK.length];
|
||||
return (
|
||||
<button key={c.id} className="cat-card" onClick={() => nav(`/${locale}/courses/${c.slug}`)}>
|
||||
<span className={`cat-ic tone-${tone}`}><Icon name={icon} size={22} /></span>
|
||||
<h3>{tr(c.translations, locale)?.name}</h3>
|
||||
<span className="small muted">{t('catalog.count', { n: visible.filter((x) => x.categoryId === c.id).length })}</span>
|
||||
<span className="cat-link">{t('landing.viewCourses')}<Icon name="chevron" size={14} /></span>
|
||||
</button>
|
||||
);
|
||||
})}</div>
|
||||
</section>}
|
||||
|
||||
<section className="stack-lg">
|
||||
<div className="section-h"><div className="stack-sm"><h2>{t('landing.featured')}</h2><p className="muted">{t('landing.featuredLead')}{Number.isFinite(minPrice) && <> · <span className="num">{t('landing.from', { price: formatMoney(minPrice, 'ETB') })}</span></>}</p></div>
|
||||
<button className="btn btn-ghost btn-sm" onClick={() => nav(`/${locale}/courses`)}>{t('landing.viewAll')}</button></div>
|
||||
{!catalogLoaded ? <Skeleton h={220} /> : featured.length ? <div className="grid-cards">{featured.map((c) => <CourseCard key={c.id} c={c} />)}</div> : <Empty>{t('catalog.emptyCategory')}</Empty>}
|
||||
{categories.length > 0 && <div className="chips">{categories.filter((c) => c.isActive).map((c) => <button key={c.id} className="chip" onClick={() => nav(`/${locale}/courses/${c.slug}`)}>{tr(c.translations, locale)?.name}</button>)}</div>}
|
||||
</section>
|
||||
<section className="stack">
|
||||
<h2 style={{ fontSize: 'var(--fs-xl)' }}>{t('landing.howTitle')}</h2>
|
||||
<ol className="steps" style={{ padding: 0, margin: 0 }}><li>{t('landing.how1')}</li><li>{t('landing.how2')}</li><li>{t('landing.how3')}</li></ol>
|
||||
<h3 style={{ fontSize: 'var(--fs-lg)', marginTop: 8 }}>{t('landing.payTitle')}</h3>
|
||||
<div className="pay-logos">{METHODS.map((m) => <span key={m.id} className="pay-logo"><i />{m.name}</span>)}</div>
|
||||
|
||||
<section className="how-panel">
|
||||
<div className="stack"><h2>{t('landing.howTitle')}</h2><ol className="steps"><li>{t('landing.how1')}</li><li>{t('landing.how2')}</li><li>{t('landing.how3')}</li></ol></div>
|
||||
<div className="stack-sm"><h3>{t('landing.payTitle')}</h3><div className="pay-logos">{METHODS.map((m) => <span key={m.id} className="pay-logo"><i />{m.name}</span>)}</div></div>
|
||||
</section>
|
||||
|
||||
<section className="cta-band">
|
||||
<div className="stack-sm"><h2>{t('landing.ctaTitle')}</h2><p>{t('landing.ctaBody')}</p></div>
|
||||
<button className="btn btn-accent btn-lg" onClick={lead ? watch : () => nav(`/${locale}/courses`)}><Icon name="play" size={16} />{t('course.watchPreview')}</button>
|
||||
</section>
|
||||
</>
|
||||
);
|
||||
|
|
@ -266,8 +338,9 @@ function Catalog({ categorySlug }: { categorySlug?: string }) {
|
|||
|
||||
function CoursePage({ slug }: { slug?: string }) {
|
||||
const t = useTranslations();
|
||||
const { courses, me, locale, nav, catalogLoaded } = useApp();
|
||||
const { courses, categories, me, locale, nav, catalogLoaded, toast } = useApp();
|
||||
const { catName } = useCatalog();
|
||||
const [tab, setTab] = useState('overview');
|
||||
const c = courses.find((x) => x.slug === slug);
|
||||
if (!catalogLoaded) return <Skeleton h={260} n={2} />;
|
||||
if (!c || !isStudentVisible(c, me)) return <Empty action={<button className="btn" onClick={() => nav(`/${locale}/courses`)}>{t('catalog.title')}</button>}>{t('course.notFound')}</Empty>;
|
||||
|
|
@ -275,76 +348,99 @@ function CoursePage({ slug }: { slug?: string }) {
|
|||
const mine = owns(me, c.id);
|
||||
const lessons = publishedLessons(c);
|
||||
const r = resumePoint(c, me);
|
||||
const p = courseProgress(c, me);
|
||||
const done = p.pct === 100;
|
||||
const pre = c.prerequisiteCourseId ? courses.find((x) => x.id === c.prerequisiteCourseId) : undefined;
|
||||
const preDone = !pre || courseProgress(pre, me).pct === 100;
|
||||
const preview = lessons.find((l) => l.isPreview);
|
||||
const first = lessons[0];
|
||||
const cat = categories.find((k) => k.id === c.categoryId);
|
||||
const chapters = [...c.chapters].sort((a, b) => a.sortOrder - b.sortOrder);
|
||||
const play = mine && r ? `/${locale}/learn/${c.slug}/${r.lesson.id}` : preview ? `/${locale}/learn/${c.slug}/${preview.id}` : null;
|
||||
const playLabel = mine && r ? (done ? t('course.watchAgain') : t('course.continue', { n: r.index + 1 })) : t('course.watchPreview');
|
||||
const share = () => { navigator.clipboard?.writeText(location.href).then(() => toast(t('course.linkCopied')), () => { /* clipboard blocked */ }); };
|
||||
const teaches = courses.filter((x) => x.instructorName === c.instructorName && isStudentVisible(x, me)).length;
|
||||
const tabs: [string, string][] = [['overview', t('course.tabOverview')], ...(text.outcomes?.length ? [['outcomes', t('course.outcomes')] as [string, string]] : []), ['instructor', t('course.tabInstructor')]];
|
||||
return (
|
||||
<>
|
||||
<section className="c-hero">
|
||||
<div className="stack">
|
||||
<div className="row"><span className="pill">{catName(c.categoryId)}</span>{c.status === 'ARCHIVED' && <StatusPill status="ARCHIVED" />}</div>
|
||||
<h1>{text.title}</h1>
|
||||
{text.subtitle && <p style={{ fontSize: 'var(--fs-lg)', color: 'var(--ink-2)' }}>{text.subtitle}</p>}
|
||||
{text.audience && <p className="small"><strong>{t('course.audience')}: </strong>{text.audience}</p>}
|
||||
<p className="small muted num">{t('course.by', { name: c.instructorName })} · {t('course.lessons', { n: lessons.length })} · {formatDuration(courseDuration(c))} · {t('course.taughtIn', { lang: LOCALE_NAMES[c.instructionLocale] })} · {t('course.updated', { date: fmtDate(c.updatedAt) })}</p>
|
||||
{pre && !preDone && <div className="banner">{t('course.prereq', { title: ct(pre, locale).title })} <button className="link" onClick={() => nav(`/${locale}/course/${pre.slug}`)}>{t('course.prereqLink', { title: ct(pre, locale).title })}</button></div>}
|
||||
{text.description && <p style={{ maxWidth: '68ch', whiteSpace: 'pre-line' }}>{text.description}</p>}
|
||||
</div>
|
||||
<aside className="card buybox" aria-label={text.title}>
|
||||
<Cover course={c} locale={locale} />
|
||||
{mine ? <>
|
||||
<span className="pill pill-ok" style={{ alignSelf: 'flex-start' }}><Icon name="check" size={14} />{courseProgress(c, me).pct === 100 ? t('course.completed') : t('course.owned')}</span>
|
||||
<div className="bar"><i style={{ width: `${courseProgress(c, me).pct}%` }} /></div>
|
||||
{r && <button className={`btn btn-block ${courseProgress(c, me).pct === 100 ? 'btn-ghost' : 'btn-accent'}`} onClick={() => nav(`/${locale}/learn/${c.slug}/${r.lesson.id}`)}>{courseProgress(c, me).pct === 100 ? t('course.watchAgain') : t('course.continue', { n: r.index + 1 })}</button>}
|
||||
</> : <>
|
||||
{c.prices.ETB != null && <div><div className="price num">{formatMoney(c.prices.ETB, 'ETB')}</div><p className="small muted">{t('checkout.lifetime')}</p></div>}
|
||||
<button className="btn btn-accent btn-block" disabled={c.status !== 'PUBLISHED' || c.prices.ETB == null} onClick={() => nav(`/${locale}/checkout/${c.slug}`)}>{t('course.buy', { price: formatMoney(c.prices.ETB ?? 0, 'ETB') })}</button>
|
||||
{preview && <button className="btn btn-ghost btn-block" onClick={() => nav(`/${locale}/learn/${c.slug}/${preview.id}`)}><Icon name="play" size={16} />{t('course.watchPreview')}</button>}
|
||||
</>}
|
||||
{c.sequentialLessons && <p className="small muted">{t('course.sequential')}</p>}
|
||||
</aside>
|
||||
</section>
|
||||
|
||||
{!!text.outcomes?.length && (
|
||||
<section className="stack">
|
||||
<h2 style={{ fontSize: 'var(--fs-xl)' }}>{t('course.outcomes')}</h2>
|
||||
<ol className="outcomes">{text.outcomes.map((o, i) => <li key={i}>{o}</li>)}</ol>
|
||||
</section>
|
||||
)}
|
||||
|
||||
<section className="stack">
|
||||
<h2 style={{ fontSize: 'var(--fs-xl)' }}>{t('course.content')}</h2>
|
||||
<ol className="journey">
|
||||
{chapters.map((ch, i) => {
|
||||
const ls = [...ch.lessons].sort((a, b) => a.sortOrder - b.sortOrder).filter((l) => l.isPublished);
|
||||
if (!ls.length) return null;
|
||||
const chDone = ls.every((l) => isCompleted(me, l.id));
|
||||
const chText = tr(ch.translations, locale);
|
||||
return (
|
||||
<li key={ch.id}>
|
||||
<span className={`node ${chDone ? 'done' : ''}`} aria-hidden>{chDone ? <Icon name="check" size={16} /> : i + 1}</span>
|
||||
<div className="card stack-sm" style={{ padding: 16 }}>
|
||||
<h3 style={{ fontSize: 'var(--fs-lg)' }}>{chText?.title}</h3>
|
||||
{chText?.summary && <p className="small" style={{ color: 'var(--ink-2)' }}>{chText.summary}</p>}
|
||||
<div>{ls.map((l) => <LessonRow key={l.id} c={c} l={l} />)}</div>
|
||||
</div>
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
{first && !mine && (
|
||||
<section className="continue" style={{ gridTemplateColumns: '1fr' }}>
|
||||
<div className="row-between">
|
||||
<div><h2 style={{ fontSize: 'var(--fs-lg)' }}>{t('course.ready')}</h2><p style={{ opacity: .85 }}>{t('course.readyBody', { min: Math.max(1, Math.round(first.durationSec / 60)) })}</p></div>
|
||||
<button className="btn btn-accent" onClick={() => nav(preview ? `/${locale}/learn/${c.slug}/${preview.id}` : `/${locale}/checkout/${c.slug}`)}>{preview ? t('course.watchPreview') : t('course.buy', { price: formatMoney(c.prices.ETB ?? 0, 'ETB') })}</button>
|
||||
<div className="c-page">
|
||||
<nav className="crumbs" aria-label="Breadcrumb">
|
||||
<button onClick={() => nav(`/${locale}`)} aria-label={t('nav.home')}><Icon name="home" size={16} /></button><Icon name="chevron" size={14} />
|
||||
<button onClick={() => nav(`/${locale}/courses`)}>{t('nav.courses')}</button>
|
||||
{cat && <><Icon name="chevron" size={14} /><button aria-current="page" onClick={() => nav(`/${locale}/courses/${cat.slug}`)}>{catName(cat.id)}</button></>}
|
||||
</nav>
|
||||
<div className="c-layout">
|
||||
<div className="c-main">
|
||||
<div className="stack-sm">
|
||||
{c.status === 'ARCHIVED' && <div><StatusPill status="ARCHIVED" /></div>}
|
||||
<h1>{text.title}</h1>
|
||||
{text.subtitle && <p className="c-sub">{text.subtitle}</p>}
|
||||
</div>
|
||||
</section>
|
||||
)}
|
||||
</>
|
||||
<ul className="c-meta">
|
||||
<li><Icon name="video" size={18} /><div><strong className="num">{lessons.length}</strong><span>{t('course.lessonsLabel')}</span></div></li>
|
||||
<li><Icon name="clock" size={18} /><div><strong className="num">{formatDuration(courseDuration(c))}</strong><span>{t('course.duration')}</span></div></li>
|
||||
<li><Icon name="globe" size={18} /><div><strong>{LOCALE_NAMES[c.instructionLocale]}</strong><span>{t('course.language')}</span></div></li>
|
||||
<li><Icon name="calendar" size={18} /><div><strong className="num">{fmtDate(c.updatedAt)}</strong><span>{t('course.lastUpdated')}</span></div></li>
|
||||
</ul>
|
||||
<div className="c-media">
|
||||
<button className="c-screen" disabled={!play} onClick={() => play && nav(play)} aria-label={playLabel}>
|
||||
<Cover course={c} locale={locale} />
|
||||
{play && <span className="play-big" aria-hidden><Icon name="play" size={24} /></span>}
|
||||
</button>
|
||||
<div className="c-actions">
|
||||
{play && <button className="btn btn-quiet btn-sm" onClick={() => nav(play)}><Icon name="play" size={14} />{playLabel}</button>}
|
||||
<span className="grow" />
|
||||
<button className="btn btn-quiet btn-sm" onClick={share}><Icon name="share" size={16} />{t('course.share')}</button>
|
||||
</div>
|
||||
</div>
|
||||
{pre && !preDone && <div className="banner">{t('course.prereq', { title: ct(pre, locale).title })} <button className="link" onClick={() => nav(`/${locale}/course/${pre.slug}`)}>{t('course.prereqLink', { title: ct(pre, locale).title })}</button></div>}
|
||||
<div className="tabs" role="tablist">{tabs.map(([k, label]) => <button key={k} role="tab" className="tab" aria-selected={tab === k} onClick={() => setTab(k)}>{label}</button>)}</div>
|
||||
{tab === 'overview' && <div className="c-overview">
|
||||
<div className="stack">
|
||||
{text.description && <p style={{ whiteSpace: 'pre-line' }}>{text.description}</p>}
|
||||
{text.audience && <p className="small"><strong>{t('course.audience')}: </strong>{text.audience}</p>}
|
||||
</div>
|
||||
<dl className="c-summary">
|
||||
<div><dt><Icon name="user" size={16} />{t('course.instructor')}</dt><dd>{c.instructorName}</dd></div>
|
||||
<div><dt><Icon name="video" size={16} />{t('course.lessonsLabel')}</dt><dd className="num">{lessons.length}</dd></div>
|
||||
<div><dt><Icon name="clock" size={16} />{t('course.duration')}</dt><dd className="num">{formatDuration(courseDuration(c))}</dd></div>
|
||||
<div><dt><Icon name="globe" size={16} />{t('course.language')}</dt><dd>{LOCALE_NAMES[c.instructionLocale]}</dd></div>
|
||||
<div><dt><Icon name="shield" size={16} />{t('course.access')}</dt><dd>{t('course.lifetime')}</dd></div>
|
||||
</dl>
|
||||
</div>}
|
||||
{tab === 'outcomes' && <ol className="outcomes">{text.outcomes?.map((o, i) => <li key={i}>{o}</li>)}</ol>}
|
||||
{tab === 'instructor' && <div className="row"><span className="avatar avatar-lg" aria-hidden>{initials(c.instructorName)}</span><div><strong>{c.instructorName}</strong><p className="small muted">{t('course.teaches', { n: teaches })}</p></div></div>}
|
||||
</div>
|
||||
|
||||
<aside className="c-side">
|
||||
<div className="card buybox">
|
||||
{mine ? <>
|
||||
<div className="row-between"><span className="pill pill-ok"><Icon name="check" size={14} />{done ? t('course.completed') : t('course.owned')}</span><span className="small num">{p.pct}%</span></div>
|
||||
<div className="bar"><i style={{ width: `${p.pct}%` }} /></div>
|
||||
<span className="small muted num">{t('my.lessonsDone', { done: p.done, total: p.total })}</span>
|
||||
{r && <button className={`btn btn-block ${done ? 'btn-ghost' : 'btn-accent'}`} onClick={() => nav(`/${locale}/learn/${c.slug}/${r.lesson.id}`)}>{playLabel}</button>}
|
||||
</> : <>
|
||||
{c.prices.ETB != null && <div><div className="price num">{formatMoney(c.prices.ETB, 'ETB')}</div><p className="small muted">{t('checkout.lifetime')}</p></div>}
|
||||
<button className="btn btn-accent btn-block" disabled={c.status !== 'PUBLISHED' || c.prices.ETB == null} onClick={() => nav(`/${locale}/checkout/${c.slug}`)}>{t('course.buy', { price: formatMoney(c.prices.ETB ?? 0, 'ETB') })}</button>
|
||||
{preview && <button className="btn btn-ghost btn-block" onClick={() => nav(`/${locale}/learn/${c.slug}/${preview.id}`)}><Icon name="play" size={16} />{t('course.watchPreview')}</button>}
|
||||
</>}
|
||||
{c.sequentialLessons && <p className="small muted">{t('course.sequential')}</p>}
|
||||
</div>
|
||||
<div className="card c-content">
|
||||
<div className="c-content-h"><h2>{t('course.content')}</h2><span className="small muted num">{t('course.lessons', { n: lessons.length })} · {formatDuration(courseDuration(c))}</span></div>
|
||||
{chapters.map((ch, i) => {
|
||||
const ls = [...ch.lessons].sort((a, b) => a.sortOrder - b.sortOrder).filter((l) => l.isPublished);
|
||||
if (!ls.length) return null;
|
||||
const d = ls.filter((l) => isCompleted(me, l.id)).length;
|
||||
return (
|
||||
<details key={ch.id} className="ch" open={i === 0}>
|
||||
<summary><span className="grow"><strong>{tr(ch.translations, locale)?.title}</strong><span className="small muted num">{d}/{ls.length} · {formatDuration(ls.reduce((s, l) => s + l.durationSec, 0))}</span></span><Icon name="down" size={18} /></summary>
|
||||
{ls.map((l) => <LessonRow key={l.id} c={c} l={l} />)}
|
||||
</details>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -773,13 +869,16 @@ function Help() {
|
|||
|
||||
// ---------------------------------------------------------------- sign in (simulated OTP) + profile setup
|
||||
|
||||
function SignIn() {
|
||||
function SignIn({ tab: tabParam }: { tab?: string }) {
|
||||
const t = useTranslations();
|
||||
const { viewer, me, ready, signIn, nav, locale } = useApp();
|
||||
const { viewer, me, ready, signIn, nav, locale, setRole } = useApp();
|
||||
const tab = tabParam === 'admin' ? 'admin' : 'student';
|
||||
const [mode, setMode] = useState<'phone' | 'email'>('phone');
|
||||
const [phone, setPhone] = useState('');
|
||||
const [email, setEmail] = useState('');
|
||||
const [pw, setPw] = useState('');
|
||||
const [adminEmail, setAdminEmail] = useState('admin@makeup.academy');
|
||||
const [adminPw, setAdminPw] = useState('');
|
||||
const [step, setStep] = useState<'start' | 'code' | 'setup'>('start');
|
||||
const [code, setCode] = useState('');
|
||||
const [entered, setEntered] = useState('');
|
||||
|
|
@ -788,7 +887,6 @@ function SignIn() {
|
|||
const [err, setErr] = useState('');
|
||||
useEffect(() => { if (wait <= 0) return; const id = setTimeout(() => setWait((w) => w - 1), 1000); return () => clearTimeout(id); }, [wait]);
|
||||
if (!ready) return <Skeleton h={200} />;
|
||||
if (!viewer?.id) return <Empty>{t('auth.noIdentity')}</Empty>;
|
||||
const target = mode === 'phone' ? `+251 ${phone}` : email;
|
||||
const send = () => {
|
||||
setErr('');
|
||||
|
|
@ -803,32 +901,64 @@ function SignIn() {
|
|||
if (entered !== code) { const left = tries - 1; setTries(left); setErr(left ? t('auth.wrongCode', { n: left }) : t('auth.locked')); return; }
|
||||
if (me && !me.deletedAt) { signIn(); nav(`/${locale}`); } else setStep('setup');
|
||||
};
|
||||
// Demo admin sign-in: the real gate is the viewer's edit access; the password is only checked for shape.
|
||||
const adminSubmit = (e: React.FormEvent) => {
|
||||
e.preventDefault(); setErr('');
|
||||
if (!viewer?.canEdit) { setErr(t('auth.adminNoAccess')); return; }
|
||||
if (!/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(adminEmail)) { setErr(t('auth.emailInvalid')); return; }
|
||||
if (!validPassword(adminPw)) { setErr(t('auth.passwordShort')); return; }
|
||||
setRole('admin'); nav('/admin');
|
||||
};
|
||||
const switchTab = (k: string) => { setErr(''); setStep('start'); nav(`/${locale}/signin${k === 'admin' ? '/admin' : ''}`); };
|
||||
if (step === 'setup') return <ProfileSetup phone={mode === 'phone' ? `+251${phone.replace(/\s/g, '')}` : undefined} email={mode === 'email' ? email : undefined} />;
|
||||
return (
|
||||
<section className="stack" style={{ maxWidth: 440, margin: '0 auto', width: '100%' }}>
|
||||
{step === 'start' ? <form className="card stack" onSubmit={(e) => { e.preventDefault(); send(); }}>
|
||||
<h1 style={{ fontSize: 'var(--fs-xl)' }}>{mode === 'phone' ? t('auth.phoneTitle') : t('auth.emailTitle')}</h1>
|
||||
{mode === 'phone' ? (
|
||||
<label className="field"><span>{t('auth.phoneLabel')}</span>
|
||||
<div className="row" style={{ flexWrap: 'nowrap' }}><span className="pill" style={{ padding: '10px 12px' }}>+251</span><input id="phone" className="input" inputMode="numeric" autoComplete="tel-national" placeholder="9XX XXX XXX" value={phone} onChange={(e) => setPhone(e.target.value)} /></div>
|
||||
</label>
|
||||
) : <>
|
||||
<label className="field"><span>{t('auth.emailLabel')}</span><input id="email" className="input" type="email" autoComplete="email" value={email} onChange={(e) => setEmail(e.target.value)} /></label>
|
||||
<label className="field"><span>{t('auth.passwordLabel')}</span><input id="pw" className="input" type="password" autoComplete="new-password" value={pw} onChange={(e) => setPw(e.target.value)} /><span className="hint">{t('auth.passwordHint')}</span></label>
|
||||
</>}
|
||||
{err && <p className="err" role="alert">{err}</p>}
|
||||
<button className="btn btn-accent btn-block">{t('auth.sendCode')}</button>
|
||||
<button type="button" className="link" onClick={() => { setMode(mode === 'phone' ? 'email' : 'phone'); setErr(''); }}>{mode === 'phone' ? t('auth.useEmail') : t('auth.usePhone')}</button>
|
||||
</form> : <form className="card stack" onSubmit={verify}>
|
||||
<h1 style={{ fontSize: 'var(--fs-xl)' }}>{t('auth.codeTitle')}</h1>
|
||||
<p>{t('auth.codeSent', { target })}</p>
|
||||
<p className="banner"><strong>{t('auth.demoCode', { code })}</strong></p>
|
||||
<label className="field"><span className="sr-only">{t('auth.codeTitle')}</span><input id="otp" className="input otp" inputMode="numeric" autoComplete="one-time-code" maxLength={6} value={entered} onChange={(e) => setEntered(e.target.value.replace(/\D/g, ''))} /></label>
|
||||
{err && <p className="err" role="alert">{err}</p>}
|
||||
<button className="btn btn-accent btn-block" disabled={entered.length !== 6 || tries <= 0}>{t('auth.verify')}</button>
|
||||
<button type="button" className="btn btn-ghost btn-block" disabled={wait > 0} onClick={send}>{wait > 0 ? t('auth.resendIn', { s: wait }) : t('auth.resend')}</button>
|
||||
<button type="button" className="link" onClick={() => setStep('start')}>{t('common.back')}</button>
|
||||
</form>}
|
||||
<section className="auth">
|
||||
<div className="auth-side">
|
||||
<span className="brand-mark" aria-hidden>ሜ</span>
|
||||
<h2>{t('auth.sideTitle')}</h2>
|
||||
<p>{t('auth.sideBody')}</p>
|
||||
<ul className="facts">{['fact1', 'fact2', 'fact3'].map((k) => <li key={k}><Icon name="check" size={16} />{t(`landing.${k}`)}</li>)}</ul>
|
||||
</div>
|
||||
<div className="auth-main">
|
||||
<div className="seg auth-tabs" role="group">
|
||||
<button aria-pressed={tab === 'student'} onClick={() => switchTab('student')}>{t('auth.student')}</button>
|
||||
<button aria-pressed={tab === 'admin'} onClick={() => switchTab('admin')}>{t('auth.admin')}</button>
|
||||
</div>
|
||||
{tab === 'admin' ? <form className="stack" onSubmit={adminSubmit}>
|
||||
<div className="stack-sm"><h1>{t('auth.adminTitle')}</h1><p className="muted">{t('auth.adminLead')}</p></div>
|
||||
<label className="field"><span>{t('auth.emailLabel')}</span><input id="aemail" className="input" type="email" autoComplete="username" value={adminEmail} onChange={(e) => setAdminEmail(e.target.value)} /></label>
|
||||
<label className="field"><span>{t('auth.passwordLabel')}</span><input id="apw" className="input" type="password" autoComplete="current-password" value={adminPw} onChange={(e) => setAdminPw(e.target.value)} /><span className="hint">{t('auth.adminHint')}</span></label>
|
||||
{err && <p className="err" role="alert">{err}</p>}
|
||||
<button className="btn btn-block btn-lg">{t('auth.adminButton')}</button>
|
||||
</form> : !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>
|
||||
</>}
|
||||
<h2 className="auth-h2">{mode === 'phone' ? t('auth.phoneTitle') : t('auth.emailTitle')}</h2>
|
||||
{mode === 'phone' ? (
|
||||
<label className="field"><span>{t('auth.phoneLabel')}</span>
|
||||
<div className="row" style={{ flexWrap: 'nowrap' }}><span className="pill" style={{ padding: '10px 12px' }}>+251</span><input id="phone" className="input" inputMode="numeric" autoComplete="tel-national" placeholder="9XX XXX XXX" value={phone} onChange={(e) => setPhone(e.target.value)} /></div>
|
||||
</label>
|
||||
) : <>
|
||||
<label className="field"><span>{t('auth.emailLabel')}</span><input id="email" className="input" type="email" autoComplete="email" value={email} onChange={(e) => setEmail(e.target.value)} /></label>
|
||||
<label className="field"><span>{t('auth.passwordLabel')}</span><input id="pw" className="input" type="password" autoComplete="new-password" value={pw} onChange={(e) => setPw(e.target.value)} /><span className="hint">{t('auth.passwordHint')}</span></label>
|
||||
</>}
|
||||
{err && <p className="err" role="alert">{err}</p>}
|
||||
<button className="btn btn-block">{t('auth.sendCode')}</button>
|
||||
<button type="button" className="link" onClick={() => { setMode(mode === 'phone' ? 'email' : 'phone'); setErr(''); }}>{mode === 'phone' ? t('auth.useEmail') : t('auth.usePhone')}</button>
|
||||
</form> : <form className="stack" onSubmit={verify}>
|
||||
<h1>{t('auth.codeTitle')}</h1>
|
||||
<p>{t('auth.codeSent', { target })}</p>
|
||||
<p className="banner"><strong>{t('auth.demoCode', { code })}</strong></p>
|
||||
<label className="field"><span className="sr-only">{t('auth.codeTitle')}</span><input id="otp" className="input otp" inputMode="numeric" autoComplete="one-time-code" maxLength={6} value={entered} onChange={(e) => setEntered(e.target.value.replace(/\D/g, ''))} /></label>
|
||||
{err && <p className="err" role="alert">{err}</p>}
|
||||
<button className="btn btn-accent btn-block" disabled={entered.length !== 6 || tries <= 0}>{t('auth.verify')}</button>
|
||||
<button type="button" className="btn btn-ghost btn-block" disabled={wait > 0} onClick={send}>{wait > 0 ? t('auth.resendIn', { s: wait }) : t('auth.resend')}</button>
|
||||
<button type="button" className="link" onClick={() => setStep('start')}>{t('common.back')}</button>
|
||||
</form>}
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -326,3 +326,173 @@ table.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
|
|||
.btn-sm { min-height: 40px; }
|
||||
@media (pointer: coarse) { .btn-sm, .controls button, .controls select { min-height: 44px; min-width: 44px; } .lesson-row { min-height: 56px; } }
|
||||
.pay-logo { gap: 10px; }
|
||||
|
||||
/* ================= v3: cleaner shell, landing, course page, sign-in (inspo: e-Learning landing, OnlineLMS, Slothui course) ================= */
|
||||
:root { --f-head: 'Plus Jakarta Sans', var(--f-latin); --shadow-soft: 0 1px 2px rgba(27, 35, 64, .04), 0 8px 24px rgba(27, 35, 64, .06); --hero-a: #FFF6DA; --hero-b: #F3EEFA; }
|
||||
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --shadow-soft: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25); --hero-a: #232a40; --hero-b: #1d2236; } }
|
||||
:root[data-theme="dark"] { --shadow-soft: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25); --hero-a: #232a40; --hero-b: #1d2236; }
|
||||
h1:lang(en), h2:lang(en), h3:lang(en), h1:lang(om), h2:lang(om), h3:lang(om), .a-shell h1, .a-shell h2, .brand { font-family: var(--f-head); letter-spacing: -.01em; }
|
||||
.btn-lg { min-height: 50px; padding: 0 24px; font-size: var(--fs-base); }
|
||||
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
|
||||
.card { box-shadow: var(--shadow-soft); border-color: transparent; }
|
||||
.lesson-row { border-radius: var(--r-sm); }
|
||||
|
||||
/* navbar: brand | links | actions */
|
||||
.s-top { background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); }
|
||||
.s-top-in { max-width: 1200px; min-height: 64px; padding: 8px 20px; }
|
||||
.s-nav { margin-left: 24px; }
|
||||
.s-nav button { padding: 8px 14px; font-weight: 600; color: var(--ink-3); position: relative; }
|
||||
.s-nav button:hover { color: var(--ink); }
|
||||
.s-nav button[aria-current="page"] { background: none; color: var(--ink); }
|
||||
.s-nav button[aria-current="page"]::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: -2px; height: 2px; border-radius: 2px; background: var(--accent); }
|
||||
.s-actions { gap: 8px; }
|
||||
.lang-pick { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 6px 0 12px; border: 1px solid var(--line); border-radius: var(--r-pill); color: var(--ink-2); cursor: pointer; }
|
||||
.lang-pick select { border: 0; background: transparent; font-size: var(--fs-sm); font-weight: 700; cursor: pointer; max-width: 120px; padding: 4px 2px; }
|
||||
.lang-pick:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
|
||||
.menu { position: relative; }
|
||||
.menu > summary { list-style: none; cursor: pointer; }
|
||||
.menu > summary::-webkit-details-marker { display: none; }
|
||||
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; font-weight: 700; font-size: var(--fs-sm); overflow: hidden; flex: none; }
|
||||
.avatar img { width: 100%; height: 100%; object-fit: cover; }
|
||||
.avatar-lg { width: 56px; height: 56px; font-size: var(--fs-lg); background: var(--tone-plum); color: var(--ink); }
|
||||
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); width: 240px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-pop); padding: 6px; display: flex; flex-direction: column; z-index: 30; }
|
||||
.menu-head { display: flex; flex-direction: column; padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
|
||||
.menu-pop button { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 10px 12px; border-radius: var(--r-sm); cursor: pointer; text-align: left; font-weight: 600; color: var(--ink-2); }
|
||||
.menu-pop button:hover { background: var(--mist); color: var(--ink); }
|
||||
.menu-pop button:last-child { border-top: 1px solid var(--line); border-radius: 0 0 var(--r-sm) var(--r-sm); margin-top: 4px; }
|
||||
@media (max-width: 600px) { .lang-pick { padding: 0 4px 0 10px; } .lang-pick select { max-width: 76px; } }
|
||||
|
||||
/* landing */
|
||||
.s-main { max-width: 1200px; padding-left: 20px; padding-right: 20px; gap: 64px; }
|
||||
.l-hero { margin: -24px calc(50% - 50vw) 0; padding: 48px max(20px, calc(50vw - 580px)) 72px; background: linear-gradient(135deg, var(--hero-a), var(--hero-b)); }
|
||||
.l-hero-in { display: grid; gap: 40px; align-items: center; }
|
||||
@media (min-width: 900px) { .l-hero-in { grid-template-columns: 1.05fr 1fr; } }
|
||||
.l-hero h1 { font-size: clamp(34px, 5.6vw, 58px); line-height: 1.12; max-width: 15ch; }
|
||||
.l-hero h1:lang(am), .l-hero h1:lang(ti) { line-height: 1.35; }
|
||||
.l-hero .lead { font-size: var(--fs-lg); color: var(--ink-2); max-width: 46ch; }
|
||||
.eyebrow-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: var(--r-pill); background: var(--paper); font-size: var(--fs-sm); font-weight: 700; box-shadow: var(--shadow); }
|
||||
.eyebrow-pill svg { color: var(--accent); }
|
||||
.play-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; }
|
||||
.hero-art { position: relative; padding: 24px 0 24px 24px; }
|
||||
.hero-frame { position: relative; display: block; width: 100%; border: 0; padding: 10px; background: var(--paper); border-radius: 24px; box-shadow: var(--shadow-pop); cursor: pointer; transform: rotate(1.5deg); }
|
||||
.hero-frame .cover { aspect-ratio: 4 / 3; border-radius: 16px; padding: 28px; }
|
||||
.hero-frame .cover .ttl { font-size: clamp(26px, 3.4vw, 40px); }
|
||||
.play-big { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 68px; height: 68px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #1B2340; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); padding-left: 4px; transition: transform .2s; }
|
||||
.hero-frame:hover .play-big, .c-screen:hover .play-big { transform: translate(-50%, -50%) scale(1.08); }
|
||||
.float { position: absolute; background: var(--paper); border-radius: var(--r-md); box-shadow: var(--shadow-pop); padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
|
||||
.float-a { left: 0; bottom: 0; align-items: flex-start; } .float-a strong { font-size: var(--fs-xl); line-height: 1; } .float-a span { font-size: 12px; color: var(--ink-3); }
|
||||
.float-b { right: -8px; top: 0; max-width: 240px; }
|
||||
.float-b strong { font-size: var(--fs-sm); }
|
||||
@media (max-width: 600px) { .hero-art { padding: 16px 0 28px; } .float-a { left: -4px; } .float-b { right: 0; } .hero-frame { transform: none; } }
|
||||
.statbar { margin-top: -104px; position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; background: var(--paper); border-radius: var(--r-lg); box-shadow: var(--shadow-soft); padding: 8px; }
|
||||
@media (min-width: 760px) { .statbar { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
|
||||
.statbar > div { display: flex; align-items: center; gap: 14px; padding: 16px 18px; min-width: 0; }
|
||||
.statbar strong { display: block; font-size: var(--fs-xl); font-family: var(--f-head); line-height: 1.1; }
|
||||
.statbar span { font-size: var(--fs-sm); color: var(--ink-3); }
|
||||
.stat-ic { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--ink) !important; }
|
||||
.section-c { text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; }
|
||||
.section-c h2, .section-h h2 { font-size: clamp(25px, 3vw, 34px); }
|
||||
.section-c p { color: var(--ink-3); max-width: 52ch; }
|
||||
.section-h { align-items: flex-end; }
|
||||
.cat-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
|
||||
.cat-card { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; text-align: left; padding: 22px; border-radius: var(--r-lg); background: var(--paper); border: 1px solid var(--line); cursor: pointer; transition: box-shadow .2s, transform .2s; }
|
||||
.cat-card:hover { box-shadow: var(--shadow-soft); transform: translateY(-2px); border-color: transparent; }
|
||||
.cat-card h3 { font-size: var(--fs-lg); margin-top: 6px; }
|
||||
.cat-ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: var(--ink); }
|
||||
.cat-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: var(--fs-sm); margin-top: 4px; }
|
||||
.how-panel { display: grid; gap: 32px; padding: 32px; border-radius: 24px; background: var(--canvas); }
|
||||
@media (min-width: 900px) { .how-panel { grid-template-columns: 2fr 1fr; align-items: end; } }
|
||||
.how-panel h2 { font-size: var(--fs-xl); }
|
||||
.steps { padding: 0; margin: 0; }
|
||||
.steps li { background: var(--paper); }
|
||||
.cta-band { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; padding: 36px; border-radius: 24px; background: var(--ink); color: var(--on-ink); }
|
||||
.cta-band h2 { font-size: var(--fs-xl); } .cta-band p { opacity: .8; }
|
||||
|
||||
/* course cards */
|
||||
.ccard { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; gap: 0; transition: box-shadow .2s, transform .2s; }
|
||||
.ccard:hover { box-shadow: var(--shadow-soft); transform: translateY(-2px); border-color: transparent; }
|
||||
.ccard:hover h3 { text-decoration: none; }
|
||||
.ccard-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 8px 6px; min-width: 0; }
|
||||
.ccard .meta { display: flex; gap: 14px; flex-wrap: wrap; }
|
||||
.ccard .meta > span { display: inline-flex; align-items: center; gap: 5px; }
|
||||
.ccard-by { font-size: var(--fs-sm); color: var(--ink-2); }
|
||||
.ccard-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--line); }
|
||||
.ccard-cta { font-size: var(--fs-sm); font-weight: 700; padding: 6px 12px; border-radius: var(--r-pill); border: 1px solid var(--line); }
|
||||
.ccard:hover .ccard-cta { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
|
||||
@media (max-width: 599px) {
|
||||
.ccard { padding: 8px; grid-template-columns: 96px 1fr; gap: 0 12px; }
|
||||
.ccard .cover { grid-row: auto; }
|
||||
.ccard-body { padding: 2px 0; gap: 4px; } .ccard-by { display: none; } .ccard-foot { padding-top: 8px; } .ccard-cta { display: none; }
|
||||
}
|
||||
|
||||
/* course page */
|
||||
.c-page { display: flex; flex-direction: column; gap: 20px; }
|
||||
.crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--ink-3); font-size: var(--fs-sm); }
|
||||
.crumbs button { background: none; border: 0; padding: 4px; cursor: pointer; color: var(--ink-3); font-weight: 600; display: inline-flex; }
|
||||
.crumbs button:hover { color: var(--ink); }
|
||||
.crumbs button[aria-current="page"] { color: var(--ink); }
|
||||
.c-layout { display: grid; gap: 28px; align-items: start; }
|
||||
@media (min-width: 1024px) { .c-layout { grid-template-columns: minmax(0, 1fr) 380px; } .c-side { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; } }
|
||||
.c-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
|
||||
.c-main h1 { font-size: clamp(30px, 4vw, 42px); }
|
||||
.c-sub { font-size: var(--fs-lg); color: var(--ink-2); }
|
||||
.c-meta { display: flex; flex-wrap: wrap; gap: 16px 32px; padding: 0; margin: 0; }
|
||||
.c-meta li { list-style: none; display: flex; gap: 10px; align-items: flex-start; }
|
||||
.c-meta li > svg { color: var(--ink-3); margin-top: 2px; }
|
||||
.c-meta strong { display: block; } .c-meta span { font-size: var(--fs-sm); color: var(--ink-3); }
|
||||
.c-media { border-radius: 20px; background: var(--paper); box-shadow: var(--shadow-soft); overflow: hidden; }
|
||||
.c-screen { position: relative; display: block; width: 100%; border: 0; padding: 0; cursor: pointer; background: none; }
|
||||
.c-screen[disabled] { cursor: default; }
|
||||
.c-screen .cover { aspect-ratio: 16 / 8; border-radius: 0; padding: 32px; }
|
||||
.c-screen .cover .ttl { font-size: clamp(28px, 4vw, 48px); }
|
||||
.c-actions { display: flex; align-items: center; gap: 8px; padding: 8px 12px; flex-wrap: wrap; }
|
||||
.c-overview { display: grid; gap: 28px; }
|
||||
@media (min-width: 760px) { .c-overview { grid-template-columns: 1.3fr 1fr; } }
|
||||
.c-summary { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 4px 18px; background: var(--canvas); border-radius: var(--r-lg); align-self: start; }
|
||||
.c-summary > div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); }
|
||||
.c-summary > div:last-child { border-bottom: 0; }
|
||||
.c-summary dt { display: flex; gap: 8px; align-items: center; color: var(--ink-3); }
|
||||
.c-summary dd { margin: 0; font-weight: 700; text-align: right; }
|
||||
.c-side { display: flex; flex-direction: column; gap: 16px; }
|
||||
.buybox { position: static; }
|
||||
.c-content { padding: 0; overflow: hidden; }
|
||||
.c-content-h { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
|
||||
.c-content-h h2 { font-size: var(--fs-lg); }
|
||||
.ch { border-bottom: 1px solid var(--line); }
|
||||
.ch:last-child { border-bottom: 0; }
|
||||
.ch > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 20px; cursor: pointer; }
|
||||
.ch > summary::-webkit-details-marker { display: none; }
|
||||
.ch > summary strong { display: block; }
|
||||
.ch > summary svg { color: var(--ink-3); transition: transform .2s; flex: none; }
|
||||
.ch[open] > summary svg { transform: rotate(180deg); }
|
||||
.ch > summary:hover { background: var(--canvas); }
|
||||
.ch .lesson-row { padding: 12px 20px; border-radius: 0; }
|
||||
.ch .lesson-row[aria-current="true"] { box-shadow: inset 3px 0 0 var(--accent); }
|
||||
.tab-n { margin-left: 6px; background: var(--alert); color: #fff; font-size: 11px; border-radius: 9px; padding: 1px 6px; }
|
||||
|
||||
/* sign-in */
|
||||
.auth { display: grid; width: 100%; max-width: 980px; margin: 0 auto; border-radius: 24px; overflow: hidden; background: var(--paper); box-shadow: var(--shadow-soft); }
|
||||
@media (min-width: 860px) { .auth { grid-template-columns: 1fr 1.1fr; min-height: 560px; } }
|
||||
.auth-side { background: linear-gradient(160deg, var(--ink), #2A3356); color: #fff; padding: 40px; display: flex; flex-direction: column; gap: 16px; justify-content: flex-end; }
|
||||
.auth-side .brand-mark { background: var(--accent); color: #1B2340; margin-bottom: auto; }
|
||||
.auth-side h2 { font-size: var(--fs-2xl); color: #fff; } .auth-side p { opacity: .8; }
|
||||
.auth-side .facts { color: rgba(255, 255, 255, .85); flex-direction: column; } .auth-side .facts svg { color: var(--accent); }
|
||||
@media (max-width: 859px) { .auth-side { display: none; } }
|
||||
.auth-main { padding: 36px clamp(20px, 5vw, 48px); display: flex; flex-direction: column; gap: 24px; justify-content: center; }
|
||||
.auth-main h1 { font-size: var(--fs-2xl); }
|
||||
.auth-h2 { font-size: var(--fs-base); color: var(--ink-2); }
|
||||
.auth-tabs { align-self: flex-start; }
|
||||
.auth-tabs button { padding: 8px 18px; }
|
||||
.or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: var(--fs-sm); }
|
||||
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
|
||||
|
||||
/* admin */
|
||||
.stats-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
|
||||
@media (min-width: 1100px) { .stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
|
||||
.stat { box-shadow: var(--shadow-soft); border-color: transparent; }
|
||||
.a-tabs { gap: 18px; }
|
||||
.a-tabs .a-card { border: 0; padding: 0; box-shadow: none; }
|
||||
.a-tabs .a-card > .row-between h2 { display: none; }
|
||||
.a-tabs .stats .stat { box-shadow: none; border: 1px solid var(--line); }
|
||||
.a-out { background: rgba(255, 255, 255, .12); color: inherit; }
|
||||
@media (max-width: 899px) { .l-hero { padding-bottom: 32px; } .statbar { margin-top: -8px; } }
|
||||
|
|
|
|||
|
|
@ -40,6 +40,14 @@ const PATHS: Record<string, string> = {
|
|||
forward: 'M13 19l9-7-9-7zM2 19l9-7-9-7z',
|
||||
expand: 'M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5',
|
||||
comment: 'M4 4h16v12H8l-4 4z',
|
||||
globe: 'M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18',
|
||||
clock: 'M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zM12 7v5l3 2',
|
||||
calendar: 'M4 6h16v14H4zM4 10h16M8 3v4M16 3v4',
|
||||
share: 'M4 12v7a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-7M16 6l-4-4-4 4M12 2v13',
|
||||
video: 'M3 6h12v12H3zM15 10l6-3v10l-6-3',
|
||||
logout: 'M15 4h4a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-4M10 17l5-5-5-5M15 12H3',
|
||||
sparkle: 'M12 3l2 6 6 2-6 2-2 6-2-6-6-2 6-2z',
|
||||
brush: 'M14 4l6 6-8 8-6-6zM6 12l-3 7 7-3',
|
||||
};
|
||||
|
||||
export function Icon({ name, size = 20, label }: { name: keyof typeof PATHS | string; size?: number; label?: string }) {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,11 @@
|
|||
"notifications": "ማሳወቂያዎች",
|
||||
"signIn": "ግባ",
|
||||
"signOut": "ውጣ",
|
||||
"admin": "የአስተዳዳሪ ገጽ"
|
||||
"admin": "የአስተዳዳሪ ገጽ",
|
||||
"getStarted": "ይጀምሩ",
|
||||
"adminSignIn": "የአስተዳዳሪ መግቢያ",
|
||||
"account": "መለያ",
|
||||
"progress": "የእኔ እድገት"
|
||||
},
|
||||
"landing": {
|
||||
"title": "ሙያዊ ሜካፕን በራስዎ ቋንቋ ይማሩ",
|
||||
|
|
@ -39,7 +43,19 @@
|
|||
"fact2": "አንድ ጊዜ ይክፈሉ፣ ለዘላለም ይጠቀሙ",
|
||||
"fact3": "ነጻ የሙከራ ትምህርቶች",
|
||||
"from": "ከ{price} ጀምሮ",
|
||||
"footer": "ለሜካፕ ባለሙያዎች የቪዲዮ ኮርሶች፣ በስልክዎ።"
|
||||
"footer": "ለሜካፕ ባለሙያዎች የቪዲዮ ኮርሶች፣ በስልክዎ።",
|
||||
"eyebrow": "የሜካፕ ኮርሶች በ4 ቋንቋዎች",
|
||||
"statCourses": "ኮርሶች",
|
||||
"statLessons": "የቪዲዮ ትምህርቶች",
|
||||
"statHours": "ጠቅላላ ቪዲዮ",
|
||||
"statLanguages": "ቋንቋዎች",
|
||||
"catTitle": "ተወዳጅ ምድቦች",
|
||||
"catLead": "ከመሠረታዊ ነገሮች ይጀምሩ፣ ወይም በቀጥታ ወደ ሙሽራና የቆዳ እንክብካቤ ይሂዱ።",
|
||||
"viewCourses": "ኮርሶችን ይመልከቱ",
|
||||
"viewAll": "ሁሉንም ኮርሶች ይመልከቱ",
|
||||
"featuredLead": "ከባለሙያ የሜካፕ አርቲስቶች የተመረጡ ኮርሶች።",
|
||||
"ctaTitle": "በነጻ የቅድመ እይታ ትምህርት ይጀምሩ",
|
||||
"ctaBody": "ቅድመ እይታ ለማየት መለያ አያስፈልግም። ሲዘጋጁ ብቻ ይክፈሉ።"
|
||||
},
|
||||
"auth": {
|
||||
"phoneTitle": "በስልክዎ ይግቡ",
|
||||
|
|
@ -62,7 +78,20 @@
|
|||
"resendIn": "በ{s} ሰከንድ ውስጥ አዲስ ኮድ መላክ ይችላሉ",
|
||||
"wrongCode": "ኮዱ ትክክል አይደለም። {n} ሙከራ ቀርቷል።",
|
||||
"locked": "ብዙ የተሳሳቱ ሙከራዎች። አዲስ ኮድ ይላኩ።",
|
||||
"noIdentity": "የተማሪ መለያ ለመፍጠር ወደ Claude ገብተው ይህን ማሳያ ይክፈቱ።"
|
||||
"noIdentity": "የተማሪ መለያ ለመፍጠር ወደ Claude ገብተው ይህን ማሳያ ይክፈቱ።",
|
||||
"welcome": "እንኳን ደህና መጡ",
|
||||
"welcomeLead": "ኮርሶችዎን መመልከት ለመቀጠል ይግቡ።",
|
||||
"student": "ተማሪ",
|
||||
"admin": "አስተዳዳሪ",
|
||||
"continueAs": "እንደ {name} ይቀጥሉ",
|
||||
"or": "ወይም",
|
||||
"adminTitle": "የአስተዳዳሪ መግቢያ",
|
||||
"adminLead": "ኮርሶችን፣ ተማሪዎችንና ክፍያዎችን ያስተዳድሩ።",
|
||||
"adminButton": "ወደ አስተዳዳሪ ይግቡ",
|
||||
"adminNoAccess": "ይህ መለያ የአስተዳዳሪ ገጹን መክፈት አይችልም። ባለቤቱን የማስተካከል ፈቃድ ይጠይቁ።",
|
||||
"adminHint": "ማሳያ፦ 8 እና ከዚያ በላይ ፊደላት ያለው ማንኛውም የይለፍ ቃል ይሰራል።",
|
||||
"sideTitle": "ከባለሙያ አርቲስቶች ሜካፕ ይማሩ",
|
||||
"sideBody": "የቪዲዮ ትምህርቶች በአማርኛ፣ በአፋን ኦሮሞ፣ በትግርኛና በእንግሊዝኛ። አንድ ጊዜ ይክፈሉ፣ ኮርሱን ለዘላለም ያቆዩ።"
|
||||
},
|
||||
"setup": {
|
||||
"title": "ስለ እርስዎ ይንገሩን",
|
||||
|
|
@ -115,7 +144,21 @@
|
|||
"notFound": "ይህ ኮርስ አይገኝም።",
|
||||
"sequential": "ትምህርቶች በቅደም ተከተል ይከፈታሉ።",
|
||||
"completed": "ኮርሱን ጨርሰዋል",
|
||||
"watchAgain": "እንደገና ይመልከቱ"
|
||||
"watchAgain": "እንደገና ይመልከቱ",
|
||||
"tabOverview": "አጠቃላይ እይታ",
|
||||
"tabInstructor": "አሠልጣኝ",
|
||||
"summary": "ማጠቃለያ",
|
||||
"duration": "ጠቅላላ ርዝመት",
|
||||
"language": "ቋንቋ",
|
||||
"lastUpdated": "መጨረሻ የተሻሻለው",
|
||||
"lessonsLabel": "ትምህርቶች",
|
||||
"instructor": "አሠልጣኝ",
|
||||
"access": "መዳረሻ",
|
||||
"lifetime": "ለዘላለም",
|
||||
"share": "አጋራ",
|
||||
"linkCopied": "ሊንኩ ተቀድቷል",
|
||||
"teaches": "በMakeUp Academy {n, plural, one {# ኮርስ} other {# ኮርሶች}}",
|
||||
"viewDetails": "ዝርዝር ይመልከቱ"
|
||||
},
|
||||
"checkout": {
|
||||
"title": "የመክፈያ መንገድ ይምረጡ",
|
||||
|
|
|
|||
|
|
@ -22,7 +22,11 @@
|
|||
"notifications": "Notifications",
|
||||
"signIn": "Sign in",
|
||||
"signOut": "Sign out",
|
||||
"admin": "Admin panel"
|
||||
"admin": "Admin panel",
|
||||
"getStarted": "Get started",
|
||||
"adminSignIn": "Admin sign-in",
|
||||
"account": "Account",
|
||||
"progress": "My progress"
|
||||
},
|
||||
"landing": {
|
||||
"title": "Learn professional makeup, in your language",
|
||||
|
|
@ -39,7 +43,19 @@
|
|||
"fact2": "Pay once, keep it for life",
|
||||
"fact3": "Free preview lessons",
|
||||
"from": "From {price}",
|
||||
"footer": "Video courses for makeup artists, on your phone."
|
||||
"footer": "Video courses for makeup artists, on your phone.",
|
||||
"eyebrow": "Makeup courses in 4 languages",
|
||||
"statCourses": "Courses",
|
||||
"statLessons": "Video lessons",
|
||||
"statHours": "Total video",
|
||||
"statLanguages": "Languages",
|
||||
"catTitle": "Popular categories",
|
||||
"catLead": "Start with the basics, or go straight to bridal and skin work.",
|
||||
"viewCourses": "View courses",
|
||||
"viewAll": "View all courses",
|
||||
"featuredLead": "Hand-picked courses from working makeup artists.",
|
||||
"ctaTitle": "Start with a free preview lesson",
|
||||
"ctaBody": "No account needed to watch a preview. Pay only when you are ready."
|
||||
},
|
||||
"auth": {
|
||||
"phoneTitle": "Sign in with your phone",
|
||||
|
|
@ -62,7 +78,20 @@
|
|||
"resendIn": "Send a new code in {s} s",
|
||||
"wrongCode": "That code is wrong. {n, plural, one {# try} other {# tries}} left.",
|
||||
"locked": "Too many wrong tries. Send a new code.",
|
||||
"noIdentity": "Open this demo while signed in to Claude to create a student account."
|
||||
"noIdentity": "Open this demo while signed in to Claude to create a student account.",
|
||||
"welcome": "Welcome back",
|
||||
"welcomeLead": "Sign in to keep watching your courses.",
|
||||
"student": "Student",
|
||||
"admin": "Admin",
|
||||
"continueAs": "Continue as {name}",
|
||||
"or": "or",
|
||||
"adminTitle": "Admin sign-in",
|
||||
"adminLead": "Manage courses, students and payments.",
|
||||
"adminButton": "Sign in to admin",
|
||||
"adminNoAccess": "This account can’t open the admin panel. Ask the owner for edit access.",
|
||||
"adminHint": "Demo: any password with 8 or more characters works.",
|
||||
"sideTitle": "Learn makeup from working artists",
|
||||
"sideBody": "Video lessons in Amharic, Afaan Oromoo, Tigrinya and English. Pay once and keep the course for life."
|
||||
},
|
||||
"setup": {
|
||||
"title": "Tell us about you",
|
||||
|
|
@ -115,7 +144,21 @@
|
|||
"notFound": "This course isn't available.",
|
||||
"sequential": "Lessons unlock in order.",
|
||||
"completed": "Course completed",
|
||||
"watchAgain": "Watch again"
|
||||
"watchAgain": "Watch again",
|
||||
"tabOverview": "Overview",
|
||||
"tabInstructor": "Instructor",
|
||||
"summary": "Summary",
|
||||
"duration": "Total duration",
|
||||
"language": "Language",
|
||||
"lastUpdated": "Last updated",
|
||||
"lessonsLabel": "Lessons",
|
||||
"instructor": "Instructor",
|
||||
"access": "Access",
|
||||
"lifetime": "Lifetime",
|
||||
"share": "Share",
|
||||
"linkCopied": "Link copied",
|
||||
"teaches": "{n, plural, one {# course} other {# courses}} on MakeUp Academy",
|
||||
"viewDetails": "View details"
|
||||
},
|
||||
"checkout": {
|
||||
"title": "Choose how to pay",
|
||||
|
|
|
|||
|
|
@ -22,7 +22,11 @@
|
|||
"notifications": "Beeksisota",
|
||||
"signIn": "Seeni",
|
||||
"signOut": "Ba'i",
|
||||
"admin": "Fuula bulchiinsaa"
|
||||
"admin": "Fuula bulchiinsaa",
|
||||
"getStarted": "Get started",
|
||||
"adminSignIn": "Admin sign-in",
|
||||
"account": "Account",
|
||||
"progress": "My progress"
|
||||
},
|
||||
"landing": {
|
||||
"title": "Meekaappii ogummaa afaan keetiin baradhu",
|
||||
|
|
@ -39,7 +43,19 @@
|
|||
"fact2": "Al tokko kaffali, bara baraan qabadhu",
|
||||
"fact3": "Barnoota yaalii bilisaa",
|
||||
"from": "{price} irraa",
|
||||
"footer": "Koorsiiwwan viidiyoo ogeeyyii meekaappiif, bilbila keessan irratti."
|
||||
"footer": "Koorsiiwwan viidiyoo ogeeyyii meekaappiif, bilbila keessan irratti.",
|
||||
"eyebrow": "Makeup courses in 4 languages",
|
||||
"statCourses": "Courses",
|
||||
"statLessons": "Video lessons",
|
||||
"statHours": "Total video",
|
||||
"statLanguages": "Languages",
|
||||
"catTitle": "Popular categories",
|
||||
"catLead": "Start with the basics, or go straight to bridal and skin work.",
|
||||
"viewCourses": "View courses",
|
||||
"viewAll": "View all courses",
|
||||
"featuredLead": "Hand-picked courses from working makeup artists.",
|
||||
"ctaTitle": "Start with a free preview lesson",
|
||||
"ctaBody": "No account needed to watch a preview. Pay only when you are ready."
|
||||
},
|
||||
"auth": {
|
||||
"phoneTitle": "Bilbila keetiin seeni",
|
||||
|
|
@ -62,7 +78,20 @@
|
|||
"resendIn": "Sekondii {s} booda koodii haaraa erguu dandeessa",
|
||||
"wrongCode": "Koodiin sun dogoggora. Yaaliin {n} hafeera.",
|
||||
"locked": "Yaaliin dogoggoraa baay'ateera. Koodii haaraa ergi.",
|
||||
"noIdentity": "Herrega barataa uumuuf Claude'tti seenii agarsiisa kana bani."
|
||||
"noIdentity": "Herrega barataa uumuuf Claude'tti seenii agarsiisa kana bani.",
|
||||
"welcome": "Welcome back",
|
||||
"welcomeLead": "Sign in to keep watching your courses.",
|
||||
"student": "Student",
|
||||
"admin": "Admin",
|
||||
"continueAs": "Continue as {name}",
|
||||
"or": "or",
|
||||
"adminTitle": "Admin sign-in",
|
||||
"adminLead": "Manage courses, students and payments.",
|
||||
"adminButton": "Sign in to admin",
|
||||
"adminNoAccess": "This account can’t open the admin panel. Ask the owner for edit access.",
|
||||
"adminHint": "Demo: any password with 8 or more characters works.",
|
||||
"sideTitle": "Learn makeup from working artists",
|
||||
"sideBody": "Video lessons in Amharic, Afaan Oromoo, Tigrinya and English. Pay once and keep the course for life."
|
||||
},
|
||||
"setup": {
|
||||
"title": "Waa'ee kee nutti himi",
|
||||
|
|
@ -115,7 +144,21 @@
|
|||
"notFound": "Koorsiin kun hin argamu.",
|
||||
"sequential": "Barnoonni tartiibaan bana.",
|
||||
"completed": "Koorsii xumurteetta",
|
||||
"watchAgain": "Irra deebi'ii ilaali"
|
||||
"watchAgain": "Irra deebi'ii ilaali",
|
||||
"tabOverview": "Overview",
|
||||
"tabInstructor": "Instructor",
|
||||
"summary": "Summary",
|
||||
"duration": "Total duration",
|
||||
"language": "Language",
|
||||
"lastUpdated": "Last updated",
|
||||
"lessonsLabel": "Lessons",
|
||||
"instructor": "Instructor",
|
||||
"access": "Access",
|
||||
"lifetime": "Lifetime",
|
||||
"share": "Share",
|
||||
"linkCopied": "Link copied",
|
||||
"teaches": "{n, plural, one {# course} other {# courses}} on MakeUp Academy",
|
||||
"viewDetails": "View details"
|
||||
},
|
||||
"checkout": {
|
||||
"title": "Akkaataa kaffaltii filadhu",
|
||||
|
|
|
|||
|
|
@ -22,7 +22,11 @@
|
|||
"notifications": "መፍለጢታት",
|
||||
"signIn": "እቶ",
|
||||
"signOut": "ውጻእ",
|
||||
"admin": "ገጽ ምምሕዳር"
|
||||
"admin": "ገጽ ምምሕዳር",
|
||||
"getStarted": "Get started",
|
||||
"adminSignIn": "Admin sign-in",
|
||||
"account": "Account",
|
||||
"progress": "My progress"
|
||||
},
|
||||
"landing": {
|
||||
"title": "ሞያዊ ሜካፕ ብቋንቋኻ ተማሃር",
|
||||
|
|
@ -39,7 +43,19 @@
|
|||
"fact2": "ሓንሳብ ክፈል፣ ንዘለኣለም ሓዞ",
|
||||
"fact3": "ናጻ ናይ ፈተነ ትምህርትታት",
|
||||
"from": "ካብ {price}",
|
||||
"footer": "ንክኢላታት ሜካፕ ናይ ቪድዮ ኮርሳት፣ ኣብ ተሌፎንካ።"
|
||||
"footer": "ንክኢላታት ሜካፕ ናይ ቪድዮ ኮርሳት፣ ኣብ ተሌፎንካ።",
|
||||
"eyebrow": "Makeup courses in 4 languages",
|
||||
"statCourses": "Courses",
|
||||
"statLessons": "Video lessons",
|
||||
"statHours": "Total video",
|
||||
"statLanguages": "Languages",
|
||||
"catTitle": "Popular categories",
|
||||
"catLead": "Start with the basics, or go straight to bridal and skin work.",
|
||||
"viewCourses": "View courses",
|
||||
"viewAll": "View all courses",
|
||||
"featuredLead": "Hand-picked courses from working makeup artists.",
|
||||
"ctaTitle": "Start with a free preview lesson",
|
||||
"ctaBody": "No account needed to watch a preview. Pay only when you are ready."
|
||||
},
|
||||
"auth": {
|
||||
"phoneTitle": "ብተሌፎንካ እቶ",
|
||||
|
|
@ -62,7 +78,20 @@
|
|||
"resendIn": "ድሕሪ {s} ካልኢት ሓድሽ ኮድ ክትሰድድ ትኽእል",
|
||||
"wrongCode": "እቲ ኮድ ጌጋ እዩ። {n} ፈተነ ተሪፉ።",
|
||||
"locked": "ብዙሕ ጌጋ ፈተነታት። ሓድሽ ኮድ ስደድ።",
|
||||
"noIdentity": "ናይ ተማሃራይ ሕሳብ ንምፍጣር ናብ Claude ኣቲኻ እዚ መርኣያ ክፈቶ።"
|
||||
"noIdentity": "ናይ ተማሃራይ ሕሳብ ንምፍጣር ናብ Claude ኣቲኻ እዚ መርኣያ ክፈቶ።",
|
||||
"welcome": "Welcome back",
|
||||
"welcomeLead": "Sign in to keep watching your courses.",
|
||||
"student": "Student",
|
||||
"admin": "Admin",
|
||||
"continueAs": "Continue as {name}",
|
||||
"or": "or",
|
||||
"adminTitle": "Admin sign-in",
|
||||
"adminLead": "Manage courses, students and payments.",
|
||||
"adminButton": "Sign in to admin",
|
||||
"adminNoAccess": "This account can’t open the admin panel. Ask the owner for edit access.",
|
||||
"adminHint": "Demo: any password with 8 or more characters works.",
|
||||
"sideTitle": "Learn makeup from working artists",
|
||||
"sideBody": "Video lessons in Amharic, Afaan Oromoo, Tigrinya and English. Pay once and keep the course for life."
|
||||
},
|
||||
"setup": {
|
||||
"title": "ብዛዕባኻ ንገረና",
|
||||
|
|
@ -115,7 +144,21 @@
|
|||
"notFound": "እዚ ኮርስ ኣይርከብን።",
|
||||
"sequential": "ትምህርትታት ብቕደም ተኸተል ይኽፈቱ።",
|
||||
"completed": "ኮርስ ወዲእካ",
|
||||
"watchAgain": "እንደገና ርአ"
|
||||
"watchAgain": "እንደገና ርአ",
|
||||
"tabOverview": "Overview",
|
||||
"tabInstructor": "Instructor",
|
||||
"summary": "Summary",
|
||||
"duration": "Total duration",
|
||||
"language": "Language",
|
||||
"lastUpdated": "Last updated",
|
||||
"lessonsLabel": "Lessons",
|
||||
"instructor": "Instructor",
|
||||
"access": "Access",
|
||||
"lifetime": "Lifetime",
|
||||
"share": "Share",
|
||||
"linkCopied": "Link copied",
|
||||
"teaches": "{n, plural, one {# course} other {# courses}} on MakeUp Academy",
|
||||
"viewDetails": "View details"
|
||||
},
|
||||
"checkout": {
|
||||
"title": "መንገዲ ክፍሊት ምረጽ",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user