Skip to content

Commit 2cf3779

Browse files
committed
docs: align visuals
1 parent 2466177 commit 2cf3779

File tree

7 files changed

+41
-81
lines changed

7 files changed

+41
-81
lines changed

apps/docs/src/app/globals.css

Lines changed: 28 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -4,79 +4,50 @@
44
@apply bg-[#151c26];
55
}
66

7-
body,
8-
.nextra-nav-container-blur,
9-
.nextra-sidebar-footer,
10-
.nextra-toc-footer {
11-
@apply bg-transparent;
7+
html,
8+
body {
9+
height: auto;
1210
}
1311

1412
pre {
15-
@apply mt-4 mb-4;
13+
@apply my-4;
1614
}
1715

18-
.nextra-content,
19-
.nextra-content.x\:w-full {
16+
article main,
17+
article main.x\:w-full {
2018
font-size: 1rem;
2119
}
2220

23-
.nextra-content h2,
24-
.nextra-content.x\:w-full h2 {
25-
font-size: 1.7rem !important;
26-
@apply !border-none;
27-
}
28-
29-
.nextra-content h2 + p,
30-
.nextra-content h3 + p {
31-
@apply !mt-2;
32-
}
33-
34-
.nextra-content.x\:w-full {
35-
@apply max-w-5xl mx-auto;
36-
}
37-
38-
.nextra-sidebar-container .active a {
39-
@apply light:bg-slate-100;
40-
}
41-
42-
.nextra-sidebar-container {
43-
@apply w-224px;
44-
}
45-
46-
.nextra-nav-container nav,
47-
.nextra-nav-container + div {
48-
@apply max-w-1408px;
49-
}
50-
51-
.nextra-nav-container a:last-of-type svg {
52-
@apply w-20px;
53-
}
54-
55-
.nextra-nav-container button div svg {
56-
@apply size-16px;
21+
header {
22+
& a:last-of-type svg {
23+
@apply size-20px;
24+
}
25+
& button svg {
26+
@apply size-16px;
27+
}
5728
}
5829

5930
.nextra-toc {
6031
@apply w-224px;
61-
}
6232

63-
.nextra-toc a {
64-
@apply font-normal;
65-
}
66-
67-
.nextra-toc p {
68-
@apply shadow-none;
69-
}
33+
& a {
34+
@apply font-normal;
35+
}
7036

71-
.nextra-scrollbar a.x\:text-primary-800 {
72-
@apply font-medium text-slate-800 dark:text-slate-200;
37+
& p {
38+
@apply shadow-none;
39+
}
7340
}
7441

7542
.nextra-sidebar-footer,
7643
.nextra-toc-footer {
7744
display: none;
7845
}
7946

47+
.nextra-breadcrumb {
48+
@apply mb-sm;
49+
}
50+
8051
.nextra-code {
8152
@apply !my-0;
8253
}
@@ -85,26 +56,12 @@ pre {
8556
@apply bg-slate-50;
8657
}
8758

88-
.nextra-breadcrumb {
89-
@apply !mb-4;
90-
}
91-
92-
@media only screen and (max-width: 768px) {
93-
.nextra-sidebar-container {
94-
@apply w-full;
59+
.nextra-scrollbar {
60+
& [aria-current="true"] {
61+
@apply text-text;
9562
}
96-
}
9763

98-
@media only screen and (max-width: 1024px) {
99-
.nextra-toc {
100-
display: none !important;
64+
& [aria-current="false"] {
65+
@apply text-textSubtle;
10166
}
10267
}
103-
104-
[aria-current="true"].nextra-focus {
105-
@apply font-medium text-text;
106-
}
107-
108-
[aria-current="false"].nextra-focus {
109-
@apply text-textSubtle;
110-
}

apps/docs/src/app/layout.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ export const metadata = {
3737
} satisfies NextraMetadata;
3838

3939
const navbar = (
40-
<Navbar logo={<UIKitLogo />}>
40+
<Navbar
41+
logo={<UIKitLogo />}
42+
projectLink="https://github.com/lumada-design/hv-uikit-react"
43+
>
4144
<ThemeSwitch lite />
4245
<ThemeSwitcher />
4346
</Navbar>

apps/docs/src/components/Footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export const Footer = () => {
4848
const year = new Date().getFullYear();
4949

5050
return (
51-
<footer className="py-lg border-t border-bgPage">
51+
<footer className="py-lg border-t border-border">
5252
<div className="max-w-1400px mx-auto px-md">
5353
<div className="flex flex-col md:flex-row md:justify-between space-y-md md:space-y-0">
5454
{/* Logo Section with More Space */}

apps/docs/src/components/Header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export async function Header({ params, ...playgroundProps }: HeaderProps) {
1717
const meta = await getComponentData(params);
1818

1919
return (
20-
<div>
20+
<div className="[&:not(:has([data-tab=usage]))_~_*]:hidden">
2121
<Description meta={meta} />
2222
<Suspense fallback={null}>
2323
<Tabs meta={meta} playgroundProps={{ ...playgroundProps, meta }} />

apps/docs/src/components/code/Playground.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export const Playground = ({
112112
{/* Component preview and controls */}
113113
<div className="grid grid-cols-[2fr_1fr] border rounded-t-round">
114114
{/* Preview Area */}
115-
<DocsProvider className="grid place-items-center p-sm h-full">
115+
<DocsProvider className="grid place-items-center rounded-inherit p-sm h-full">
116116
{decoratorClassName ? (
117117
<div className={decoratorClassName}>{componentElement}</div>
118118
) : (

apps/docs/src/components/usage/Classes.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const Classes = ({ meta }: { meta: ComponentMeta }) => {
2828
);
2929

3030
return (
31-
<div className="flex flex-col">
31+
<div className="grid">
3232
<HvTypography variant="title3">{meta.component} classes</HvTypography>
3333
<HvTypography className="mt-xs mb-md">
3434
The following classes are available in the component{" "}

apps/docs/src/components/usage/Tabs.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use client";
22

33
import { usePathname, useRouter, useSearchParams } from "next/navigation";
4-
import { HvContainer, HvTab, HvTabs } from "@hitachivantara/uikit-react-core";
4+
import { HvTab, HvTabs } from "@hitachivantara/uikit-react-core";
55

66
import { ComponentMeta } from "../../utils/component";
77
import { Playground, PlaygroundProps } from "../code/Playground";
@@ -24,7 +24,7 @@ export function Tabs({
2424
const tab = (searchParams.get("tab") as TabId) || "usage";
2525

2626
return (
27-
<div className="pt-md">
27+
<>
2828
<HvTabs
2929
variant="fullWidth"
3030
value={tab}
@@ -39,13 +39,13 @@ export function Tabs({
3939
<HvTab value="props" label="Props" />
4040
<HvTab value="classes" label="Classes" />
4141
</HvTabs>
42-
<HvContainer disableGutters className="mb-lg">
42+
<div className="mb-lg" data-tab={tab}>
4343
{tab === "usage" && playgroundProps && (
4444
<Playground {...playgroundProps} />
4545
)}
4646
{tab === "props" && <Props meta={meta} />}
4747
{tab === "classes" && <Classes meta={meta} />}
48-
</HvContainer>
49-
</div>
48+
</div>
49+
</>
5050
);
5151
}

0 commit comments

Comments
 (0)