Files
SnapOtter/apps/docs/.vitepress/theme/github-stars.css
T
SnapOtter 7cb8d912e8 fix(docs): rewrite homepage layout with proper visual hierarchy
Rewrote all homepage CSS overrides from scratch:
- Brand name at 44px with gradient, subtitle at 34px (clear hierarchy)
- Feature cards at 14px/13px with 20px padding (readable, not cramped)
- 3-column feature grid with equal-height rows
- Removed VitePress 128px default gap before footer
- Trimmed Local AI feature description to balance card heights

Entire page fits in one viewport without scrolling.
2026-06-08 13:29:15 +08:00

259 lines
4.9 KiB
CSS

/* Homepage layout: order sections and remove VitePress default 128px gap */
.VPHome {
display: flex;
flex-direction: column;
margin-bottom: 0 !important;
}
.VPHome > .VPHomeHero {
order: 0;
}
.VPHome > .vp-doc {
order: 1;
}
.VPHome > .VPHomeFeatures {
order: 2;
}
/* Hero: center content, tighten padding */
.VPHero {
padding-top: calc(var(--vp-nav-height) + 20px) !important;
padding-bottom: 10px !important;
}
.VPHero .main {
display: flex !important;
flex-direction: column !important;
align-items: center !important;
text-align: center !important;
max-width: 100% !important;
}
.VPHero .main .name.clip {
font-size: 44px !important;
line-height: 1.1 !important;
max-width: none !important;
}
.VPHero .main .text {
font-size: 34px !important;
line-height: 1.15 !important;
max-width: none !important;
}
.VPHero .main .tagline {
font-size: 16px !important;
line-height: 1.5 !important;
padding-top: 6px !important;
max-width: 520px !important;
}
.VPHero .main .actions {
padding-top: 14px !important;
justify-content: center !important;
}
/* Quick start command banner */
.quick-start-banner {
max-width: 960px;
margin: 0 auto 12px;
padding: 0 24px;
text-align: center;
}
.quick-start-banner div[class*="language-"] {
margin: 0;
border-radius: 10px;
}
/* Features: 3-column grid, no extra section padding */
.VPHomeFeatures {
padding-top: 0 !important;
padding-bottom: 0 !important;
}
.VPFeatures .container {
max-width: 1152px !important;
}
.VPFeatures .items {
display: grid !important;
grid-template-columns: repeat(3, 1fr) !important;
gap: 12px !important;
}
.VPFeatures .item.grid-6 {
width: 100% !important;
padding: 0 !important;
}
.VPFeature {
padding: 20px !important;
height: 100% !important;
}
.VPFeature .title {
font-size: 14px !important;
font-weight: 600 !important;
}
.VPFeature .details {
font-size: 13px !important;
line-height: 1.5 !important;
}
/* Footer */
.VPFooter {
padding: 12px 24px !important;
}
.VPFooter .message,
.VPFooter .copyright {
font-size: 12px !important;
}
@media (max-width: 768px) {
.VPFeatures .items {
grid-template-columns: 1fr !important;
}
.VPHero .main .name.clip {
font-size: 32px !important;
}
.VPHero .main .text {
font-size: 28px !important;
}
}
/* Hide the three-dots extra menu - its contents are now in the navbar directly */
.VPNavBarExtra {
display: none !important;
}
/* Also hide the default appearance toggle since we render our own */
.VPNavBarAppearance {
display: none !important;
}
/* Right side of navbar: toggle + GitHub button */
.nav-bar-right {
display: flex;
align-items: center;
gap: 12px;
margin-left: 16px;
}
/* GitHub button group */
.github-btn-wrapper {
display: flex;
align-items: stretch;
height: 30px;
}
.github-btn {
display: flex;
align-items: center;
gap: 6px;
padding: 0 10px;
font-size: 12px;
font-weight: 600;
line-height: 30px;
color: var(--vp-c-text-1);
background: var(--vp-c-bg-soft);
border: 1px solid var(--vp-c-divider);
border-radius: 6px;
text-decoration: none;
transition: border-color 0.25s, background 0.25s;
white-space: nowrap;
}
.github-btn:hover {
background: var(--vp-c-bg-mute);
border-color: var(--vp-c-text-3);
}
.github-icon {
opacity: 0.85;
}
.github-btn-label {
margin-top: -1px;
}
/* Star count badge - attached to right side of button */
.github-btn-count {
display: flex;
align-items: center;
padding: 0 8px;
font-size: 12px;
font-weight: 600;
line-height: 30px;
color: var(--vp-c-text-2);
background: var(--vp-c-bg);
border: 1px solid var(--vp-c-divider);
border-left: none;
border-radius: 0 6px 6px 0;
text-decoration: none;
transition: color 0.25s;
white-space: nowrap;
}
.github-btn-count:hover {
color: var(--vp-c-brand-1);
}
/* When count is present, left-button gets flat right edge */
.github-btn-wrapper .github-btn:first-child:not(:last-child) {
border-radius: 6px 0 0 6px;
}
/* Fund Development button */
.fund-btn {
display: flex;
align-items: center;
gap: 6px;
padding: 0 10px;
height: 30px;
font-size: 12px;
font-weight: 600;
line-height: 30px;
color: #db2777;
background: rgba(219, 39, 119, 0.08);
border: 1px solid rgba(219, 39, 119, 0.3);
border-radius: 6px;
text-decoration: none;
transition: border-color 0.25s, background 0.25s;
white-space: nowrap;
}
.fund-btn:hover {
background: rgba(219, 39, 119, 0.15);
border-color: rgba(219, 39, 119, 0.5);
}
.fund-icon {
flex-shrink: 0;
}
.dark .fund-btn {
color: #f472b6;
background: rgba(244, 114, 182, 0.08);
border-color: rgba(244, 114, 182, 0.25);
}
.dark .fund-btn:hover {
background: rgba(244, 114, 182, 0.15);
border-color: rgba(244, 114, 182, 0.4);
}
/* Hide stars and fund button on small screens, keep toggle */
@media (max-width: 640px) {
.github-btn-wrapper,
.fund-btn {
display: none;
}
}