moved menu float-right
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
> **Note**: This application is a fork of [AriaDocs](https://github.com/nisabmohd/Aria-Docs), created by [Nisab Mohd](https://github.com/nisabmohd). DocuBook provides an alternative to the documentation solution found on [Mintlify](https://mintlify.com/), utilizing `.mdx` (Markdown + JSX) for content creation and management.
|
> **Note**: This application is a fork of [AriaDocs](https://github.com/nisabmohd/Aria-Docs), created by [Nisab Mohd](https://github.com/nisabmohd). DocuBook provides an alternative to the documentation solution found on [Mintlify](https://mintlify.com/), utilizing `.mdx` (Markdown + JSX) for content creation and management.
|
||||||
|
|
||||||
[](https://vercel.com/import/project?template=https://github.com/gitfromwildan/docubook)
|
Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/gitfromwildan/docubook)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import Search from "@/components/search";
|
|||||||
import Anchor from "@/components/anchor";
|
import Anchor from "@/components/anchor";
|
||||||
import { SheetLeftbar } from "@/components/leftbar";
|
import { SheetLeftbar } from "@/components/leftbar";
|
||||||
import { SheetClose } from "@/components/ui/sheet";
|
import { SheetClose } from "@/components/ui/sheet";
|
||||||
|
import { Separator } from "@/components/ui/separator";
|
||||||
import docuConfig from "@/docu.json"; // Import JSON
|
import docuConfig from "@/docu.json"; // Import JSON
|
||||||
|
|
||||||
export function Navbar() {
|
export function Navbar() {
|
||||||
@@ -18,13 +19,13 @@ export function Navbar() {
|
|||||||
<div className="hidden sm:flex">
|
<div className="hidden sm:flex">
|
||||||
<Logo />
|
<Logo />
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
<div className="items-center hidden gap-4 text-sm font-medium lg:flex text-muted-foreground">
|
<div className="items-center hidden gap-4 text-sm font-medium lg:flex text-muted-foreground">
|
||||||
<NavMenu />
|
<NavMenu />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<Separator className="hidden sm:flex my-4 h-9" orientation="vertical" />
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="flex items-center gap-2">
|
|
||||||
<Search />
|
<Search />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -36,9 +37,9 @@ export function Logo() {
|
|||||||
const { navbar } = docuConfig; // Extract navbar from JSON
|
const { navbar } = docuConfig; // Extract navbar from JSON
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Link href="/" className="flex items-center gap-2.5">
|
<Link href="/" className="flex items-center gap-1.5">
|
||||||
<Image src={navbar.logo.src} alt={navbar.logo.alt} width="24" height="24" />
|
<Image src={navbar.logo.src} alt={navbar.logo.alt} width="42" height="42" />
|
||||||
<h2 className="font-bold font-code text-md">{navbar.logoText}</h2>
|
<h2 className="font-bold font-code text-lg">{navbar.logoText}</h2>
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,14 +96,14 @@ export default function Search() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<DialogTrigger asChild>
|
<DialogTrigger asChild>
|
||||||
<div className="relative flex-1 cursor-pointer max-w-[160px]">
|
<div className="relative flex-1 cursor-pointer max-w-[140px]">
|
||||||
<SearchIcon className="absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-stone-500 dark:text-stone-400" />
|
<SearchIcon className="absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-stone-500 dark:text-stone-400" />
|
||||||
<Input
|
<Input
|
||||||
className="md:w-full rounded-md dark:bg-background/95 bg-background border h-9 pl-10 pr-0 sm:pr-4 text-sm shadow-sm overflow-ellipsis"
|
className="md:w-full rounded-full dark:bg-background/95 bg-background border h-9 pl-10 pr-0 sm:pr-4 text-sm shadow-sm overflow-ellipsis"
|
||||||
placeholder="Search"
|
placeholder="Search"
|
||||||
type="search"
|
type="search"
|
||||||
/>
|
/>
|
||||||
<div className="flex absolute top-1/2 -translate-y-1/2 right-2 text-xs font-medium font-mono items-center gap-0.5 dark:bg-black dark:border dark:border-white/20 bg-stone-200/50 border border-black/40 p-1 rounded-sm">
|
<div className="flex absolute top-1/2 -translate-y-1/2 right-2 text-xs font-medium font-mono items-center gap-0.5 dark:bg-accent bg-accent text-white px-2 py-0.5 rounded-full">
|
||||||
<CommandIcon className="w-3 h-3" />
|
<CommandIcon className="w-3 h-3" />
|
||||||
<span>K</span>
|
<span>K</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user