Skip to content

Commit 66b84d3

Browse files
fix(docs): add missing hero section styles for homepage
Homepage used custom classes (home-header, home-intro-row, home-stats, quick-start, command-block, etc.) that had no CSS definitions, causing all elements to render unstyled and stacked in a single block. Added styles for: - .home-header: flex row layout with bottom border separator - .home-logo: 48×48 gradient rounded square - .home-title / .home-subtitle: stacked title typography - .home-nav: inline link group - .home-intro-row: two-column intro + language tags row - .home-stats span: pill-style language badges - .quick-start / .command-block: styled code command block - Responsive breakpoint at 768px for mobile stacking Applies to both zh/ and en/ index pages. Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent 762a381 commit 66b84d3

1 file changed

Lines changed: 154 additions & 0 deletions

File tree

docs/.vitepress/theme/styles/vars.css

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,160 @@
626626
color: var(--ck-slate-400);
627627
}
628628

629+
/* === Homepage Hero Section === */
630+
.home-header {
631+
display: flex;
632+
align-items: center;
633+
justify-content: space-between;
634+
padding: 48px 0 24px;
635+
border-bottom: 1px solid var(--vp-c-border);
636+
margin-bottom: 32px;
637+
}
638+
639+
.home-header-left {
640+
display: flex;
641+
align-items: center;
642+
gap: 16px;
643+
}
644+
645+
.home-logo {
646+
width: 48px;
647+
height: 48px;
648+
background: var(--ck-gradient-primary);
649+
color: #fff;
650+
border-radius: 12px;
651+
display: flex;
652+
align-items: center;
653+
justify-content: center;
654+
font-size: 14px;
655+
font-weight: 700;
656+
letter-spacing: 0.5px;
657+
flex-shrink: 0;
658+
}
659+
660+
.home-title {
661+
display: block;
662+
font-size: 22px;
663+
font-weight: 700;
664+
color: var(--vp-c-text-1);
665+
line-height: 1.2;
666+
}
667+
668+
.home-subtitle {
669+
display: block;
670+
font-size: 13px;
671+
color: var(--vp-c-text-3);
672+
margin-top: 2px;
673+
}
674+
675+
.home-nav {
676+
display: flex;
677+
align-items: center;
678+
gap: 24px;
679+
}
680+
681+
.home-nav a {
682+
font-size: 14px;
683+
font-weight: 500;
684+
color: var(--vp-c-brand-1);
685+
text-decoration: none;
686+
transition: opacity 150ms ease;
687+
border-bottom: none;
688+
}
689+
690+
.home-nav a:hover {
691+
opacity: 0.75;
692+
}
693+
694+
.home-intro-row {
695+
display: flex;
696+
align-items: center;
697+
justify-content: space-between;
698+
gap: 32px;
699+
padding: 24px 0 32px;
700+
}
701+
702+
.home-intro {
703+
font-size: 15px;
704+
line-height: 1.7;
705+
color: var(--vp-c-text-2);
706+
max-width: 680px;
707+
}
708+
709+
.home-stats {
710+
display: flex;
711+
align-items: center;
712+
gap: 8px;
713+
flex-shrink: 0;
714+
}
715+
716+
.home-stats span {
717+
font-size: 12px;
718+
font-weight: 600;
719+
color: var(--vp-c-text-2);
720+
padding: 4px 10px;
721+
background: var(--vp-c-bg-soft);
722+
border: 1px solid var(--vp-c-border);
723+
border-radius: 20px;
724+
}
725+
726+
.quick-start {
727+
margin-top: 48px;
728+
padding: 24px 0 48px;
729+
border-top: 1px solid var(--vp-c-border);
730+
}
731+
732+
.quick-start-title {
733+
font-size: 16px;
734+
font-weight: 600;
735+
color: var(--vp-c-text-1);
736+
margin-bottom: 12px;
737+
}
738+
739+
.quick-start-content {
740+
display: flex;
741+
align-items: center;
742+
}
743+
744+
.command-block {
745+
background: var(--vp-c-bg-soft);
746+
border: 1px solid var(--vp-c-border);
747+
border-radius: 8px;
748+
padding: 12px 16px;
749+
font-family: var(--ck-font-mono);
750+
font-size: 13px;
751+
color: var(--vp-c-brand-1);
752+
overflow-x: auto;
753+
width: 100%;
754+
}
755+
756+
.command-block code {
757+
background: transparent;
758+
padding: 0;
759+
border-radius: 0;
760+
font-size: 13px;
761+
color: inherit;
762+
}
763+
764+
@media (max-width: 768px) {
765+
.home-header {
766+
flex-direction: column;
767+
align-items: flex-start;
768+
gap: 16px;
769+
padding: 32px 0 20px;
770+
}
771+
772+
.home-intro-row {
773+
flex-direction: column;
774+
align-items: flex-start;
775+
gap: 16px;
776+
}
777+
778+
.home-stats {
779+
flex-wrap: wrap;
780+
}
781+
}
782+
629783
/* === Homepage Feature Cards === */
630784
.feature-map {
631785
display: grid;

0 commit comments

Comments
 (0)