feat: improve section pages with GitBook-style layout and landing page

- Add side-by-side layout for section pages (text left, code right)
- Include educational content with code examples for CSS, HTML, Tailwind
- Add section overviews explaining each technology
- Make header level pill clickable to return to last lesson
- Update landing page with "How It Works" steps and features section
- Improve code block readability with GitHub-dark color scheme
- Add prominent topic links with SEO-friendly accessible text
- Add responsive grid layout that stacks on mobile

🤖 Generated with [Claude Code](https://claude.com/claude-code)
This commit is contained in:
2026-01-15 11:52:26 +01:00
parent 512f716054
commit a8410df42a
3 changed files with 702 additions and 49 deletions

View File

@@ -149,6 +149,15 @@ kbd {
color: var(--text-muted);
white-space: nowrap;
margin-left: var(--spacing-sm);
text-decoration: none;
transition:
background 0.2s,
color 0.2s;
}
.header-level-pill:hover {
background: var(--primary-bg-medium);
color: var(--primary-color);
}
.header-module-name {
@@ -1618,6 +1627,120 @@ input:checked + .toggle-slider::before {
font-weight: 500;
}
/* Landing About Section */
.landing-about {
padding: 3rem 1rem;
text-align: center;
}
.landing-about h2 {
font-size: 1.75rem;
color: var(--primary-dark);
margin-bottom: 2rem;
}
.about-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: 2rem;
text-align: left;
}
.about-item {
text-align: center;
}
.about-icon {
display: inline-flex;
align-items: center;
justify-content: center;
width: 2.5rem;
height: 2.5rem;
background: var(--primary-color);
color: white;
font-weight: 700;
font-size: 1.1rem;
border-radius: 50%;
margin-bottom: 1rem;
}
.about-item h3 {
font-size: 1rem;
color: var(--primary-dark);
margin-bottom: 0.5rem;
}
.about-item p {
color: var(--light-text);
line-height: 1.6;
}
/* Landing Features */
.landing-features {
padding: 2rem 1rem;
max-width: 800px;
margin: 0 auto;
}
.feature-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 3rem;
}
.feature-text h3 {
font-size: 1rem;
color: var(--primary-dark);
margin-bottom: 0.5rem;
}
.feature-text p {
color: var(--light-text);
line-height: 1.6;
font-size: 0.95rem;
}
@media (max-width: 600px) {
.feature-row {
grid-template-columns: 1fr;
gap: 1.5rem;
}
}
/* Landing CTA */
.landing-cta {
text-align: center;
padding: 2rem 1rem 3rem;
}
.cta-button {
display: inline-block;
padding: 1rem 2.5rem;
background: var(--primary-color);
color: white;
text-decoration: none;
border-radius: var(--border-radius-md);
font-weight: 600;
font-size: 1.1rem;
transition:
background 0.2s,
transform 0.2s,
box-shadow 0.2s;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.cta-button:hover {
background: var(--primary-dark);
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.cta-sub {
color: var(--light-text);
font-size: 0.875rem;
margin-top: 1rem;
}
/* ================= SECTION PAGE ================= */
.section-page {
flex: 1;
@@ -1654,6 +1777,172 @@ input:checked + .toggle-slider::before {
margin-bottom: var(--spacing-xs);
}
.section-content {
max-width: 1200px;
margin: 0 auto;
}
/* Section Intro - Educational Content (GitBook-style side-by-side) */
.section-intro {
padding: 0 var(--spacing-md);
}
/* Section Overview - intro paragraph */
.section-overview {
padding: 1.5rem 0 2rem;
border-bottom: 1px solid var(--border-color);
margin-bottom: 0.5rem;
}
.section-overview p {
color: var(--text-color);
line-height: 1.7;
margin-bottom: 1rem;
max-width: 85ch;
}
.section-overview p:last-child {
margin-bottom: 0;
}
.section-overview strong {
color: var(--primary-dark);
}
.section-overview code {
background: var(--primary-bg-light);
color: var(--primary-dark);
padding: 0.1rem 0.35rem;
border-radius: 4px;
font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
font-size: 0.85em;
}
/* Topic Row - side by side layout */
.topic-row {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 2rem;
padding: 2rem 0;
border-bottom: 1px solid var(--border-color);
align-items: start;
}
.topic-row:last-child {
border-bottom: none;
}
.topic-text h2 {
font-size: 1.25rem;
color: var(--primary-dark);
margin: 0 0 0.75rem;
}
.topic-text h3 {
font-size: 1rem;
color: var(--primary-dark);
margin: 0 0 0.5rem;
}
.topic-text p {
color: var(--text-color);
line-height: 1.6;
margin: 0 0 1rem;
}
.topic-text p:last-child {
margin-bottom: 0;
}
.topic-link {
display: inline-flex;
align-items: center;
gap: 0.5rem;
margin-top: 1.25rem;
padding: 0.75rem 1.5rem;
background: var(--primary-color);
color: white;
text-decoration: none;
border-radius: var(--border-radius-md);
font-size: 1rem;
font-weight: 600;
transition:
background 0.2s,
transform 0.2s,
box-shadow 0.2s;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.topic-link:hover {
background: var(--primary-dark);
transform: translateY(-1px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}
.topic-link::after {
content: "→";
transition: transform 0.2s;
}
.topic-link:hover::after {
transform: translateX(3px);
}
/* Inline code in topic text */
.topic-text code {
background: var(--primary-bg-light);
color: var(--primary-dark);
padding: 0.15rem 0.4rem;
border-radius: 4px;
font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
font-size: 0.9em;
}
/* Code Examples */
.topic-code {
position: sticky;
top: 1rem;
}
.code-block {
background: #0d1117;
border-radius: var(--border-radius-md);
border: 1px solid #30363d;
overflow: hidden;
}
.code-block pre {
margin: 0;
padding: 1rem;
overflow-x: auto;
}
.code-block code {
font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
font-size: 0.8rem;
line-height: 1.6;
color: #e6edf3;
white-space: pre;
}
.code-caption {
font-size: 0.75rem;
color: var(--light-text);
margin-top: 0.5rem;
}
/* Responsive: stack on mobile */
@media (max-width: 900px) {
.topic-row {
grid-template-columns: 1fr;
gap: 1rem;
}
.topic-code {
position: static;
}
}
/* Module Grid */
.module-grid {
display: grid;