Files
SnapOtter/apps/docs/.vitepress/theme/github-stars.css
T
SnapOtter 143feadb49 fix(docs): fix hero name size and eliminate remaining scroll
The .name and .clip are the same element (class="name clip"), not
nested, so .name .clip selector never matched. Use .name.clip instead.
Also remove VitePress default 128px margin-bottom on .VPHome that was
pushing the footer below the viewport.
2026-06-08 13:20:08 +08:00

258 lines
4.5 KiB
CSS

/* Move the docker command banner between hero and features */
.VPHome {
display: flex;
flex-direction: column;
margin-bottom: 0 !important;
}
.VPHome > .VPHomeHero {
order: 0;
}
.VPHome > .vp-doc {
order: 1;
}
.VPHome > .VPHomeFeatures {
order: 2;
}
/* Compact hero: reduce padding so entire page fits in one viewport */
.VPHero {
padding-top: calc(var(--vp-nav-height) + 16px) !important;
padding-bottom: 8px !important;
}
.VPHero .main {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
max-width: 100%;
}
.VPHero .main .name.clip {
font-size: 32px;
line-height: 1.15;
max-width: none;
}
.VPHero .main .text {
font-size: 32px;
line-height: 1.15;
max-width: none;
}
.VPHero .main .tagline {
font-size: 15px;
line-height: 1.45;
padding-top: 4px;
max-width: 520px;
}
.VPHero .main .actions {
padding-top: 12px;
justify-content: center;
}
/* Quick start command banner on homepage */
.quick-start-banner {
max-width: 960px;
margin: 0 auto 10px;
padding: 0 24px;
text-align: center;
}
.quick-start-banner div[class*="language-"] {
margin: 0;
border-radius: 10px;
}
/* Compact 3-column feature grid */
.VPHomeFeatures {
padding-top: 0 !important;
padding-bottom: 0 !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 18px;
height: 100%;
}
.VPFeature .title {
font-size: 13.5px;
line-height: 1.3;
}
.VPFeature .details {
font-size: 12px;
line-height: 1.45;
}
.VPFooter {
padding: 10px 24px !important;
}
.VPFooter .message,
.VPFooter .copyright {
font-size: 12px;
}
@media (max-width: 768px) {
.VPFeatures .items {
grid-template-columns: 1fr !important;
}
.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;
}
/* 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;
}
}