diff --git a/packages/features/src/student.tsx b/packages/features/src/student.tsx index 46c2b5f..bab0400 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 ( - @@ -92,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 ( -
+
@@ -135,7 +143,7 @@ export function StudentApp() { {settings.maintenanceBanner &&
{settings.maintenanceBanner}
} -