From a94514eb6b470e1b4386e354dd0d21b2d7406b70 Mon Sep 17 00:00:00 2001 From: n3p-tun3 Date: Mon, 26 Oct 2026 17:39:10 +0300 Subject: [PATCH 1/6] =?UTF-8?q?feat(course):=20course=20page=20polish=20P1?= =?UTF-8?q?=E2=80=93P5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - P1: sticky buy/continue bar hides while the buy card's button is on screen - P2: price, preview and "lifetime" shown once; button reads "Buy course" - P3: phones drop the tabs and stack overview, curriculum and about in one scroll - P4: owners land on the curriculum with the next lesson's chapter open and an "Up next" card instead of the sales list - P5: instructor tab removed; course count moves to the creator row - i18n: course.about in all locales (om/ti drafts) --- packages/features/src/student.tsx | 75 ++++++++++++++++++------------- packages/features/src/styles.css | 23 ++++++++++ packages/i18n/messages/am.json | 1 + packages/i18n/messages/en.json | 1 + packages/i18n/messages/om.json | 1 + packages/i18n/messages/ti.json | 1 + 6 files changed, 72 insertions(+), 30 deletions(-) diff --git a/packages/features/src/student.tsx b/packages/features/src/student.tsx index 46c2b5f..dac8841 100644 --- a/packages/features/src/student.tsx +++ b/packages/features/src/student.tsx @@ -532,9 +532,19 @@ function CoursePage({ slug }: { slug?: string }) { const t = useTranslations(); const { courses, categories, me, locale, nav, catalogLoaded, toast, ds } = useApp(); const { catName } = useCatalog(); - const [tab, setTab] = useState('overview'); + const [tab, setTab] = useState(null); // null: the viewer's default (curriculum once they own it) + // The sticky bar repeats the buy card's button, so it only shows while that button is off screen (P1). + const [ctaEl, setCtaEl] = useState(null); + const [ctaInView, setCtaInView] = useState(true); // start hidden: the bar slides in once the button is known to be off screen, never flashes out on load 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 + useEffect(() => { + if (!ctaEl || typeof IntersectionObserver === 'undefined') { setCtaInView(false); return; } + // The bottom margin is the bar's own height: a button still underneath the bar doesn't count as visible. + const io = new IntersectionObserver(([e]) => setCtaInView(e.isIntersecting), { rootMargin: '0px 0px -88px 0px' }); + io.observe(ctaEl); + return () => io.disconnect(); + }, [ctaEl]); if (!catalogLoaded) return ; if (!c || !isStudentVisible(c, me)) return nav(`/${locale}/courses`)}>{t('catalog.title')}}>{t('course.notFound')}; const text = ct(c, locale); @@ -549,21 +559,27 @@ function CoursePage({ slug }: { slug?: string }) { const previews = lessons.filter((l) => l.isPreview).length; const cat = categories.find((k) => k.id === c.categoryId); const chapters = [...c.chapters].sort((a, b) => a.sortOrder - b.sortOrder); - const play = mine && r ? `/${locale}/learn/${c.slug}/${r.lesson.id}` : preview ? `/${locale}/learn/${c.slug}/${preview.id}` : null; + // The hero only offers the free preview; once owned, the progress card below carries the one "continue" button (P2). + const play = !mine && preview ? `/${locale}/learn/${c.slug}/${preview.id}` : null; const playLabel = mine && r ? (done ? t('course.watchAgain') : t('course.continue', { n: r.index + 1 })) : t('course.watchPreview'); const share = () => { navigator.clipboard?.writeText(location.href).then(() => toast(t('course.linkCopied')), () => { /* clipboard blocked */ }); }; const teaches = courses.filter((x) => x.instructorName === c.instructorName && isStudentVisible(x, me)).length; // No uploaded cover in the demo → a category photo stands in on the preview card. const photo = c.coverAssetId ? ds.assetUrl(c.coverAssetId) : coursePhoto(c, categories.map((k) => k.id)); - const tabs: [string, string][] = [['overview', t('course.tabOverview')], ['content', t('course.content')], ['instructor', t('course.tabInstructor')]]; + // Owners come back for the curriculum, buyers for the pitch (P4). Desktop shows one tab at a time; + // phones drop the tabs and stack every section in one scroll (P3). + const active = tab ?? (mine ? 'content' : 'overview'); + const tabs: [string, string][] = [['overview', t('course.tabOverview')], ['content', t('course.content')]]; + const nextChapter = mine && r ? chapters.find((ch) => ch.lessons.some((l) => l.id === r.lesson.id))?.id : undefined; const includes: [string, ReactNode][] = [ ['globe', LOCALE_NAMES[c.instructionLocale]], ['video', t('course.lessons', { n: lessons.length })], ['clock', formatDuration(courseDuration(c))], ...(previews ? [['play', t('course.previewLessons', { n: previews })] as [string, ReactNode]] : []), ...(c.assessments?.length ? [['quiz', t('assess.title')] as [string, ReactNode]] : []), - ['shield', t('course.lifetimeAccess')], ]; + const showBar = !!(mine ? r : c.prices.ETB != null && c.status === 'PUBLISHED'); + const barHidden = showBar && ctaInView; return (
@@ -583,13 +599,12 @@ function CoursePage({ slug }: { slug?: string }) {
{lessons.length}{t('course.lessonsLabel')} {formatDuration(courseDuration(c))} - {previews > 0 && {t('course.previewLessons', { n: previews })}}
{(text.subtitle || text.description) &&

{text.subtitle || text.description}

} {play && }
{initials(c.instructorName)} - {t('course.createdBy')}{c.instructorName} + {t('course.createdBy')}{c.instructorName}{t('course.teaches', { n: teaches })} {t('course.lastUpdated')} {fmtDate(c.updatedAt)}
@@ -600,25 +615,24 @@ function CoursePage({ slug }: { slug?: string }) {
{done ? t('course.completed') : t('course.owned')}{p.pct}%
{t('my.lessonsDone', { done: p.done, total: p.total })} - {r &&
} + {r && !done &&

{t('player.upNext')}{r.index + 1}. {lessonTitle(r.lesson, locale)}{clock(r.lesson.durationSec)}

} + {r &&
} : <> - {c.prices.ETB != null &&
{formatMoney(c.prices.ETB, 'ETB')}{t('course.lifetime')}
} -
- + {c.prices.ETB != null &&
{formatMoney(c.prices.ETB, 'ETB')}{t('checkout.lifetime')}
} +
+
- {preview && } -

{t('checkout.lifetime')}

+
+

{t('course.includes')}

+
    {includes.map(([icon, label], k) =>
  • {label}
  • )}
+ {c.sequentialLessons &&

{t('course.sequential')}

} +
} -
-

{t('course.includes')}

-
    {includes.map(([icon, label], k) =>
  • {label}
  • )}
- {c.sequentialLessons &&

{t('course.sequential')}

} -
- {(mine ? r : c.prices.ETB != null && c.status === 'PUBLISHED') &&
+ {showBar &&
{mine && r ? <> {p.pct}%{t('my.lessonsDone', { done: p.done, total: p.total })} @@ -628,25 +642,22 @@ function CoursePage({ slug }: { slug?: string }) { }
} -
+
{pre && !preDone &&
{t('course.prereq', { title: ct(pre, locale).title })}
} -
{tabs.map(([k, label]) => )}
- {tab === 'overview' &&
- {!!text.outcomes?.length && <> -

{t('course.outcomes')}

-
    {text.outcomes.map((o, k) =>
  • {o}
  • )}
- } - {text.description &&

{text.description}

} - {text.audience &&

{t('course.audience')}: {text.audience}

} +
{tabs.map(([k, label]) => )}
+ {!!text.outcomes?.length &&
+

{t('course.outcomes')}

+
    {text.outcomes.map((o, k) =>
  • {o}
  • )}
} - {tab === 'content' &&
+
+

{t('course.content')}

{t('course.lessons', { n: lessons.length })} · {formatDuration(courseDuration(c))}

{chapters.map((ch, i) => { const ls = [...ch.lessons].sort((a, b) => a.sortOrder - b.sortOrder).filter((l) => l.isPublished); if (!ls.length) return null; const d = ls.filter((l) => isCompleted(me, l.id)).length; return ( -
+
{tr(ch.translations, locale)?.title}{d}/{ls.length} · {formatDuration(ls.reduce((s, l) => s + l.durationSec, 0))} {ls.map((l) => )}
@@ -656,8 +667,12 @@ function CoursePage({ slug }: { slug?: string }) { {t('assess.title')}{c.assessments.filter((a) => me?.assessments?.[a.id]?.passed).length}/{c.assessments.length} {c.assessments.map((a) => )}
} +
+ {(text.description || text.audience) &&
+

{t('course.about')}

+ {text.description &&

{text.description}

} + {text.audience &&

{t('course.audience')}: {text.audience}

}
} - {tab === 'instructor' &&
{initials(c.instructorName)}
{c.instructorName}

{t('course.teaches', { n: teaches })}

}
); diff --git a/packages/features/src/styles.css b/packages/features/src/styles.css index 37b9038..1248b1a 100644 --- a/packages/features/src/styles.css +++ b/packages/features/src/styles.css @@ -905,6 +905,29 @@ fieldset[disabled] .quiz-opt { cursor: default; } .cd-bar .btn { border-radius: 999px; min-height: 48px; padding-inline: 22px; } @media (min-width: 1024px) { .cd-bar { display: none; } } +/* ---------- course page polish 2026-10-26 (P1–P5) ---------- */ +/* P1: the bar repeats the buy card's button, so it steps aside while that button is on screen */ +.cd-bar { transition: transform 220ms var(--ease-out), opacity 220ms var(--ease-out); } +.cd-bar[data-hidden="true"] { transform: translateY(100%); opacity: 0; pointer-events: none; } +/* P2: price once, with its terms underneath */ +.cd-price { flex-direction: column; align-items: flex-start; gap: 2px; } +.cd-price > span:last-child { font-weight: 600; color: var(--ink-3); } +/* P4: owners see the next lesson instead of the sales list */ +.cd-next { margin: 0; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--mist); } +.cd-next > span:first-child { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); } +.cd-next > .num { font-size: var(--fs-sm); color: var(--ink-3); } +/* P5: what the instructor tab said, in the creator row */ +.cd-by-n { font-size: 12px; color: var(--ink-3); } +/* P3: desktop keeps tabs (one section at a time); phones drop them and stack every section in one scroll */ +.cd-pane-h { margin-bottom: 4px; } +@media (min-width: 1024px) { .cd-pane[data-active="false"], .cd-pane-h { display: none; } } +@media (max-width: 1023px) { + .cd-tabs { display: none; } + .cd-body { gap: 0; } + .cd-body > .banner { order: -2; } + .cd-body.is-owner > .cd-content { order: -1; } /* P4: owners land on the curriculum */ +} + /* 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); } diff --git a/packages/i18n/messages/am.json b/packages/i18n/messages/am.json index 566c650..6bf63df 100644 --- a/packages/i18n/messages/am.json +++ b/packages/i18n/messages/am.json @@ -151,6 +151,7 @@ "watchAgain": "እንደገና ይመልከቱ", "tabOverview": "አጠቃላይ እይታ", "tabInstructor": "አሠልጣኝ", + "about": "ስለ ኮርሱ", "summary": "ማጠቃለያ", "duration": "ጠቅላላ ርዝመት", "language": "ቋንቋ", diff --git a/packages/i18n/messages/en.json b/packages/i18n/messages/en.json index fa935c7..b197c12 100644 --- a/packages/i18n/messages/en.json +++ b/packages/i18n/messages/en.json @@ -151,6 +151,7 @@ "watchAgain": "Watch again", "tabOverview": "Overview", "tabInstructor": "Instructor", + "about": "About this course", "summary": "Summary", "duration": "Total duration", "language": "Language", diff --git a/packages/i18n/messages/om.json b/packages/i18n/messages/om.json index d4bfeb8..2eaa4a6 100644 --- a/packages/i18n/messages/om.json +++ b/packages/i18n/messages/om.json @@ -151,6 +151,7 @@ "watchAgain": "Irra deebi'ii ilaali", "tabOverview": "Overview", "tabInstructor": "Instructor", + "about": "Waa'ee koorsii kanaa", "summary": "Summary", "duration": "Total duration", "language": "Language", diff --git a/packages/i18n/messages/ti.json b/packages/i18n/messages/ti.json index 164bb58..99e9e43 100644 --- a/packages/i18n/messages/ti.json +++ b/packages/i18n/messages/ti.json @@ -151,6 +151,7 @@ "watchAgain": "እንደገና ርአ", "tabOverview": "Overview", "tabInstructor": "Instructor", + "about": "ብዛዕባ እዚ ኮርስ", "summary": "Summary", "duration": "Total duration", "language": "Language", -- 2.43.0 From a25c02365f844f017e6883028076dcd2f48132ef Mon Sep 17 00:00:00 2001 From: n3p-tun3 Date: Mon, 26 Oct 2026 17:53:35 +0300 Subject: [PATCH 2/6] =?UTF-8?q?feat(course):=20course=20page=20polish=20P6?= =?UTF-8?q?=E2=80=93P10?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - P6: "last updated" moves from the hero to the end of About - P7: quizzes sit inside their chapter; only chapterless quizzes keep a final group, and quiz rows share the lesson row's look - P8: share becomes a glass button in the hero corner; the owned chip joins the stat pills - P9: prerequisite shown in the buy card before purchase instead of a banner below it - P10: lesson rows always number in the title; the circle shows state (play, check, lock, now playing) --- packages/features/src/student.tsx | 41 ++++++++++++++++++------------- packages/features/src/styles.css | 20 ++++++++++++--- 2 files changed, 41 insertions(+), 20 deletions(-) diff --git a/packages/features/src/student.tsx b/packages/features/src/student.tsx index dac8841..0c06fca 100644 --- a/packages/features/src/student.tsx +++ b/packages/features/src/student.tsx @@ -570,6 +570,8 @@ function CoursePage({ slug }: { slug?: string }) { // phones drop the tabs and stack every section in one scroll (P3). const active = tab ?? (mine ? 'content' : 'overview'); const tabs: [string, string][] = [['overview', t('course.tabOverview')], ['content', t('course.content')]]; + const quizzes = c.assessments ?? []; + const finalQuizzes = quizzes.filter((a) => !a.chapterId || !chapters.some((ch) => ch.id === a.chapterId && ch.lessons.some((l) => l.isPublished))); const nextChapter = mine && r ? chapters.find((ch) => ch.lessons.some((l) => l.id === r.lesson.id))?.id : undefined; const includes: [string, ReactNode][] = [ ['globe', LOCALE_NAMES[c.instructionLocale]], @@ -592,20 +594,20 @@ function CoursePage({ slug }: { slug?: string }) { {c.status === 'ARCHIVED' && } - {mine && {done ? t('course.completed') : t('course.owned')}} +

{text.title}

{lessons.length}{t('course.lessonsLabel')} {formatDuration(courseDuration(c))} + {mine && {done ? t('course.completed') : t('course.owned')}}
{(text.subtitle || text.description) &&

{text.subtitle || text.description}

} {play && }
{initials(c.instructorName)} {t('course.createdBy')}{c.instructorName}{t('course.teaches', { n: teaches })} - {t('course.lastUpdated')} {fmtDate(c.updatedAt)}
@@ -615,13 +617,14 @@ function CoursePage({ slug }: { slug?: string }) {
{done ? t('course.completed') : t('course.owned')}{p.pct}%
{t('my.lessonsDone', { done: p.done, total: p.total })} + {pre && !preDone &&

{t('course.prereq', { title: ct(pre, locale).title })}

} {r && !done &&

{t('player.upNext')}{r.index + 1}. {lessonTitle(r.lesson, locale)}{clock(r.lesson.durationSec)}

} - {r &&
} + {r &&
} : <> {c.prices.ETB != null &&
{formatMoney(c.prices.ETB, 'ETB')}{t('checkout.lifetime')}
} + {pre && !preDone &&

{t('course.prereq', { title: ct(pre, locale).title })}

}
-

{t('course.includes')}

@@ -643,7 +646,6 @@ function CoursePage({ slug }: { slug?: string }) {
}
- {pre && !preDone &&
{t('course.prereq', { title: ct(pre, locale).title })}
}
{tabs.map(([k, label]) => )}
{!!text.outcomes?.length &&

{t('course.outcomes')}

@@ -660,18 +662,20 @@ function CoursePage({ slug }: { slug?: string }) {
{tr(ch.translations, locale)?.title}{d}/{ls.length} · {formatDuration(ls.reduce((s, l) => s + l.durationSec, 0))} {ls.map((l) => )} + {quizzes.filter((a) => a.chapterId === ch.id).map((a) => )}
); })} - {!!c.assessments?.length &&
- {t('assess.title')}{c.assessments.filter((a) => me?.assessments?.[a.id]?.passed).length}/{c.assessments.length} - {c.assessments.map((a) => )} + {!!finalQuizzes.length &&
+ {t('assess.title')}{finalQuizzes.filter((a) => me?.assessments?.[a.id]?.passed).length}/{finalQuizzes.length} + {finalQuizzes.map((a) => )}
}
{(text.description || text.audience) &&

{t('course.about')}

{text.description &&

{text.description}

} {text.audience &&

{t('course.audience')}: {text.audience}

} +

{t('course.lastUpdated')} {fmtDate(c.updatedAt)}

}
@@ -687,9 +691,9 @@ function LessonRow({ c, l, current }: { c: Course; l: Lesson; current?: boolean const seen = !done && l.durationSec ? Math.min(100, ((me?.progress?.[l.id]?.maxPositionSec ?? 0) / l.durationSec) * 100) : 0; return ( ); diff --git a/packages/features/src/styles.css b/packages/features/src/styles.css index 1248b1a..f693336 100644 --- a/packages/features/src/styles.css +++ b/packages/features/src/styles.css @@ -798,8 +798,6 @@ fieldset[disabled] .quiz-opt { cursor: default; } .cd-price > span:last-child { font-weight: 700; font-size: var(--fs-sm); color: var(--ink-2); } .cd-cta { display: flex; gap: 10px; } .cd-cta .btn { flex: 1; border-radius: 999px; min-height: 54px; } -.cd-round { flex: none; width: 54px; height: 54px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: background 160ms; } -.cd-round:hover { background: var(--mist); } .cd-buy .btn-ghost.btn-block { border-radius: 999px; } .cd-note { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); padding: 0 4px; } .cd-includes { padding: 6px 4px 4px; display: flex; flex-direction: column; gap: 10px; } @@ -924,9 +922,25 @@ fieldset[disabled] .quiz-opt { cursor: default; } @media (max-width: 1023px) { .cd-tabs { display: none; } .cd-body { gap: 0; } - .cd-body > .banner { order: -2; } .cd-body.is-owner > .cd-content { order: -1; } /* P4: owners land on the curriculum */ } +/* P8: share is a quiet glass button in the hero corner, matching the preview pill */ +.cd-top { flex-wrap: nowrap; align-items: flex-start; } +.cd-top > .crumbs { flex: 1; min-width: 0; } +.cd-top > .row { margin-left: auto; flex-wrap: nowrap; } +.cd-share { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); background: rgba(10, 10, 10, .45); backdrop-filter: blur(8px); color: #fff; cursor: pointer; transition: background-color 160ms ease, transform 160ms var(--ease-out); } +.cd-share:active { transform: scale(.96); } +.cd-head .cd-pill-own { background: rgba(245, 245, 245, .92); border-color: transparent; color: #0A0A0A; } +.cd-head .cd-pill-own svg, .cd-head .cd-pill-own strong { color: #0A0A0A; } +@media (hover: hover) and (pointer: fine) { .cd-share:hover { background: rgba(30, 30, 30, .7); } } +/* P9: the prerequisite, said where the buying decision happens */ +.cd-prereq { margin: 0; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--mist); font-size: var(--fs-sm); color: var(--ink-2); } +.cd-prereq > svg { flex: none; margin-top: 3px; color: var(--ink-3); } +.cd-prereq .link { font-weight: 700; } +/* P6: "last updated" closes the About section */ +.cd-pane .cd-updated { margin: 0; } +/* P7: quiz rows inside chapters reuse the lesson row; their result is a tag, not a block line */ +.lesson-row .lr-tag.quiz-ok, .lesson-row .lr-tag.quiz-todo { display: inline-block; font-weight: 600; } /* help: big ask, three contact doors, FAQ beside the report form */ .help { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 48px); } -- 2.43.0 From 7c9c9d97d53585a1c233dd0f9fccb62d1b1131b5 Mon Sep 17 00:00:00 2001 From: n3p-tun3 Date: Tue, 27 Oct 2026 12:34:36 +0300 Subject: [PATCH 3/6] =?UTF-8?q?feat(home):=20continue=20card=20polish=20H1?= =?UTF-8?q?=E2=80=93H3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - H1: the course photo becomes a short header with the title on it and progress along its bottom edge; the full-width button sits at the card's bottom, within thumb reach - H2: the card leads with the next lesson and its length ("Up next · 5. … · 8 min") - H3: greeting and continue card form one group instead of two sections 64px apart Replaces the old .continue rules instead of layering overrides on top of them. --- packages/features/src/student.tsx | 33 ++++++++++++++++++++----------- packages/features/src/styles.css | 27 ++++++++++++++++++++----- 2 files changed, 44 insertions(+), 16 deletions(-) diff --git a/packages/features/src/student.tsx b/packages/features/src/student.tsx index 0c06fca..35420da 100644 --- a/packages/features/src/student.tsx +++ b/packages/features/src/student.tsx @@ -462,8 +462,10 @@ function Home() { const others = visible.filter((c) => !owns(me, c.id)); return ( <> -

{t('home.hello', { name: me?.name.split(' ')[0] ?? '' })}

- {cont ? : nav(`/${locale}/courses`)}>{t('landing.browse')}}>{t('home.emptyMine')}} +
+

{t('home.hello', { name: me?.name.split(' ')[0] ?? '' })}

+ {cont ? : nav(`/${locale}/courses`)}>{t('landing.browse')}}>{t('home.emptyMine')}} +
{mine.length > 1 &&

{t('nav.myCourses')}

{mine.map((c) => )}
}

{t('home.categories')}

@@ -474,21 +476,30 @@ function Home() { ); } +// H1/H2: a short photo header carries the course and its progress; the body leads with the next lesson and how long +// it takes, with the button at the bottom where a thumb reaches it. function ContinueCard({ c }: { c: Course }) { const t = useTranslations(); - const { me, locale, nav } = useApp(); + const { me, locale, nav, ds, categories } = useApp(); const p = courseProgress(c, me); const r = resumePoint(c, me); + const finished = p.pct === 100; + const photo = c.coverAssetId ? ds.assetUrl(c.coverAssetId) : coursePhoto(c, categories.map((k) => k.id)); return (
- -
- {t('home.continue')} -

{ct(c, locale).title}

- {r &&

{r.index + 1}. {lessonTitle(r.lesson, locale)}

} -
- {t('my.lessonsDone', { done: p.done, total: p.total })} - {r &&
} +
+ + {t('home.continue')} +

{ct(c, locale).title}

+ +
+
+ {r &&

+ {finished ? t('course.completed') : t('player.upNext')} + {r.index + 1}. {lessonTitle(r.lesson, locale)} + {formatDuration(r.lesson.durationSec)} · {t('my.lessonsDone', { done: p.done, total: p.total })} +

} + {r && }
); diff --git a/packages/features/src/styles.css b/packages/features/src/styles.css index f693336..0c28817 100644 --- a/packages/features/src/styles.css +++ b/packages/features/src/styles.css @@ -171,9 +171,28 @@ textarea.input { min-height: 110px; resize: vertical; } .ccard h3 { font-size: var(--fs-lg); } .ccard:hover h3 { text-decoration: underline; text-underline-offset: 4px; } .ccard .meta { font-size: var(--fs-sm); color: var(--ink-3); } -.continue { display: grid; gap: 20px; grid-template-columns: 1fr; padding: 20px; border-radius: var(--r-lg); background: var(--ink); color: var(--on-ink); } -.continue .bar { background: rgba(255, 255, 255, .18); } -@media (min-width: 720px) { .continue { grid-template-columns: 260px 1fr; align-items: center; } } +/* home: greeting + continue card (H1–H3). The card is a dark photo surface in both themes. */ +.home-top { display: flex; flex-direction: column; gap: 16px; } +.continue { display: grid; grid-template-columns: 1fr; border-radius: 22px; overflow: hidden; background: #111; color: #F5F5F5; } +.continue-media { position: relative; isolation: isolate; aspect-ratio: 16 / 9; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; padding: 16px 18px 22px; } +.continue-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 25%; z-index: -2; } +.continue-media::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 10, 10, 0) 30%, rgba(10, 10, 10, .82)); } +.continue-kicker, .continue-next > span:first-child { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(245, 245, 245, .75); } +.continue-media h2 { font-size: var(--fs-xl); line-height: 1.15; letter-spacing: -.02em; color: #fff; } +.continue-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .2); } +.continue-bar > i { display: block; height: 100%; background: #fff; } +.continue-body { display: flex; flex-direction: column; gap: 16px; padding: 16px 18px 18px; } +.continue-next { margin: 0; display: flex; flex-direction: column; gap: 2px; } +.continue-next strong { font-size: var(--fs-lg); line-height: 1.3; } +.continue-next > .num { font-size: var(--fs-sm); color: #A3A3A3; } +.continue-body .btn { width: 100%; border-radius: 999px; } +.continue .btn-accent { background: #F5F5F5; color: #0A0A0A; } +@media (min-width: 720px) { + .continue { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } + .continue-media { aspect-ratio: auto; min-height: 260px; padding: 20px 24px 26px; } + .continue-body { justify-content: center; padding: 24px 28px; } + .continue-body .btn { align-self: flex-start; width: auto; } +} .chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; } .chip { flex: none; border: 1px solid var(--line); background: var(--paper); padding: 8px 14px; border-radius: var(--r-pill); cursor: pointer; font-weight: 700; color: var(--ink-2); } .chip[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); } @@ -467,8 +486,6 @@ h1:lang(en), h2:lang(en), h3:lang(en), h1:lang(om), h2:lang(om), h3:lang(om), .b .cta-band { position: relative; overflow: hidden; background: #111; color: #fff; } .cta-band::after { content: ''; position: absolute; right: -60px; bottom: -120px; width: 280px; height: 280px; border-radius: 50%; background: #fff; opacity: .12; pointer-events: none; } .cta-band > * { position: relative; z-index: 1; } -.continue { background: #111; color: #fff; } -.continue .bar > i { background: #fff; } .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); } .pay-mark { width: 48px; height: 28px; flex: none; display: grid; place-items: center; } .pay-mark img { width: 48px; height: 28px; object-fit: contain; } -- 2.43.0 From 529f35cdf6b82b35b105ad82ad258203bd4a7291 Mon Sep 17 00:00:00 2001 From: n3p-tun3 Date: Tue, 27 Oct 2026 12:43:23 +0300 Subject: [PATCH 4/6] =?UTF-8?q?feat(cards):=20course=20card=20polish=20C1?= =?UTF-8?q?=E2=80=93C4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - C1: one quiet "lessons · length" line; "new course" / student count becomes a tag on the photo - C2: round arrow removed; the whole card is the target and the footer is just the price - C3: owned cards show the next lesson and its length above the progress bar - C4: home Featured becomes a swipe rail of tall cards, the next one peeking past the edge Card styles were spread over five overriding passes; they now live in one block. --- packages/features/src/student.tsx | 21 ++++++--- packages/features/src/styles.css | 74 +++++++++++++++---------------- 2 files changed, 49 insertions(+), 46 deletions(-) diff --git a/packages/features/src/student.tsx b/packages/features/src/student.tsx index 35420da..c762ea5 100644 --- a/packages/features/src/student.tsx +++ b/packages/features/src/student.tsx @@ -35,22 +35,29 @@ const ct = (c: Course, l: Locale) => tr(c.translations, l) ?? { title: c.slug, d const lessonTitle = (l: Lesson, loc: Locale) => tr(l.translations, loc)?.title ?? ''; const lessonNumber = (c: Course, id: string) => publishedLessons(c).findIndex((l) => l.id === id) + 1; -function CourseCard({ c }: { c: Course }) { +// C1: one quiet "lessons · length" line, with "new course" / student count as a tag on the photo. +// C2: the whole card is the target, so the footer is just the price. C3: owned cards say what's next. +// `tall` keeps the photo-on-top layout on phones too (the home Featured rail, C4). +function CourseCard({ c, tall }: { c: Course; tall?: boolean }) { const { locale, nav, me, signedIn } = useApp(); const t = useTranslations(); const { catName } = useCatalog(); const p = courseProgress(c, me); const mine = signedIn && owns(me, c.id); + const r = mine ? resumePoint(c, me) : null; + const tag = c.enrolledCount ? t('course.enrolled', { n: c.enrolledCount }) : t('course.newCourse'); return ( - @@ -471,7 +478,7 @@ function Home() {

{t('home.categories')}

{categories.filter((c) => c.isActive).map((c) => )}
- {others.length > 0 &&

{others.some((c) => c.isFeatured) ? t('home.featured') : t('home.new')}

{[...others.filter((c) => c.isFeatured), ...others.filter((c) => !c.isFeatured)].slice(0, 4).map((c) => )}
} + {others.length > 0 &&

{others.some((c) => c.isFeatured) ? t('home.featured') : t('home.new')}

{[...others.filter((c) => c.isFeatured), ...others.filter((c) => !c.isFeatured)].slice(0, 4).map((c) => )}
} ); } diff --git a/packages/features/src/styles.css b/packages/features/src/styles.css index 0c28817..befa066 100644 --- a/packages/features/src/styles.css +++ b/packages/features/src/styles.css @@ -167,10 +167,6 @@ textarea.input { min-height: 110px; resize: vertical; } .tone-sand { background: var(--tone-sand); } .tone-sage { background: var(--tone-sage); } .tone-ink { background: var(--tone-ink); } .grid-cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } .grid-cards > * { max-width: 440px; } -.ccard { display: flex; flex-direction: column; gap: 10px; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; min-width: 0; } -.ccard h3 { font-size: var(--fs-lg); } -.ccard:hover h3 { text-decoration: underline; text-underline-offset: 4px; } -.ccard .meta { font-size: var(--fs-sm); color: var(--ink-3); } /* home: greeting + continue card (H1–H3). The card is a dark photo surface in both themes. */ .home-top { display: flex; flex-direction: column; gap: 16px; } .continue { display: grid; grid-template-columns: 1fr; border-radius: 22px; overflow: hidden; background: #111; color: #F5F5F5; } @@ -280,11 +276,6 @@ table.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); } /* compact course rows on phones (§11.2: catalog cards are compact; the Continue card stays wide) */ @media (max-width: 599px) { .grid-cards { grid-template-columns: 1fr; gap: 14px; } - .ccard { display: grid; grid-template-columns: 104px 1fr; gap: 2px 14px; align-items: start; } - .ccard .cover { grid-row: 1 / span 4; aspect-ratio: 1; padding: 8px; } - .ccard .cover .ttl { font-size: 13px; -webkit-line-clamp: 4; } - .ccard .cover .pill { display: none; } - .ccard h3 { font-size: var(--fs-base); } } /* audit fixes: no sideways scroll at 360–400px */ @media (max-width: 600px) { .stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .stat { min-width: 0; } .stat .lbl { flex-wrap: wrap; letter-spacing: .03em; } .stat .lbl span { overflow-wrap: anywhere; } } @@ -292,7 +283,6 @@ table.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); } .cover .ttl { margin-top: auto; } .hero-card .cover { aspect-ratio: 16 / 10; } .hero-card .cover .ttl { font-size: clamp(24px, 3.2vw, 36px); } -.ccard .cover { aspect-ratio: 16 / 9; } /* touch targets: 40px minimum everywhere, 44px on touch screens */ .btn-sm { min-height: 40px; } @media (pointer: coarse) { .btn-sm, .controls button, .controls select { min-height: 44px; min-width: 44px; } .lesson-row { min-height: 56px; } } @@ -382,22 +372,6 @@ h1:lang(en), h2:lang(en), h3:lang(en), h1:lang(om), h2:lang(om), h3:lang(om), .b .cta-band { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; padding: 36px; border-radius: 24px; background: var(--ink); color: var(--on-ink); } .cta-band h2 { font-size: var(--fs-xl); } .cta-band p { opacity: .8; } -/* course cards */ -.ccard { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px; gap: 0; transition: box-shadow .2s, transform .2s; } -.ccard:hover { box-shadow: var(--shadow-soft); transform: translateY(-2px); border-color: transparent; } -.ccard:hover h3 { text-decoration: none; } -.ccard-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 8px 6px; min-width: 0; } -.ccard .meta { display: flex; gap: 14px; flex-wrap: wrap; } -.ccard .meta > span { display: inline-flex; align-items: center; gap: 5px; } -.ccard-by { font-size: var(--fs-sm); color: var(--ink-2); } -.ccard-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; margin-top: 4px; border-top: 1px solid var(--line); } -.ccard-cta { font-size: var(--fs-sm); font-weight: 700; padding: 6px 12px; border-radius: var(--r-pill); border: 1px solid var(--line); } -.ccard:hover .ccard-cta { background: var(--ink); color: var(--on-ink); border-color: var(--ink); } -@media (max-width: 599px) { - .ccard { padding: 8px; grid-template-columns: 96px 1fr; gap: 0 12px; } - .ccard .cover { grid-row: auto; } - .ccard-body { padding: 2px 0; gap: 4px; } .ccard-by { display: none; } .ccard-foot { padding-top: 8px; } .ccard-cta { display: none; } -} /* course page */ .c-page { display: flex; flex-direction: column; gap: 20px; } @@ -563,8 +537,6 @@ fieldset[disabled] .quiz-opt { cursor: default; } .thumb .cover .ttl { font-size: 15px; line-height: 1.3; -webkit-line-clamp: 2; } /* phone course rows: square thumbnail that shows the title instead of an empty swatch */ @media (max-width: 599px) { - .ccard .cover { aspect-ratio: 1; padding: 8px; } - .ccard .cover .ttl { font-size: 13px; line-height: 1.3; -webkit-line-clamp: 3; max-width: 100%; } .my-row .btn { flex: 1 1 100%; } } .prog-head .grow { flex: 1 1 160px; } @@ -1080,18 +1052,42 @@ fieldset[disabled] .quiz-opt { cursor: default; } @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; } +/* ---------- course card (C1–C4, 2026-10-27): the one place card styles live ---------- + Photo on top with the category and a "new course" / students tag on it; one quiet info line; the footer is the + price, or progress plus the next lesson once owned. Phones show a compact row unless the card is .ccard-tall. */ +.ccard { display: flex; flex-direction: column; min-width: 0; padding: 0; text-align: start; cursor: pointer; color: inherit; background: var(--paper); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; } +.ccard .cover { aspect-ratio: 16 / 9; 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; } } +.ccard-tag { position: absolute; z-index: 1; left: 10px; bottom: 10px; padding: 3px 10px; border-radius: 999px; background: rgba(10, 10, 10, .62); backdrop-filter: blur(8px); color: #F5F5F5; font-size: 12px; font-weight: 600; white-space: nowrap; } +.ccard-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 14px; min-width: 0; flex: 1; } +.ccard h3 { font-size: var(--fs-lg); line-height: 1.25; letter-spacing: -.02em; } +.ccard .meta { font-size: var(--fs-sm); color: var(--ink-3); } +.ccard-by { font-size: var(--fs-sm); color: var(--ink-2); } +.ccard-foot { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); } +.ccard-foot > strong { font-size: var(--fs-lg); } +.ccard-next { font-size: var(--fs-sm); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } +.ccard-next b { color: var(--ink); font-weight: 700; } +.ccard-prog { display: flex; align-items: center; gap: 10px; } +@media (hover: hover) and (pointer: fine) { + .ccard:hover { box-shadow: var(--shadow-soft); transform: translateY(-2px); border-color: transparent; } + .ccard:hover .cover img { transform: scale(1.05); } +} +/* phones: compact row (square thumbnail beside the text), except tall cards in a rail */ +@media (max-width: 599px) { + .ccard:not(.ccard-tall) { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 0 12px; align-items: start; padding: 8px; border-radius: 18px; } + .ccard:not(.ccard-tall) .cover { aspect-ratio: 1; border-radius: 12px; padding: 8px; } + .ccard:not(.ccard-tall) .cover .pill { display: none; } + .ccard:not(.ccard-tall) .ccard-tag { left: 6px; right: 6px; bottom: 6px; padding: 2px 6px; font-size: 11px; text-align: center; overflow: hidden; text-overflow: ellipsis; } + .ccard:not(.ccard-tall) .ccard-body { padding: 2px 0; gap: 4px; } + .ccard:not(.ccard-tall) h3 { font-size: var(--fs-base); } + .ccard:not(.ccard-tall) .ccard-by { display: none; } + .ccard:not(.ccard-tall) .ccard-foot { padding-top: 8px; gap: 6px; } +} +/* C4: home Featured is a swipe rail of tall cards; the next card peeks past the edge */ +.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; padding-bottom: 4px; } +.rail::-webkit-scrollbar { display: none; } +.rail > * { scroll-snap-align: start; } +@media (max-width: 599px) { .rail { grid-auto-columns: 78%; gap: 12px; margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; } } /* ---------- 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; } -- 2.43.0 From fd382359c027503dade83370075668f15e662977 Mon Sep 17 00:00:00 2001 From: n3p-tun3 Date: Tue, 27 Oct 2026 17:31:26 +0300 Subject: [PATCH 5/6] =?UTF-8?q?feat(catalog):=20catalog=20polish=20CT1?= =?UTF-8?q?=E2=80=93CT3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - CT1: chip rows scroll without a visible scrollbar; a faded edge hints there's more (also applies to the category chips on home) - CT2: search filters on every keystroke (no 300ms debounce) and gets a search icon, a clear button and Escape-to-clear - CT3: "Taught in" filter next to the result count, listing only languages the visible courses are taught in; the empty state offers "Clear filters" - i18n: catalog.clearSearch, taughtIn, anyLanguage, clearFilters, emptyLanguage (om/ti drafts) --- packages/features/src/student.tsx | 34 +++++++++++++++++++++++-------- packages/features/src/styles.css | 17 +++++++++++++++- packages/i18n/messages/am.json | 7 ++++++- packages/i18n/messages/en.json | 7 ++++++- packages/i18n/messages/om.json | 7 ++++++- packages/i18n/messages/ti.json | 7 ++++++- 6 files changed, 65 insertions(+), 14 deletions(-) diff --git a/packages/features/src/student.tsx b/packages/features/src/student.tsx index c762ea5..e55c8e2 100644 --- a/packages/features/src/student.tsx +++ b/packages/features/src/student.tsx @@ -519,27 +519,43 @@ function Catalog({ categorySlug }: { categorySlug?: string }) { const { categories, locale, nav, catalogLoaded } = useApp(); const { visible, catName } = useCatalog(); const [q, setQ] = useState(''); - const [dq, setDq] = useState(''); - useEffect(() => { const id = setTimeout(() => setDq(q.trim().toLowerCase()), 300); return () => clearTimeout(id); }, [q]); + const [lang, setLang] = useState(''); // '' = any language the course is taught in (CT3) + const searchRef = useRef(null); + const dq = q.trim().toLowerCase(); // the list is in memory: filter on every keystroke, no debounce (CT2) const cat = categories.find((c) => c.slug === categorySlug); - const list = visible.filter((c) => (!cat || c.categoryId === cat.id) && (!dq || [ + const langs = [...new Set(visible.map((c) => c.instructionLocale))]; + const list = visible.filter((c) => (!cat || c.categoryId === cat.id) && (!lang || c.instructionLocale === lang) && (!dq || [ ...Object.values(c.translations).map((x) => x?.title ?? ''), c.instructorName, ...Object.values(categories.find((k) => k.id === c.categoryId)?.translations ?? {}).map((x) => x?.name ?? ''), ].some((s) => s.toLowerCase().includes(dq)))); + const clear = () => { setQ(''); searchRef.current?.focus(); }; return (

{cat ? catName(cat.id) : t('catalog.title')}

-
); } diff --git a/packages/features/src/styles.css b/packages/features/src/styles.css index befa066..36cfc51 100644 --- a/packages/features/src/styles.css +++ b/packages/features/src/styles.css @@ -189,7 +189,22 @@ textarea.input { min-height: 110px; resize: vertical; } .continue-body { justify-content: center; padding: 24px 28px; } .continue-body .btn { align-self: flex-start; width: auto; } } -.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; } +/* CT1: chip rows scroll without a visible scrollbar; the faded edge says there's more */ +.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); } +.chips::-webkit-scrollbar { display: none; } +@media (max-width: 599px) { .chips { margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; mask-image: linear-gradient(to right, transparent, #000 16px, #000 calc(100% - 32px), transparent); } } +/* CT2: search with an icon and a clear button (the browser's own cancel glyph is hidden so there's only one) */ +.search { position: relative; display: block; } +.search > svg { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--ink-3); pointer-events: none; } +.search .input { min-height: 48px; padding-inline: 42px 46px; border-radius: 14px; } +.search .input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; } +.search-clear { position: absolute; right: 4px; top: 50%; translate: 0 -50%; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--ink-3); cursor: pointer; } +@media (hover: hover) and (pointer: fine) { .search-clear:hover { color: var(--ink); background: var(--mist); } } +/* CT3: result count with the "taught in" filter beside it */ +.catalog-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; } +.catalog-lang { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--ink-3); } +.catalog-lang select { min-height: 40px; padding: 6px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-weight: 600; font-size: var(--fs-sm); cursor: pointer; } +@media (pointer: coarse) { .catalog-lang select { font-size: 16px; } } /* iOS zooms into anything smaller */ .chip { flex: none; border: 1px solid var(--line); background: var(--paper); padding: 8px 14px; border-radius: var(--r-pill); cursor: pointer; font-weight: 700; color: var(--ink-2); } .chip[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); } diff --git a/packages/i18n/messages/am.json b/packages/i18n/messages/am.json index 6bf63df..ea7fb04 100644 --- a/packages/i18n/messages/am.json +++ b/packages/i18n/messages/am.json @@ -124,7 +124,12 @@ "all": "ሁሉም", "count": "{n} ኮርሶች", "empty": "ከ«{q}» ጋር የሚዛመድ ኮርስ የለም። አጠር ያለ ቃል ይሞክሩ።", - "emptyCategory": "በዚህ ምድብ እስካሁን ኮርስ የለም።" + "emptyCategory": "በዚህ ምድብ እስካሁን ኮርስ የለም።", + "clearSearch": "ፍለጋውን አጽዳ", + "taughtIn": "የማስተማሪያ ቋንቋ", + "anyLanguage": "ማንኛውም ቋንቋ", + "clearFilters": "ማጣሪያዎችን አጽዳ", + "emptyLanguage": "በዚህ ቋንቋ እስካሁን ኮርስ የለም።" }, "course": { "buyShort": "ኮርሱን ይግዙ", diff --git a/packages/i18n/messages/en.json b/packages/i18n/messages/en.json index b197c12..0621ccb 100644 --- a/packages/i18n/messages/en.json +++ b/packages/i18n/messages/en.json @@ -124,7 +124,12 @@ "all": "All", "count": "{n, plural, one {# course} other {# courses}}", "empty": "No courses match “{q}”. Try a shorter word.", - "emptyCategory": "No courses in this category yet." + "emptyCategory": "No courses in this category yet.", + "clearSearch": "Clear search", + "taughtIn": "Taught in", + "anyLanguage": "Any language", + "clearFilters": "Clear filters", + "emptyLanguage": "No courses in this language here yet." }, "course": { "buyShort": "Buy course", diff --git a/packages/i18n/messages/om.json b/packages/i18n/messages/om.json index 2eaa4a6..148b2da 100644 --- a/packages/i18n/messages/om.json +++ b/packages/i18n/messages/om.json @@ -124,7 +124,12 @@ "all": "Hunda", "count": "Koorsii {n}", "empty": "Koorsiin “{q}” wajjin walsimu hin jiru. Jecha gabaabaa yaali.", - "emptyCategory": "Ramaddii kana keessa ammatti koorsiin hin jiru." + "emptyCategory": "Ramaddii kana keessa ammatti koorsiin hin jiru.", + "clearSearch": "Barbaacha haqi", + "taughtIn": "Afaan barsiisaa", + "anyLanguage": "Afaan kamiyyuu", + "clearFilters": "Calaltuu haqi", + "emptyLanguage": "Afaan kanaan koorsiin ammaaf hin jiru." }, "course": { "buyShort": "Koorsii bitadhu", diff --git a/packages/i18n/messages/ti.json b/packages/i18n/messages/ti.json index 99e9e43..90fdd06 100644 --- a/packages/i18n/messages/ti.json +++ b/packages/i18n/messages/ti.json @@ -124,7 +124,12 @@ "all": "ኩሉ", "count": "{n} ኮርሳት", "empty": "ምስ «{q}» ዝሰማማዕ ኮርስ የለን። ሓጺር ቃል ፈትን።", - "emptyCategory": "ኣብዚ ምድብ ክሳብ ሕጂ ኮርስ የለን።" + "emptyCategory": "ኣብዚ ምድብ ክሳብ ሕጂ ኮርስ የለን።", + "clearSearch": "ምድላይ ኣጽሪ", + "taughtIn": "ቋንቋ ምምሃር", + "anyLanguage": "ዝኾነ ቋንቋ", + "clearFilters": "መጻረዪታት ኣጽሪ", + "emptyLanguage": "ብዚ ቋንቋ ክሳብ ሕጂ ኮርስ የለን።" }, "course": { "buyShort": "ኮርስ ግዝእ", -- 2.43.0 From 67650698bf2bede5e48ddf431a2966137674cd13 Mon Sep 17 00:00:00 2001 From: n3p-tun3 Date: Tue, 27 Oct 2026 17:42:48 +0300 Subject: [PATCH 6/6] =?UTF-8?q?feat(player):=20lesson=20player=20polish=20?= =?UTF-8?q?L1=E2=80=93L7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - L1: focus mode while watching: site links and the marketing footer are hidden - L2: the video comes first (edge to edge on phones, right under the header); course, chapter and lesson title sit under it, the course name doubling as the way back - L3: the lesson bar's next button reads "Next" so it no longer wraps - L4: when a lesson ends, "up next" appears over the video with a 5-second countdown (play now / cancel / Escape); the card below the video only shows after cancelling - L5: the notes card only appears for lessons that have notes, not the course blurb - L6: the "5 / 7" button opens the lesson list as a bottom sheet instead of scrolling the page away from the video; picking a lesson closes it - L7: chapter markers are round like lesson markers - The sidebar and the sheet share one CourseContents component - i18n: player.nextShort, playNow, autoNext (om/ti drafts) --- packages/features/src/student.tsx | 136 ++++++++++++++++++++---------- packages/features/src/styles.css | 37 +++++++- packages/i18n/messages/am.json | 3 + packages/i18n/messages/en.json | 3 + packages/i18n/messages/om.json | 3 + packages/i18n/messages/ti.json | 3 + 6 files changed, 139 insertions(+), 46 deletions(-) diff --git a/packages/features/src/student.tsx b/packages/features/src/student.tsx index e55c8e2..bab0400 100644 --- a/packages/features/src/student.tsx +++ b/packages/features/src/student.tsx @@ -99,9 +99,10 @@ export function StudentApp() { const tabs: [string, string, string][] = [['', 'home', t('nav.home')], ['courses', 'grid', t('nav.courses')], ['my', 'book', t('nav.myCourses')], ['help', 'help', t('nav.help')], ['profile', 'user', t('nav.profile')]]; const links = tabs.filter(([p]) => p !== 'profile' && (p !== 'my' || signedIn)); const current = (s: string) => (s === section || (s === 'courses' && (section === 'course')) || (s === 'profile' && (section === 'progress' || section === 'history')) ? 'page' : undefined); + const focus = section === 'learn'; // L1: watching a lesson drops the site links and the marketing footer return ( -
+
@@ -142,7 +143,7 @@ export function StudentApp() { {settings.maintenanceBanner &&
{settings.maintenanceBanner}
} -