Fix course title overflowing the page on mobile
The course dashboard's <h2>{{ course.name }}</h2> heading had no wrap
protection, and course.name is the raw folder name - unlike lesson
titles (cleaned up via _clean_lesson_name), it's never given real
spaces. Most real course folders are dot-separated scene-release-style
names with no natural break point at all, so the browser had nowhere
to wrap and widened the whole page instead - confirmed live against
the deployed site (page rendered at 1066px on a 375px mobile
viewport). Every other place that shows a long course/lesson name
already truncates correctly via flex + overflow:hidden; this heading
was the one gap.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -134,6 +134,16 @@
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.course-name-heading {
|
||||
/* course.name is the raw folder name, unlike lesson titles
|
||||
(cleaned up via _clean_lesson_name) - real course folders are
|
||||
commonly dot-separated with no spaces at all, so without this
|
||||
the browser has no natural break point and widens the whole
|
||||
page on mobile instead of wrapping. */
|
||||
overflow-wrap: break-word;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.app-footer {
|
||||
background: var(--bg-secondary);
|
||||
border-top: 1px solid var(--border-color);
|
||||
@@ -870,7 +880,7 @@
|
||||
|
||||
<div class="container">
|
||||
<div class="card">
|
||||
<h2>{{ course.name }}</h2>
|
||||
<h2 class="course-name-heading">{{ course.name }}</h2>
|
||||
<div style="display: flex; justify-content: space-between; align-items: center; margin-top: 15px; flex-wrap: wrap; gap: 10px;">
|
||||
<div>
|
||||
<strong>{{ stats.completed_lessons }}/{{ stats.total_lessons }}</strong> lessons completed
|
||||
|
||||
Reference in New Issue
Block a user