fix(docs): restore official visual hierarchy and component previews
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
--docs-width: 1400px;
|
||||
--docs-header-height: 96px;
|
||||
--docs-sidebar-width: 220px;
|
||||
--docs-toc-width: 240px;
|
||||
--docs-toc-width: 268px;
|
||||
}
|
||||
html {
|
||||
scroll-padding-top: 154px;
|
||||
@@ -108,7 +108,7 @@ html {
|
||||
border-radius: 0;
|
||||
}
|
||||
.docs-nav-sections nav .hv-link[aria-current="page"] {
|
||||
border-color: var(--foreground);
|
||||
border-color: var(--accent);
|
||||
color: var(--foreground);
|
||||
}
|
||||
.docs-nav-sections .framework {
|
||||
@@ -169,16 +169,17 @@ html {
|
||||
}
|
||||
.sidebar-tree h2 {
|
||||
margin: 0;
|
||||
padding: 8px 12px;
|
||||
font-size: 13px;
|
||||
padding: 4px 8px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.sidebar-tree .hv-link {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
padding: 7px 12px;
|
||||
padding: 8px;
|
||||
margin: 2px 0;
|
||||
font-size: 14px;
|
||||
line-height: 1.5;
|
||||
line-height: 20px;
|
||||
color: var(--muted);
|
||||
border-radius: var(--radius-field);
|
||||
word-break: keep-all;
|
||||
@@ -206,44 +207,34 @@ html {
|
||||
outline: none;
|
||||
}
|
||||
.docs-main > .page-description {
|
||||
font-size: 18px;
|
||||
line-height: 1.65;
|
||||
font-size: 16px;
|
||||
line-height: 24px;
|
||||
color: var(--muted);
|
||||
margin: 0 0 32px;
|
||||
margin: 16px 0 32px;
|
||||
}
|
||||
.docs-main > h1 {
|
||||
font-size: 28px;
|
||||
font-weight: 600;
|
||||
line-height: 1.3;
|
||||
line-height: 42px;
|
||||
letter-spacing: -0.6px;
|
||||
margin: 16px 0;
|
||||
margin: 0;
|
||||
outline: none;
|
||||
}
|
||||
.docs-main .breadcrumb {
|
||||
font-size: 13px;
|
||||
color: var(--muted);
|
||||
}
|
||||
.docs-main .breadcrumb .hv-link {
|
||||
font-size: 13px;
|
||||
color: var(--muted);
|
||||
}
|
||||
.docs-main .breadcrumb [aria-current="page"] {
|
||||
color: var(--foreground);
|
||||
}
|
||||
.source-links {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
margin: -12px 0 32px;
|
||||
margin: -8px 0 32px;
|
||||
}
|
||||
.source-links .hv-link {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 5px 9px;
|
||||
border: 1px solid var(--docs-border);
|
||||
border-radius: 7px;
|
||||
font-size: 12px;
|
||||
padding: 5px 12px;
|
||||
border: 0;
|
||||
border-radius: 999px;
|
||||
background: var(--default);
|
||||
font-size: 14px;
|
||||
color: var(--muted);
|
||||
}
|
||||
.source-links .hv-link:hover {
|
||||
@@ -277,6 +268,7 @@ html {
|
||||
}
|
||||
.toc-links .hv-link {
|
||||
display: block;
|
||||
border-radius: 0;
|
||||
padding: 6px 8px 6px 12px;
|
||||
line-height: 1.5;
|
||||
font-size: 13px;
|
||||
@@ -285,6 +277,9 @@ html {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.toc-links .hv-link[aria-current="location"] {
|
||||
box-shadow: inset 1px 0 var(--foreground);
|
||||
}
|
||||
.toc-links .hv-link.nested {
|
||||
padding-left: 24px;
|
||||
}
|
||||
@@ -348,28 +343,85 @@ html {
|
||||
}
|
||||
.components-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 12px;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
column-gap: 16px;
|
||||
row-gap: 40px;
|
||||
}
|
||||
.component-index-card {
|
||||
padding: 18px;
|
||||
border: 1px solid var(--docs-border);
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 9px;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
overflow: visible;
|
||||
}
|
||||
.component-index-preview {
|
||||
position: relative;
|
||||
height: 198px;
|
||||
overflow: hidden;
|
||||
border: 1px solid var(--separator);
|
||||
border-radius: 12px;
|
||||
}
|
||||
.component-index-card:hover {
|
||||
background: var(--default-soft);
|
||||
.component-index-preview > img,
|
||||
.component-thumbnail-fallback {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
.component-index-card .hv-card__title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
font-size: 14px;
|
||||
.component-thumbnail-dark,
|
||||
.dark .component-thumbnail-light {
|
||||
display: none;
|
||||
}
|
||||
.component-index-card .hv-card__description {
|
||||
margin-top: 6px;
|
||||
.dark .component-thumbnail-dark {
|
||||
display: block;
|
||||
}
|
||||
.component-thumbnail-fallback {
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
align-content: center;
|
||||
}
|
||||
.component-thumbnail-fallback span {
|
||||
display: block;
|
||||
color: var(--muted);
|
||||
font-size: 12px;
|
||||
line-height: 1.6;
|
||||
margin-top: 8px;
|
||||
}
|
||||
.component-index-title {
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
line-height: 24px;
|
||||
color: var(--foreground);
|
||||
}
|
||||
.component-index-title::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.component-index-card:hover .component-index-preview {
|
||||
border-color: var(--muted);
|
||||
}
|
||||
.component-index-card:focus-within .component-index-preview {
|
||||
outline: 2px solid var(--focus);
|
||||
outline-offset: 3px;
|
||||
}
|
||||
@media (max-width: 1023px) {
|
||||
.components-grid {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
@media (max-width: 639px) {
|
||||
.components-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
.component-index-title {
|
||||
order: -1;
|
||||
}
|
||||
}
|
||||
.search-trigger {
|
||||
display: flex;
|
||||
@@ -667,9 +719,6 @@ html {
|
||||
.source-links .hv-link {
|
||||
font-size: 11px;
|
||||
}
|
||||
.components-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
.page-navigation .hv-card {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user