feat: guided tour, course cards with enrolled counts, abstract steps, grouped payments, SEO, founder link
- After sign-in a 7-step spotlight tour shows students around (replay from the menu); ends on Esc or navigation - Course cards: edge-to-edge photo, student count (Course.enrolledCount), arrow that inverts on hover (fixes white-on-white hover in dark mode) - Landing: stats removed; How it works uses abstract CSS art; payment card grouped by mobile money, bank cards and from abroad; step 2 copy covers local and international payment - SEO: metadata (title template, description, keywords, canonical, Open Graph, Twitter), per-route titles, EducationalOrganization JSON-LD with founder Rezina Brhane and her TikTok, robots.txt, sitemap.xml; same tags on the waitlist page - Footers link the founder's TikTok - Backend issue drafted: design/issues/enrollment-counts.md - Smoke test: blocks third-party requests (Vimeo iframe stalled unloads), tolerates a missed load event; it caught a hook-order crash on the course page, fixed here Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
270d36a237
commit
c6dc5d46a8
|
|
@ -4,7 +4,24 @@ import { join } from 'node:path';
|
|||
|
||||
import { LOGO_MARK } from '@lms/features/src/brandLogo';
|
||||
|
||||
export const metadata = { title: 'Sirkul Makeup', description: 'Claude-hosted demo of the e-learning platform (SPEC §18).', icons: { icon: LOGO_MARK } };
|
||||
const SITE = 'https://makeup-lms.vercel.app';
|
||||
const DESCRIPTION = "Video makeup courses from working Ethiopian artists, founded by Rezina Brhane. Bridal, soft glam, skin prep and traditional Habesha looks. Pay once with Telebirr, CBE Birr, cards or PayPal, keep the course for life, and learn on your phone in Amharic, English, Afaan Oromoo or Tigrinya.";
|
||||
export const metadata = {
|
||||
metadataBase: new URL(SITE),
|
||||
title: { default: 'Sirkul Makeup — Learn professional makeup from working artists', template: '%s · Sirkul Makeup' },
|
||||
description: DESCRIPTION,
|
||||
keywords: ['makeup course', 'makeup class Ethiopia', 'online makeup course', 'bridal makeup', 'Habesha makeup', 'makeup artist training', 'Addis Ababa makeup school', 'የሜካፕ ትምህርት', 'Rezina Brhane', 'Sirkul Makeup'],
|
||||
authors: [{ name: 'Rezina Brhane', url: 'https://www.tiktok.com/@rezinabrhane' }],
|
||||
creator: 'Rezina Brhane',
|
||||
alternates: { canonical: '/' },
|
||||
icons: { icon: LOGO_MARK },
|
||||
openGraph: { type: 'website', url: SITE, siteName: 'Sirkul Makeup', title: 'Learn professional makeup from working artists', description: DESCRIPTION, images: [{ url: '/photos/hero.jpg', alt: 'Makeup by Sirkul Makeup School' }], locale: 'en_US', alternateLocale: ['am_ET', 'om_ET', 'ti_ET'] },
|
||||
twitter: { card: 'summary_large_image', title: 'Sirkul Makeup — makeup courses on your phone', description: DESCRIPTION, images: ['/photos/hero.jpg'] },
|
||||
robots: { index: true, follow: true },
|
||||
};
|
||||
export const viewport = { themeColor: '#0A0A0A' };
|
||||
// Structured data: the school, its founder (Rezina Brhane) and her TikTok, so search results tie them together.
|
||||
const ORG = {"@context": "https://schema.org", "@type": "EducationalOrganization", "name": "Sirkul Makeup School/Studio", "alternateName": "Sirkul Makeup", "url": "https://makeup-lms.vercel.app", "logo": "https://makeup-lms.vercel.app/brand/sirkul-logo.png", "image": "https://makeup-lms.vercel.app/photos/hero.jpg", "description": "Video makeup courses from working Ethiopian artists, founded by Rezina Brhane. Bridal, soft glam, skin prep and traditional Habesha looks. Pay once with Telebirr, CBE Birr, cards or PayPal, keep the course for life, and learn on your phone in Amharic, English, Afaan Oromoo or Tigrinya.", "founder": {"@type": "Person", "name": "Rezina Brhane", "jobTitle": "Founder and head of Sirkul Makeup", "sameAs": ["https://www.tiktok.com/@rezinabrhane"]}, "sameAs": ["https://www.tiktok.com/@rezinabrhane"], "areaServed": "ET", "knowsLanguage": ["am", "en", "om", "ti"], "contactPoint": {"@type": "ContactPoint", "contactType": "customer support", "telephone": "+251911234567", "availableLanguage": ["Amharic", "English", "Afaan Oromoo", "Tigrinya"]}};
|
||||
|
||||
// Inlined at build time instead of `import '…css'`: an imported stylesheet is re-requested by React's
|
||||
// stylesheet hoisting at hydration, which the artifact CSP blocks. apps/web and apps/admin import it normally.
|
||||
|
|
@ -19,6 +36,7 @@ export default function RootLayout({ children }: { children: ReactNode }) {
|
|||
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="" />
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Noto+Sans+Ethiopic:wght@400;700&family=Noto+Serif+Ethiopic:wght@500;700&display=swap" />
|
||||
<style dangerouslySetInnerHTML={{ __html: css }} />
|
||||
<script type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(ORG) }} />
|
||||
{/* Saved theme, else dark (the brand default); runs before paint so there's no flash. */}
|
||||
<script dangerouslySetInnerHTML={{ __html: "try{var t=localStorage.getItem('theme')||'dark';document.documentElement.dataset.theme=t}catch(e){}" }} />
|
||||
</head>
|
||||
|
|
|
|||
4
apps/demo/public/robots.txt
Normal file
4
apps/demo/public/robots.txt
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
User-agent: *
|
||||
Allow: /
|
||||
|
||||
Sitemap: https://makeup-lms.vercel.app/sitemap.xml
|
||||
5
apps/demo/public/sitemap.xml
Normal file
5
apps/demo/public/sitemap.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
<url><loc>https://makeup-lms.vercel.app/</loc><changefreq>weekly</changefreq><priority>1.0</priority></url>
|
||||
<url><loc>https://makeup-lms.vercel.app/waitlist/</loc><changefreq>weekly</changefreq><priority>0.9</priority></url>
|
||||
</urlset>
|
||||
|
|
@ -4,8 +4,24 @@
|
|||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
||||
<title>Sirkul Makeup — Join the waitlist</title>
|
||||
<meta name="description" content="Video makeup courses from Sirkul Makeup School. Join the waitlist and be first in line the day classes open." />
|
||||
<meta name="description" content="Join the Sirkul Makeup waitlist: video makeup courses from working Ethiopian artists, founded by Rezina Brhane. Bridal, soft glam, skin prep and traditional Habesha looks, made for your phone." />
|
||||
<meta name="theme-color" content="#0A0A0A" />
|
||||
<link rel="canonical" href="https://makeup-lms.vercel.app/waitlist/" />
|
||||
<meta name="keywords" content="makeup course, makeup class Ethiopia, online makeup course, bridal makeup, Habesha makeup, Rezina Brhane, Sirkul Makeup, የሜካፕ ትምህርት" />
|
||||
<meta name="author" content="Rezina Brhane" />
|
||||
<meta name="robots" content="index, follow" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:site_name" content="Sirkul Makeup" />
|
||||
<meta property="og:url" content="https://makeup-lms.vercel.app/waitlist/" />
|
||||
<meta property="og:title" content="Your signature look starts here — Sirkul Makeup" />
|
||||
<meta property="og:description" content="Join the Sirkul Makeup waitlist: video makeup courses from working Ethiopian artists, founded by Rezina Brhane. Bridal, soft glam, skin prep and traditional Habesha looks, made for your phone." />
|
||||
<meta property="og:image" content="https://makeup-lms.vercel.app/photos/hero.jpg" />
|
||||
<meta property="og:image:alt" content="Makeup by Sirkul Makeup School" />
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:title" content="Your signature look starts here — Sirkul Makeup" />
|
||||
<meta name="twitter:description" content="Join the Sirkul Makeup waitlist: video makeup courses from working Ethiopian artists, founded by Rezina Brhane. Bridal, soft glam, skin prep and traditional Habesha looks, made for your phone." />
|
||||
<meta name="twitter:image" content="https://makeup-lms.vercel.app/photos/hero.jpg" />
|
||||
<script type="application/ld+json">{"@context": "https://schema.org", "@type": "EducationalOrganization", "name": "Sirkul Makeup School/Studio", "alternateName": "Sirkul Makeup", "url": "https://makeup-lms.vercel.app", "logo": "https://makeup-lms.vercel.app/brand/sirkul-logo.png", "image": "https://makeup-lms.vercel.app/photos/hero.jpg", "description": "Video makeup courses from working Ethiopian artists, founded by Rezina Brhane. Bridal, soft glam, skin prep and traditional Habesha looks. Pay once with Telebirr, CBE Birr, cards or PayPal, keep the course for life, and learn on your phone in Amharic, English, Afaan Oromoo or Tigrinya.", "founder": {"@type": "Person", "name": "Rezina Brhane", "jobTitle": "Founder and head of Sirkul Makeup", "sameAs": ["https://www.tiktok.com/@rezinabrhane"]}, "sameAs": ["https://www.tiktok.com/@rezinabrhane"], "areaServed": "ET", "knowsLanguage": ["am", "en", "om", "ti"], "contactPoint": {"@type": "ContactPoint", "contactType": "customer support", "telephone": "+251911234567", "availableLanguage": ["Amharic", "English", "Afaan Oromoo", "Tigrinya"]}}</script>
|
||||
<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=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Noto+Sans+Ethiopic:wght@400;600&display=swap" />
|
||||
|
|
@ -216,6 +232,7 @@
|
|||
.foot-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
|
||||
.foot-brand img { width: min(100%, 340px); filter: invert(1); }
|
||||
.foot-brand p { margin: 0; color: var(--ink-2); font-size: 17px; }
|
||||
.foot-brand .founder { font-size: 15px; color: var(--ink-3); } .founder a { color: var(--ink); text-underline-offset: 3px; }
|
||||
.foot-contact { display: flex; flex-direction: column; }
|
||||
.foot-contact h3 { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
|
||||
.foot-contact a { display: flex; align-items: center; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 600; overflow-wrap: anywhere; transition: padding 240ms var(--ease-out), color 160ms; }
|
||||
|
|
@ -344,6 +361,7 @@
|
|||
<div class="foot-brand">
|
||||
<img src="/brand/sirkul-logo.png" alt="Sirkul Makeup School/Studio" />
|
||||
<p>Learn the craft. Keep it for life.</p>
|
||||
<p class="founder">Founded by <a href="https://www.tiktok.com/@rezinabrhane" target="_blank" rel="noopener">Rezina Brhane</a></p>
|
||||
<a class="btn" href="#join" data-focus>Join the waitlist</a>
|
||||
</div>
|
||||
<!-- Contact details mirror the app's settings (packages/db/seed/demo-seed.mjs → settings/app). -->
|
||||
|
|
@ -351,6 +369,7 @@
|
|||
<h3>Contact us</h3>
|
||||
<a href="https://t.me/sirkulmakeup_demo" target="_blank" rel="noopener"><span><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M22 2L11 13M22 2l-7 20-4-9-9-4z"/></svg></span>Message us on Telegram</a>
|
||||
<a href="tel:+251911234567"><span><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7c.1.9.4 1.8.7 2.7a2 2 0 0 1-.5 2.1L8 9.8a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.7.7a2 2 0 0 1 1.7 2z"/></svg></span>+251 911 234 567</a>
|
||||
<a href="https://www.tiktok.com/@rezinabrhane" target="_blank" rel="noopener"><span><svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M16.6 5.8A4.3 4.3 0 0 1 15.5 3h-3.1v12.4a2.6 2.6 0 1 1-2.6-2.6c.3 0 .5 0 .8.1V9.7a5.7 5.7 0 1 0 4.9 5.7V9.1a7.3 7.3 0 0 0 4.3 1.4V7.4a4.3 4.3 0 0 1-3.2-1.6z"/></svg></span>@rezinabrhane on TikTok</a>
|
||||
<a href="mailto:support@sirkul-makeup.example"><span><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 6h18v12H3zM3 7l9 6 9-6"/></svg></span>support@sirkul-makeup.example</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
14
design/issues/enrollment-counts.md
Normal file
14
design/issues/enrollment-counts.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# Backend: enrolled counts per course, and where each student is
|
||||
|
||||
**Labels:** backend, analytics
|
||||
|
||||
The course cards now show "N students" from `Course.enrolledCount` (optional field in `packages/data/src/index.ts`). In the demo the seed computes it once from the sample students. Students can't read each other's records, so the real number has to come from the backend.
|
||||
|
||||
## Needed
|
||||
- **Enrolled count per course.** Keep `enrolledCount` on each course doc up to date when an enrollment is created or revoked (purchase, admin grant, free). A counter updated in the same write as the enrollment is enough; recount nightly to self-heal.
|
||||
- **Where each student is.** For admins: per course, how many students are on each chapter/section right now, and per student their current lesson. Derive from `Student.progress` (latest `updatedAt` per course → that lesson's chapter). Expose as an admin view or a nightly aggregate doc per course, e.g. `courseStats/{courseId} = { enrolled, bySection: { [chapterId]: n }, completed }`.
|
||||
|
||||
## Done when
|
||||
- [ ] A purchase shows up in the course's student count without a redeploy
|
||||
- [ ] Admins can see, per course, how many students are in each section and who is stuck where
|
||||
- [ ] Remove the seed-time computation in `packages/db/seed/demo-seed.mjs` (marked `ponytail:`)
|
||||
|
|
@ -48,6 +48,7 @@ export interface Course {
|
|||
prerequisiteCourseId?: string | null; publishedAt?: string | null; createdAt: string; updatedAt: string;
|
||||
translations: Tr<{ title: string; subtitle?: string; description: string; audience?: string; outcomes?: string[] }>;
|
||||
prices: Partial<Record<Currency, number>>; // integer minor units
|
||||
enrolledCount?: number; // backend aggregate: students enrolled (purchase, grant or free)
|
||||
chapters: Chapter[];
|
||||
assessments?: Assessment[];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -230,4 +230,9 @@ people.forEach(([name, phone, email, country, city, locale, joined], i) => {
|
|||
if (i === 0) s.issues['iss-s1'] = { id: 'iss-s1', type: 'ACCOUNT', subject: 'Change my phone number', description: 'I have a new Safaricom number.', status: 'RESOLVED', resolutionNote: 'Updated on your profile.', createdAt: t('2026-03-02', 9), updatedAt: t('2026-03-03', 9) };
|
||||
put('students', id, s);
|
||||
});
|
||||
// Enrolled count per course, from the students above. ponytail: computed once at seed time; the backend
|
||||
// keeps this aggregate live (see design/issues/enrollment-counts.md), students can't read each other's docs.
|
||||
const enrolled = {};
|
||||
for (const f of fs.readdirSync(path.join(out, 'students'))) for (const k of Object.keys(JSON.parse(fs.readFileSync(path.join(out, 'students', f), 'utf8')).enrollments ?? {})) enrolled[k] = (enrolled[k] ?? 0) + 1;
|
||||
for (const f of fs.readdirSync(path.join(out, 'courses'))) { const file = path.join(out, 'courses', f), c = JSON.parse(fs.readFileSync(file, 'utf8')); fs.writeFileSync(file, JSON.stringify({ ...c, enrolledCount: enrolled[c.id] ?? 0 }, null, 1)); }
|
||||
console.log('seed written to', out);
|
||||
|
|
|
|||
|
|
@ -46,11 +46,11 @@ function CourseCard({ c }: { c: Course }) {
|
|||
<Cover course={c} locale={locale} badge={<span className="pill">{catName(c.categoryId)}</span>} />
|
||||
<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="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><Icon name="users" size={14} />{c.enrolledCount ? t('course.enrolled', { n: c.enrolledCount }) : t('course.newCourse')}</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></>}
|
||||
: <>{c.prices.ETB != null ? <strong className="num">{formatMoney(c.prices.ETB, 'ETB')}</strong> : <span />}<span className="ccard-go" aria-hidden><Icon name="chevron" size={18} /></span></>}
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
|
|
@ -73,6 +73,13 @@ export function StudentApp() {
|
|||
const mainRef = useRef<HTMLElement>(null);
|
||||
const sheet = useRef<HTMLDialogElement>(null);
|
||||
const closeSheet = () => sheet.current?.close();
|
||||
const [touring, setTouring] = useState(false);
|
||||
// The tour runs once, after sign-in and after the first-visit language choice.
|
||||
const maybeTour = useCallback(() => {
|
||||
try { if (signedIn && localStorage.getItem('lms.langChosen') && !localStorage.getItem('lms.tourDone')) setTouring(true); } catch { /* storage blocked: skip the tour */ }
|
||||
}, [signedIn]);
|
||||
useEffect(() => { maybeTour(); }, [maybeTour]);
|
||||
const endTour = () => { try { localStorage.setItem('lms.tourDone', '1'); } catch {} setTouring(false); };
|
||||
const [scrolled, setScrolled] = useState(false);
|
||||
useEffect(() => {
|
||||
const on = () => setScrolled(scrollY > 24);
|
||||
|
|
@ -80,6 +87,8 @@ export function StudentApp() {
|
|||
return () => removeEventListener('scroll', on);
|
||||
}, []);
|
||||
const go = (p: string) => nav(`/${locale}${p}`);
|
||||
// Tab title per section (the course page sets its own, with the course name).
|
||||
useEffect(() => { if (section !== 'course') document.title = section ? `${t.has(`nav.${section}`) ? t(`nav.${section}`) : settings.brandName} · ${settings.brandName}` : `${settings.brandName} — ${t('landing.title')}`; }, [section, locale, settings.brandName, t]);
|
||||
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 === 'profile' && (section === 'progress' || section === 'history')) ? 'page' : undefined);
|
||||
|
|
@ -90,7 +99,7 @@ export function StudentApp() {
|
|||
<div className="s-top-in">
|
||||
<button className="brand" onClick={() => go('')} aria-label={settings.brandName}><Logo size={36} /><Logo size={36} mark /></button>
|
||||
<nav className="s-nav" aria-label="Main">
|
||||
{links.map(([p, , label]) => <button key={p} aria-current={current(p)} onClick={() => go(p ? '/' + p : '')}>{label}</button>)}
|
||||
{links.map(([p, , label]) => <button key={p} data-tour={p} aria-current={current(p)} onClick={() => go(p ? '/' + p : '')}>{label}</button>)}
|
||||
</nav>
|
||||
<div className="s-actions">
|
||||
{signedIn ? <>
|
||||
|
|
@ -112,6 +121,7 @@ export function StudentApp() {
|
|||
{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">
|
||||
{signedIn && <div className="sheet-row"><span>{t('tour.again')}</span><button className="icon-btn" aria-label={t('tour.again')} onClick={() => { closeSheet(); setTouring(true); }}><Icon name="sparkle" size={20} /></button></div>}
|
||||
<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>
|
||||
|
|
@ -119,14 +129,15 @@ export function StudentApp() {
|
|||
<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 />
|
||||
<LangWelcome onDone={maybeTour} />
|
||||
{touring && <Tour onDone={endTour} />}
|
||||
<main className="s-main" ref={mainRef}>
|
||||
{settings.maintenanceBanner && <div className="banner small" role="status">{settings.maintenanceBanner}</div>}
|
||||
<StudentRoutes />
|
||||
</main>
|
||||
<Footer />
|
||||
{signedIn && section !== 'learn' && section !== 'course' && <nav className="s-tabs" aria-label="Main">
|
||||
{tabs.map(([p, icon, label]) => <button key={p} aria-current={current(p)} onClick={() => go(p ? '/' + p : '')}><Icon name={icon} size={22} />{label}</button>)}
|
||||
{tabs.map(([p, icon, label]) => <button key={p} data-tour={p} aria-current={current(p)} onClick={() => go(p ? '/' + p : '')}><Icon name={icon} size={22} />{label}</button>)}
|
||||
</nav>}
|
||||
</div>
|
||||
);
|
||||
|
|
@ -144,9 +155,51 @@ function LangPick() {
|
|||
);
|
||||
}
|
||||
|
||||
// Guided tour: each step rings a real element (the first visible match, so phones point at the bottom tabs
|
||||
// and desktops at the header) and explains it. A step whose element isn't on screen shows as a centered card.
|
||||
const TOUR: [string, string | null][] = [['welcome', null], ['continue', '.continue'], ['courses', '[data-tour="courses"]'], ['my', '[data-tour="my"]'], ['profile', '[data-tour="profile"]'], ['menu', '.menu-btn'], ['help', '[data-tour="help"]']];
|
||||
function Tour({ onDone }: { onDone(): void }) {
|
||||
const t = useTranslations();
|
||||
const { me } = useApp();
|
||||
const [i, setI] = useState(0);
|
||||
const [rect, setRect] = useState<DOMRect | null>(null);
|
||||
const [key, sel] = TOUR[i];
|
||||
const last = i === TOUR.length - 1;
|
||||
useEffect(() => {
|
||||
const el = sel ? [...document.querySelectorAll<HTMLElement>(sel)].find((e) => e.offsetParent && e.getBoundingClientRect().width > 0) : undefined;
|
||||
if (!el) { setRect(null); return; }
|
||||
el.scrollIntoView({ block: 'center', behavior: 'smooth' });
|
||||
const measure = () => setRect(el.getBoundingClientRect());
|
||||
const id = setTimeout(measure, 380);
|
||||
addEventListener('resize', measure); addEventListener('scroll', measure, { passive: true });
|
||||
return () => { clearTimeout(id); removeEventListener('resize', measure); removeEventListener('scroll', measure); };
|
||||
}, [sel]);
|
||||
// Esc or any navigation (e.g. the back button) ends the tour.
|
||||
useEffect(() => { const esc = (e: KeyboardEvent) => { if (e.key === 'Escape') onDone(); }; addEventListener('keydown', esc); addEventListener('hashchange', onDone); return () => { removeEventListener('keydown', esc); removeEventListener('hashchange', onDone); }; }, [onDone]);
|
||||
const below = !rect || rect.top + rect.height / 2 < innerHeight / 2;
|
||||
const pad = 8;
|
||||
return (
|
||||
<div className="tour" role="dialog" aria-modal="true" aria-labelledby="tour-h">
|
||||
{rect ? <div className="tour-ring" style={{ top: rect.top - pad, left: rect.left - pad, width: rect.width + pad * 2, height: rect.height + pad * 2 }} /> : <div className="tour-dim" />}
|
||||
<div className={`tour-card ${rect ? (below ? 'at-bottom' : 'at-top') : 'at-center'}`} key={i}>
|
||||
<div className="tour-dots" aria-hidden>{TOUR.map((_, k) => <i key={k} className={k === i ? 'on' : ''} />)}</div>
|
||||
<span className="sr-only">{i + 1} / {TOUR.length}</span>
|
||||
<h2 id="tour-h">{t(`tour.${key}T`, { name: me?.name.split(' ')[0] ?? '' })}</h2>
|
||||
<p>{t(`tour.${key}`)}</p>
|
||||
<div className="tour-actions">
|
||||
{!last && <button className="link" onClick={onDone}>{t('tour.skip')}</button>}
|
||||
<span className="grow" />
|
||||
{i > 0 && <button className="btn btn-ghost btn-sm" onClick={() => setI(i - 1)}>{t('common.back')}</button>}
|
||||
<button className="btn btn-accent btn-sm" autoFocus onClick={() => (last ? onDone() : setI(i + 1))}>{last ? t('tour.done') : t('tour.next')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
// 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() {
|
||||
function LangWelcome({ onDone }: { onDone(): void }) {
|
||||
const { locale, setLocale } = useApp();
|
||||
const ref = useRef<HTMLDialogElement>(null);
|
||||
useEffect(() => {
|
||||
|
|
@ -158,6 +211,7 @@ function LangWelcome() {
|
|||
try { localStorage.setItem('lms.langChosen', '1'); } catch {}
|
||||
if (l !== locale) setLocale(l);
|
||||
ref.current?.close();
|
||||
onDone();
|
||||
};
|
||||
return (
|
||||
<dialog ref={ref} className="lang-welcome" aria-labelledby="lw-h" onCancel={() => pick(locale)}>
|
||||
|
|
@ -199,7 +253,7 @@ function UserMenu() {
|
|||
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>
|
||||
<summary data-tour="profile" 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>
|
||||
|
|
@ -224,11 +278,13 @@ function Footer() {
|
|||
<div className="foot-brand">
|
||||
<h2 className="foot-word"><Logo size={64} /><span className="foot-icon"><KitIcon name="brush" size={56} /></span><span className="sr-only">{settings.brandName}</span></h2>
|
||||
<p className="foot-tag">{t('footer.tagline')}</p>
|
||||
<p className="foot-founder">{t.rich('footer.founder', { name: () => <a href="https://www.tiktok.com/@rezinabrhane" target="_blank" rel="noreferrer">Rezina Brhane</a> })}</p>
|
||||
<div className="foot-contact">
|
||||
<span className="foot-chip">{t('footer.contact')}</span>
|
||||
<a href={settings.telegramLink} target="_blank" rel="noreferrer">{t('help.telegram')}</a>
|
||||
<span className="num">{settings.supportPhone}</span>
|
||||
{settings.supportEmail && <a href={`mailto:${settings.supportEmail}`}>{settings.supportEmail}</a>}
|
||||
<a href="https://www.tiktok.com/@rezinabrhane" target="_blank" rel="noreferrer">{t('footer.tiktok')}</a>
|
||||
</div>
|
||||
</div>
|
||||
<nav className="foot-cols" aria-label="Footer">
|
||||
|
|
@ -308,7 +364,7 @@ const PHOTO_CREDITS: [string, string, string][] = [
|
|||
['T.Voekler', 'CC BY-SA 3.0', 'https://commons.wikimedia.org/wiki/File:Eritrean_woman.jpg'],
|
||||
];
|
||||
const WORK_PHOTOS = ['glam.jpg', 'habesha-harari.jpg', 'bridal.jpg', 'hero.jpg', 'skin.jpg', 'habesha-trad.jpg', 'foundations.jpg', 'habesha-eritrean.jpg', 'clients.jpg', 'habesha-bride.jpg'];
|
||||
const PAY_IDS = ['TELEBIRR', 'CBE_BIRR', 'VISA', 'MASTERCARD', 'PAYPAL', 'ZELLE'];
|
||||
const PAY_GROUPS: [string, string[]][] = [['payLocal', ['TELEBIRR', 'CBE_BIRR']], ['payCards', ['VISA', 'MASTERCARD']], ['payAbroad', ['PAYPAL', 'ZELLE']]];
|
||||
|
||||
function WaitPill({ label }: { label: string }) {
|
||||
const [i, setI] = useState(0);
|
||||
|
|
@ -335,11 +391,8 @@ 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']];
|
||||
return (
|
||||
<div className="landing">
|
||||
<section className="l-hero">
|
||||
|
|
@ -356,10 +409,6 @@ function Landing() {
|
|||
</div>
|
||||
</section>
|
||||
|
||||
<section className="statbar">
|
||||
{stats.map(([, n, k]) => <div key={k}><strong className="num">{n}</strong><span>{t(`landing.${k}`)}</span></div>)}
|
||||
</section>
|
||||
|
||||
{cats.length > 0 && <section className="stack-lg">
|
||||
<div className="section-h"><div className="stack-sm"><h2>{t('landing.catTitle')}</h2><p className="muted">{t('landing.catLead')}</p></div></div>
|
||||
<div className="look-grid">{cats.map((c, i) => (
|
||||
|
|
@ -380,13 +429,16 @@ function Landing() {
|
|||
<section className="stack-lg">
|
||||
<div className="section-h"><div className="stack-sm"><h2>{t('landing.howTitle')}</h2><p className="muted">{t('landing.payLead')}{Number.isFinite(minPrice) && <> <strong className="num">{t('landing.from', { price: formatMoney(minPrice, 'ETB') })}</strong></>}</p></div></div>
|
||||
<ol className="steps3">
|
||||
<li className="step"><img src="/photos/habesha-bride.jpg" alt="" loading="lazy" /><strong>{t('landing.how1')}</strong></li>
|
||||
<li className="step"><img src="/photos/habesha-harari.jpg" alt="" loading="lazy" /><strong>{t('landing.how2')}</strong></li>
|
||||
<li className="step"><img src="/photos/habesha-eritrean.jpg" alt="" loading="lazy" /><strong>{t('landing.how3')}</strong></li>
|
||||
{/* Abstract art per step (CSS only): preview rings, a stack of cards, an unlocking arc. */}
|
||||
{(['play', 'cart', 'lock'] as const).map((icon, k) => <li key={icon} className={`step step-${k + 1}`}><span className="step-art" aria-hidden><span className="step-glyph"><Icon name={icon} size={26} /></span></span><strong>{t(`landing.how${k + 1}`)}</strong></li>)}
|
||||
</ol>
|
||||
<div className="pay-strip">
|
||||
<h3>{t('landing.payTitle')}</h3>
|
||||
<ul>{PAY_IDS.map((id) => <li key={id}><PayLogo id={id} />{methodName(id)}</li>)}</ul>
|
||||
<div className="pay-groups">{PAY_GROUPS.map(([k, ids]) => <div key={k} className="pay-group">
|
||||
<span className="pay-label">{t(`landing.${k}`)}</span>
|
||||
<ul>{ids.map((id) => <li key={id}><PayLogo id={id} />{methodName(id)}</li>)}</ul>
|
||||
</div>)}</div>
|
||||
<p className="cd-note"><Icon name="lock" size={14} />{t('landing.payNote')}</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
|
@ -483,6 +535,7 @@ function CoursePage({ slug }: { slug?: string }) {
|
|||
const { catName } = useCatalog();
|
||||
const [tab, setTab] = useState('overview');
|
||||
const c = courses.find((x) => x.slug === slug);
|
||||
useEffect(() => { if (c) document.title = `${ct(c, locale).title} · Sirkul Makeup`; }, [c, locale]); // before the early returns: hooks must run every render
|
||||
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>;
|
||||
const text = ct(c, locale);
|
||||
|
|
|
|||
|
|
@ -470,7 +470,6 @@ h1:lang(en), h2:lang(en), h3:lang(en), h1:lang(om), h2:lang(om), h3:lang(om), .b
|
|||
.continue { background: #111; color: #fff; }
|
||||
.continue .bar > i { background: #fff; }
|
||||
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); }
|
||||
.ccard:hover .ccard-cta { background: var(--accent); border-color: var(--accent); color: #fff; }
|
||||
.pay-mark { width: 48px; height: 28px; flex: none; display: grid; place-items: center; }
|
||||
.pay-mark img { width: 48px; height: 28px; object-fit: contain; }
|
||||
.pay-logo { padding: 8px 14px 8px 10px; }
|
||||
|
|
@ -1008,3 +1007,61 @@ fieldset[disabled] .quiz-opt { cursor: default; }
|
|||
.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; } }
|
||||
|
||||
/* ---------- guided tour ---------- */
|
||||
.tour { position: fixed; inset: 0; z-index: 60; }
|
||||
.tour-dim { position: absolute; inset: 0; background: rgba(0, 0, 0, .7); animation: fade-in 240ms ease; }
|
||||
.tour-ring { position: fixed; border-radius: 18px; box-shadow: 0 0 0 2px #fff, 0 0 0 9999px rgba(0, 0, 0, .7); transition: top 420ms var(--ease-out), left 420ms var(--ease-out), width 420ms var(--ease-out), height 420ms var(--ease-out); pointer-events: none; }
|
||||
.tour-card { position: fixed; left: 16px; right: 16px; margin: 0 auto; max-width: 380px; display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 22px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); animation: sheet-in 320ms var(--ease-out); }
|
||||
.tour-card.at-bottom { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
|
||||
.tour-card.at-top { top: 76px; }
|
||||
.tour-card.at-center { top: 50%; transform: translateY(-50%); }
|
||||
.tour-card h2 { font-size: var(--fs-xl); letter-spacing: -.03em; line-height: 1.1; }
|
||||
.tour-card p { color: var(--ink-2); }
|
||||
.tour-dots { display: flex; gap: 6px; }
|
||||
.tour-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width 300ms var(--ease-out), background 300ms; }
|
||||
.tour-dots i.on { width: 20px; background: var(--ink); }
|
||||
.tour-actions { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
|
||||
.tour-actions .btn { border-radius: 999px; min-height: 44px; padding-inline: 18px; }
|
||||
@media (min-width: 900px) { .tour-card.at-bottom { bottom: 32px; } }
|
||||
@media (prefers-reduced-motion: reduce) { .tour-ring, .tour-card, .tour-dim { transition: none; animation: none; } }
|
||||
|
||||
/* ---------- course cards 2026-10-20: edge-to-edge photo, enrolled count, arrow that inverts on hover ---------- */
|
||||
.ccard { padding: 0; overflow: hidden; border-radius: 22px; }
|
||||
.ccard .cover { border-radius: 0; overflow: hidden; }
|
||||
.ccard .cover img { transition: transform 700ms var(--ease-out); }
|
||||
.ccard:hover .cover img { transform: scale(1.05); }
|
||||
.ccard-body { padding: 16px 16px 14px; }
|
||||
.ccard h3 { letter-spacing: -.02em; line-height: 1.25; }
|
||||
.ccard .meta { gap: 6px 12px; }
|
||||
.ccard-go { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); color: var(--ink); transition: background 200ms, color 200ms, border-color 200ms, transform 240ms var(--ease-out); }
|
||||
.ccard:hover .ccard-go, .ccard:focus-visible .ccard-go { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: translateX(2px); }
|
||||
@media (max-width: 600px) { .ccard { padding: 8px; border-radius: 18px; } .ccard .cover { border-radius: 12px; } .ccard-body { padding: 2px 0; } .ccard-go { width: 32px; height: 32px; } }
|
||||
@media (hover: none) { .ccard:hover .cover img { transform: none; } }
|
||||
|
||||
/* ---------- how it works: abstract art instead of portraits ---------- */
|
||||
.step { background: var(--paper); border: 1px solid var(--line); color: var(--ink); justify-content: flex-end; min-height: 300px; }
|
||||
.step::after { display: none; }
|
||||
.step::before { background: var(--mist); backdrop-filter: none; color: var(--ink-2); }
|
||||
.step-art { position: absolute; inset: 0 0 38% 0; display: grid; place-items: center; z-index: -1; overflow: hidden; }
|
||||
.step-glyph { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); box-shadow: 0 12px 30px rgba(0, 0, 0, .25); position: relative; z-index: 1; transition: transform 500ms var(--ease-out); }
|
||||
.step:hover .step-glyph { transform: scale(1.08); }
|
||||
.step-1 .step-art { background: repeating-radial-gradient(circle at 50% 55%, transparent 0 22px, var(--line) 22px 23px); }
|
||||
.step-1 .step-art::after { content: ''; position: absolute; width: 140px; height: 140px; border-radius: 50%; border: 1px solid var(--ink-3); animation: ring 3s var(--ease-out) infinite; }
|
||||
@keyframes ring { from { transform: scale(.5); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
|
||||
.step-2 .step-art::before, .step-2 .step-art::after { content: ''; position: absolute; width: 150px; height: 96px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(135deg, var(--mist), transparent); }
|
||||
.step-2 .step-art::before { transform: translate(-28px, -14px) rotate(-10deg); }
|
||||
.step-2 .step-art::after { transform: translate(26px, 12px) rotate(8deg); }
|
||||
.step-3 .step-art { background: conic-gradient(from 200deg at 50% 55%, transparent 0 25%, var(--mist) 25% 75%, transparent 75%); }
|
||||
.step-3 .step-art::after { content: ''; position: absolute; width: 150px; height: 150px; border-radius: 50%; border: 2px dashed var(--line); animation: spin 18s linear infinite; }
|
||||
@keyframes spin { to { rotate: 360deg; } }
|
||||
@media (prefers-reduced-motion: reduce) { .step-art::after { animation: none !important; } }
|
||||
|
||||
/* payment card: grouped so it's clear we take local and international */
|
||||
.pay-groups { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
|
||||
.pay-group { display: flex; flex-direction: column; gap: 10px; }
|
||||
.pay-label { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
|
||||
.pay-strip ul { grid-template-columns: 1fr 1fr; }
|
||||
.pay-strip .cd-note { padding: 0; }
|
||||
|
||||
.foot-founder { color: var(--ink-3); font-size: var(--fs-sm); margin-top: -8px; } .foot-founder a { color: var(--ink); text-underline-offset: 3px; }
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
"featured": "ተመራጭ ኮርሶች",
|
||||
"howTitle": "እንዴት ይሠራል",
|
||||
"how1": "ነጻ የሙከራ ትምህርቶችን ይመልከቱ",
|
||||
"how2": "በቴሌብር ወይም በሲቢኢ ብር ይክፈሉ",
|
||||
"how2": "በአገር ውስጥም ሆነ በውጭ በፈለጉት መንገድ ይክፈሉ",
|
||||
"how3": "ኮርሱ ወዲያውኑ ይከፈታል፣ ለዘላለም",
|
||||
"payTitle": "በለመዱት መንገድ ይክፈሉ",
|
||||
"fact1": "አማርኛ፣ አፋን ኦሮሞ፣ ትግርኛና እንግሊዝኛ",
|
||||
|
|
@ -165,7 +165,9 @@
|
|||
"includes": "ይህ ኮርስ የሚያካትተው",
|
||||
"previewLessons": "{n, plural, one {# ነጻ የቅድመ እይታ ትምህርት} other {# ነጻ የቅድመ እይታ ትምህርቶች}}",
|
||||
"createdBy": "ያዘጋጀው",
|
||||
"lifetimeAccess": "የዕድሜ ልክ መዳረሻ"
|
||||
"lifetimeAccess": "የዕድሜ ልክ መዳረሻ",
|
||||
"enrolled": "{n} ተማሪዎች",
|
||||
"newCourse": "አዲስ ኮርስ"
|
||||
},
|
||||
"checkout": {
|
||||
"title": "የመክፈያ መንገድ ይምረጡ",
|
||||
|
|
@ -366,7 +368,9 @@
|
|||
"kit4Note": "ከንፈር",
|
||||
"workTitle": "የተማሪዎች ሥራ",
|
||||
"workSub": "በሲርኩል ተማሪዎች የተሠሩ",
|
||||
"credits": "የፎቶ ምንጮች"
|
||||
"credits": "የፎቶ ምንጮች",
|
||||
"founder": "መሥራች፦ <name></name>",
|
||||
"tiktok": "@rezinabrhane በቲክቶክ"
|
||||
},
|
||||
"history": {
|
||||
"title": "ታሪክ",
|
||||
|
|
@ -377,5 +381,25 @@
|
|||
"report": "ሪፖርት ልከዋል፦ {subject}",
|
||||
"empty": "እስካሁን ምንም የለም። ትምህርት ሲጀምሩ እዚህ ይታያል።",
|
||||
"seeAll": "ሁሉንም ይመልከቱ"
|
||||
},
|
||||
"tour": {
|
||||
"welcomeT": "እንኳን ደህና መጡ፣ {name}",
|
||||
"welcome": "ሁሉም ነገር የት እንዳለ ፈጣን ጉብኝት። 30 ሰከንድ ያህል ይወስዳል።",
|
||||
"continueT": "ካቆሙበት ይቀጥሉ",
|
||||
"continue": "የመጨረሻው ትምህርትዎ እዚህ ይጠብቅዎታል። አንድ ጊዜ ሲነኩት ካቆሙበት ይቀጥላል።",
|
||||
"coursesT": "ኮርሶችን ያስሱ",
|
||||
"courses": "እያንዳንዱ ኮርስ ነጻ የቅድመ እይታ ትምህርቶች አሉት፤ ከመግዛትዎ በፊት ይሞክሩ።",
|
||||
"myT": "የእርስዎ ኮርሶች",
|
||||
"my": "የገዙት ሁሉ እዚህ አለ፤ ለዘላለም የእርስዎ ነው።",
|
||||
"profileT": "እድገትና ታሪክ",
|
||||
"profile": "መገለጫዎ በእያንዳንዱ ኮርስ ምን ያህል እንደደረሱና ያዩትን ሁሉ ያሳያል።",
|
||||
"menuT": "ቋንቋና ገጽታ",
|
||||
"menu": "ቋንቋ፣ ብርሃን ወይም ጨለማ ገጽታ ይቀይሩ ወይም አስተያየት ይላኩ።",
|
||||
"helpT": "እርዳታ ይፈልጋሉ?",
|
||||
"help": "በቴሌግራም ይጻፉልን፣ ይደውሉ ወይም ችግር ያሳውቁ። እውነተኛ ሰው ይመልሳል።",
|
||||
"next": "ቀጣይ",
|
||||
"skip": "ጉብኝቱን ዝለል",
|
||||
"done": "መማር ይጀምሩ",
|
||||
"again": "አስጎብኙኝ"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
"featured": "Featured courses",
|
||||
"howTitle": "How it works",
|
||||
"how1": "Watch the free preview lessons",
|
||||
"how2": "Pay with Telebirr or CBE Birr",
|
||||
"how2": "Pay your way, at home or abroad",
|
||||
"how3": "The course unlocks right away, for life",
|
||||
"payTitle": "Pay the way you already do",
|
||||
"fact1": "Amharic, Afaan Oromoo, Tigrinya and English",
|
||||
|
|
@ -165,7 +165,9 @@
|
|||
"includes": "This course includes",
|
||||
"previewLessons": "{n, plural, one {# free preview lesson} other {# free preview lessons}}",
|
||||
"createdBy": "Created by",
|
||||
"lifetimeAccess": "Lifetime access"
|
||||
"lifetimeAccess": "Lifetime access",
|
||||
"enrolled": "{n, plural, one {# student} other {# students}}",
|
||||
"newCourse": "New course"
|
||||
},
|
||||
"checkout": {
|
||||
"title": "Choose how to pay",
|
||||
|
|
@ -366,7 +368,9 @@
|
|||
"kit4Note": "Lips",
|
||||
"workTitle": "Student work",
|
||||
"workSub": "Looks by Sirkul students",
|
||||
"credits": "Photo credits"
|
||||
"credits": "Photo credits",
|
||||
"founder": "Founded by <name></name>",
|
||||
"tiktok": "@rezinabrhane on TikTok"
|
||||
},
|
||||
"history": {
|
||||
"title": "History",
|
||||
|
|
@ -377,5 +381,25 @@
|
|||
"report": "Sent a report: {subject}",
|
||||
"empty": "Nothing yet. Start a lesson and it shows up here.",
|
||||
"seeAll": "See all"
|
||||
},
|
||||
"tour": {
|
||||
"welcomeT": "Welcome, {name}",
|
||||
"welcome": "A quick look at where everything lives. It takes about 30 seconds.",
|
||||
"continueT": "Pick up where you left off",
|
||||
"continue": "Your last lesson waits here. One tap and the video picks up where you stopped.",
|
||||
"coursesT": "Browse courses",
|
||||
"courses": "Every course has free preview lessons, so you can try before you buy.",
|
||||
"myT": "Your courses",
|
||||
"my": "Everything you bought lives here, yours for life.",
|
||||
"profileT": "Progress and history",
|
||||
"profile": "Your profile shows how far you are in each course and everything you have watched.",
|
||||
"menuT": "Language and theme",
|
||||
"menu": "Switch language, light or dark mode, or send us feedback from the menu.",
|
||||
"helpT": "Need a hand?",
|
||||
"help": "Message us on Telegram, call, or report a problem. A real person answers.",
|
||||
"next": "Next",
|
||||
"skip": "Skip tour",
|
||||
"done": "Start learning",
|
||||
"again": "Show me around"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
"featured": "Koorsiiwwan filatamoo",
|
||||
"howTitle": "Akkamitti hojjeta",
|
||||
"how1": "Barnoota yaalii bilisaa ilaali",
|
||||
"how2": "Telebirr ykn CBE Birr'n kaffali",
|
||||
"how2": "Biyya keessaa ykn alaa karaa barbaadde kaffali",
|
||||
"how3": "Koorsiin battalumatti, bara baraan siif bana",
|
||||
"payTitle": "Karaa duraan beekteen kaffali",
|
||||
"fact1": "Amaariffa, Afaan Oromoo, Tigrinyaa fi Ingiliffa",
|
||||
|
|
@ -165,7 +165,9 @@
|
|||
"includes": "Koorsiin kun kan of keessaa qabu",
|
||||
"previewLessons": "{n, plural, one {Barnoota bilisaa # ilaaluu} other {Barnoota bilisaa # ilaaluu}}",
|
||||
"createdBy": "Kan qopheesse",
|
||||
"lifetimeAccess": "Dhaqqabummaa umurii guutuu"
|
||||
"lifetimeAccess": "Dhaqqabummaa umurii guutuu",
|
||||
"enrolled": "barattoota {n}",
|
||||
"newCourse": "Koorsii haaraa"
|
||||
},
|
||||
"checkout": {
|
||||
"title": "Akkaataa kaffaltii filadhu",
|
||||
|
|
@ -366,7 +368,9 @@
|
|||
"kit4Note": "Afaan",
|
||||
"workTitle": "Hojii barattootaa",
|
||||
"workSub": "Kan barattoota Sirkul",
|
||||
"credits": "Madda suuraalee"
|
||||
"credits": "Madda suuraalee",
|
||||
"founder": "Hundeessituu: <name></name>",
|
||||
"tiktok": "@rezinabrhane TikTok irratti"
|
||||
},
|
||||
"history": {
|
||||
"title": "Seenaa",
|
||||
|
|
@ -377,5 +381,25 @@
|
|||
"report": "Gabaasa ergite: {subject}",
|
||||
"empty": "Ammaaf homaa hin jiru. Barnoota jalqabi, asitti mul'ata.",
|
||||
"seeAll": "Hunda ilaali"
|
||||
},
|
||||
"tour": {
|
||||
"welcomeT": "Baga nagaan dhufte, {name}",
|
||||
"welcome": "Wanti hundi eessa akka jiru ilaalcha gabaabaa. Sekondii 30 qofa.",
|
||||
"continueT": "Bakka dhaabde irraa itti fufi",
|
||||
"continue": "Barnoonni kee dhumaa asitti si eeggata. Tuqaa tokkoon bakka dhaabde irraa itti fufa.",
|
||||
"coursesT": "Koorsiiwwan ilaali",
|
||||
"courses": "Koorsiin hundi barnoota bilisaa qaba; osoo hin bitatin yaali.",
|
||||
"myT": "Koorsiiwwan kee",
|
||||
"my": "Wanti bitte hundi asitti argama, bara baraan kan kee.",
|
||||
"profileT": "Guddinaa fi seenaa",
|
||||
"profile": "Piroofaayiliin kee koorsii tokkoon tokkoon keessatti hammam akka geesse fi waan ilaalte hunda agarsiisa.",
|
||||
"menuT": "Afaanii fi bifa",
|
||||
"menu": "Afaan, bifa ifaa ykn dukkanaa jijjiiri, ykn yaada nuuf ergi.",
|
||||
"helpT": "Gargaarsa barbaaddaa?",
|
||||
"help": "Telegram irratti nuuf barreessi, bilbili ykn rakkoo gabaasi. Namni dhugaa deebisa.",
|
||||
"next": "Itti aanu",
|
||||
"skip": "Daawwannaa irra darbi",
|
||||
"done": "Barachuu jalqabi",
|
||||
"again": "Naa agarsiisi"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
"featured": "ፍሉያት ኮርሳት",
|
||||
"howTitle": "ከመይ ይሰርሕ",
|
||||
"how1": "ናጻ ናይ ፈተነ ትምህርትታት ርአ",
|
||||
"how2": "ብቴሌብር ወይ ሲቢኢ ብር ክፈል",
|
||||
"how2": "ኣብ ውሽጢ ዓዲ ይኹን ወጻኢ ብዝደለኽዮ ክፈሊ",
|
||||
"how3": "ኮርሱ ብቕጽበት ይኽፈት፣ ንዘለኣለም",
|
||||
"payTitle": "ብዝለመድካዮ መንገዲ ክፈል",
|
||||
"fact1": "ኣምሓርኛ፣ ኦሮምኛ፣ ትግርኛን እንግሊዝኛን",
|
||||
|
|
@ -165,7 +165,9 @@
|
|||
"includes": "እዚ ኮርስ ዝሓዞ",
|
||||
"previewLessons": "{n, plural, one {# ነጻ ቅድመ ርእይቶ ትምህርቲ} other {# ነጻ ቅድመ ርእይቶ ትምህርትታት}}",
|
||||
"createdBy": "ዘዳለዎ",
|
||||
"lifetimeAccess": "ንዘለኣለም ምርካብ"
|
||||
"lifetimeAccess": "ንዘለኣለም ምርካብ",
|
||||
"enrolled": "{n} ተማሃሮ",
|
||||
"newCourse": "ሓድሽ ኮርስ"
|
||||
},
|
||||
"checkout": {
|
||||
"title": "መንገዲ ክፍሊት ምረጽ",
|
||||
|
|
@ -366,7 +368,9 @@
|
|||
"kit4Note": "ከናፍር",
|
||||
"workTitle": "ስራሕ ተምሃሮ",
|
||||
"workSub": "ብተምሃሮ ሲርኩል ዝተሰርሑ",
|
||||
"credits": "ምንጪ ስእልታት"
|
||||
"credits": "ምንጪ ስእልታት",
|
||||
"founder": "መስራቲት፦ <name></name>",
|
||||
"tiktok": "@rezinabrhane ኣብ ቲክቶክ"
|
||||
},
|
||||
"history": {
|
||||
"title": "ታሪኽ",
|
||||
|
|
@ -377,5 +381,25 @@
|
|||
"report": "ጸብጻብ ሰዲድካ፦ {subject}",
|
||||
"empty": "ገና የለን። ትምህርቲ ጀምር፣ ኣብዚ ክርአ እዩ።",
|
||||
"seeAll": "ኩሉ ርአ"
|
||||
},
|
||||
"tour": {
|
||||
"welcomeT": "እንቋዕ ብደሓን መጻእኪ፣ {name}",
|
||||
"welcome": "ኩሉ ነገር ኣበይ ከም ዘሎ ሓጺር ምርኣይ። 30 ሰከንድ ጥራይ።",
|
||||
"continueT": "ካብ ዘቋረጽክዮ ቀጽሊ",
|
||||
"continue": "ናይ መወዳእታ ትምህርትኺ ኣብዚ ይጽበየኪ። ሓንሳብ ምስ ጠወቕኪ ካብ ዘቋረጽክዮ ይቕጽል።",
|
||||
"coursesT": "ኮርሳት ድለዪ",
|
||||
"courses": "ነፍሲ ወከፍ ኮርስ ነጻ ትምህርትታት ኣለዎ፤ ቅድሚ ምግዛእኪ ፈትኒ።",
|
||||
"myT": "ኮርሳትኪ",
|
||||
"my": "ዝገዛእክዮ ኩሉ ኣብዚ ኣሎ፣ ንሓዋሩ ናትኪ።",
|
||||
"profileT": "ምዕባለን ታሪኽን",
|
||||
"profile": "ፕሮፋይልኪ ኣብ ነፍሲ ወከፍ ኮርስ ክሳብ ክንደይ ከም ዝበጻሕክን ዝረኣኽዮ ኩሉን የርኢ።",
|
||||
"menuT": "ቋንቋን ገጽታን",
|
||||
"menu": "ቋንቋ፣ ብሩህ ወይ ጸልማት ገጽታ ቀይሪ፣ ወይ ርእይቶ ስደዲ።",
|
||||
"helpT": "ሓገዝ ትደልዪ?",
|
||||
"help": "ብቴሌግራም ጽሓፍልና፣ ደውሊ ወይ ጸገም ሓብሪ። ሓቀኛ ሰብ ይምልስ።",
|
||||
"next": "ቀጻሊ",
|
||||
"skip": "ዑደት ሕለፍ",
|
||||
"done": "ምምሃር ጀምሪ",
|
||||
"again": "ኣርእዩኒ"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,8 @@ const w = dom.window;
|
|||
await new Promise((r) => setTimeout(r, 2000));
|
||||
for (const route of ['#/am', '#/am/courses', '#/en/help']) { w.location.hash = route; await new Promise((r) => setTimeout(r, 300)); }
|
||||
// React can re-insert hoisted <link>/<script> tags at hydration; jsdom doesn't fetch them, so scan the DOM too.
|
||||
for (const el of w.document.querySelectorAll('link[href],script[src]')) network.push(`${el.tagName.toLowerCase()} ${el.getAttribute('href') ?? el.getAttribute('src')}`);
|
||||
for (const el of w.document.querySelectorAll('link[href]:not([rel=canonical]):not([rel=author]):not([rel=alternate]),script[src]')) // canonical/author/alternate are metadata, never fetched
|
||||
network.push(`${el.tagName.toLowerCase()} ${el.getAttribute('href') ?? el.getAttribute('src')}`);
|
||||
const allowed = (u) => /^(link|script) data:/.test(u) || /^link https:\/\/fonts\.(googleapis|gstatic)\.com/.test(u) || /cdnjs\.cloudflare\.com|cdn\.jsdelivr\.net\/npm|fonts\.googleapis\.com|fonts\.gstatic\.com/.test(u);
|
||||
const bad = network.filter((n) => !allowed(n));
|
||||
console.log({ networkAttempts: bad, errors });
|
||||
|
|
|
|||
|
|
@ -14,14 +14,19 @@ const b = await puppeteer.launch({ executablePath: '/Applications/Google Chrome.
|
|||
const problems = []; let clicks = 0;
|
||||
async function open(p, hash, signedOut) {
|
||||
await p.goto('about:blank');
|
||||
await p.goto('file://' + file + hash, { waitUntil: 'domcontentloaded' }); await new Promise((r) => setTimeout(r, 500));
|
||||
// The app rewrites the hash while booting, and Puppeteer sometimes misses that load's lifecycle event and
|
||||
// waits forever. If the document did load, carry on; if it didn't, fail as before.
|
||||
await p.goto('file://' + file + hash, { waitUntil: 'domcontentloaded', timeout: 15000 })
|
||||
.catch(async (e) => { if ((await p.evaluate(() => document.readyState).catch(() => '')) === 'loading' || !(await p.evaluate(() => !!document.body).catch(() => false))) throw e; }); await new Promise((r) => setTimeout(r, 500));
|
||||
}
|
||||
async function worker(list) {
|
||||
const p = await b.newPage(); await p.setViewport({ width: 1280, height: 900 });
|
||||
let errs = []; p.on('pageerror', (e) => errs.push(e.message));
|
||||
// Offline run: block third-party requests (the Vimeo placeholder iframe can stall unloading the player page).
|
||||
await p.setRequestInterception(true); p.on('request', (r) => (/^(file|data|about|blob):/.test(r.url()) || /fonts\.(googleapis|gstatic)\.com/.test(r.url()) ? r.continue() : r.abort()));
|
||||
await p.evaluateOnNewDocument((s) => { window.__SEED__ = s; }, seed);
|
||||
await p.evaluateOnNewDocument(mock);
|
||||
await p.evaluateOnNewDocument(() => { try { localStorage.setItem('lms.langChosen', '1'); } catch {} });
|
||||
await p.evaluateOnNewDocument(() => { try { localStorage.setItem('lms.langChosen', '1'); localStorage.setItem('lms.tourDone', '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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user