Compare commits
No commits in common. "c6dc5d46a82266ae0194cfa01cb4d31b5323ab33" and "5699903ea7e71164fdc3e3114a6f0ecc7cc8f98b" have entirely different histories.
c6dc5d46a8
...
5699903ea7
|
|
@ -4,24 +4,7 @@ import { join } from 'node:path';
|
||||||
|
|
||||||
import { LOGO_MARK } from '@lms/features/src/brandLogo';
|
import { LOGO_MARK } from '@lms/features/src/brandLogo';
|
||||||
|
|
||||||
const SITE = 'https://makeup-lms.vercel.app';
|
export const metadata = { title: 'Sirkul Makeup', description: 'Claude-hosted demo of the e-learning platform (SPEC §18).', icons: { icon: LOGO_MARK } };
|
||||||
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
|
// 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.
|
// stylesheet hoisting at hydration, which the artifact CSP blocks. apps/web and apps/admin import it normally.
|
||||||
|
|
@ -36,7 +19,6 @@ export default function RootLayout({ children }: { children: ReactNode }) {
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="" />
|
<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" />
|
<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 }} />
|
<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. */}
|
{/* 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){}" }} />
|
<script dangerouslySetInnerHTML={{ __html: "try{var t=localStorage.getItem('theme')||'dark';document.documentElement.dataset.theme=t}catch(e){}" }} />
|
||||||
</head>
|
</head>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
User-agent: *
|
|
||||||
Allow: /
|
|
||||||
|
|
||||||
Sitemap: https://makeup-lms.vercel.app/sitemap.xml
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
<?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,24 +4,8 @@
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
||||||
<title>Sirkul Makeup — Join the waitlist</title>
|
<title>Sirkul Makeup — Join the waitlist</title>
|
||||||
<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="description" content="Video makeup courses from Sirkul Makeup School. Join the waitlist and be first in line the day classes open." />
|
||||||
<meta name="theme-color" content="#0A0A0A" />
|
<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.googleapis.com" />
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
<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" />
|
<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" />
|
||||||
|
|
@ -182,77 +166,7 @@
|
||||||
footer a { text-decoration: none; }
|
footer a { text-decoration: none; }
|
||||||
footer a:hover { color: var(--ink); }
|
footer a:hover { color: var(--ink); }
|
||||||
|
|
||||||
/* ---------- SMS / email toggle: SMS first, since most people here live on their phone ---------- */
|
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .card { opacity: 1; } html { scroll-behavior: auto; } }
|
||||||
.seg { display: flex; width: max-content; gap: 4px; padding: 4px; margin: 0 auto 10px; border-radius: 999px; background: var(--field); border: 1px solid var(--line); }
|
|
||||||
.seg button { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 18px; border: 0; border-radius: 999px; background: none; color: var(--ink-3); font-weight: 600; font-size: 14px; cursor: pointer; transition: background 220ms var(--ease-out), color 220ms; }
|
|
||||||
.seg button[aria-selected="true"] { background: #fff; color: #0A0A0A; }
|
|
||||||
.bar .tel { flex: 1; min-width: 0; min-height: 48px; border: 0; background: none; }
|
|
||||||
.bar .tel input { height: 48px; }
|
|
||||||
.bar .cc { margin-left: 2px; }
|
|
||||||
.bar [hidden] { display: none !important; }
|
|
||||||
.more { grid-template-columns: 1fr; }
|
|
||||||
|
|
||||||
/* ---------- motion: headline words rise, then the rest; sections reveal on scroll ---------- */
|
|
||||||
h1 .w { display: inline-block; opacity: 0; animation: rise 900ms var(--ease-out) forwards; animation-delay: calc(var(--i) * 80ms + 200ms); }
|
|
||||||
.pitch > .proof, .pitch > .lead, .pitch > .join { opacity: 0; animation: rise 800ms var(--ease-out) forwards; }
|
|
||||||
.pitch > .proof { animation-delay: 80ms; } .pitch > .lead { animation-delay: 620ms; } .pitch > .join { animation-delay: 760ms; }
|
|
||||||
.collage { transform: translateY(var(--py, 0px)); }
|
|
||||||
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 900ms var(--ease-out), transform 1000ms var(--ease-out); transition-delay: var(--rd, 0ms); }
|
|
||||||
.reveal.in { opacity: 1; transform: none; }
|
|
||||||
.looks li.reveal img { transform: scale(1.18); transition: transform 1600ms var(--ease-out); transition-delay: var(--rd, 0ms); }
|
|
||||||
.looks li.in img { transform: scale(1); }
|
|
||||||
.looks li.in:hover img { transform: scale(1.05); transition-duration: 700ms; transition-delay: 0ms; }
|
|
||||||
.cta img { transform: scale(1.12); transition: transform 2400ms var(--ease-out); }
|
|
||||||
.cta.in img { transform: scale(1); }
|
|
||||||
|
|
||||||
/* ---------- portrait reel under the hero ---------- */
|
|
||||||
.reel { overflow: hidden; padding: 8px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
|
|
||||||
.reel > div { display: flex; gap: 12px; width: max-content; animation: reel 60s linear infinite; }
|
|
||||||
.reel:hover > div { animation-play-state: paused; }
|
|
||||||
.reel img { width: 190px; height: 250px; object-fit: cover; object-position: center 22%; border-radius: 18px; filter: grayscale(.4) brightness(.85); transition: filter 500ms var(--ease-out), transform 500ms var(--ease-out); }
|
|
||||||
.reel img:nth-child(even) { margin-top: 28px; }
|
|
||||||
.reel img:hover { filter: none; transform: translateY(-4px); }
|
|
||||||
@keyframes reel { to { transform: translateX(calc(-50% - 6px)); } }
|
|
||||||
@media (max-width: 760px) { .reel img { width: 120px; height: 160px; border-radius: 14px; } .reel img:nth-child(even) { margin-top: 18px; } }
|
|
||||||
|
|
||||||
/* courses swipe on phones */
|
|
||||||
@media (max-width: 520px) { .looks { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -24px; padding-inline: 24px; scroll-padding-inline: 24px; scrollbar-width: none; } .looks::-webkit-scrollbar { display: none; } .looks li { scroll-snap-align: start; } }
|
|
||||||
|
|
||||||
/* why us: big numbers on hairlines instead of three boxes */
|
|
||||||
.why { gap: 0; border-top: 1px solid var(--line); }
|
|
||||||
.why > div { background: none; border: 0; border-radius: 0; padding: 28px 24px 8px 0; }
|
|
||||||
.why > div + div { border-left: 1px solid var(--line); padding-left: 24px; }
|
|
||||||
.why .n { font-size: clamp(48px, 6vw, 80px); font-weight: 700; letter-spacing: -.05em; color: var(--ink); margin-bottom: 18px; }
|
|
||||||
@media (max-width: 760px) { .why > div, .why > div + div { border-left: 0; padding: 24px 0; border-bottom: 1px solid var(--line); } }
|
|
||||||
|
|
||||||
/* ---------- footer: landing-page card, contact block, credits, powered-by ---------- */
|
|
||||||
.foot { padding: clamp(72px, 9vw, 120px) 0 24px; }
|
|
||||||
.foot-card { display: grid; gap: 32px; padding: clamp(24px, 4vw, 48px); border-radius: 28px; background: var(--raise); border: 1px solid #1F1F1F; }
|
|
||||||
@media (min-width: 760px) { .foot-card { grid-template-columns: 1.3fr 1fr; align-items: end; } }
|
|
||||||
.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; }
|
|
||||||
.foot-contact a:hover { padding-left: 6px; }
|
|
||||||
.foot-contact a span { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #222; color: var(--ink-2); }
|
|
||||||
.foot-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 24px 4px 0; font-size: 13px; color: var(--ink-3); }
|
|
||||||
.foot-bar summary { padding: 0; font-size: 13px; font-weight: 500; display: inline; }
|
|
||||||
.foot-bar details { border: 0; } .foot-bar details p { padding: 8px 0 0; font-size: 13px; color: var(--ink-3); }
|
|
||||||
.foot-bar a { text-decoration: none; } .foot-bar a:hover { color: var(--ink); }
|
|
||||||
.powered { text-align: center; font-size: 12px; color: var(--ink-3); margin: 24px 0 0; letter-spacing: .04em; }
|
|
||||||
.shine { font-weight: 700; text-decoration: none; color: transparent; background: linear-gradient(110deg, var(--ink-2) 40%, #fff 50%, var(--ink-2) 60%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; animation: shine 3.2s linear infinite; }
|
|
||||||
@keyframes shine { from { background-position: 100% 0; } to { background-position: -150% 0; } }
|
|
||||||
|
|
||||||
@media (prefers-reduced-motion: reduce) {
|
|
||||||
*, *::before, *::after { animation: none !important; transition: none !important; }
|
|
||||||
.card, h1 .w, .pitch > *, .reveal { opacity: 1 !important; transform: none !important; }
|
|
||||||
.looks li img, .cta img, .collage { transform: none !important; }
|
|
||||||
.shine { color: var(--ink); background: none; }
|
|
||||||
html { scroll-behavior: auto; }
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
@ -283,28 +197,24 @@
|
||||||
<span class="live" aria-hidden="true"></span>
|
<span class="live" aria-hidden="true"></span>
|
||||||
<span id="waiting" aria-live="polite">Be one of the first on the list</span>
|
<span id="waiting" aria-live="polite">Be one of the first on the list</span>
|
||||||
</span>
|
</span>
|
||||||
<h1><span class="w" style="--i:0">Your</span> <em><span class="w" style="--i:1">signature</span> <span class="w" style="--i:2">look</span></em> <span class="w" style="--i:3">starts</span> <span class="w" style="--i:4">here.</span></h1>
|
<h1>Your <em>signature look</em> starts here.</h1>
|
||||||
<p class="lead">Video makeup courses from working Ethiopian artists. Join the waitlist and we'll tell you the day classes open.</p>
|
<p class="lead">Video makeup courses from working Ethiopian artists. Join the waitlist and we'll tell you the day classes open.</p>
|
||||||
|
|
||||||
<div class="join" id="join">
|
<div class="join" id="join">
|
||||||
<form id="form" novalidate>
|
<form id="form" novalidate>
|
||||||
<label class="sr-only" aria-hidden="true">Company<input id="company" name="company" tabindex="-1" autocomplete="off" /></label>
|
<label class="sr-only" aria-hidden="true">Company<input id="company" name="company" tabindex="-1" autocomplete="off" /></label>
|
||||||
<div class="seg" role="radiogroup" aria-label="How should we reach you?">
|
|
||||||
<button type="button" role="radio" aria-selected="true" aria-checked="true" data-ch="sms"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="6" y="2" width="12" height="20" rx="3"/><path d="M11 18h2"/></svg>SMS</button>
|
|
||||||
<button type="button" role="radio" aria-selected="false" aria-checked="false" data-ch="email"><svg width="16" height="16" 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>Email</button>
|
|
||||||
</div>
|
|
||||||
<div class="more" id="more" hidden>
|
<div class="more" id="more" hidden>
|
||||||
<label class="sr-only" for="name">Full name</label>
|
<label class="sr-only" for="name">Full name</label>
|
||||||
<input id="name" name="name" autocomplete="name" placeholder="Full name" required maxlength="80" />
|
<input id="name" name="name" autocomplete="name" placeholder="Full name" required maxlength="80" />
|
||||||
</div>
|
<div class="tel">
|
||||||
<div class="bar">
|
|
||||||
<div class="tel" id="telWrap">
|
|
||||||
<label class="cc"><span class="sr-only">Country code</span><span class="flag" id="ccFlag" aria-hidden="true"></span><span id="ccDial" aria-hidden="true"></span><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" aria-hidden="true"><path d="M6 9l6 6 6-6"/></svg><select id="cc" autocomplete="tel-country-code"></select></label>
|
<label class="cc"><span class="sr-only">Country code</span><span class="flag" id="ccFlag" aria-hidden="true"></span><span id="ccDial" aria-hidden="true"></span><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" aria-hidden="true"><path d="M6 9l6 6 6-6"/></svg><select id="cc" autocomplete="tel-country-code"></select></label>
|
||||||
<label class="sr-only" for="phone">Phone number</label>
|
<label class="sr-only" for="phone">Phone number</label>
|
||||||
<input id="phone" name="phone" type="tel" autocomplete="tel-national" inputmode="tel" placeholder="911 234 567" maxlength="20" />
|
<input id="phone" name="phone" type="tel" autocomplete="tel-national" inputmode="tel" placeholder="911 234 567" required maxlength="20" />
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="bar">
|
||||||
<label class="sr-only" for="email">Email</label>
|
<label class="sr-only" for="email">Email</label>
|
||||||
<input id="email" name="email" type="email" autocomplete="email" placeholder="Enter your email" maxlength="120" hidden />
|
<input id="email" name="email" type="email" autocomplete="email" placeholder="Enter your email" required maxlength="120" />
|
||||||
<button class="btn" id="submit">Join waitlist</button>
|
<button class="btn" id="submit">Join waitlist</button>
|
||||||
</div>
|
</div>
|
||||||
<p class="err" id="err" role="alert"></p>
|
<p class="err" id="err" role="alert"></p>
|
||||||
|
|
@ -314,25 +224,23 @@
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<div class="reel" aria-hidden="true"><div><img src="/photos/habesha-tigray.jpg" alt="" loading="lazy" /><img src="/photos/hero.jpg" alt="" loading="lazy" /><img src="/photos/habesha-harari.jpg" alt="" loading="lazy" /><img src="/photos/habesha-eritrean.jpg" alt="" loading="lazy" /><img src="/photos/habesha-bride.jpg" alt="" loading="lazy" /><img src="/photos/habesha-trad.jpg" alt="" loading="lazy" /><img src="/photos/bridal.jpg" alt="" loading="lazy" /><img src="/photos/glam.jpg" alt="" loading="lazy" /><img src="/photos/foundations.jpg" alt="" loading="lazy" /><img src="/photos/clients.jpg" alt="" loading="lazy" /><img src="/photos/habesha-tigray.jpg" alt="" loading="lazy" /><img src="/photos/hero.jpg" alt="" loading="lazy" /><img src="/photos/habesha-harari.jpg" alt="" loading="lazy" /><img src="/photos/habesha-eritrean.jpg" alt="" loading="lazy" /><img src="/photos/habesha-bride.jpg" alt="" loading="lazy" /><img src="/photos/habesha-trad.jpg" alt="" loading="lazy" /><img src="/photos/bridal.jpg" alt="" loading="lazy" /><img src="/photos/glam.jpg" alt="" loading="lazy" /><img src="/photos/foundations.jpg" alt="" loading="lazy" /><img src="/photos/clients.jpg" alt="" loading="lazy" /></div></div>
|
|
||||||
|
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<section class="block" id="courses">
|
<section class="block" id="courses">
|
||||||
<p class="kicker reveal">At launch</p>
|
<p class="kicker">At launch</p>
|
||||||
<h2 class="reveal">Four courses, <em>one craft</em></h2>
|
<h2>Four courses, <em>one craft</em></h2>
|
||||||
<p class="sub">Start with the basics, or go straight to the looks clients book you for.</p>
|
<p class="sub">Start with the basics, or go straight to the looks clients book you for.</p>
|
||||||
<ul class="looks">
|
<ul class="looks">
|
||||||
<li class="reveal"><img src="/photos/hero.jpg" alt="" loading="lazy" /><div><strong>Makeup foundations</strong><span>Skin tone, base and color</span></div></li>
|
<li><img src="/photos/hero.jpg" alt="" loading="lazy" /><div><strong>Makeup foundations</strong><span>Skin tone, base and color</span></div></li>
|
||||||
<li class="reveal"><img src="/photos/habesha-harari.jpg" alt="" loading="lazy" /><div><strong>Bridal & events</strong><span>Looks that last a 14-hour day</span></div></li>
|
<li><img src="/photos/habesha-harari.jpg" alt="" loading="lazy" /><div><strong>Bridal & events</strong><span>Looks that last a 14-hour day</span></div></li>
|
||||||
<li class="reveal"><img src="/photos/habesha-eritrean.jpg" alt="" loading="lazy" /><div><strong>Skin prep & care</strong><span>The canvas before the color</span></div></li>
|
<li><img src="/photos/habesha-eritrean.jpg" alt="" loading="lazy" /><div><strong>Skin prep & care</strong><span>The canvas before the color</span></div></li>
|
||||||
<li class="reveal"><img src="/photos/habesha-trad.jpg" alt="" loading="lazy" /><div><strong>Building your clientele</strong><span>Pricing, kit and bookings</span></div></li>
|
<li><img src="/photos/habesha-trad.jpg" alt="" loading="lazy" /><div><strong>Building your clientele</strong><span>Pricing, kit and bookings</span></div></li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="block" id="why">
|
<section class="block" id="why">
|
||||||
<p class="kicker reveal">Why us</p>
|
<p class="kicker">Why us</p>
|
||||||
<h2 class="reveal">Learn the craft, <em>your way</em></h2>
|
<h2>Learn the craft, <em>your way</em></h2>
|
||||||
<div class="why reveal">
|
<div class="why">
|
||||||
<div><span class="n">01</span><h3>Waitlist goes first</h3><p>Everyone on the list gets in on opening day, before we announce it anywhere else.</p></div>
|
<div><span class="n">01</span><h3>Waitlist goes first</h3><p>Everyone on the list gets in on opening day, before we announce it anywhere else.</p></div>
|
||||||
<div><span class="n">02</span><h3>Pay once, keep it</h3><p>One payment per course with Telebirr or CBE Birr. Yours for life.</p></div>
|
<div><span class="n">02</span><h3>Pay once, keep it</h3><p>One payment per course with Telebirr or CBE Birr. Yours for life.</p></div>
|
||||||
<div><span class="n">03</span><h3>Made for your phone</h3><p>Short video lessons that work on a mobile data plan.</p></div>
|
<div><span class="n">03</span><h3>Made for your phone</h3><p>Short video lessons that work on a mobile data plan.</p></div>
|
||||||
|
|
@ -348,7 +256,7 @@
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="cta reveal">
|
<section class="cta">
|
||||||
<img src="/photos/habesha-bride.jpg" alt="" loading="lazy" />
|
<img src="/photos/habesha-bride.jpg" alt="" loading="lazy" />
|
||||||
<div>
|
<div>
|
||||||
<h2>Be first in <em>the chair</em>.</h2>
|
<h2>Be first in <em>the chair</em>.</h2>
|
||||||
|
|
@ -356,28 +264,9 @@
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<footer class="foot">
|
<footer>
|
||||||
<div class="foot-card reveal">
|
<span>© <span id="year"></span> Sirkul Makeup School/Studio · Photos: <a href="https://commons.wikimedia.org/wiki/File:Tigray_Bride_(48108302903).jpg" rel="noopener">Rod Waddington</a> (CC BY-SA 2.0), <a href="https://commons.wikimedia.org/wiki/File:Femme_harari_v%C3%AAtue_de_la_tenue_traditionnelle,_orn%C3%A9e_de_bijoux_en_or..jpg" rel="noopener">Imagesdumonde</a> (CC BY-SA 4.0), <a href="https://commons.wikimedia.org/wiki/File:Eritrean_woman.jpg" rel="noopener">T.Voekler</a> (CC BY-SA 3.0), <a href="https://www.pexels.com/" rel="noopener">Pexels</a></span>
|
||||||
<div class="foot-brand">
|
<nav aria-label="Footer"><a href="#courses">Courses</a><a href="#faq">FAQ</a><a href="#top">Back to top ↑</a></nav>
|
||||||
<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). -->
|
|
||||||
<div class="foot-contact">
|
|
||||||
<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>
|
|
||||||
<div class="foot-bar">
|
|
||||||
<span>© <span id="year"></span> Sirkul Makeup School/Studio · All rights reserved</span>
|
|
||||||
<details><summary>Photo credits</summary><p><a href="https://commons.wikimedia.org/wiki/File:Tigray_Bride_(48108302903).jpg" rel="noopener">Rod Waddington</a> (CC BY-SA 2.0), <a href="https://commons.wikimedia.org/wiki/File:Femme_harari_v%C3%AAtue_de_la_tenue_traditionnelle,_orn%C3%A9e_de_bijoux_en_or..jpg" rel="noopener">Imagesdumonde</a> (CC BY-SA 4.0), <a href="https://commons.wikimedia.org/wiki/File:Eritrean_woman.jpg" rel="noopener">T.Voekler</a> (CC BY-SA 3.0), <a href="https://www.pexels.com/" rel="noopener">Pexels</a></p></details>
|
|
||||||
</div>
|
|
||||||
<p class="powered">Powered by <a class="shine" href="https://yaltopia.com" target="_blank" rel="noopener">Yaltopia Tech</a></p>
|
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
@ -387,29 +276,8 @@
|
||||||
const ENDPOINT = '';
|
const ENDPOINT = '';
|
||||||
|
|
||||||
document.getElementById('year').textContent = new Date().getFullYear();
|
document.getElementById('year').textContent = new Date().getFullYear();
|
||||||
document.querySelectorAll('[data-focus]').forEach((a) => a.addEventListener('click', () => setTimeout(() => document.getElementById(channel === 'sms' ? 'phone' : 'email')?.focus({ preventScroll: true }), 400)));
|
document.querySelectorAll('[data-focus]').forEach((a) => a.addEventListener('click', () => setTimeout(() => document.getElementById('email')?.focus({ preventScroll: true }), 400)));
|
||||||
|
|
||||||
// Scroll reveal, and the hero photos drift up a little as the page scrolls.
|
|
||||||
const still = matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
||||||
const revealEls = document.querySelectorAll('.reveal');
|
|
||||||
if ('IntersectionObserver' in window && !still) {
|
|
||||||
document.querySelectorAll('.looks .reveal').forEach((el, k) => el.style.setProperty('--rd', k * 90 + 'ms'));
|
|
||||||
const io = new IntersectionObserver((es) => es.forEach((e) => { if (e.isIntersecting) { e.target.classList.add('in'); io.unobserve(e.target); } }), { rootMargin: '0px 0px -10% 0px' });
|
|
||||||
revealEls.forEach((el) => io.observe(el));
|
|
||||||
const collage = document.querySelector('.collage');
|
|
||||||
let ticking = false;
|
|
||||||
addEventListener('scroll', () => { if (ticking) return; ticking = true; requestAnimationFrame(() => { collage.style.setProperty('--py', Math.min(scrollY, 900) * -0.12 + 'px'); ticking = false; }); }, { passive: true });
|
|
||||||
} else revealEls.forEach((el) => el.classList.add('in'));
|
|
||||||
|
|
||||||
// SMS (default) or email: one contact is enough, the toggle picks which field shows.
|
|
||||||
let channel = 'sms';
|
|
||||||
document.querySelectorAll('.seg button').forEach((b) => b.addEventListener('click', () => {
|
|
||||||
channel = b.dataset.ch;
|
|
||||||
document.querySelectorAll('.seg button').forEach((x) => { const on = x === b; x.setAttribute('aria-selected', on); x.setAttribute('aria-checked', on); });
|
|
||||||
$('telWrap').hidden = channel !== 'sms'; $('email').hidden = channel !== 'email';
|
|
||||||
err.textContent = ''; ['phone', 'email'].forEach((k) => $(k).removeAttribute('aria-invalid'));
|
|
||||||
$(channel === 'sms' ? 'phone' : 'email').focus();
|
|
||||||
}));
|
|
||||||
const form = document.getElementById('form'), err = document.getElementById('err'), btn = document.getElementById('submit'), more = document.getElementById('more');
|
const form = document.getElementById('form'), err = document.getElementById('err'), btn = document.getElementById('submit'), more = document.getElementById('more');
|
||||||
const $ = (id) => document.getElementById(id);
|
const $ = (id) => document.getElementById(id);
|
||||||
const digits = (p) => p.replace(/[\s()-]/g, '');
|
const digits = (p) => p.replace(/[\s()-]/g, '');
|
||||||
|
|
@ -454,28 +322,25 @@
|
||||||
};
|
};
|
||||||
if (ENDPOINT) fetch(ENDPOINT).then((r) => r.json()).then((d) => { waiting = Number(d.count) || 0; showWaiting(false); }).catch(() => {});
|
if (ENDPOINT) fetch(ENDPOINT).then((r) => r.json()).then((d) => { waiting = Number(d.count) || 0; showWaiting(false); }).catch(() => {});
|
||||||
|
|
||||||
const contactError = () => channel === 'sms'
|
|
||||||
? (normPhone($('phone').value) ? null : ['phone', cc.value === 'ET' ? 'Please enter a phone number, e.g. 911 234 567.' : 'Please check the phone number for the country you picked.'])
|
|
||||||
: (emailOk($('email').value.trim()) ? null : ['email', 'Please enter a valid email.']);
|
|
||||||
function check() {
|
function check() {
|
||||||
const name = $('name').value.trim();
|
const name = $('name').value.trim(), email = $('email').value.trim(), phone = normPhone($('phone').value);
|
||||||
const bad = [];
|
const bad = [];
|
||||||
if (name.length < 2) bad.push(['name', 'Please enter your name.']);
|
if (name.length < 2) bad.push(['name', 'Please enter your name.']);
|
||||||
const c = contactError(); if (c) bad.push(c);
|
if (!phone) bad.push(['phone', cc.value === 'ET' ? 'Please enter a phone number, e.g. 911 234 567.' : 'Please check the phone number for the country you picked.']);
|
||||||
|
if (!emailOk(email)) bad.push(['email', 'Please enter a valid email.']);
|
||||||
['name', 'email', 'phone'].forEach((k) => $(k).setAttribute('aria-invalid', String(bad.some(([b]) => b === k))));
|
['name', 'email', 'phone'].forEach((k) => $(k).setAttribute('aria-invalid', String(bad.some(([b]) => b === k))));
|
||||||
const email = channel === 'email' ? $('email').value.trim().toLowerCase() : '', phone = channel === 'sms' ? normPhone($('phone').value) : '';
|
return bad.length ? { error: bad[0] } : { data: { name, email: email.toLowerCase(), phone, locale: navigator.language || 'en', createdAt: new Date().toISOString() } };
|
||||||
return bad.length ? { error: bad[0] } : { data: { name, email, phone, channel, locale: navigator.language || 'en', createdAt: new Date().toISOString() } };
|
|
||||||
}
|
}
|
||||||
form.addEventListener('input', (e) => { if (e.target.getAttribute('aria-invalid') === 'true') { if (more.hidden) { const c = contactError(); e.target.setAttribute('aria-invalid', String(!!c && c[0] === e.target.id)); } else check(); } });
|
form.addEventListener('input', (e) => { if (e.target.getAttribute('aria-invalid') === 'true') { if (more.hidden) e.target.setAttribute('aria-invalid', String(!emailOk(e.target.value.trim()))); else check(); } });
|
||||||
form.addEventListener('submit', async (e) => {
|
form.addEventListener('submit', async (e) => {
|
||||||
e.preventDefault(); err.textContent = '';
|
e.preventDefault(); err.textContent = '';
|
||||||
// Step 1 asks only for the phone or email; step 2 adds the name.
|
// Step 1 asks only for the email (one field, like the reference); step 2 adds name and phone.
|
||||||
if (more.hidden) {
|
if (more.hidden) {
|
||||||
const c = contactError();
|
const ok = emailOk($('email').value.trim());
|
||||||
['phone', 'email'].forEach((k) => $(k).setAttribute('aria-invalid', String(!!c && c[0] === k)));
|
$('email').setAttribute('aria-invalid', String(!ok));
|
||||||
if (c) { err.textContent = c[1]; $(c[0]).focus(); return; }
|
if (!ok) { err.textContent = 'Please enter a valid email.'; $('email').focus(); return; }
|
||||||
more.hidden = false; btn.textContent = 'Get notified';
|
more.hidden = false; btn.textContent = 'Get notified';
|
||||||
$('fine').textContent = 'Last step: what should we call you?';
|
$('fine').textContent = 'Last step: so we can text you on opening day.';
|
||||||
$('name').focus(); return;
|
$('name').focus(); return;
|
||||||
}
|
}
|
||||||
const r = check();
|
const r = check();
|
||||||
|
|
@ -489,7 +354,7 @@
|
||||||
if (!res.ok || !out.ok) throw new Error(out.error || res.status);
|
if (!res.ok || !out.ok) throw new Error(out.error || res.status);
|
||||||
} else {
|
} else {
|
||||||
let list = []; try { list = JSON.parse(localStorage.getItem('waitlist') || '[]'); } catch {}
|
let list = []; try { list = JSON.parse(localStorage.getItem('waitlist') || '[]'); } catch {}
|
||||||
if (!list.some((x) => (r.data.email && x.email === r.data.email) || (r.data.phone && x.phone === r.data.phone))) list.push(r.data);
|
if (!list.some((x) => x.email === r.data.email)) list.push(r.data);
|
||||||
try { localStorage.setItem('waitlist', JSON.stringify(list)); } catch {}
|
try { localStorage.setItem('waitlist', JSON.stringify(list)); } catch {}
|
||||||
console.warn('Waitlist ENDPOINT not set: signup saved in this browser only.', r.data);
|
console.warn('Waitlist ENDPOINT not set: signup saved in this browser only.', r.data);
|
||||||
}
|
}
|
||||||
|
|
@ -497,7 +362,7 @@
|
||||||
// The new signup's initial joins the faces in the pill.
|
// The new signup's initial joins the faces in the pill.
|
||||||
const me = document.createElement('b'); me.textContent = first[0].toUpperCase(); $('faces').prepend(me);
|
const me = document.createElement('b'); me.textContent = first[0].toUpperCase(); $('faces').prepend(me);
|
||||||
waiting += 1; showWaiting(true);
|
waiting += 1; showWaiting(true);
|
||||||
form.parentElement.innerHTML = `<div class="done" role="status"><div class="tick"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7"/></svg></div><div><h3>You're on the list, ${first.replace(/[<>&"]/g, '')}.</h3><p>We'll ${channel === 'sms' ? 'text' : 'email'} you the day classes open.</p></div></div>`;
|
form.parentElement.innerHTML = `<div class="done" role="status"><div class="tick"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12.5l4.5 4.5L19 7"/></svg></div><div><h3>You're on the list, ${first.replace(/[<>&"]/g, '')}.</h3><p>We'll message you the day classes open.</p></div></div>`;
|
||||||
} catch {
|
} catch {
|
||||||
err.textContent = "Something went wrong. Please try again in a moment.";
|
err.textContent = "Something went wrong. Please try again in a moment.";
|
||||||
btn.disabled = false;
|
btn.disabled = false;
|
||||||
|
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
# 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:`)
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
# Remove placeholder courses and stand-in photos after backend integration
|
|
||||||
|
|
||||||
**Labels:** cleanup, after-integration
|
|
||||||
|
|
||||||
The demo seed has placeholder content so the catalog, checkout and player can be clicked through before real courses exist. Remove it once the backend serves real courses.
|
|
||||||
|
|
||||||
## Remove
|
|
||||||
- Placeholder courses in `packages/db/seed/demo-seed.mjs` (block marked `PLACEHOLDER`):
|
|
||||||
- `soft-glam-evening` (crs-softglam)
|
|
||||||
- `traditional-habesha-looks` (crs-habesha)
|
|
||||||
- `building-your-clientele` (crs-clientele)
|
|
||||||
- The rest of the demo catalog, if production data replaces the seed: `makeup-foundations`, `bridal-makeup`, `skin-prep-and-care`, `crs-business` (draft), `payment-test`.
|
|
||||||
- Stand-in covers: `CAT_PHOTOS` / `coursePhoto()` in `packages/features/src/ui.tsx` fall back to category photos when a course has no `coverAssetId`. Real covers replace these.
|
|
||||||
- Placeholder student-work photos in the footer reel (`WORK_PHOTOS`, marked `ponytail:` in `student.tsx`).
|
|
||||||
- Vimeo placeholder playback for lessons without `videoAssetId` (`VIMEO_PLACEHOLDER` in `ui.tsx`).
|
|
||||||
|
|
||||||
## Done when
|
|
||||||
- [ ] Catalog, home, landing stats and featured rows show only real courses
|
|
||||||
- [ ] No course page shows a category stand-in photo
|
|
||||||
- [ ] Every lesson plays its uploaded video
|
|
||||||
- [ ] `node tools/preview/smoke.mjs` passes against the real data
|
|
||||||
|
|
@ -48,7 +48,6 @@ export interface Course {
|
||||||
prerequisiteCourseId?: string | null; publishedAt?: string | null; createdAt: string; updatedAt: string;
|
prerequisiteCourseId?: string | null; publishedAt?: string | null; createdAt: string; updatedAt: string;
|
||||||
translations: Tr<{ title: string; subtitle?: string; description: string; audience?: string; outcomes?: string[] }>;
|
translations: Tr<{ title: string; subtitle?: string; description: string; audience?: string; outcomes?: string[] }>;
|
||||||
prices: Partial<Record<Currency, number>>; // integer minor units
|
prices: Partial<Record<Currency, number>>; // integer minor units
|
||||||
enrolledCount?: number; // backend aggregate: students enrolled (purchase, grant or free)
|
|
||||||
chapters: Chapter[];
|
chapters: Chapter[];
|
||||||
assessments?: Assessment[];
|
assessments?: Assessment[];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@ put('courses', 'crs-skin', order({ ...base, slug: 'skin-prep-and-care', category
|
||||||
]),
|
]),
|
||||||
] }));
|
] }));
|
||||||
|
|
||||||
// ---- PLACEHOLDER courses (simulated): remove after backend integration, see design/issues/remove-placeholder-courses.md
|
// ---- simulated catalog extras so there is more to browse, buy (simulated) and watch
|
||||||
put('courses', 'crs-softglam', order({ ...base, slug: 'soft-glam-evening', categoryId: 'cat-fundamentals', instructorName: 'Meron Tesfaye', instructionLocale: 'am', coverTone: 'clay', status: 'PUBLISHED', isFeatured: true, publishedAt: '2026-06-01T08:00:00.000Z', updatedAt: '2026-09-10T08:00:00.000Z', prices: { ETB: 150000 },
|
put('courses', 'crs-softglam', order({ ...base, slug: 'soft-glam-evening', categoryId: 'cat-fundamentals', instructorName: 'Meron Tesfaye', instructionLocale: 'am', coverTone: 'clay', status: 'PUBLISHED', isFeatured: true, publishedAt: '2026-06-01T08:00:00.000Z', updatedAt: '2026-09-10T08:00:00.000Z', prices: { ETB: 150000 },
|
||||||
translations: {
|
translations: {
|
||||||
en: { title: 'Soft glam for evenings', subtitle: 'A camera-ready evening look in under an hour.', audience: 'Artists who know the basics and want a signature evening look.', description: 'Sculpt, smoke and highlight for parties, graduations and photo shoots, with looks built for deep and medium skin.', outcomes: ['Sculpt with warm bronzer instead of grey contour', 'Build a soft smoky eye in three layers', 'Finish skin that glows on camera without flashback'] },
|
en: { title: 'Soft glam for evenings', subtitle: 'A camera-ready evening look in under an hour.', audience: 'Artists who know the basics and want a signature evening look.', description: 'Sculpt, smoke and highlight for parties, graduations and photo shoots, with looks built for deep and medium skin.', outcomes: ['Sculpt with warm bronzer instead of grey contour', 'Build a soft smoky eye in three layers', 'Finish skin that glows on camera without flashback'] },
|
||||||
|
|
@ -230,9 +230,4 @@ 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) };
|
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);
|
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);
|
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>} />
|
<Cover course={c} locale={locale} badge={<span className="pill">{catName(c.categoryId)}</span>} />
|
||||||
<div className="ccard-body">
|
<div className="ccard-body">
|
||||||
<h3>{ct(c, locale).title}</h3>
|
<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><Icon name="users" size={14} />{c.enrolledCount ? t('course.enrolled', { n: c.enrolledCount }) : t('course.newCourse')}</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>
|
||||||
<span className="ccard-by">{t('course.by', { name: c.instructorName })}</span>
|
<span className="ccard-by">{t('course.by', { name: c.instructorName })}</span>
|
||||||
<div className="ccard-foot">
|
<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></>
|
{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-go" aria-hidden><Icon name="chevron" size={18} /></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>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -71,15 +71,6 @@ export function StudentApp() {
|
||||||
const section = route[1] ?? '';
|
const section = route[1] ?? '';
|
||||||
const unread = signedIn ? inbox.filter((n) => !n.readAt).length : 0;
|
const unread = signedIn ? inbox.filter((n) => !n.readAt).length : 0;
|
||||||
const mainRef = useRef<HTMLElement>(null);
|
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);
|
const [scrolled, setScrolled] = useState(false);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const on = () => setScrolled(scrollY > 24);
|
const on = () => setScrolled(scrollY > 24);
|
||||||
|
|
@ -87,11 +78,9 @@ export function StudentApp() {
|
||||||
return () => removeEventListener('scroll', on);
|
return () => removeEventListener('scroll', on);
|
||||||
}, []);
|
}, []);
|
||||||
const go = (p: string) => nav(`/${locale}${p}`);
|
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 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 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);
|
const current = (s: string) => (s === section || (s === 'courses' && (section === 'course')) || (s === 'my' && section === 'progress') ? 'page' : undefined);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div lang={locale}>
|
<div lang={locale}>
|
||||||
|
|
@ -99,45 +88,29 @@ export function StudentApp() {
|
||||||
<div className="s-top-in">
|
<div className="s-top-in">
|
||||||
<button className="brand" onClick={() => go('')} aria-label={settings.brandName}><Logo size={36} /><Logo size={36} mark /></button>
|
<button className="brand" onClick={() => go('')} aria-label={settings.brandName}><Logo size={36} /><Logo size={36} mark /></button>
|
||||||
<nav className="s-nav" aria-label="Main">
|
<nav className="s-nav" aria-label="Main">
|
||||||
{links.map(([p, , label]) => <button key={p} data-tour={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>
|
</nav>
|
||||||
<div className="s-actions">
|
<div className="s-actions">
|
||||||
|
<FeedbackButton label={t('common.feedback')} target={() => mainRef.current} />
|
||||||
|
<ThemeToggle label={t('common.theme')} />
|
||||||
|
<LangPick />
|
||||||
{signedIn ? <>
|
{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.notifications')}${unread ? ` (${unread})` : ''}`} onClick={() => go('/notifications')}><Icon name="bell" />{unread > 0 && <span className="dot">{unread}</span>}</button>
|
||||||
<UserMenu />
|
<UserMenu />
|
||||||
</> : <>
|
</> : <>
|
||||||
|
<button className="btn btn-quiet btn-sm hide-sm" onClick={() => go('/signin')}>{t('nav.signIn')}</button>
|
||||||
<button className="btn btn-accent btn-sm" onClick={() => go('/signin')}>{t('nav.getStarted')}</button>
|
<button className="btn btn-accent btn-sm" onClick={() => go('/signin')}>{t('nav.getStarted')}</button>
|
||||||
</>}
|
</>}
|
||||||
<button className="icon-btn menu-btn" aria-label={t('nav.menu')} aria-haspopup="dialog" onClick={() => sheet.current?.showModal()}><Icon name="menu" size={22} /></button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
{/* Menu sheet: the main links set large, then the preferences that used to crowd the header. */}
|
|
||||||
<dialog ref={sheet} className="sheet" aria-label={t('nav.menu')} onClick={(e) => { if (e.target === sheet.current) closeSheet(); }}>
|
|
||||||
<div className="sheet-in">
|
|
||||||
<div className="sheet-top"><Logo size={30} /><button className="icon-btn" aria-label={t('common.close')} onClick={closeSheet}><Icon name="x" size={22} /></button></div>
|
|
||||||
<nav className="sheet-nav" aria-label="Main">
|
|
||||||
{tabs.filter(([p]) => signedIn || (p !== 'my' && p !== 'profile')).map(([p, , label], k) => <button key={p} aria-current={current(p)} onClick={() => { closeSheet(); go(p ? '/' + p : ''); }}><span className="num">{String(k + 1).padStart(2, '0')}</span>{label}</button>)}
|
|
||||||
{signedIn && <button aria-current={section === 'history' ? 'page' : undefined} onClick={() => { closeSheet(); go('/history'); }}><span className="num">{String(tabs.length + 1).padStart(2, '0')}</span>{t('nav.history')}</button>}
|
|
||||||
</nav>
|
|
||||||
<div className="sheet-prefs">
|
|
||||||
{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>
|
|
||||||
</div>
|
|
||||||
<p className="sheet-foot"><a href={settings.telegramLink} target="_blank" rel="noreferrer">{t('help.telegram')}</a><span className="num">{settings.supportPhone}</span></p>
|
|
||||||
</div>
|
|
||||||
</dialog>
|
|
||||||
<LangWelcome onDone={maybeTour} />
|
|
||||||
{touring && <Tour onDone={endTour} />}
|
|
||||||
<main className="s-main" ref={mainRef}>
|
<main className="s-main" ref={mainRef}>
|
||||||
{settings.maintenanceBanner && <div className="banner small" role="status">{settings.maintenanceBanner}</div>}
|
{settings.maintenanceBanner && <div className="banner small" role="status">{settings.maintenanceBanner}</div>}
|
||||||
<StudentRoutes />
|
<StudentRoutes />
|
||||||
</main>
|
</main>
|
||||||
<Footer />
|
<Footer />
|
||||||
{signedIn && section !== 'learn' && section !== 'course' && <nav className="s-tabs" aria-label="Main">
|
{signedIn && section !== 'learn' && <nav className="s-tabs" aria-label="Main">
|
||||||
{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>)}
|
{tabs.map(([p, icon, label]) => <button key={p} aria-current={current(p)} onClick={() => go(p ? '/' + p : '')}><Icon name={icon} size={22} />{label}</button>)}
|
||||||
</nav>}
|
</nav>}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
@ -155,76 +128,6 @@ 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({ onDone }: { onDone(): void }) {
|
|
||||||
const { locale, setLocale } = useApp();
|
|
||||||
const ref = useRef<HTMLDialogElement>(null);
|
|
||||||
useEffect(() => {
|
|
||||||
let seen = true;
|
|
||||||
try { seen = !!localStorage.getItem('lms.langChosen'); } catch { /* storage blocked: don't nag */ }
|
|
||||||
if (!seen) ref.current?.showModal();
|
|
||||||
}, []);
|
|
||||||
const pick = (l: Locale) => {
|
|
||||||
try { localStorage.setItem('lms.langChosen', '1'); } catch {}
|
|
||||||
if (l !== locale) setLocale(l);
|
|
||||||
ref.current?.close();
|
|
||||||
onDone();
|
|
||||||
};
|
|
||||||
return (
|
|
||||||
<dialog ref={ref} className="lang-welcome" aria-labelledby="lw-h" onCancel={() => pick(locale)}>
|
|
||||||
<img src="/photos/habesha-bride.jpg" alt="" />
|
|
||||||
<div className="lw-body">
|
|
||||||
<Logo size={30} />
|
|
||||||
<div><h2 id="lw-h" lang="en">{LANG_PROMPT.en}</h2><p>{LOCALES.filter((l) => l !== 'en').map((l) => <span key={l} lang={l}>{LANG_PROMPT[l]}</span>)}</p></div>
|
|
||||||
<div className="lw-list">{LOCALES.map((l) => <button key={l} lang={l} aria-current={l === locale} autoFocus={l === locale} onClick={() => pick(l)}><span>{LOCALE_NAMES[l]}</span><Icon name="chevron" size={18} /></button>)}</div>
|
|
||||||
</div>
|
|
||||||
</dialog>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// The choice lives in localStorage; apps/demo/app/layout.tsx applies it before first paint.
|
// The choice lives in localStorage; apps/demo/app/layout.tsx applies it before first paint.
|
||||||
function ThemeToggle({ label }: { label: string }) {
|
function ThemeToggle({ label }: { label: string }) {
|
||||||
const [dark, setDark] = useState(false);
|
const [dark, setDark] = useState(false);
|
||||||
|
|
@ -253,11 +156,11 @@ function UserMenu() {
|
||||||
const go = (p: string) => { if (ref.current) ref.current.open = false; nav(p); };
|
const go = (p: string) => { if (ref.current) ref.current.open = false; nav(p); };
|
||||||
return (
|
return (
|
||||||
<details className="menu" ref={ref}>
|
<details className="menu" ref={ref}>
|
||||||
<summary data-tour="profile" className="avatar" aria-label={t('nav.account')}>{viewer?.avatarUrl ? <img src={viewer.avatarUrl} alt="" /> : initials(name)}</summary>
|
<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-pop">
|
||||||
<div className="menu-head"><strong>{name}</strong>{(me?.phone || me?.email) && <span className="small muted">{me?.phone || me?.email}</span>}</div>
|
<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}/profile`)}><Icon name="user" size={16} />{t('nav.profile')}</button>
|
||||||
<button onClick={() => go(`/${locale}/history`)}><Icon name="clock" size={16} />{t('nav.history')}</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>
|
<button onClick={() => go(`/${locale}/help`)}><Icon name="help" size={16} />{t('nav.help')}</button>
|
||||||
<button onClick={() => { signOut(); go(`/${locale}/signin`); }}><Icon name="logout" size={16} />{t('nav.signOut')}</button>
|
<button onClick={() => { signOut(); go(`/${locale}/signin`); }}><Icon name="logout" size={16} />{t('nav.signOut')}</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -269,7 +172,19 @@ function Footer() {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
const { settings, locale, nav, categories, courses, signedIn, me, route } = useApp();
|
const { settings, locale, nav, categories, courses, signedIn, me, route } = useApp();
|
||||||
// Big marketing footer on the landing page and catalog only; app screens get one quiet line (audit 2026-10-16, Q1).
|
// Big marketing footer on the landing page and catalog only; app screens get one quiet line (audit 2026-10-16, Q1).
|
||||||
|
const full = (route[1] === undefined && !signedIn) || route[1] === 'courses';
|
||||||
const langs = <LangPick />;
|
const langs = <LangPick />;
|
||||||
|
if (!full) return (
|
||||||
|
<footer className="foot foot-compact">
|
||||||
|
<div className="foot-base">
|
||||||
|
<Logo size={22} mark /><span>© {new Date().getFullYear()} {settings.brandName}</span>
|
||||||
|
<a href={settings.telegramLink} target="_blank" rel="noreferrer">{t('help.telegram')}</a>
|
||||||
|
<span className="num">{settings.supportPhone}</span>
|
||||||
|
<div className="foot-langs">{langs}</div>
|
||||||
|
</div>
|
||||||
|
<p className="powered">{t.rich('footer.poweredBy', { name: () => <a className="shine" href="https://yaltopia.com" target="_blank" rel="noreferrer">Yaltopia Tech</a> })}</p>
|
||||||
|
</footer>
|
||||||
|
);
|
||||||
const go = (p: string) => nav(`/${locale}${p}`);
|
const go = (p: string) => nav(`/${locale}${p}`);
|
||||||
const kit: [string, string][] = [['foundation', 'kit1'], ['brush', 'kit2'], ['brow', 'kit3'], ['lipstick', 'kit4']];
|
const kit: [string, string][] = [['foundation', 'kit1'], ['brush', 'kit2'], ['brow', 'kit3'], ['lipstick', 'kit4']];
|
||||||
return (
|
return (
|
||||||
|
|
@ -278,20 +193,18 @@ function Footer() {
|
||||||
<div className="foot-brand">
|
<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>
|
<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-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">
|
<div className="foot-contact">
|
||||||
<span className="foot-chip">{t('footer.contact')}</span>
|
<span className="foot-chip">{t('footer.contact')}</span>
|
||||||
<a href={settings.telegramLink} target="_blank" rel="noreferrer">{t('help.telegram')}</a>
|
<a href={settings.telegramLink} target="_blank" rel="noreferrer">{t('help.telegram')}</a>
|
||||||
<span className="num">{settings.supportPhone}</span>
|
<span className="num">{settings.supportPhone}</span>
|
||||||
{settings.supportEmail && <a href={`mailto:${settings.supportEmail}`}>{settings.supportEmail}</a>}
|
{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>
|
||||||
</div>
|
</div>
|
||||||
<nav className="foot-cols" aria-label="Footer">
|
<nav className="foot-cols" aria-label="Footer">
|
||||||
<div><h3>{t('nav.courses')}</h3>{categories.filter((c) => c.isActive).map((c) => <button key={c.id} onClick={() => go(`/courses/${c.slug}`)}>{tr(c.translations, locale)?.name}</button>)}</div>
|
<div><h3>{t('nav.courses')}</h3>{categories.filter((c) => c.isActive).map((c) => <button key={c.id} onClick={() => go(`/courses/${c.slug}`)}>{tr(c.translations, locale)?.name}</button>)}</div>
|
||||||
<div><h3>{t('footer.learn')}</h3>
|
<div><h3>{t('footer.learn')}</h3>
|
||||||
<button onClick={() => go('/courses')}>{t('catalog.title')}</button>
|
<button onClick={() => go('/courses')}>{t('catalog.title')}</button>
|
||||||
{signedIn && <button onClick={() => go('/history')}>{t('nav.history')}</button>}
|
{signedIn && <button onClick={() => go('/progress')}>{t('nav.progress')}</button>}
|
||||||
<button onClick={() => go('/help')}>{t('nav.help')}</button>
|
<button onClick={() => go('/help')}>{t('nav.help')}</button>
|
||||||
<a href="/waitlist">{t('footer.waitlist')}</a>
|
<a href="/waitlist">{t('footer.waitlist')}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -342,8 +255,7 @@ function StudentRoutes() {
|
||||||
case 'pay': return <SignInGate><ProviderSim orderId={a} /></SignInGate>;
|
case 'pay': return <SignInGate><ProviderSim orderId={a} /></SignInGate>;
|
||||||
case 'orders': return <SignInGate><OrderStatusPage orderId={a} /></SignInGate>;
|
case 'orders': return <SignInGate><OrderStatusPage orderId={a} /></SignInGate>;
|
||||||
case 'my': return <SignInGate><MyCourses /></SignInGate>;
|
case 'my': return <SignInGate><MyCourses /></SignInGate>;
|
||||||
case 'progress': return <SignInGate><Profile /></SignInGate>; // progress lives on the profile
|
case 'progress': return <SignInGate><MyProgress /></SignInGate>;
|
||||||
case 'history': return <SignInGate><History /></SignInGate>;
|
|
||||||
case 'notifications': return <SignInGate><Inbox /></SignInGate>;
|
case 'notifications': return <SignInGate><Inbox /></SignInGate>;
|
||||||
case 'help': return <Help />;
|
case 'help': return <Help />;
|
||||||
case 'profile': return <SignInGate><Profile /></SignInGate>;
|
case 'profile': return <SignInGate><Profile /></SignInGate>;
|
||||||
|
|
@ -364,7 +276,7 @@ const PHOTO_CREDITS: [string, string, string][] = [
|
||||||
['T.Voekler', 'CC BY-SA 3.0', 'https://commons.wikimedia.org/wiki/File:Eritrean_woman.jpg'],
|
['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 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_GROUPS: [string, string[]][] = [['payLocal', ['TELEBIRR', 'CBE_BIRR']], ['payCards', ['VISA', 'MASTERCARD']], ['payAbroad', ['PAYPAL', 'ZELLE']]];
|
const PAY_IDS = ['TELEBIRR', 'CBE_BIRR', 'VISA', 'MASTERCARD', 'PAYPAL', 'ZELLE'];
|
||||||
|
|
||||||
function WaitPill({ label }: { label: string }) {
|
function WaitPill({ label }: { label: string }) {
|
||||||
const [i, setI] = useState(0);
|
const [i, setI] = useState(0);
|
||||||
|
|
@ -391,8 +303,11 @@ function Landing() {
|
||||||
const lead = featured[0];
|
const lead = featured[0];
|
||||||
const preview = lead && publishedLessons(lead).find((l) => l.isPreview);
|
const preview = lead && publishedLessons(lead).find((l) => l.isPreview);
|
||||||
const minPrice = Math.min(...visible.map((c) => c.prices.ETB ?? Infinity));
|
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 cats = categories.filter((c) => c.isActive);
|
||||||
const watch = () => { if (lead) nav(preview ? `/${locale}/learn/${lead.slug}/${preview.id}` : `/${locale}/course/${lead.slug}`); };
|
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 (
|
return (
|
||||||
<div className="landing">
|
<div className="landing">
|
||||||
<section className="l-hero">
|
<section className="l-hero">
|
||||||
|
|
@ -409,6 +324,10 @@ function Landing() {
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<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">
|
{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="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) => (
|
<div className="look-grid">{cats.map((c, i) => (
|
||||||
|
|
@ -429,17 +348,10 @@ function Landing() {
|
||||||
<section className="stack-lg">
|
<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>
|
<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">
|
<ol className="steps3">
|
||||||
{/* Abstract art per step (CSS only): preview rings, a stack of cards, an unlocking arc. */}
|
<li className="step"><img src="/photos/habesha-bride.jpg" alt="" loading="lazy" /><strong>{t('landing.how1')}</strong></li>
|
||||||
{(['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>)}
|
<li className="step"><img src="/photos/habesha-harari.jpg" alt="" loading="lazy" /><strong>{t('landing.how2')}</strong><div className="step-pay">{PAY_IDS.map((id) => <span key={id} title={methodName(id)}><PayLogo id={id} /></span>)}</div></li>
|
||||||
|
<li className="step"><img src="/photos/habesha-eritrean.jpg" alt="" loading="lazy" /><strong>{t('landing.how3')}</strong></li>
|
||||||
</ol>
|
</ol>
|
||||||
<div className="pay-strip">
|
|
||||||
<h3>{t('landing.payTitle')}</h3>
|
|
||||||
<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>
|
</section>
|
||||||
|
|
||||||
<section className="cta-photo">
|
<section className="cta-photo">
|
||||||
|
|
@ -535,7 +447,6 @@ function CoursePage({ slug }: { slug?: string }) {
|
||||||
const { catName } = useCatalog();
|
const { catName } = useCatalog();
|
||||||
const [tab, setTab] = useState('overview');
|
const [tab, setTab] = useState('overview');
|
||||||
const c = courses.find((x) => x.slug === slug);
|
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 (!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>;
|
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);
|
const text = ct(c, locale);
|
||||||
|
|
@ -568,7 +479,6 @@ function CoursePage({ slug }: { slug?: string }) {
|
||||||
return (
|
return (
|
||||||
<div className="cd">
|
<div className="cd">
|
||||||
<section className="cd-head">
|
<section className="cd-head">
|
||||||
<img className="cd-hero-img" src={photo} alt="" />
|
|
||||||
<div className="cd-top">
|
<div className="cd-top">
|
||||||
<nav className="crumbs" aria-label="Breadcrumb">
|
<nav className="crumbs" aria-label="Breadcrumb">
|
||||||
<button onClick={() => nav(`/${locale}/courses`)}>{t('nav.courses')}</button>
|
<button onClick={() => nav(`/${locale}/courses`)}>{t('nav.courses')}</button>
|
||||||
|
|
@ -587,7 +497,6 @@ function CoursePage({ slug }: { slug?: string }) {
|
||||||
{previews > 0 && <span className="muted small">{t('course.previewLessons', { n: previews })}</span>}
|
{previews > 0 && <span className="muted small">{t('course.previewLessons', { n: previews })}</span>}
|
||||||
</div>
|
</div>
|
||||||
{(text.subtitle || text.description) && <p className="cd-lead">{text.subtitle || text.description}</p>}
|
{(text.subtitle || text.description) && <p className="cd-lead">{text.subtitle || text.description}</p>}
|
||||||
{play && <button className="cd-hero-play" onClick={() => nav(play)}><span className="play-dot"><Icon name="play" size={12} /></span>{playLabel}</button>}
|
|
||||||
<div className="cd-by">
|
<div className="cd-by">
|
||||||
<span className="avatar" aria-hidden>{initials(c.instructorName)}</span>
|
<span className="avatar" aria-hidden>{initials(c.instructorName)}</span>
|
||||||
<span className="cd-by-txt"><em>{t('course.createdBy')}</em><strong>{c.instructorName}</strong></span>
|
<span className="cd-by-txt"><em>{t('course.createdBy')}</em><strong>{c.instructorName}</strong></span>
|
||||||
|
|
@ -597,6 +506,10 @@ function CoursePage({ slug }: { slug?: string }) {
|
||||||
|
|
||||||
<aside className="cd-side">
|
<aside className="cd-side">
|
||||||
<div className="cd-buy">
|
<div className="cd-buy">
|
||||||
|
<button className="cd-preview" disabled={!play} onClick={() => play && nav(play)} aria-label={playLabel}>
|
||||||
|
<img src={photo} alt="" />
|
||||||
|
{play && <span className="cd-preview-pill"><Icon name="play" size={12} /><i aria-hidden />{mine ? playLabel : t('course.preview')}</span>}
|
||||||
|
</button>
|
||||||
{mine ? <>
|
{mine ? <>
|
||||||
<div className="row-between"><strong>{done ? t('course.completed') : t('course.owned')}</strong><span className="small num">{p.pct}%</span></div>
|
<div className="row-between"><strong>{done ? t('course.completed') : t('course.owned')}</strong><span className="small num">{p.pct}%</span></div>
|
||||||
<div className="bar"><i style={{ width: `${p.pct}%` }} /></div>
|
<div className="bar"><i style={{ width: `${p.pct}%` }} /></div>
|
||||||
|
|
@ -619,16 +532,6 @@ function CoursePage({ slug }: { slug?: string }) {
|
||||||
</div>
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
{(mine ? r : c.prices.ETB != null && c.status === 'PUBLISHED') && <div className="cd-bar">
|
|
||||||
{mine && r ? <>
|
|
||||||
<span className="cd-bar-txt"><strong className="num">{p.pct}%</strong><span>{t('my.lessonsDone', { done: p.done, total: p.total })}</span></span>
|
|
||||||
<button className="btn btn-accent" onClick={() => nav(`/${locale}/learn/${c.slug}/${r.lesson.id}`)}>{playLabel}</button>
|
|
||||||
</> : <>
|
|
||||||
<span className="cd-bar-txt"><strong className="num">{formatMoney(c.prices.ETB ?? 0, 'ETB')}</strong><span>{t('course.lifetime')}</span></span>
|
|
||||||
<button className="btn btn-accent" onClick={() => nav(`/${locale}/checkout/${c.slug}`)}>{t('course.buyShort')}</button>
|
|
||||||
</>}
|
|
||||||
</div>}
|
|
||||||
|
|
||||||
<section className="cd-body">
|
<section className="cd-body">
|
||||||
{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>}
|
{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="cd-tabs" role="tablist">{tabs.map(([k, label]) => <button key={k} role="tab" aria-selected={tab === k} onClick={() => setTab(k)}>{label}</button>)}</div>
|
<div className="cd-tabs" role="tablist">{tabs.map(([k, label]) => <button key={k} role="tab" aria-selected={tab === k} onClick={() => setTab(k)}>{label}</button>)}</div>
|
||||||
|
|
@ -1110,47 +1013,22 @@ function MyCourses() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Everything a student did, newest first: lessons finished or started, purchases, reports.
|
function MyProgress() {
|
||||||
type Activity = { at: string; icon: string; text: string; link?: string };
|
|
||||||
function activity(me: Student, courses: Course[], locale: Locale, t: ReturnType<typeof useTranslations>): Activity[] {
|
|
||||||
const out: Activity[] = [];
|
|
||||||
for (const [lid, pr] of Object.entries(me.progress ?? {})) {
|
|
||||||
const c = courses.find((x) => x.id === pr.courseId);
|
|
||||||
const l = c?.chapters.flatMap((ch) => ch.lessons).find((x) => x.id === lid);
|
|
||||||
if (!c || !l) continue;
|
|
||||||
out.push({ at: pr.completedAt ?? pr.updatedAt, icon: pr.completedAt ? 'check' : 'play', text: t(pr.completedAt ? 'history.done' : 'history.watched', { lesson: lessonTitle(l, locale), course: ct(c, locale).title }), link: `/${locale}/learn/${c.slug}/${lid}` });
|
|
||||||
}
|
|
||||||
for (const o of Object.values(me.orders ?? {})) {
|
|
||||||
const c = courses.find((x) => x.id === o.courseId);
|
|
||||||
if (o.paidAt && c) out.push({ at: o.paidAt, icon: 'cart', text: t('history.paid', { course: ct(c, locale).title }), link: `/${locale}/course/${c.slug}` });
|
|
||||||
}
|
|
||||||
for (const i of Object.values(me.issues ?? {})) out.push({ at: i.createdAt, icon: 'flag', text: t('history.report', { subject: i.subject }), link: `/${locale}/help` });
|
|
||||||
return out.sort((a, b) => b.at.localeCompare(a.at));
|
|
||||||
}
|
|
||||||
|
|
||||||
function Timeline({ items, grouped }: { items: Activity[]; grouped?: boolean }) {
|
|
||||||
const { nav } = useApp();
|
|
||||||
return (
|
|
||||||
<ol className="tl">{items.map((a, k) => <li key={k}>
|
|
||||||
{grouped && (k === 0 || fmtDate(items[k - 1].at) !== fmtDate(a.at)) && <h3 className="tl-day">{fmtDate(a.at)}</h3>}
|
|
||||||
<button className="tl-row" disabled={!a.link} onClick={() => a.link && nav(a.link)}>
|
|
||||||
<span className={`tl-ic tl-${a.icon}`}><Icon name={a.icon} size={16} /></span>
|
|
||||||
<span className="tl-txt">{a.text}{!grouped && <time className="small muted">{fmtDate(a.at)}</time>}</span>
|
|
||||||
{a.link && <Icon name="chevron" size={16} />}
|
|
||||||
</button>
|
|
||||||
</li>)}</ol>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function History() {
|
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
const { me, courses, locale } = useApp();
|
const { me, courses, locale, nav } = useApp();
|
||||||
if (!me) return null;
|
const mine = courses.filter((c) => owns(me, c.id) && !c.isTest);
|
||||||
const items = activity(me, courses, locale, t);
|
|
||||||
return (
|
return (
|
||||||
<section className="pf">
|
<section className="stack">
|
||||||
<header className="pf-head"><h1>{t('history.title')}</h1><p className="muted">{t('history.lead')}</p></header>
|
<h1 style={{ fontSize: 'var(--fs-2xl)' }}>{t('my.progressTitle')}</h1>
|
||||||
{items.length ? <Timeline items={items} grouped /> : <Empty>{t('history.empty')}</Empty>}
|
{!mine.length && <Empty action={<button className="btn" onClick={() => nav(`/${locale}/courses`)}>{t('landing.browse')}</button>}>{t('my.empty')}</Empty>}
|
||||||
|
{mine.map((c) => (
|
||||||
|
<div key={c.id} className="card stack-sm">
|
||||||
|
<div className="row prog-head"><Ring pct={courseProgress(c, me).pct} /><div className="grow"><h2 style={{ fontSize: 'var(--fs-lg)' }}>{ct(c, locale).title}</h2></div>
|
||||||
|
<button className="btn btn-ghost btn-sm" onClick={() => nav(`/${locale}/course/${c.slug}`)}>{t('course.content')}</button></div>
|
||||||
|
{[...c.chapters].sort((a, b) => a.sortOrder - b.sortOrder).map((ch) => <div key={ch.id}><p className="small" style={{ fontWeight: 700, padding: '8px 4px 2px' }}>{tr(ch.translations, locale)?.title}</p>{ch.lessons.filter((l) => l.isPublished).sort((a, b) => a.sortOrder - b.sortOrder).map((l) => <LessonRow key={l.id} c={c} l={l} />)}</div>)}
|
||||||
|
{!!c.assessments?.length && <div><p className="small" style={{ fontWeight: 700, padding: '8px 4px 2px' }}>{t('assess.title')}</p>{c.assessments.map((a) => <AssessmentRow key={a.id} c={c} a={a} />)}</div>}
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -1207,38 +1085,35 @@ function Help() {
|
||||||
const tel = settings.supportPhone.replace(/[^\d+]/g, '');
|
const tel = settings.supportPhone.replace(/[^\d+]/g, '');
|
||||||
const mine = Object.values(me?.issues ?? {}).sort((a, b) => b.createdAt.localeCompare(a.createdAt));
|
const mine = Object.values(me?.issues ?? {}).sort((a, b) => b.createdAt.localeCompare(a.createdAt));
|
||||||
return (
|
return (
|
||||||
<div className="help">
|
<section className="two-col">
|
||||||
<header className="help-hero">
|
<div className="stack">
|
||||||
<h1>{t('help.title')}</h1>
|
<h1 style={{ fontSize: 'var(--fs-2xl)' }}>{t('help.title')}</h1>
|
||||||
<p className="lead">{t('help.lead')}</p>
|
<div className="faq"><h2 style={{ fontSize: 'var(--fs-lg)' }}>{t('help.faq')}</h2>
|
||||||
</header>
|
{[1, 2, 3].map((i) => <details key={i}><summary>{t(`help.q${i}`)}</summary><p>{t(`help.a${i}`)}</p></details>)}
|
||||||
<ul className="help-contact" aria-label={t('help.contact')}>
|
</div>
|
||||||
<li><a href={settings.telegramLink} target="_blank" rel="noreferrer"><span className="hc-ic"><Icon name="send" size={22} /></span><strong>Telegram</strong><span>{t('help.telegram')}</span></a></li>
|
<div className="card stack-sm"><h2 style={{ fontSize: 'var(--fs-lg)' }}>{t('help.contact')}</h2>
|
||||||
<li><a href={`tel:${tel}`}><span className="hc-ic"><Icon name="phone" size={22} /></span><strong>{t('help.call')}</strong><span className="num">{settings.supportPhone}</span></a><CopyText text={settings.supportPhone} copyLabel={t('help.copy')} copiedLabel={t('help.copied')} /></li>
|
<a className="btn btn-ghost" href={settings.telegramLink} target="_blank" rel="noreferrer"><Icon name="send" size={16} />{t('help.telegram')}</a>
|
||||||
<li><a href={`mailto:${settings.supportEmail}`}><span className="hc-ic"><Icon name="mail" size={22} /></span><strong>{t('help.email')}</strong><span>{settings.supportEmail}</span></a><CopyText text={settings.supportEmail} copyLabel={t('help.copy')} copiedLabel={t('help.copied')} /></li>
|
<div className="row"><a className="btn btn-ghost grow" href={`tel:${tel}`}><Icon name="phone" size={16} />{t('help.call')}: <span className="num">{settings.supportPhone}</span></a><CopyText text={settings.supportPhone} copyLabel={t('help.copy')} copiedLabel={t('help.copied')} /></div>
|
||||||
</ul>
|
<div className="row"><span className="grow small">{settings.supportEmail}</span><CopyText text={settings.supportEmail} copyLabel={t('help.copy')} copiedLabel={t('help.copied')} /></div>
|
||||||
<div className="help-grid">
|
|
||||||
<section className="faq help-faq"><h2>{t('help.faq')}</h2>
|
|
||||||
{[1, 2, 3].map((i) => <details key={i}><summary>{t(`help.q${i}`)}<Icon name="plus" size={18} /></summary><p>{t(`help.a${i}`)}</p></details>)}
|
|
||||||
</section>
|
|
||||||
<div className="stack">
|
|
||||||
{signedIn ? <form className="card stack" onSubmit={submit}>
|
|
||||||
<h2 style={{ fontSize: 'var(--fs-lg)' }}>{t('help.report')}</h2>
|
|
||||||
<label className="field"><span>{t('help.type')}</span><select id="itype" className="input" value={type} onChange={(e) => setType(e.target.value as IssueType)}>{ISSUE_TYPES.map((x) => <option key={x} value={x}>{t(`issueType.${x}`)}</option>)}</select></label>
|
|
||||||
<label className="field"><span>{t('help.subject')}</span><input id="isubject" className="input" value={subject} onChange={(e) => setSubject(e.target.value)} maxLength={120} /></label>
|
|
||||||
<label className="field"><span>{t('help.description')}</span><textarea id="idesc" className="input" value={desc} onChange={(e) => setDesc(e.target.value)} maxLength={2000} /></label>
|
|
||||||
{uploader && <label className="field"><span>{t('help.screenshot')}</span><input id="ishot" type="file" accept="image/png,image/jpeg,image/webp" onChange={(e) => setShot(e.target.files?.[0] ?? null)} /></label>}
|
|
||||||
{err && <p className="err" role="alert">{err}</p>}
|
|
||||||
<button className="btn btn-accent">{t('help.submit')}</button>
|
|
||||||
</form> : <div className="card stack-sm"><h2 style={{ fontSize: 'var(--fs-lg)' }}>{t('help.report')}</h2><button className="btn" onClick={() => nav(`/${locale}/signin`)}>{t('nav.getStarted')}</button></div>}
|
|
||||||
{signedIn && <div className="card stack-sm"><h2 style={{ fontSize: 'var(--fs-lg)' }}>{t('help.mine')}</h2>
|
|
||||||
{mine.length ? mine.map((i) => <div key={i.id} className="row-between" style={{ borderTop: '1px solid var(--line)', paddingTop: 10 }}>
|
|
||||||
<div className="grow"><strong>{i.subject}</strong><p className="small muted">{t(`issueType.${i.type}`)} · {fmtDate(i.createdAt)}</p>{i.resolutionNote && <p className="small">{i.resolutionNote}</p>}</div>
|
|
||||||
<StatusPill status={i.status} label={t(`status.${i.status}`)} /></div>) : <p className="muted">{t('help.noReports')}</p>}
|
|
||||||
</div>}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div className="stack">
|
||||||
|
{signedIn ? <form className="card stack" onSubmit={submit}>
|
||||||
|
<h2 style={{ fontSize: 'var(--fs-lg)' }}>{t('help.report')}</h2>
|
||||||
|
<label className="field"><span>{t('help.type')}</span><select id="itype" className="input" value={type} onChange={(e) => setType(e.target.value as IssueType)}>{ISSUE_TYPES.map((x) => <option key={x} value={x}>{t(`issueType.${x}`)}</option>)}</select></label>
|
||||||
|
<label className="field"><span>{t('help.subject')}</span><input id="isubject" className="input" value={subject} onChange={(e) => setSubject(e.target.value)} maxLength={120} /></label>
|
||||||
|
<label className="field"><span>{t('help.description')}</span><textarea id="idesc" className="input" value={desc} onChange={(e) => setDesc(e.target.value)} maxLength={2000} /></label>
|
||||||
|
{uploader && <label className="field"><span>{t('help.screenshot')}</span><input id="ishot" type="file" accept="image/png,image/jpeg,image/webp" onChange={(e) => setShot(e.target.files?.[0] ?? null)} /></label>}
|
||||||
|
{err && <p className="err" role="alert">{err}</p>}
|
||||||
|
<button className="btn btn-accent">{t('help.submit')}</button>
|
||||||
|
</form> : <div className="card stack-sm"><h2 style={{ fontSize: 'var(--fs-lg)' }}>{t('help.report')}</h2><button className="btn" onClick={() => nav(`/${locale}/signin`)}>{t('nav.signIn')}</button></div>}
|
||||||
|
{signedIn && <div className="card stack-sm"><h2 style={{ fontSize: 'var(--fs-lg)' }}>{t('help.mine')}</h2>
|
||||||
|
{mine.length ? mine.map((i) => <div key={i.id} className="row-between" style={{ borderTop: '1px solid var(--line)', paddingTop: 10 }}>
|
||||||
|
<div className="grow"><strong>{i.subject}</strong><p className="small muted">{t(`issueType.${i.type}`)} · {fmtDate(i.createdAt)}</p>{i.resolutionNote && <p className="small">{i.resolutionNote}</p>}</div>
|
||||||
|
<StatusPill status={i.status} label={t(`status.${i.status}`)} /></div>) : <p className="muted">{t('help.noReports')}</p>}
|
||||||
|
</div>}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1286,9 +1161,10 @@ function SignIn() {
|
||||||
<div className="auth-main">
|
<div className="auth-main">
|
||||||
{!viewer?.id ? <Empty>{t('auth.noIdentity')}</Empty> : step === 'start' ? <form className="stack" onSubmit={(e) => { e.preventDefault(); send(); }}>
|
{!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>
|
<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>}
|
{me && !me.deletedAt && <>
|
||||||
<SocialLogins onPick={() => { if (me && !me.deletedAt) { signIn(); nav(`/${locale}`); } else setStep('setup'); }} />
|
<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>
|
<div className="or"><span>{t('auth.or')}</span></div>
|
||||||
|
</>}
|
||||||
<h2 className="auth-h2">{mode === 'phone' ? t('auth.phoneTitle') : t('auth.emailTitle')}</h2>
|
<h2 className="auth-h2">{mode === 'phone' ? t('auth.phoneTitle') : t('auth.emailTitle')}</h2>
|
||||||
{mode === 'phone' ? (
|
{mode === 'phone' ? (
|
||||||
<label className="field"><span>{t('auth.phoneLabel')}</span>
|
<label className="field"><span>{t('auth.phoneLabel')}</span>
|
||||||
|
|
@ -1316,24 +1192,6 @@ function SignIn() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Simulated like the phone code: any provider signs the demo viewer in (or starts profile setup).
|
|
||||||
const SOCIAL: [string, string, ReactNode][] = [
|
|
||||||
['google', 'Google', <><path fill="#FFC107" d="M43.6 20.1H42V20H24v8h11.3C33.7 32.7 29.2 36 24 36c-6.6 0-12-5.4-12-12s5.4-12 12-12c3.1 0 5.8 1.2 7.9 3.1l5.7-5.7C34 6.1 29.3 4 24 4 12.9 4 4 12.9 4 24s8.9 20 20 20 20-8.9 20-20c0-1.3-.1-2.6-.4-3.9z" /><path fill="#FF3D00" d="M6.3 14.7l6.6 4.8C14.7 15.1 19 12 24 12c3.1 0 5.8 1.2 7.9 3.1l5.7-5.7C34 6.1 29.3 4 24 4 16.3 4 9.7 8.3 6.3 14.7z" /><path fill="#4CAF50" d="M24 44c5.2 0 9.9-2 13.4-5.2l-6.2-5.2C29.2 35.1 26.7 36 24 36c-5.2 0-9.6-3.3-11.3-7.9l-6.5 5C9.5 39.6 16.2 44 24 44z" /><path fill="#1976D2" d="M43.6 20.1H42V20H24v8h11.3c-.8 2.2-2.2 4.2-4.1 5.6l6.2 5.2C37 39.2 44 34 44 24c0-1.3-.1-2.6-.4-3.9z" /></>],
|
|
||||||
['apple', 'Apple', <path fill="currentColor" transform="scale(2)" d="M12.15 6.9c-.95 0-2.42-1.08-3.96-1.04-2.04.03-3.91 1.18-4.96 3.01-2.12 3.68-.55 9.1 1.52 12.09 1.01 1.45 2.2 3.09 3.79 3.04 1.52-.07 2.09-.99 3.94-.99 1.83 0 2.35.99 3.96.95 1.64-.03 2.68-1.48 3.68-2.95 1.16-1.69 1.64-3.33 1.66-3.42-.04-.01-3.18-1.22-3.22-4.86-.03-3.04 2.48-4.49 2.6-4.56-1.43-2.09-3.62-2.32-4.39-2.38-2-.16-3.68 1.09-4.62 1.09zm3.38-3.07c.84-1.01 1.4-2.43 1.25-3.83-1.21.05-2.66.8-3.53 1.82-.78.9-1.45 2.34-1.27 3.71 1.34.1 2.71-.69 3.55-1.7z" />],
|
|
||||||
['telegram', 'Telegram', <><circle cx="24" cy="24" r="24" fill="#26A5E4" /><path fill="#fff" d="M10.8 23.6l23.2-9c1-.4 1.9.2 1.6 1.9l-4 18.6c-.3 1.3-1.1 1.6-2.1 1l-6-4.4-2.9 2.8c-.3.3-.6.6-1.2.6l.4-6.1 11.2-10.1c.5-.4-.1-.7-.8-.3l-13.8 8.7-6-1.9c-1.3-.4-1.3-1.3.4-1.8z" /></>],
|
|
||||||
['facebook', 'Facebook', <path fill="#1877F2" transform="scale(2)" d="M24 12.07C24 5.41 18.63 0 12 0S0 5.4 0 12.07C0 18.1 4.39 23.1 10.13 24v-8.44H7.08v-3.49h3.04V9.41c0-3.02 1.8-4.7 4.54-4.7 1.31 0 2.68.24 2.68.24v2.97h-1.5c-1.5 0-1.96.93-1.96 1.89v2.26h3.32l-.53 3.5h-2.8V24C19.62 23.1 24 18.1 24 12.07" />],
|
|
||||||
];
|
|
||||||
function SocialLogins({ onPick }: { onPick(provider: string): void }) {
|
|
||||||
const t = useTranslations();
|
|
||||||
return (
|
|
||||||
<div className="social" role="group" aria-label={t('auth.socialLabel')}>
|
|
||||||
{SOCIAL.map(([id, name, mark]) => <button key={id} type="button" className="social-btn" aria-label={t('auth.continueWith', { name })} onClick={() => onPick(id)}>
|
|
||||||
<svg viewBox="0 0 48 48" width="20" height="20" aria-hidden>{mark}</svg>{name}
|
|
||||||
</button>)}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function LocationFields({ country, city, onCountry, onCity, labels }: { country: string; city: string; onCountry(v: string): void; onCity(v: string): void; labels: { country: string; city: string; pick: string; type: string } }) {
|
export function LocationFields({ country, city, onCountry, onCity, labels }: { country: string; city: string; onCountry(v: string): void; onCity(v: string): void; labels: { country: string; city: string; pick: string; type: string } }) {
|
||||||
return <>
|
return <>
|
||||||
<label className="field"><span>{labels.country}</span>
|
<label className="field"><span>{labels.country}</span>
|
||||||
|
|
@ -1383,7 +1241,7 @@ const NOTIF_TYPES = ['PAYMENT', 'NEW_LESSON', 'ISSUE', 'ANNOUNCEMENT'] as const;
|
||||||
|
|
||||||
function Profile() {
|
function Profile() {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
const { me, ds, write, courses, categories, locale, setLocale, signOut, nav } = useApp();
|
const { me, ds, write, courses, locale, setLocale, signOut, nav } = useApp();
|
||||||
const [name, setName] = useState(me?.name ?? '');
|
const [name, setName] = useState(me?.name ?? '');
|
||||||
const [phone, setPhone] = useState(me?.phone ?? '');
|
const [phone, setPhone] = useState(me?.phone ?? '');
|
||||||
const [email, setEmail] = useState(me?.email ?? '');
|
const [email, setEmail] = useState(me?.email ?? '');
|
||||||
|
|
@ -1403,50 +1261,9 @@ function Profile() {
|
||||||
const pref = (type: string, ch: 'EMAIL' | 'SMS') => me.notificationPrefs?.[type]?.[ch] !== false;
|
const pref = (type: string, ch: 'EMAIL' | 'SMS') => me.notificationPrefs?.[type]?.[ch] !== false;
|
||||||
const orders = Object.values(me.orders ?? {}).sort((a, b) => b.createdAt.localeCompare(a.createdAt));
|
const orders = Object.values(me.orders ?? {}).sort((a, b) => b.createdAt.localeCompare(a.createdAt));
|
||||||
const courseTitle = (id: string) => { const c = courses.find((x) => x.id === id); return c ? ct(c, locale).title : id; };
|
const courseTitle = (id: string) => { const c = courses.find((x) => x.id === id); return c ? ct(c, locale).title : id; };
|
||||||
const mine = courses.filter((c) => owns(me, c.id) && !c.isTest);
|
|
||||||
const finished = Object.values(me.progress ?? {}).filter((x) => x.completedAt).length;
|
|
||||||
const watched = Object.values(me.watchSec ?? {}).reduce((a, b) => a + b, 0);
|
|
||||||
const recent = activity(me, courses, locale, t).slice(0, 5);
|
|
||||||
const where = [me.city, COUNTRIES.find(([code]) => code === me.country)?.[1]].filter(Boolean).join(', ');
|
|
||||||
return (
|
return (
|
||||||
<section className="pf">
|
<section className="stack">
|
||||||
<header className="pf-hero">
|
<h1 style={{ fontSize: 'var(--fs-2xl)' }}>{t('profile.title')}</h1>
|
||||||
<span className="pf-avatar" aria-hidden>{initials(me.name)}</span>
|
|
||||||
<div className="pf-id"><h1>{me.name}</h1><p>{where && <>{where} · </>}{t('profile.since', { date: fmtDate(me.createdAt) })}</p></div>
|
|
||||||
</header>
|
|
||||||
<dl className="pf-stats">
|
|
||||||
<div><dt>{t('profile.statCourses')}</dt><dd className="num">{mine.length}</dd></div>
|
|
||||||
<div><dt>{t('profile.statLessons')}</dt><dd className="num">{finished}</dd></div>
|
|
||||||
<div><dt>{t('profile.statTime')}</dt><dd className="num">{formatDuration(watched)}</dd></div>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
<section className="pf-sec" id="progress">
|
|
||||||
<h2>{t('my.progressTitle')}</h2>
|
|
||||||
{mine.length ? <ul className="pf-courses">{mine.map((c) => {
|
|
||||||
const pr = courseProgress(c, me);
|
|
||||||
const r = resumePoint(c, me);
|
|
||||||
return <li key={c.id} className="pf-course">
|
|
||||||
<img src={c.coverAssetId ? ds.assetUrl(c.coverAssetId) : coursePhoto(c, categories.map((k) => k.id))} alt="" loading="lazy" />
|
|
||||||
<div className="pf-c-main">
|
|
||||||
<strong>{ct(c, locale).title}</strong>
|
|
||||||
<div className="bar"><i style={{ width: `${pr.pct}%` }} /></div>
|
|
||||||
<span className="small muted num">{t('my.lessonsDone', { done: pr.done, total: pr.total })} · {pr.pct}%</span>
|
|
||||||
</div>
|
|
||||||
{r && <button className={`btn btn-sm ${pr.pct === 100 ? 'btn-ghost' : 'btn-accent'}`} onClick={() => nav(`/${locale}/learn/${c.slug}/${r.lesson.id}`)}>{pr.pct === 100 ? t('course.watchAgain') : t('course.continue', { n: r.index + 1 })}</button>}
|
|
||||||
<details className="pf-more"><summary>{t('profile.lessonsList')}<Icon name="down" size={16} /></summary>
|
|
||||||
{[...c.chapters].sort((a, b) => a.sortOrder - b.sortOrder).map((ch) => <div key={ch.id}><p className="small" style={{ fontWeight: 700, padding: '8px 4px 2px' }}>{tr(ch.translations, locale)?.title}</p>{ch.lessons.filter((l) => l.isPublished).sort((a, b) => a.sortOrder - b.sortOrder).map((l) => <LessonRow key={l.id} c={c} l={l} />)}</div>)}
|
|
||||||
{!!c.assessments?.length && <div><p className="small" style={{ fontWeight: 700, padding: '8px 4px 2px' }}>{t('assess.title')}</p>{c.assessments.map((a) => <AssessmentRow key={a.id} c={c} a={a} />)}</div>}
|
|
||||||
</details>
|
|
||||||
</li>;
|
|
||||||
})}</ul> : <Empty action={<button className="btn" onClick={() => nav(`/${locale}/courses`)}>{t('landing.browse')}</button>}>{t('my.empty')}</Empty>}
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section className="pf-sec">
|
|
||||||
<div className="row-between"><h2>{t('history.title')}</h2>{recent.length > 0 && <button className="btn btn-ghost btn-sm" onClick={() => nav(`/${locale}/history`)}>{t('history.seeAll')}</button>}</div>
|
|
||||||
{recent.length ? <Timeline items={recent} /> : <p className="muted">{t('history.empty')}</p>}
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<h2 className="pf-h">{t('profile.account')}</h2>
|
|
||||||
<div className="two-col">
|
<div className="two-col">
|
||||||
<form className="card stack" onSubmit={save}>
|
<form className="card stack" onSubmit={save}>
|
||||||
<h2 style={{ fontSize: 'var(--fs-lg)' }}>{t('profile.details')}</h2>
|
<h2 style={{ fontSize: 'var(--fs-lg)' }}>{t('profile.details')}</h2>
|
||||||
|
|
|
||||||
|
|
@ -470,6 +470,7 @@ 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 { background: #111; color: #fff; }
|
||||||
.continue .bar > i { background: #fff; }
|
.continue .bar > i { background: #fff; }
|
||||||
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); }
|
.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 { width: 48px; height: 28px; flex: none; display: grid; place-items: center; }
|
||||||
.pay-mark img { width: 48px; height: 28px; object-fit: contain; }
|
.pay-mark img { width: 48px; height: 28px; object-fit: contain; }
|
||||||
.pay-logo { padding: 8px 14px 8px 10px; }
|
.pay-logo { padding: 8px 14px 8px 10px; }
|
||||||
|
|
@ -556,6 +557,10 @@ fieldset[disabled] .quiz-opt { cursor: default; }
|
||||||
|
|
||||||
/* ================= v6: audit 2026-10-16 phases 2–3 ================= */
|
/* ================= v6: audit 2026-10-16 phases 2–3 ================= */
|
||||||
/* Q1: compact footer on app screens */
|
/* Q1: compact footer on app screens */
|
||||||
|
.foot-compact { margin-top: 32px; padding-top: 20px; padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); }
|
||||||
|
@media (min-width: 900px) { .foot-compact { padding-bottom: 20px; } }
|
||||||
|
.foot-compact .foot-base { max-width: 1200px; margin: 0 auto; padding-top: 0; border-top: 0; letter-spacing: normal; text-transform: none; font-size: var(--fs-sm); }
|
||||||
|
.foot-compact a { color: var(--ink-2); text-decoration: none; } .foot-compact a:hover { color: var(--accent); }
|
||||||
.foot-langs { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-left: auto; }
|
.foot-langs { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-left: auto; }
|
||||||
.foot-langs button { background: none; border: 0; padding: 4px 0; cursor: pointer; color: var(--ink-2); font-size: var(--fs-sm); }
|
.foot-langs button { background: none; border: 0; padding: 4px 0; cursor: pointer; color: var(--ink-2); font-size: var(--fs-sm); }
|
||||||
.foot-langs button[aria-current="true"] { color: var(--ink); font-weight: 700; }
|
.foot-langs button[aria-current="true"] { color: var(--ink); font-weight: 700; }
|
||||||
|
|
@ -863,205 +868,11 @@ fieldset[disabled] .quiz-opt { cursor: default; }
|
||||||
.statbar > div { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 10px; }
|
.statbar > div { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 10px; }
|
||||||
.statbar .stat-ic { width: 36px; height: 36px; border-radius: 10px; }
|
.statbar .stat-ic { width: 36px; height: 36px; border-radius: 10px; }
|
||||||
}
|
}
|
||||||
|
/* narrow phones: header actions must fit 360-390px signed out (feedback, theme, language, Get started) */
|
||||||
|
@media (max-width: 420px) { .s-actions { gap: 2px; } .s-actions .lang-pick > svg { display: none; } .s-actions .lang-pick { padding-left: 8px; } .s-top-in { gap: 6px; } }
|
||||||
/* "Powered by Yaltopia Tech": a light band sweeps across the name every few seconds */
|
/* "Powered by Yaltopia Tech": a light band sweeps across the name every few seconds */
|
||||||
.powered { text-align: center; font-size: 12px; color: var(--ink-3); padding: 18px 16px 4px; letter-spacing: .04em; }
|
.powered { text-align: center; font-size: 12px; color: var(--ink-3); padding: 18px 16px 4px; letter-spacing: .04em; }
|
||||||
.shine { font-weight: 700; text-decoration: none; color: transparent; background: linear-gradient(110deg, var(--ink-2) 40%, #fff 50%, var(--ink-2) 60%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; animation: shine 3.2s linear infinite; }
|
.shine { font-weight: 700; text-decoration: none; color: transparent; background: linear-gradient(110deg, var(--ink-2) 40%, #fff 50%, var(--ink-2) 60%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; animation: shine 3.2s linear infinite; }
|
||||||
:root:not([data-theme="dark"]) .shine { background-image: linear-gradient(110deg, var(--ink) 40%, #B9B9B9 50%, var(--ink) 60%); }
|
:root:not([data-theme="dark"]) .shine { background-image: linear-gradient(110deg, var(--ink) 40%, #B9B9B9 50%, var(--ink) 60%); }
|
||||||
@keyframes shine { from { background-position: 100% 0; } to { background-position: -150% 0; } }
|
@keyframes shine { from { background-position: 100% 0; } to { background-position: -150% 0; } }
|
||||||
@media (prefers-reduced-motion: reduce) { .shine { animation: none; color: var(--ink); background: none; } }
|
@media (prefers-reduced-motion: reduce) { .shine { animation: none; color: var(--ink); background: none; } }
|
||||||
|
|
||||||
/* ---------- 2026-10-20 pass 3: stats, pay strip, course hero, help ---------- */
|
|
||||||
/* stats: three big numbers on hairlines, no tiles */
|
|
||||||
.l-hero + .statbar { background: none; box-shadow: none; border-radius: 0; padding: 0; margin-top: 8px; border-block: 1px solid var(--line); grid-template-columns: repeat(3, minmax(0, 1fr)); }
|
|
||||||
.statbar > div { flex-direction: column; align-items: flex-start; gap: 4px; padding: clamp(18px, 3vw, 32px) clamp(12px, 3vw, 32px); }
|
|
||||||
.statbar > div + div { border-left: 1px solid var(--line); }
|
|
||||||
.statbar strong { font-size: clamp(30px, 5vw, 64px) !important; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
|
|
||||||
.statbar span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
|
|
||||||
|
|
||||||
/* pay strip: every method named, nothing clipped, wraps instead of scrolling */
|
|
||||||
.pay-strip { display: flex; flex-direction: column; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: 22px; }
|
|
||||||
.pay-strip h3 { font-size: var(--fs-base); }
|
|
||||||
.pay-strip ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
|
|
||||||
.pay-strip li { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border-radius: 14px; background: var(--mist); font-weight: 600; font-size: var(--fs-sm); min-width: 0; }
|
|
||||||
.pay-strip .pay-mark { flex: none; width: 48px; height: 32px; border-radius: 8px; background: #fff; padding: 4px 6px; }
|
|
||||||
.pay-strip .pay-mark img { width: 100%; height: 100%; }
|
|
||||||
@media (max-width: 420px) { .pay-strip ul { grid-template-columns: 1fr 1fr; } }
|
|
||||||
|
|
||||||
/* course: the title sits on the course photo (same move as the landing hero) */
|
|
||||||
.cd-head { position: relative; overflow: hidden; isolation: isolate; border: 0; background: #0A0A0A; min-height: clamp(380px, 52vh, 480px); justify-content: flex-end; color: #F5F5F5;
|
|
||||||
--ink: #F5F5F5; --ink-2: #D6D6D6; --ink-3: #A3A3A3; --line: rgba(255, 255, 255, .16); --mist: rgba(255, 255, 255, .1); }
|
|
||||||
.cd-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; z-index: -2; }
|
|
||||||
.cd-head::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 10, 10, .55), rgba(10, 10, 10, .1) 30%, rgba(10, 10, 10, .75) 62%, #0A0A0A); }
|
|
||||||
.cd-head .cd-top { margin-bottom: auto; }
|
|
||||||
.cd-head .cd-pill { background: rgba(10, 10, 10, .45); backdrop-filter: blur(8px); }
|
|
||||||
.cd-hero-play { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 18px 6px 6px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(10, 10, 10, .45); backdrop-filter: blur(8px); color: #fff; font-weight: 700; cursor: pointer; }
|
|
||||||
.cd-hero-play .play-dot { background: #fff; color: #0A0A0A; }
|
|
||||||
.cd-hero-play:hover { background: rgba(30, 30, 30, .7); }
|
|
||||||
/* phones/tablets: a buy (or continue) bar replaces the app tabs */
|
|
||||||
.cd-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--paper); border-top: 1px solid var(--line); }
|
|
||||||
.cd-bar-txt { flex: 1; display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
|
|
||||||
.cd-bar-txt strong { font-size: var(--fs-lg); }
|
|
||||||
.cd-bar-txt span { font-size: 12px; color: var(--ink-3); }
|
|
||||||
.cd-bar .btn { border-radius: 999px; min-height: 48px; padding-inline: 22px; }
|
|
||||||
@media (min-width: 1024px) { .cd-bar { display: none; } }
|
|
||||||
|
|
||||||
/* help: big ask, three contact doors, FAQ beside the report form */
|
|
||||||
.help { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 48px); }
|
|
||||||
.help-hero { display: flex; flex-direction: column; gap: 10px; padding-top: clamp(8px, 3vw, 32px); }
|
|
||||||
.help-hero h1 { font-size: clamp(40px, 6vw, 72px); letter-spacing: -.045em; line-height: 1; }
|
|
||||||
.help-hero .lead { color: var(--ink-2); max-width: 48ch; font-size: var(--fs-lg); }
|
|
||||||
.help-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
|
|
||||||
.help-contact li { position: relative; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); transition: border-color 160ms, transform 160ms var(--ease-out); }
|
|
||||||
.help-contact li:hover { border-color: var(--ink-3); }
|
|
||||||
.help-contact a { display: flex; flex-direction: column; gap: 4px; padding: 20px; min-height: 150px; color: inherit; text-decoration: none; border-radius: inherit; }
|
|
||||||
.help-contact a strong { margin-top: auto; font-size: var(--fs-lg); }
|
|
||||||
.help-contact a span:last-child { color: var(--ink-3); font-size: var(--fs-sm); overflow-wrap: anywhere; }
|
|
||||||
.hc-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--mist); margin-bottom: 16px; }
|
|
||||||
.help-contact li > :not(a) { position: absolute; top: 16px; right: 16px; }
|
|
||||||
.help-grid { display: grid; gap: 24px; }
|
|
||||||
@media (min-width: 900px) { .help-grid { grid-template-columns: 1.2fr 1fr; align-items: start; } }
|
|
||||||
.help-faq h2 { font-size: var(--fs-xl); margin-bottom: 4px; }
|
|
||||||
.help-faq details { padding: 18px 0; }
|
|
||||||
.help-faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: var(--fs-lg); }
|
|
||||||
.help-faq summary::-webkit-details-marker { display: none; }
|
|
||||||
.help-faq summary svg { flex: none; color: var(--ink-3); transition: transform 200ms var(--ease-out); }
|
|
||||||
.help-faq details[open] summary svg { transform: rotate(45deg); }
|
|
||||||
@media (max-width: 760px) { .cd-head { min-height: 560px; } .cd-hero-img { height: 62%; object-position: center 20%; } .cd-head::after { background: linear-gradient(180deg, rgba(10, 10, 10, .5), transparent 25%, rgba(10, 10, 10, .2) 42%, #0A0A0A 62%); } }
|
|
||||||
|
|
||||||
/* ---------- menu sheet 2026-10-20: quiet header, preferences behind the menu button ---------- */
|
|
||||||
.s-actions { gap: 6px; }
|
|
||||||
.sheet { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(440px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; padding: 0; border: 0; border-left: 1px solid var(--line); background: var(--paper); color: var(--ink); }
|
|
||||||
.sheet::backdrop { background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px); }
|
|
||||||
.sheet[open] { animation: sheet-in 320ms var(--ease-out); }
|
|
||||||
.sheet[open]::backdrop { animation: fade-in 320ms ease; }
|
|
||||||
@keyframes sheet-in { from { transform: translateX(32px); opacity: 0; } }
|
|
||||||
@keyframes fade-in { from { opacity: 0; } }
|
|
||||||
.sheet-in { height: 100%; display: flex; flex-direction: column; gap: 28px; padding: 16px 20px calc(24px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; }
|
|
||||||
.sheet-top { display: flex; align-items: center; justify-content: space-between; }
|
|
||||||
.sheet-nav { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
|
|
||||||
.sheet-nav button { display: flex; align-items: baseline; gap: 16px; padding: 18px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink-2); font-family: var(--f-head); font-size: clamp(28px, 8vw, 36px); font-weight: 600; letter-spacing: -.035em; text-align: left; cursor: pointer; transition: color 160ms, padding 240ms var(--ease-out); }
|
|
||||||
.sheet-nav button .num { font-size: 12px; font-weight: 600; letter-spacing: .12em; color: var(--ink-3); width: 24px; flex: none; }
|
|
||||||
.sheet-nav button:hover, .sheet-nav button[aria-current="page"] { color: var(--ink); padding-left: 6px; }
|
|
||||||
.sheet-nav button[aria-current="page"]::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); align-self: center; margin-left: auto; }
|
|
||||||
.sheet-prefs { display: flex; flex-direction: column; gap: 4px; margin-top: auto; }
|
|
||||||
.sheet-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 6px 4px; border-bottom: 1px solid var(--line); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
|
|
||||||
.sheet-row:has(.feedback-btn:empty), .sheet-row:not(:has(button, select)) { display: none; }
|
|
||||||
.sheet-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: var(--fs-sm); color: var(--ink-3); }
|
|
||||||
.sheet-foot a { color: var(--ink); }
|
|
||||||
@media (prefers-reduced-motion: reduce) { .sheet[open], .sheet[open]::backdrop { animation: none; } }
|
|
||||||
|
|
||||||
/* ---------- profile + history (mobile first) ---------- */
|
|
||||||
.pf { display: flex; flex-direction: column; gap: 28px; }
|
|
||||||
.pf-hero { display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: 24px; background: linear-gradient(135deg, var(--mist), transparent 70%); border: 1px solid var(--line); }
|
|
||||||
.pf-avatar { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); font-family: var(--f-head); font-size: 22px; font-weight: 700; letter-spacing: -.02em; box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--line); }
|
|
||||||
.pf-id { min-width: 0; }
|
|
||||||
.pf-id h1, .pf-head h1 { font-size: clamp(26px, 5vw, 44px); letter-spacing: -.04em; line-height: 1.05; }
|
|
||||||
.pf-id p { color: var(--ink-3); font-size: var(--fs-sm); margin-top: 4px; }
|
|
||||||
.pf-head { display: flex; flex-direction: column; gap: 6px; }
|
|
||||||
.pf-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border-block: 1px solid var(--line); }
|
|
||||||
.pf-stats > div { padding: 16px 12px; display: flex; flex-direction: column-reverse; gap: 4px; min-width: 0; }
|
|
||||||
.pf-stats > div + div { border-left: 1px solid var(--line); }
|
|
||||||
.pf-stats dt { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
|
|
||||||
.pf-stats dd { margin: 0; font-size: clamp(24px, 5vw, 44px); font-weight: 700; letter-spacing: -.04em; line-height: 1; white-space: nowrap; }
|
|
||||||
.pf-sec { display: flex; flex-direction: column; gap: 14px; }
|
|
||||||
.pf-sec h2, .pf-h { font-size: var(--fs-xl); letter-spacing: -.02em; }
|
|
||||||
.pf-courses { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
|
|
||||||
@media (min-width: 900px) { .pf-courses { grid-template-columns: 1fr 1fr; } }
|
|
||||||
.pf-course { display: grid; grid-template-columns: 72px minmax(0, 1fr); grid-template-areas: "img main" "btn btn" "more more"; gap: 12px 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); }
|
|
||||||
.pf-course > img { grid-area: img; width: 72px; height: 88px; object-fit: cover; object-position: center 20%; border-radius: 14px; }
|
|
||||||
.pf-c-main { grid-area: main; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
|
|
||||||
.pf-course > .btn { grid-area: btn; border-radius: 999px; min-height: 44px; }
|
|
||||||
.pf-more { grid-area: more; border-top: 1px solid var(--line); padding-top: 4px; }
|
|
||||||
.pf-more summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 8px 4px; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); cursor: pointer; }
|
|
||||||
.pf-more summary::-webkit-details-marker { display: none; }
|
|
||||||
.pf-more summary svg { transition: transform 200ms var(--ease-out); }
|
|
||||||
.pf-more[open] summary svg { transform: rotate(180deg); }
|
|
||||||
.tl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
|
|
||||||
.tl-day { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding: 18px 0 6px; }
|
|
||||||
.tl li:first-child .tl-day { padding-top: 0; }
|
|
||||||
.tl-row { width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); text-align: left; cursor: pointer; min-height: 56px; }
|
|
||||||
.tl-row:disabled { cursor: default; }
|
|
||||||
.tl-row > svg { color: var(--ink-3); flex: none; }
|
|
||||||
.tl-ic { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--mist); color: var(--ink-2); }
|
|
||||||
.tl-check { background: var(--ink); color: var(--paper); }
|
|
||||||
.tl-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-sm); line-height: 1.4; }
|
|
||||||
|
|
||||||
/* ---------- social sign-in ---------- */
|
|
||||||
.social { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
|
|
||||||
.social-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-weight: 600; font-size: var(--fs-sm); cursor: pointer; transition: background 160ms, border-color 160ms; }
|
|
||||||
.social-btn:hover { background: var(--mist); border-color: var(--ink-3); }
|
|
||||||
.social-btn svg { flex: none; }
|
|
||||||
|
|
||||||
|
|
||||||
/* first-visit language picker */
|
|
||||||
.lang-welcome { width: min(760px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line); border-radius: 28px; background: var(--paper); color: var(--ink); overflow: hidden; }
|
|
||||||
.lang-welcome[open] { display: grid; grid-template-columns: 1fr; animation: sheet-in 360ms var(--ease-out); }
|
|
||||||
.lang-welcome::backdrop { background: rgba(0, 0, 0, .7); backdrop-filter: blur(8px); }
|
|
||||||
.lang-welcome > img { width: 100%; height: 160px; object-fit: cover; object-position: center 22%; }
|
|
||||||
.lw-body { display: flex; flex-direction: column; gap: 20px; padding: 20px 20px 24px; }
|
|
||||||
.lw-body h2 { font-size: clamp(28px, 6vw, 40px); letter-spacing: -.04em; line-height: 1.05; }
|
|
||||||
.lw-body p { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; color: var(--ink-3); font-size: var(--fs-sm); }
|
|
||||||
.lw-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
|
|
||||||
.lw-list button { display: flex; justify-content: space-between; align-items: center; min-height: 56px; padding: 0 4px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font-size: var(--fs-lg); font-weight: 600; cursor: pointer; transition: padding 240ms var(--ease-out); }
|
|
||||||
.lw-list button:hover, .lw-list button:focus-visible { padding-left: 10px; }
|
|
||||||
.lw-list button[aria-current="true"] svg { color: var(--ink); } .lw-list button svg { color: var(--ink-3); }
|
|
||||||
@media (min-width: 700px) { .lang-welcome[open] { grid-template-columns: 1fr 1.2fr; } .lang-welcome > img { height: 100%; min-height: 460px; } .lw-body { padding: 32px; justify-content: center; } }
|
|
||||||
@media (prefers-reduced-motion: reduce) { .lang-welcome[open] { animation: none; } }
|
|
||||||
|
|
||||||
/* ---------- 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; }
|
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,6 @@ const PATHS: Record<string, string> = {
|
||||||
menu: 'M4 6h16M4 12h16M4 18h16',
|
menu: 'M4 6h16M4 12h16M4 18h16',
|
||||||
upload: 'M12 16V4M7 9l5-5 5 5M4 20h16',
|
upload: 'M12 16V4M7 9l5-5 5 5M4 20h16',
|
||||||
plus: 'M12 5v14M5 12h14',
|
plus: 'M12 5v14M5 12h14',
|
||||||
mail: 'M3 6h18v12H3zM3 7l9 6 9-6',
|
|
||||||
up: 'M6 15l6-6 6 6',
|
up: 'M6 15l6-6 6 6',
|
||||||
down: 'M6 9l6 6 6-6',
|
down: 'M6 9l6 6 6-6',
|
||||||
download: 'M12 4v12M7 11l5 5 5-5M4 20h16',
|
download: 'M12 4v12M7 11l5 5 5-5M4 20h16',
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@
|
||||||
"theme": "ጨለማ ገጽታ"
|
"theme": "ጨለማ ገጽታ"
|
||||||
},
|
},
|
||||||
"nav": {
|
"nav": {
|
||||||
"history": "ታሪክ",
|
|
||||||
"home": "መነሻ",
|
"home": "መነሻ",
|
||||||
"courses": "ኮርሶች",
|
"courses": "ኮርሶች",
|
||||||
"myCourses": "የእኔ ኮርሶች",
|
"myCourses": "የእኔ ኮርሶች",
|
||||||
|
|
@ -26,8 +25,7 @@
|
||||||
"signOut": "ውጣ",
|
"signOut": "ውጣ",
|
||||||
"getStarted": "ይጀምሩ",
|
"getStarted": "ይጀምሩ",
|
||||||
"account": "መለያ",
|
"account": "መለያ",
|
||||||
"progress": "የእኔ እድገት",
|
"progress": "የእኔ እድገት"
|
||||||
"menu": "ማውጫ"
|
|
||||||
},
|
},
|
||||||
"landing": {
|
"landing": {
|
||||||
"title": "ከሥራ ላይ ካሉ ባለሙያዎች ሙያዊ ሜካፕ ይማሩ",
|
"title": "ከሥራ ላይ ካሉ ባለሙያዎች ሙያዊ ሜካፕ ይማሩ",
|
||||||
|
|
@ -37,7 +35,7 @@
|
||||||
"featured": "ተመራጭ ኮርሶች",
|
"featured": "ተመራጭ ኮርሶች",
|
||||||
"howTitle": "እንዴት ይሠራል",
|
"howTitle": "እንዴት ይሠራል",
|
||||||
"how1": "ነጻ የሙከራ ትምህርቶችን ይመልከቱ",
|
"how1": "ነጻ የሙከራ ትምህርቶችን ይመልከቱ",
|
||||||
"how2": "በአገር ውስጥም ሆነ በውጭ በፈለጉት መንገድ ይክፈሉ",
|
"how2": "በቴሌብር ወይም በሲቢኢ ብር ይክፈሉ",
|
||||||
"how3": "ኮርሱ ወዲያውኑ ይከፈታል፣ ለዘላለም",
|
"how3": "ኮርሱ ወዲያውኑ ይከፈታል፣ ለዘላለም",
|
||||||
"payTitle": "በለመዱት መንገድ ይክፈሉ",
|
"payTitle": "በለመዱት መንገድ ይክፈሉ",
|
||||||
"fact1": "አማርኛ፣ አፋን ኦሮሞ፣ ትግርኛና እንግሊዝኛ",
|
"fact1": "አማርኛ፣ አፋን ኦሮሞ፣ ትግርኛና እንግሊዝኛ",
|
||||||
|
|
@ -65,8 +63,6 @@
|
||||||
"waitPill": "በቅርቡ ይከፈታል · የተጠባባቂ ዝርዝሩን ይቀላቀሉ"
|
"waitPill": "በቅርቡ ይከፈታል · የተጠባባቂ ዝርዝሩን ይቀላቀሉ"
|
||||||
},
|
},
|
||||||
"auth": {
|
"auth": {
|
||||||
"socialLabel": "በሌላ መለያ ይግቡ",
|
|
||||||
"continueWith": "በ{name} ይቀጥሉ",
|
|
||||||
"phoneTitle": "በስልክዎ ይግቡ",
|
"phoneTitle": "በስልክዎ ይግቡ",
|
||||||
"phoneLabel": "ስልክ ቁጥር",
|
"phoneLabel": "ስልክ ቁጥር",
|
||||||
"sendCode": "ኮድ ላክ",
|
"sendCode": "ኮድ ላክ",
|
||||||
|
|
@ -126,7 +122,6 @@
|
||||||
"emptyCategory": "በዚህ ምድብ እስካሁን ኮርስ የለም።"
|
"emptyCategory": "በዚህ ምድብ እስካሁን ኮርስ የለም።"
|
||||||
},
|
},
|
||||||
"course": {
|
"course": {
|
||||||
"buyShort": "ኮርሱን ይግዙ",
|
|
||||||
"by": "ከ{name} ጋር",
|
"by": "ከ{name} ጋር",
|
||||||
"lessons": "{n} ትምህርቶች",
|
"lessons": "{n} ትምህርቶች",
|
||||||
"taughtIn": "የማስተማሪያ ቋንቋ፦ {lang}",
|
"taughtIn": "የማስተማሪያ ቋንቋ፦ {lang}",
|
||||||
|
|
@ -165,9 +160,7 @@
|
||||||
"includes": "ይህ ኮርስ የሚያካትተው",
|
"includes": "ይህ ኮርስ የሚያካትተው",
|
||||||
"previewLessons": "{n, plural, one {# ነጻ የቅድመ እይታ ትምህርት} other {# ነጻ የቅድመ እይታ ትምህርቶች}}",
|
"previewLessons": "{n, plural, one {# ነጻ የቅድመ እይታ ትምህርት} other {# ነጻ የቅድመ እይታ ትምህርቶች}}",
|
||||||
"createdBy": "ያዘጋጀው",
|
"createdBy": "ያዘጋጀው",
|
||||||
"lifetimeAccess": "የዕድሜ ልክ መዳረሻ",
|
"lifetimeAccess": "የዕድሜ ልክ መዳረሻ"
|
||||||
"enrolled": "{n} ተማሪዎች",
|
|
||||||
"newCourse": "አዲስ ኮርስ"
|
|
||||||
},
|
},
|
||||||
"checkout": {
|
"checkout": {
|
||||||
"title": "የመክፈያ መንገድ ይምረጡ",
|
"title": "የመክፈያ መንገድ ይምረጡ",
|
||||||
|
|
@ -230,8 +223,6 @@
|
||||||
"open": "ክፈት"
|
"open": "ክፈት"
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"email": "ኢሜይል ይላኩልን",
|
|
||||||
"lead": "ፈጣን መልሶች፣ በቴሌግራም እውነተኛ ሰው፣ ወይም የምንከታተለው ሪፖርት።",
|
|
||||||
"title": "እገዛ",
|
"title": "እገዛ",
|
||||||
"faq": "በብዛት የሚጠየቁ ጥያቄዎች",
|
"faq": "በብዛት የሚጠየቁ ጥያቄዎች",
|
||||||
"q1": "እንዴት እከፍላለሁ?",
|
"q1": "እንዴት እከፍላለሁ?",
|
||||||
|
|
@ -258,12 +249,6 @@
|
||||||
"required": "ርዕሱንና የተፈጠረውን ይሙሉ።"
|
"required": "ርዕሱንና የተፈጠረውን ይሙሉ።"
|
||||||
},
|
},
|
||||||
"profile": {
|
"profile": {
|
||||||
"lessonsList": "ትምህርቶችና ፈተናዎች",
|
|
||||||
"account": "የመለያ ቅንብሮች",
|
|
||||||
"statTime": "የታየ ጊዜ",
|
|
||||||
"statLessons": "የተጠናቀቁ ትምህርቶች",
|
|
||||||
"statCourses": "ኮርሶች",
|
|
||||||
"since": "ከ{date} ጀምሮ አባል",
|
|
||||||
"title": "መገለጫ",
|
"title": "መገለጫ",
|
||||||
"details": "የእርስዎ መረጃ",
|
"details": "የእርስዎ መረጃ",
|
||||||
"phone": "ስልክ",
|
"phone": "ስልክ",
|
||||||
|
|
@ -368,38 +353,6 @@
|
||||||
"kit4Note": "ከንፈር",
|
"kit4Note": "ከንፈር",
|
||||||
"workTitle": "የተማሪዎች ሥራ",
|
"workTitle": "የተማሪዎች ሥራ",
|
||||||
"workSub": "በሲርኩል ተማሪዎች የተሠሩ",
|
"workSub": "በሲርኩል ተማሪዎች የተሠሩ",
|
||||||
"credits": "የፎቶ ምንጮች",
|
"credits": "የፎቶ ምንጮች"
|
||||||
"founder": "መሥራች፦ <name></name>",
|
|
||||||
"tiktok": "@rezinabrhane በቲክቶክ"
|
|
||||||
},
|
|
||||||
"history": {
|
|
||||||
"title": "ታሪክ",
|
|
||||||
"lead": "ያዩት፣ የጨረሱትና የገዙት ሁሉ።",
|
|
||||||
"done": "“{lesson}” ጨርሰዋል · {course}",
|
|
||||||
"watched": "“{lesson}” አይተዋል · {course}",
|
|
||||||
"paid": "{course} ገዝተዋል",
|
|
||||||
"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": "አስጎብኙኝ"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@
|
||||||
"theme": "Dark mode"
|
"theme": "Dark mode"
|
||||||
},
|
},
|
||||||
"nav": {
|
"nav": {
|
||||||
"history": "History",
|
|
||||||
"home": "Home",
|
"home": "Home",
|
||||||
"courses": "Courses",
|
"courses": "Courses",
|
||||||
"myCourses": "My courses",
|
"myCourses": "My courses",
|
||||||
|
|
@ -26,8 +25,7 @@
|
||||||
"signOut": "Sign out",
|
"signOut": "Sign out",
|
||||||
"getStarted": "Get started",
|
"getStarted": "Get started",
|
||||||
"account": "Account",
|
"account": "Account",
|
||||||
"progress": "My progress",
|
"progress": "My progress"
|
||||||
"menu": "Menu"
|
|
||||||
},
|
},
|
||||||
"landing": {
|
"landing": {
|
||||||
"title": "Learn professional makeup from working artists",
|
"title": "Learn professional makeup from working artists",
|
||||||
|
|
@ -37,7 +35,7 @@
|
||||||
"featured": "Featured courses",
|
"featured": "Featured courses",
|
||||||
"howTitle": "How it works",
|
"howTitle": "How it works",
|
||||||
"how1": "Watch the free preview lessons",
|
"how1": "Watch the free preview lessons",
|
||||||
"how2": "Pay your way, at home or abroad",
|
"how2": "Pay with Telebirr or CBE Birr",
|
||||||
"how3": "The course unlocks right away, for life",
|
"how3": "The course unlocks right away, for life",
|
||||||
"payTitle": "Pay the way you already do",
|
"payTitle": "Pay the way you already do",
|
||||||
"fact1": "Amharic, Afaan Oromoo, Tigrinya and English",
|
"fact1": "Amharic, Afaan Oromoo, Tigrinya and English",
|
||||||
|
|
@ -65,8 +63,6 @@
|
||||||
"waitPill": "Opening soon · Join the waitlist"
|
"waitPill": "Opening soon · Join the waitlist"
|
||||||
},
|
},
|
||||||
"auth": {
|
"auth": {
|
||||||
"socialLabel": "Sign in with another account",
|
|
||||||
"continueWith": "Continue with {name}",
|
|
||||||
"phoneTitle": "Sign in with your phone",
|
"phoneTitle": "Sign in with your phone",
|
||||||
"phoneLabel": "Phone number",
|
"phoneLabel": "Phone number",
|
||||||
"sendCode": "Send code",
|
"sendCode": "Send code",
|
||||||
|
|
@ -126,7 +122,6 @@
|
||||||
"emptyCategory": "No courses in this category yet."
|
"emptyCategory": "No courses in this category yet."
|
||||||
},
|
},
|
||||||
"course": {
|
"course": {
|
||||||
"buyShort": "Buy course",
|
|
||||||
"by": "With {name}",
|
"by": "With {name}",
|
||||||
"lessons": "{n, plural, one {# lesson} other {# lessons}}",
|
"lessons": "{n, plural, one {# lesson} other {# lessons}}",
|
||||||
"taughtIn": "Taught in {lang}",
|
"taughtIn": "Taught in {lang}",
|
||||||
|
|
@ -165,9 +160,7 @@
|
||||||
"includes": "This course includes",
|
"includes": "This course includes",
|
||||||
"previewLessons": "{n, plural, one {# free preview lesson} other {# free preview lessons}}",
|
"previewLessons": "{n, plural, one {# free preview lesson} other {# free preview lessons}}",
|
||||||
"createdBy": "Created by",
|
"createdBy": "Created by",
|
||||||
"lifetimeAccess": "Lifetime access",
|
"lifetimeAccess": "Lifetime access"
|
||||||
"enrolled": "{n, plural, one {# student} other {# students}}",
|
|
||||||
"newCourse": "New course"
|
|
||||||
},
|
},
|
||||||
"checkout": {
|
"checkout": {
|
||||||
"title": "Choose how to pay",
|
"title": "Choose how to pay",
|
||||||
|
|
@ -230,8 +223,6 @@
|
||||||
"open": "Open"
|
"open": "Open"
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"email": "Email us",
|
|
||||||
"lead": "Quick answers, a real person on Telegram, or a report we follow up on.",
|
|
||||||
"title": "Help",
|
"title": "Help",
|
||||||
"faq": "Common questions",
|
"faq": "Common questions",
|
||||||
"q1": "How do I pay?",
|
"q1": "How do I pay?",
|
||||||
|
|
@ -258,12 +249,6 @@
|
||||||
"required": "Fill in the subject and what happened."
|
"required": "Fill in the subject and what happened."
|
||||||
},
|
},
|
||||||
"profile": {
|
"profile": {
|
||||||
"lessonsList": "Lessons and quizzes",
|
|
||||||
"account": "Account settings",
|
|
||||||
"statTime": "Watch time",
|
|
||||||
"statLessons": "Lessons finished",
|
|
||||||
"statCourses": "Courses",
|
|
||||||
"since": "Member since {date}",
|
|
||||||
"title": "Profile",
|
"title": "Profile",
|
||||||
"details": "Your details",
|
"details": "Your details",
|
||||||
"phone": "Phone",
|
"phone": "Phone",
|
||||||
|
|
@ -368,38 +353,6 @@
|
||||||
"kit4Note": "Lips",
|
"kit4Note": "Lips",
|
||||||
"workTitle": "Student work",
|
"workTitle": "Student work",
|
||||||
"workSub": "Looks by Sirkul students",
|
"workSub": "Looks by Sirkul students",
|
||||||
"credits": "Photo credits",
|
"credits": "Photo credits"
|
||||||
"founder": "Founded by <name></name>",
|
|
||||||
"tiktok": "@rezinabrhane on TikTok"
|
|
||||||
},
|
|
||||||
"history": {
|
|
||||||
"title": "History",
|
|
||||||
"lead": "Everything you've watched, finished and bought.",
|
|
||||||
"done": "Finished “{lesson}” · {course}",
|
|
||||||
"watched": "Watched “{lesson}” · {course}",
|
|
||||||
"paid": "Bought {course}",
|
|
||||||
"report": "Sent a report: {subject}",
|
|
||||||
"empty": "Nothing yet. Start a lesson and it shows up here.",
|
|
||||||
"seeAll": "See all"
|
|
||||||
},
|
|
||||||
"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"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@
|
||||||
"theme": "Haala dukkanaa"
|
"theme": "Haala dukkanaa"
|
||||||
},
|
},
|
||||||
"nav": {
|
"nav": {
|
||||||
"history": "Seenaa",
|
|
||||||
"home": "Mana",
|
"home": "Mana",
|
||||||
"courses": "Koorsiiwwan",
|
"courses": "Koorsiiwwan",
|
||||||
"myCourses": "Koorsiiwwan koo",
|
"myCourses": "Koorsiiwwan koo",
|
||||||
|
|
@ -26,8 +25,7 @@
|
||||||
"signOut": "Ba'i",
|
"signOut": "Ba'i",
|
||||||
"getStarted": "Get started",
|
"getStarted": "Get started",
|
||||||
"account": "Account",
|
"account": "Account",
|
||||||
"progress": "My progress",
|
"progress": "My progress"
|
||||||
"menu": "Baafata"
|
|
||||||
},
|
},
|
||||||
"landing": {
|
"landing": {
|
||||||
"title": "Ogeeyyii hojii irra jiran irraa meekaappii ogummaa baradhu",
|
"title": "Ogeeyyii hojii irra jiran irraa meekaappii ogummaa baradhu",
|
||||||
|
|
@ -37,7 +35,7 @@
|
||||||
"featured": "Koorsiiwwan filatamoo",
|
"featured": "Koorsiiwwan filatamoo",
|
||||||
"howTitle": "Akkamitti hojjeta",
|
"howTitle": "Akkamitti hojjeta",
|
||||||
"how1": "Barnoota yaalii bilisaa ilaali",
|
"how1": "Barnoota yaalii bilisaa ilaali",
|
||||||
"how2": "Biyya keessaa ykn alaa karaa barbaadde kaffali",
|
"how2": "Telebirr ykn CBE Birr'n kaffali",
|
||||||
"how3": "Koorsiin battalumatti, bara baraan siif bana",
|
"how3": "Koorsiin battalumatti, bara baraan siif bana",
|
||||||
"payTitle": "Karaa duraan beekteen kaffali",
|
"payTitle": "Karaa duraan beekteen kaffali",
|
||||||
"fact1": "Amaariffa, Afaan Oromoo, Tigrinyaa fi Ingiliffa",
|
"fact1": "Amaariffa, Afaan Oromoo, Tigrinyaa fi Ingiliffa",
|
||||||
|
|
@ -65,8 +63,6 @@
|
||||||
"waitPill": "Dhiyootti banama · Tarree eegdotaatti makami"
|
"waitPill": "Dhiyootti banama · Tarree eegdotaatti makami"
|
||||||
},
|
},
|
||||||
"auth": {
|
"auth": {
|
||||||
"socialLabel": "Herrega biraatiin seeni",
|
|
||||||
"continueWith": "{name}n itti fufi",
|
|
||||||
"phoneTitle": "Bilbila keetiin seeni",
|
"phoneTitle": "Bilbila keetiin seeni",
|
||||||
"phoneLabel": "Lakkoofsa bilbilaa",
|
"phoneLabel": "Lakkoofsa bilbilaa",
|
||||||
"sendCode": "Koodii ergi",
|
"sendCode": "Koodii ergi",
|
||||||
|
|
@ -126,7 +122,6 @@
|
||||||
"emptyCategory": "Ramaddii kana keessa ammatti koorsiin hin jiru."
|
"emptyCategory": "Ramaddii kana keessa ammatti koorsiin hin jiru."
|
||||||
},
|
},
|
||||||
"course": {
|
"course": {
|
||||||
"buyShort": "Koorsii bitadhu",
|
|
||||||
"by": "{name} wajjin",
|
"by": "{name} wajjin",
|
||||||
"lessons": "Barnoota {n}",
|
"lessons": "Barnoota {n}",
|
||||||
"taughtIn": "Afaan barsiisaa: {lang}",
|
"taughtIn": "Afaan barsiisaa: {lang}",
|
||||||
|
|
@ -165,9 +160,7 @@
|
||||||
"includes": "Koorsiin kun kan of keessaa qabu",
|
"includes": "Koorsiin kun kan of keessaa qabu",
|
||||||
"previewLessons": "{n, plural, one {Barnoota bilisaa # ilaaluu} other {Barnoota bilisaa # ilaaluu}}",
|
"previewLessons": "{n, plural, one {Barnoota bilisaa # ilaaluu} other {Barnoota bilisaa # ilaaluu}}",
|
||||||
"createdBy": "Kan qopheesse",
|
"createdBy": "Kan qopheesse",
|
||||||
"lifetimeAccess": "Dhaqqabummaa umurii guutuu",
|
"lifetimeAccess": "Dhaqqabummaa umurii guutuu"
|
||||||
"enrolled": "barattoota {n}",
|
|
||||||
"newCourse": "Koorsii haaraa"
|
|
||||||
},
|
},
|
||||||
"checkout": {
|
"checkout": {
|
||||||
"title": "Akkaataa kaffaltii filadhu",
|
"title": "Akkaataa kaffaltii filadhu",
|
||||||
|
|
@ -230,8 +223,6 @@
|
||||||
"open": "Bani"
|
"open": "Bani"
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"email": "Imeelii nuuf ergaa",
|
|
||||||
"lead": "Deebii saffisaa, nama dhugaa Telegram irratti, ykn gabaasa nuti hordofnu.",
|
|
||||||
"title": "Gargaarsa",
|
"title": "Gargaarsa",
|
||||||
"faq": "Gaaffilee baay'inaan gaafataman",
|
"faq": "Gaaffilee baay'inaan gaafataman",
|
||||||
"q1": "Akkamittan kaffala?",
|
"q1": "Akkamittan kaffala?",
|
||||||
|
|
@ -258,12 +249,6 @@
|
||||||
"required": "Mata-duree fi waan uumame guuti."
|
"required": "Mata-duree fi waan uumame guuti."
|
||||||
},
|
},
|
||||||
"profile": {
|
"profile": {
|
||||||
"lessonsList": "Barnootaa fi qormaata",
|
|
||||||
"account": "Qindaa'ina herregaa",
|
|
||||||
"statTime": "Yeroo ilaalame",
|
|
||||||
"statLessons": "Barnoota xumuraman",
|
|
||||||
"statCourses": "Koorsiiwwan",
|
|
||||||
"since": "Miseensa {date} irraa",
|
|
||||||
"title": "Piroofaayilii",
|
"title": "Piroofaayilii",
|
||||||
"details": "Odeeffannoo kee",
|
"details": "Odeeffannoo kee",
|
||||||
"phone": "Bilbila",
|
"phone": "Bilbila",
|
||||||
|
|
@ -368,38 +353,6 @@
|
||||||
"kit4Note": "Afaan",
|
"kit4Note": "Afaan",
|
||||||
"workTitle": "Hojii barattootaa",
|
"workTitle": "Hojii barattootaa",
|
||||||
"workSub": "Kan barattoota Sirkul",
|
"workSub": "Kan barattoota Sirkul",
|
||||||
"credits": "Madda suuraalee",
|
"credits": "Madda suuraalee"
|
||||||
"founder": "Hundeessituu: <name></name>",
|
|
||||||
"tiktok": "@rezinabrhane TikTok irratti"
|
|
||||||
},
|
|
||||||
"history": {
|
|
||||||
"title": "Seenaa",
|
|
||||||
"lead": "Waan ilaalte, xumurte fi bitte hunda.",
|
|
||||||
"done": "“{lesson}” xumurte · {course}",
|
|
||||||
"watched": "“{lesson}” ilaalte · {course}",
|
|
||||||
"paid": "{course} bitte",
|
|
||||||
"report": "Gabaasa ergite: {subject}",
|
|
||||||
"empty": "Ammaaf homaa hin jiru. Barnoota jalqabi, asitti mul'ata.",
|
|
||||||
"seeAll": "Hunda ilaali"
|
|
||||||
},
|
|
||||||
"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"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@
|
||||||
"theme": "ጸልማት ገጽ"
|
"theme": "ጸልማት ገጽ"
|
||||||
},
|
},
|
||||||
"nav": {
|
"nav": {
|
||||||
"history": "ታሪኽ",
|
|
||||||
"home": "መበገሲ",
|
"home": "መበገሲ",
|
||||||
"courses": "ኮርሳት",
|
"courses": "ኮርሳት",
|
||||||
"myCourses": "ናተይ ኮርሳት",
|
"myCourses": "ናተይ ኮርሳት",
|
||||||
|
|
@ -26,8 +25,7 @@
|
||||||
"signOut": "ውጻእ",
|
"signOut": "ውጻእ",
|
||||||
"getStarted": "Get started",
|
"getStarted": "Get started",
|
||||||
"account": "Account",
|
"account": "Account",
|
||||||
"progress": "My progress",
|
"progress": "My progress"
|
||||||
"menu": "መውጽኢ"
|
|
||||||
},
|
},
|
||||||
"landing": {
|
"landing": {
|
||||||
"title": "ካብ ኣብ ስራሕ ዘለዉ ሞያውያን ሞያዊ ሜካፕ ተማሃር",
|
"title": "ካብ ኣብ ስራሕ ዘለዉ ሞያውያን ሞያዊ ሜካፕ ተማሃር",
|
||||||
|
|
@ -37,7 +35,7 @@
|
||||||
"featured": "ፍሉያት ኮርሳት",
|
"featured": "ፍሉያት ኮርሳት",
|
||||||
"howTitle": "ከመይ ይሰርሕ",
|
"howTitle": "ከመይ ይሰርሕ",
|
||||||
"how1": "ናጻ ናይ ፈተነ ትምህርትታት ርአ",
|
"how1": "ናጻ ናይ ፈተነ ትምህርትታት ርአ",
|
||||||
"how2": "ኣብ ውሽጢ ዓዲ ይኹን ወጻኢ ብዝደለኽዮ ክፈሊ",
|
"how2": "ብቴሌብር ወይ ሲቢኢ ብር ክፈል",
|
||||||
"how3": "ኮርሱ ብቕጽበት ይኽፈት፣ ንዘለኣለም",
|
"how3": "ኮርሱ ብቕጽበት ይኽፈት፣ ንዘለኣለም",
|
||||||
"payTitle": "ብዝለመድካዮ መንገዲ ክፈል",
|
"payTitle": "ብዝለመድካዮ መንገዲ ክፈል",
|
||||||
"fact1": "ኣምሓርኛ፣ ኦሮምኛ፣ ትግርኛን እንግሊዝኛን",
|
"fact1": "ኣምሓርኛ፣ ኦሮምኛ፣ ትግርኛን እንግሊዝኛን",
|
||||||
|
|
@ -65,8 +63,6 @@
|
||||||
"waitPill": "ቀልጢፉ ይኽፈት · ናብ ዝርዝር ተጸበይቲ ተጸንበር"
|
"waitPill": "ቀልጢፉ ይኽፈት · ናብ ዝርዝር ተጸበይቲ ተጸንበር"
|
||||||
},
|
},
|
||||||
"auth": {
|
"auth": {
|
||||||
"socialLabel": "ብካልእ ሕሳብ እቶ",
|
|
||||||
"continueWith": "ብ{name} ቀጽል",
|
|
||||||
"phoneTitle": "ብተሌፎንካ እቶ",
|
"phoneTitle": "ብተሌፎንካ እቶ",
|
||||||
"phoneLabel": "ቁጽሪ ተሌፎን",
|
"phoneLabel": "ቁጽሪ ተሌፎን",
|
||||||
"sendCode": "ኮድ ስደድ",
|
"sendCode": "ኮድ ስደድ",
|
||||||
|
|
@ -126,7 +122,6 @@
|
||||||
"emptyCategory": "ኣብዚ ምድብ ክሳብ ሕጂ ኮርስ የለን።"
|
"emptyCategory": "ኣብዚ ምድብ ክሳብ ሕጂ ኮርስ የለን።"
|
||||||
},
|
},
|
||||||
"course": {
|
"course": {
|
||||||
"buyShort": "ኮርስ ግዝእ",
|
|
||||||
"by": "ምስ {name}",
|
"by": "ምስ {name}",
|
||||||
"lessons": "{n} ትምህርትታት",
|
"lessons": "{n} ትምህርትታት",
|
||||||
"taughtIn": "ቋንቋ ምምሃር፦ {lang}",
|
"taughtIn": "ቋንቋ ምምሃር፦ {lang}",
|
||||||
|
|
@ -165,9 +160,7 @@
|
||||||
"includes": "እዚ ኮርስ ዝሓዞ",
|
"includes": "እዚ ኮርስ ዝሓዞ",
|
||||||
"previewLessons": "{n, plural, one {# ነጻ ቅድመ ርእይቶ ትምህርቲ} other {# ነጻ ቅድመ ርእይቶ ትምህርትታት}}",
|
"previewLessons": "{n, plural, one {# ነጻ ቅድመ ርእይቶ ትምህርቲ} other {# ነጻ ቅድመ ርእይቶ ትምህርትታት}}",
|
||||||
"createdBy": "ዘዳለዎ",
|
"createdBy": "ዘዳለዎ",
|
||||||
"lifetimeAccess": "ንዘለኣለም ምርካብ",
|
"lifetimeAccess": "ንዘለኣለም ምርካብ"
|
||||||
"enrolled": "{n} ተማሃሮ",
|
|
||||||
"newCourse": "ሓድሽ ኮርስ"
|
|
||||||
},
|
},
|
||||||
"checkout": {
|
"checkout": {
|
||||||
"title": "መንገዲ ክፍሊት ምረጽ",
|
"title": "መንገዲ ክፍሊት ምረጽ",
|
||||||
|
|
@ -230,8 +223,6 @@
|
||||||
"open": "ክፈት"
|
"open": "ክፈት"
|
||||||
},
|
},
|
||||||
"help": {
|
"help": {
|
||||||
"email": "ኢመይል ስደዱልና",
|
|
||||||
"lead": "ቅልጡፍ መልስታት፣ ብቴሌግራም ሓቀኛ ሰብ፣ ወይ እንከታተሎ ጸብጻብ።",
|
|
||||||
"title": "ሓገዝ",
|
"title": "ሓገዝ",
|
||||||
"faq": "ብተደጋጋሚ ዝሕተቱ ሕቶታት",
|
"faq": "ብተደጋጋሚ ዝሕተቱ ሕቶታት",
|
||||||
"q1": "ብኸመይ እኸፍል?",
|
"q1": "ብኸመይ እኸፍል?",
|
||||||
|
|
@ -258,12 +249,6 @@
|
||||||
"required": "ኣርእስትን ዘጋጠመን ምላእ።"
|
"required": "ኣርእስትን ዘጋጠመን ምላእ።"
|
||||||
},
|
},
|
||||||
"profile": {
|
"profile": {
|
||||||
"lessonsList": "ትምህርትታትን ፈተናታትን",
|
|
||||||
"account": "ምድላው ሕሳብ",
|
|
||||||
"statTime": "ዝተራእየ ግዜ",
|
|
||||||
"statLessons": "ዝተወድኡ ትምህርትታት",
|
|
||||||
"statCourses": "ኮርሳት",
|
|
||||||
"since": "ካብ {date} ኣባል",
|
|
||||||
"title": "ፕሮፋይል",
|
"title": "ፕሮፋይል",
|
||||||
"details": "ሓበሬታኻ",
|
"details": "ሓበሬታኻ",
|
||||||
"phone": "ተሌፎን",
|
"phone": "ተሌፎን",
|
||||||
|
|
@ -368,38 +353,6 @@
|
||||||
"kit4Note": "ከናፍር",
|
"kit4Note": "ከናፍር",
|
||||||
"workTitle": "ስራሕ ተምሃሮ",
|
"workTitle": "ስራሕ ተምሃሮ",
|
||||||
"workSub": "ብተምሃሮ ሲርኩል ዝተሰርሑ",
|
"workSub": "ብተምሃሮ ሲርኩል ዝተሰርሑ",
|
||||||
"credits": "ምንጪ ስእልታት",
|
"credits": "ምንጪ ስእልታት"
|
||||||
"founder": "መስራቲት፦ <name></name>",
|
|
||||||
"tiktok": "@rezinabrhane ኣብ ቲክቶክ"
|
|
||||||
},
|
|
||||||
"history": {
|
|
||||||
"title": "ታሪኽ",
|
|
||||||
"lead": "ዝረኣኻዮ፣ ዝወዳእካዮን ዝገዛእካዮን ኩሉ።",
|
|
||||||
"done": "“{lesson}” ወዲእካ · {course}",
|
|
||||||
"watched": "“{lesson}” ርኢኻ · {course}",
|
|
||||||
"paid": "{course} ገዚእካ",
|
|
||||||
"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,8 +26,7 @@ const w = dom.window;
|
||||||
await new Promise((r) => setTimeout(r, 2000));
|
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)); }
|
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.
|
// 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]:not([rel=canonical]):not([rel=author]):not([rel=alternate]),script[src]')) // canonical/author/alternate are metadata, never fetched
|
for (const el of w.document.querySelectorAll('link[href],script[src]')) network.push(`${el.tagName.toLowerCase()} ${el.getAttribute('href') ?? el.getAttribute('src')}`);
|
||||||
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 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));
|
const bad = network.filter((n) => !allowed(n));
|
||||||
console.log({ networkAttempts: bad, errors });
|
console.log({ networkAttempts: bad, errors });
|
||||||
|
|
|
||||||
|
|
@ -14,19 +14,13 @@ const b = await puppeteer.launch({ executablePath: '/Applications/Google Chrome.
|
||||||
const problems = []; let clicks = 0;
|
const problems = []; let clicks = 0;
|
||||||
async function open(p, hash, signedOut) {
|
async function open(p, hash, signedOut) {
|
||||||
await p.goto('about:blank');
|
await p.goto('about:blank');
|
||||||
// The app rewrites the hash while booting, and Puppeteer sometimes misses that load's lifecycle event and
|
await p.goto('file://' + file + hash, { waitUntil: 'domcontentloaded' }); await new Promise((r) => setTimeout(r, 500));
|
||||||
// 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) {
|
async function worker(list) {
|
||||||
const p = await b.newPage(); await p.setViewport({ width: 1280, height: 900 });
|
const p = await b.newPage(); await p.setViewport({ width: 1280, height: 900 });
|
||||||
let errs = []; p.on('pageerror', (e) => errs.push(e.message));
|
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((s) => { window.__SEED__ = s; }, seed);
|
||||||
await p.evaluateOnNewDocument(mock);
|
await p.evaluateOnNewDocument(mock);
|
||||||
await p.evaluateOnNewDocument(() => { try { localStorage.setItem('lms.langChosen', '1'); localStorage.setItem('lms.tourDone', '1'); } catch {} });
|
|
||||||
for (const [hash, signedOut] of list) {
|
for (const [hash, signedOut] of list) {
|
||||||
await p.evaluateOnNewDocument((so) => { try { so ? localStorage.setItem('lms.signedOut', '1') : localStorage.removeItem('lms.signedOut'); } catch {} }, !!signedOut);
|
await p.evaluateOnNewDocument((so) => { try { so ? localStorage.setItem('lms.signedOut', '1') : localStorage.removeItem('lms.signedOut'); } catch {} }, !!signedOut);
|
||||||
await open(p, hash, signedOut);
|
await open(p, hash, signedOut);
|
||||||
|
|
|
||||||
|
|
@ -24,10 +24,9 @@ function doPost(e) {
|
||||||
try {
|
try {
|
||||||
const sheet = getSheet();
|
const sheet = getSheet();
|
||||||
const last = sheet.getLastRow();
|
const last = sheet.getLastRow();
|
||||||
// Email (col C) and phone (col D) either may be blank; a match on either one is the same person.
|
const emails = last > 1 ? sheet.getRange(2, 3, last - 1, 1).getValues().map((r) => String(r[0]).toLowerCase()) : [];
|
||||||
const seen = last > 1 ? sheet.getRange(2, 3, last - 1, 2).getValues().some((r) => (row.email && String(r[0]).toLowerCase() === row.email) || (row.phone && String(r[1]).replace(/^'/, '') === row.phone)) : false;
|
if (emails.indexOf(row.email) === -1) {
|
||||||
if (!seen) {
|
sheet.appendRow([new Date().toISOString(), safe(row.name), safe(row.email), "'" + row.phone, safe(row.locale), safe(row.page)]);
|
||||||
sheet.appendRow([new Date().toISOString(), safe(row.name), safe(row.email), row.phone ? "'" + row.phone : '', safe(row.locale), safe(row.page)]);
|
|
||||||
}
|
}
|
||||||
} finally { lock.releaseLock(); }
|
} finally { lock.releaseLock(); }
|
||||||
return reply({ ok: true });
|
return reply({ ok: true });
|
||||||
|
|
@ -44,11 +43,9 @@ function clean(d) {
|
||||||
const name = String(d.name || '').trim().slice(0, 80);
|
const name = String(d.name || '').trim().slice(0, 80);
|
||||||
const email = String(d.email || '').trim().toLowerCase().slice(0, 120);
|
const email = String(d.email || '').trim().toLowerCase().slice(0, 120);
|
||||||
const phone = String(d.phone || '').replace(/[\s()-]/g, '');
|
const phone = String(d.phone || '').replace(/[\s()-]/g, '');
|
||||||
// People sign up by SMS or by email: a name plus at least one valid contact.
|
|
||||||
if (name.length < 2) return { error: 'name' };
|
if (name.length < 2) return { error: 'name' };
|
||||||
if (email && !/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(email)) return { error: 'email' };
|
if (!/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(email)) return { error: 'email' };
|
||||||
if (phone && !/^\+\d{8,15}$/.test(phone)) return { error: 'phone' };
|
if (!/^\+\d{8,15}$/.test(phone)) return { error: 'phone' };
|
||||||
if (!email && !phone) return { error: 'contact' };
|
|
||||||
return { name, email, phone, locale: String(d.locale || '').slice(0, 20), page: String(d.page || '').slice(0, 200) };
|
return { name, email, phone, locale: String(d.locale || '').slice(0, 20), page: String(d.page || '').slice(0, 200) };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
import fs from 'fs'; import vm from 'vm'; import assert from 'assert';
|
import fs from 'fs'; import vm from 'vm'; import assert from 'assert';
|
||||||
const rows = [];
|
const rows = [];
|
||||||
const sheet = { appendRow: (r) => rows.push(r), getLastRow: () => rows.length, setFrozenRows() {},
|
const sheet = { appendRow: (r) => rows.push(r), getLastRow: () => rows.length, setFrozenRows() {},
|
||||||
getRange: (r, c, n, w = 1) => ({ getValues: () => rows.slice(r - 1, r - 1 + n).map((row) => row.slice(c - 1, c - 1 + w)) }) };
|
getRange: (r, c, n) => ({ getValues: () => rows.slice(r - 1, r - 1 + n).map((row) => [row[c - 1]]) }) };
|
||||||
const ctx = {
|
const ctx = {
|
||||||
SpreadsheetApp: { getActiveSpreadsheet: () => ({ getSheetByName: () => (rows.length ? sheet : null), insertSheet: () => sheet }) },
|
SpreadsheetApp: { getActiveSpreadsheet: () => ({ getSheetByName: () => (rows.length ? sheet : null), insertSheet: () => sheet }) },
|
||||||
LockService: { getScriptLock: () => ({ waitLock() {}, releaseLock() {} }) },
|
LockService: { getScriptLock: () => ({ waitLock() {}, releaseLock() {} }) },
|
||||||
|
|
@ -19,14 +19,8 @@ assert.deepEqual(post({ ...ok, email: 'selam@example.com' }), { ok: true }); ass
|
||||||
assert.deepEqual(post({ ...ok, email: 'x@y.co', phone: '0911' }), { ok: false, error: 'phone' });
|
assert.deepEqual(post({ ...ok, email: 'x@y.co', phone: '0911' }), { ok: false, error: 'phone' });
|
||||||
assert.deepEqual(post({ ...ok, email: 'nope' }), { ok: false, error: 'email' });
|
assert.deepEqual(post({ ...ok, email: 'nope' }), { ok: false, error: 'email' });
|
||||||
assert.deepEqual(post({ ...ok, name: ' ' }), { ok: false, error: 'name' });
|
assert.deepEqual(post({ ...ok, name: ' ' }), { ok: false, error: 'name' });
|
||||||
post({ ...ok, email: 'f@y.co', phone: '+251911000222', name: '=HYPERLINK("x")' }); assert.equal(rows.at(-1)[1], '\'=HYPERLINK("x")', 'formula neutralised');
|
post({ ...ok, email: 'f@y.co', name: '=HYPERLINK("x")' }); assert.equal(rows.at(-1)[1], '\'=HYPERLINK("x")', 'formula neutralised');
|
||||||
const n = rows.length; assert.deepEqual(post({ ...ok, email: 'bot@y.co', company: 'spam' }), { ok: true }); assert.equal(rows.length, n, 'honeypot dropped');
|
const n = rows.length; assert.deepEqual(post({ ...ok, email: 'bot@y.co', company: 'spam' }), { ok: true }); assert.equal(rows.length, n, 'honeypot dropped');
|
||||||
assert.deepEqual(ctx.doPost({ postData: { contents: '{bad' } }), { ok: false, error: 'bad_json' });
|
assert.deepEqual(ctx.doPost({ postData: { contents: '{bad' } }), { ok: false, error: 'bad_json' });
|
||||||
assert.deepEqual(ctx.doGet(), { ok: true, count: rows.length - 1 }, 'count excludes the header');
|
assert.deepEqual(ctx.doGet(), { ok: true, count: rows.length - 1 }, 'count excludes the header');
|
||||||
console.log('waitlist checks: all passed');
|
console.log('waitlist checks: all passed');
|
||||||
// SMS or email: either contact alone is enough, neither is an error, and a repeat phone is skipped.
|
|
||||||
assert.deepEqual(post({ name: 'Hana T', phone: '+251922000111' }), { ok: true });
|
|
||||||
const m = rows.length; post({ name: 'Hana T', phone: '+251 922 000 111' }); assert.equal(rows.length, m, 'duplicate phone skipped');
|
|
||||||
assert.deepEqual(post({ name: 'Mimi K', email: 'mimi@example.com' }), { ok: true });
|
|
||||||
assert.deepEqual(post({ name: 'No Contact' }), { ok: false, error: 'contact' });
|
|
||||||
console.log('waitlist sms/email checks: ok');
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user