update how the links in the sidebar look
Some checks failed
Deploy / deploy (ubuntu-latest, 2.44.0) (push) Has been cancelled
Some checks failed
Deploy / deploy (ubuntu-latest, 2.44.0) (push) Has been cancelled
Took 40 minutes
This commit is contained in:
parent
137dfacfed
commit
61d052fc62
@ -53,7 +53,7 @@ const DocsFooter = ({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Pages */}
|
{/* Pages */}
|
||||||
<Separator className="my-4" />
|
<Separator className="my-4 bg-separator-gradient" />
|
||||||
<div className="flex justify-between">
|
<div className="flex justify-between">
|
||||||
{/* Previous */}
|
{/* Previous */}
|
||||||
{previous && (
|
{previous && (
|
||||||
|
@ -51,14 +51,15 @@ const CategoryItem = ({
|
|||||||
const hasChildren = Object.keys(node.children).length > 0;
|
const hasChildren = Object.keys(node.children).length > 0;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={`relative ${depth > 0 ? "ml-2.5" : ""} select-none`}>
|
<div className={cn(`relative select-none`, depth > 0 && "ml-2.5")}>
|
||||||
{/* Indentation */}
|
{/* Indentation */}
|
||||||
{depth > 0 && (
|
{depth > 0 && (
|
||||||
<div
|
<div
|
||||||
className={`absolute left-0 top-1 bottom-0 border-l-2 border-muted`}
|
className={cn(
|
||||||
style={{
|
"absolute left-0 bottom-0 border-l-2 border-muted",
|
||||||
height: isLast ? "30px" : "100%",
|
isLast ? "h-[32px]" : "h-[100%]",
|
||||||
}}
|
active && "border-primary"
|
||||||
|
)}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
@ -71,9 +72,10 @@ const CategoryItem = ({
|
|||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
className={cn(
|
className={cn(
|
||||||
`relative px-1.5 ${depth > 0 ? "pl-4" : ""} w-full justify-between`,
|
`relative w-full px-1.5 h-8 text-base justify-between hover:bg-accent/20`,
|
||||||
|
depth > 0 && "pl-4",
|
||||||
active &&
|
active &&
|
||||||
"bg-primary/15 hover:bg-primary/20 text-primary/95 hover:text-primary"
|
"text-primary/95 font-bold hover:text-primary"
|
||||||
)}
|
)}
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
>
|
>
|
||||||
@ -134,7 +136,7 @@ const CategoryItem = ({
|
|||||||
const buildTree = (pages: DocsContentMetadata[]): Record<string, TreeNode> => {
|
const buildTree = (pages: DocsContentMetadata[]): Record<string, TreeNode> => {
|
||||||
const tree: Record<string, TreeNode> = {};
|
const tree: Record<string, TreeNode> = {};
|
||||||
|
|
||||||
pages.forEach((page) => {
|
pages.forEach((page: DocsContentMetadata) => {
|
||||||
const parts: string[] | undefined = page.slug?.split("/");
|
const parts: string[] | undefined = page.slug?.split("/");
|
||||||
let currentLevel = tree;
|
let currentLevel = tree;
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ const SidebarContent = (): ReactElement => {
|
|||||||
|
|
||||||
{/* Theme Switcher */}
|
{/* Theme Switcher */}
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
<Separator className="mb-3" />
|
<Separator className="mb-3 bg-separator-gradient" />
|
||||||
<ThemeSwitcher />
|
<ThemeSwitcher />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -63,6 +63,10 @@ const config: Config = {
|
|||||||
md: "calc(var(--radius) - 2px)",
|
md: "calc(var(--radius) - 2px)",
|
||||||
sm: "calc(var(--radius) - 4px)",
|
sm: "calc(var(--radius) - 4px)",
|
||||||
},
|
},
|
||||||
|
backgroundImage: {
|
||||||
|
"separator-gradient":
|
||||||
|
"linear-gradient(90deg, #161619, hsl(var(--muted)), #161619)",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [require("tailwindcss-animate")],
|
plugins: [require("tailwindcss-animate")],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user