fix(docs): compact homepage layout to fit in single viewport

Reduce hero padding and font sizes, center tagline and action buttons,
switch feature cards from 2-column to 3-column grid, and tighten all
section spacing so the entire docs homepage is visible without scrolling.
This commit is contained in:
SnapOtter
2026-06-08 12:21:51 +08:00
parent 7db6bb97da
commit 2fb37f0fb6
+96 -1
View File
@@ -16,10 +16,45 @@
order: 2;
}
/* Compact hero: reduce padding so entire page fits in one viewport */
.VPHero {
padding-top: calc(var(--vp-nav-height) + 20px) !important;
padding-bottom: 12px !important;
text-align: center;
}
.VPHero .main {
max-width: 100%;
}
.VPHero .main .name,
.VPHero .main .name .clip {
font-size: 28px;
line-height: 1.2;
}
.VPHero .main .text {
font-size: 32px;
line-height: 1.2;
}
.VPHero .main .tagline {
font-size: 15px;
line-height: 1.4;
padding-top: 4px;
max-width: 560px;
margin: 0 auto;
}
.VPHero .main .actions {
padding-top: 12px;
justify-content: center;
}
/* Quick start command banner on homepage */
.quick-start-banner {
max-width: 960px;
margin: 0 auto 48px;
margin: 0 auto 12px;
padding: 0 24px;
text-align: center;
}
@@ -29,6 +64,66 @@
border-radius: 10px;
}
/* Compact 3-column feature grid */
.VPHomeFeatures {
padding-top: 0 !important;
padding-bottom: 8px !important;
}
.VPFeatures .container {
max-width: 1100px;
}
.VPFeatures .items {
display: grid !important;
grid-template-columns: repeat(3, 1fr) !important;
gap: 10px !important;
}
.VPFeatures .item.grid-6 {
width: 100%;
padding: 0;
}
.VPFeature {
padding: 16px;
}
.VPFeature .title {
font-size: 13px;
line-height: 1.3;
}
.VPFeature .details {
font-size: 11.5px;
line-height: 1.4;
}
.VPFooter {
padding: 12px 24px;
}
.VPFooter .message,
.VPFooter .copyright {
font-size: 12px;
line-height: 1.4;
}
@media (max-width: 768px) {
.VPFeatures .items {
grid-template-columns: 1fr !important;
}
.VPHero .main .name,
.VPHero .main .name .clip {
font-size: 24px;
}
.VPHero .main .text {
font-size: 26px;
}
}
/* Hide the three-dots extra menu - its contents are now in the navbar directly */
.VPNavBarExtra {
display: none !important;