/[sudobot]/trunk/docs/components/Navbar/Navbar.tsx
ViewVC logotype

Annotation of /trunk/docs/components/Navbar/Navbar.tsx

Parent Directory Parent Directory | Revision Log Revision Log


Revision 626 - (hide annotations)
Sat Sep 7 09:38:45 2024 UTC (6 months, 3 weeks ago) by rakinar2
File MIME type: application/typescript
File size: 1563 byte(s)
chore: sync with git

1 rakinar2 575 import Link from "@/components/Navigation/Link";
2     import styles from "@/styles/Navbar.module.css";
3     import { pages } from "@/utils/pages";
4     import Image from "next/image";
5     import logo from "../../images/sudobot.png";
6     import Search from "../Searching/Search";
7     import NavbarClientSide from "./NavbarClientSide";
8 rakinar2 626 import { NavbarTitle } from "./NavbarTitle";
9 rakinar2 575
10     export default function Navbar() {
11     return (
12     <nav className={styles.nav}>
13     <a className={styles.logoWrapper} href="/">
14     <Image src={logo.src} alt="Logo" height={128} width={128} />
15     <span className="mobile">SudoBot</span>
16 rakinar2 626 <NavbarTitle />
17 rakinar2 575 </a>
18    
19     <ul className={`${styles.ul} desktop`}>
20     {pages.map(link => {
21     const LinkComponent = link.url.startsWith("/") ? Link : "a";
22     return (
23     <li key={`${link.url}_${link.name}`}>
24     <LinkComponent
25     href={link.url}
26     {...(/^http(s?):\/\//gi.test(link.url)
27     ? { target: "_blank", rel: "noreferrer" }
28     : {})}
29     title={link.name}
30     >
31     {link.name}
32     </LinkComponent>
33     </li>
34     );
35     })}
36     </ul>
37    
38     <Search />
39    
40     <NavbarClientSide />
41     </nav>
42     );
43     }

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26