mirror of
https://github.com/Sosokker/B2D-Ventures.git
synced 2025-12-20 14:34:05 +01:00
style: add site footer and put nav in container
This commit is contained in:
parent
e4c3275102
commit
0b87f66ce7
@ -6,6 +6,7 @@ import "@/app/globals.css";
|
|||||||
|
|
||||||
import { NavigationBar } from "@/components/navigationBar/nav";
|
import { NavigationBar } from "@/components/navigationBar/nav";
|
||||||
import { Toaster } from "react-hot-toast";
|
import { Toaster } from "react-hot-toast";
|
||||||
|
import { SiteFooter } from "@/components/siteFooter";
|
||||||
|
|
||||||
const montserrat = Montserrat({
|
const montserrat = Montserrat({
|
||||||
subsets: ["latin"],
|
subsets: ["latin"],
|
||||||
@ -39,6 +40,7 @@ export default function RootLayout({ children }: RootLayoutProps) {
|
|||||||
<div className="flex-1 bg-background">{children}</div>
|
<div className="flex-1 bg-background">{children}</div>
|
||||||
</div>
|
</div>
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
|
<SiteFooter />
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
</ReactQueryClientProvider>
|
</ReactQueryClientProvider>
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import { cn } from "@/lib/utils";
|
|||||||
import { Separator } from "@/components/ui/separator";
|
import { Separator } from "@/components/ui/separator";
|
||||||
import { ThemeToggle } from "@/components/theme-toggle";
|
import { ThemeToggle } from "@/components/theme-toggle";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { useRouter } from 'next/navigation';
|
import { useRouter } from "next/navigation";
|
||||||
import {
|
import {
|
||||||
NavigationMenu,
|
NavigationMenu,
|
||||||
NavigationMenuContent,
|
NavigationMenuContent,
|
||||||
@ -46,10 +46,8 @@ const landings = [
|
|||||||
route: "/crm-landing",
|
route: "/crm-landing",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
const ListItem = React.forwardRef<
|
const ListItem = React.forwardRef<React.ElementRef<"a">, React.ComponentPropsWithoutRef<"a">>(
|
||||||
React.ElementRef<"a">,
|
({ className, title, children, ...props }, ref) => {
|
||||||
React.ComponentPropsWithoutRef<"a">
|
|
||||||
>(({ className, title, children, ...props }, ref) => {
|
|
||||||
return (
|
return (
|
||||||
<li>
|
<li>
|
||||||
<NavigationMenuLink asChild>
|
<NavigationMenuLink asChild>
|
||||||
@ -59,18 +57,16 @@ const ListItem = React.forwardRef<
|
|||||||
"block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",
|
"block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",
|
||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}>
|
||||||
>
|
|
||||||
<div className="text-sm font-medium leading-none">{title}</div>
|
<div className="text-sm font-medium leading-none">{title}</div>
|
||||||
<hr />
|
<hr />
|
||||||
<p className="line-clamp-2 text-sm leading-snug text-muted-foreground">
|
<p className="line-clamp-2 text-sm leading-snug text-muted-foreground">{children}</p>
|
||||||
{children}
|
|
||||||
</p>
|
|
||||||
</a>
|
</a>
|
||||||
</NavigationMenuLink>
|
</NavigationMenuLink>
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
ListItem.displayName = "ListItem";
|
ListItem.displayName = "ListItem";
|
||||||
|
|
||||||
const unAuthenticatedComponents = () => {
|
const unAuthenticatedComponents = () => {
|
||||||
@ -104,11 +100,7 @@ const authenticatedComponents = () => {
|
|||||||
<Wallet />
|
<Wallet />
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
<Button
|
<Button variant="outline" size="icon" className="overflow-hidden rounded-full">
|
||||||
variant="outline"
|
|
||||||
size="icon"
|
|
||||||
className="overflow-hidden rounded-full"
|
|
||||||
>
|
|
||||||
<Avatar>
|
<Avatar>
|
||||||
<AvatarImage src="https://api.dicebear.com/9.x/pixel-art/svg" />
|
<AvatarImage src="https://api.dicebear.com/9.x/pixel-art/svg" />
|
||||||
<AvatarFallback>1</AvatarFallback>
|
<AvatarFallback>1</AvatarFallback>
|
||||||
@ -144,7 +136,7 @@ export function NavigationBar() {
|
|||||||
}, [loading]);
|
}, [loading]);
|
||||||
|
|
||||||
const handleKeyDown = async (k: React.KeyboardEvent<HTMLInputElement>) => {
|
const handleKeyDown = async (k: React.KeyboardEvent<HTMLInputElement>) => {
|
||||||
if (k.key === 'Enter') {
|
if (k.key === "Enter") {
|
||||||
const query = (k.target as HTMLInputElement).value.trim();
|
const query = (k.target as HTMLInputElement).value.trim();
|
||||||
if (query) {
|
if (query) {
|
||||||
router.push(`/find?query=${encodeURIComponent(query)}`);
|
router.push(`/find?query=${encodeURIComponent(query)}`);
|
||||||
@ -177,14 +169,13 @@ export function NavigationBar() {
|
|||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
<header className="sticky top-0 flex flex-wrap w-full bg-card text-sm py-3 border-b-2 border-border z-50">
|
<header className="sticky top-0 flex flex-wrap w-full bg-card text-sm py-3 border-b-2 border-border z-50">
|
||||||
<nav className="max-w-[85rem] w-full mx-auto px-4">
|
<nav className="max-w-screen-xl w-full mx-auto px-4">
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<div className="flex flex-col">
|
<div className="flex flex-col">
|
||||||
<Link
|
<Link
|
||||||
className="flex-none text-xl font-semibold dark:text-white focus:outline-none focus:opacity-80"
|
className="flex-none text-xl font-semibold dark:text-white focus:outline-none focus:opacity-80"
|
||||||
href="/"
|
href="/"
|
||||||
aria-label="Brand"
|
aria-label="Brand">
|
||||||
>
|
|
||||||
<span className="inline-flex items-center gap-x-2 text-xl font-semibold dark:text-white">
|
<span className="inline-flex items-center gap-x-2 text-xl font-semibold dark:text-white">
|
||||||
<Image src="./logo.svg" alt="logo" width={50} height={50} />
|
<Image src="./logo.svg" alt="logo" width={50} height={50} />
|
||||||
B2DVentures
|
B2DVentures
|
||||||
@ -196,17 +187,11 @@ export function NavigationBar() {
|
|||||||
<NavigationMenu>
|
<NavigationMenu>
|
||||||
<NavigationMenuList>
|
<NavigationMenuList>
|
||||||
<NavigationMenuItem>
|
<NavigationMenuItem>
|
||||||
<NavigationMenuTrigger className="text-base">
|
<NavigationMenuTrigger className="text-base">Businesses</NavigationMenuTrigger>
|
||||||
Businesses
|
|
||||||
</NavigationMenuTrigger>
|
|
||||||
<NavigationMenuContent>
|
<NavigationMenuContent>
|
||||||
<ul className="grid w-[400px] ">
|
<ul className="grid w-[400px] ">
|
||||||
{businessComponents.map((component) => (
|
{businessComponents.map((component) => (
|
||||||
<ListItem
|
<ListItem key={component.title} title={component.title} href={component.href}>
|
||||||
key={component.title}
|
|
||||||
title={component.title}
|
|
||||||
href={component.href}
|
|
||||||
>
|
|
||||||
{component.description}
|
{component.description}
|
||||||
</ListItem>
|
</ListItem>
|
||||||
))}
|
))}
|
||||||
@ -215,17 +200,11 @@ export function NavigationBar() {
|
|||||||
</NavigationMenuItem>
|
</NavigationMenuItem>
|
||||||
|
|
||||||
<NavigationMenuItem>
|
<NavigationMenuItem>
|
||||||
<NavigationMenuTrigger className="text-base font-medium ">
|
<NavigationMenuTrigger className="text-base font-medium ">Projects</NavigationMenuTrigger>
|
||||||
Projects
|
|
||||||
</NavigationMenuTrigger>
|
|
||||||
<NavigationMenuContent>
|
<NavigationMenuContent>
|
||||||
<ul className="grid w-[400px] ">
|
<ul className="grid w-[400px] ">
|
||||||
{projectComponents.map((component) => (
|
{projectComponents.map((component) => (
|
||||||
<ListItem
|
<ListItem key={component.title} title={component.title} href={component.href}>
|
||||||
key={component.title}
|
|
||||||
title={component.title}
|
|
||||||
href={component.href}
|
|
||||||
>
|
|
||||||
{component.description}
|
{component.description}
|
||||||
</ListItem>
|
</ListItem>
|
||||||
))}
|
))}
|
||||||
@ -234,17 +213,11 @@ export function NavigationBar() {
|
|||||||
</NavigationMenuItem>
|
</NavigationMenuItem>
|
||||||
|
|
||||||
<NavigationMenuItem>
|
<NavigationMenuItem>
|
||||||
<NavigationMenuTrigger className="text-base">
|
<NavigationMenuTrigger className="text-base">Blogs</NavigationMenuTrigger>
|
||||||
Blogs
|
|
||||||
</NavigationMenuTrigger>
|
|
||||||
<NavigationMenuContent>
|
<NavigationMenuContent>
|
||||||
<ul className="grid w-[400px] ">
|
<ul className="grid w-[400px] ">
|
||||||
{blogComponents.map((component) => (
|
{blogComponents.map((component) => (
|
||||||
<ListItem
|
<ListItem key={component.title} title={component.title} href={component.href}>
|
||||||
key={component.title}
|
|
||||||
title={component.title}
|
|
||||||
href={component.href}
|
|
||||||
>
|
|
||||||
{component.description}
|
{component.description}
|
||||||
</ListItem>
|
</ListItem>
|
||||||
))}
|
))}
|
||||||
@ -253,19 +226,13 @@ export function NavigationBar() {
|
|||||||
</NavigationMenuItem>
|
</NavigationMenuItem>
|
||||||
|
|
||||||
<NavigationMenuItem>
|
<NavigationMenuItem>
|
||||||
<NavigationMenuLink
|
<NavigationMenuLink className="text-base font-medium" href="docs">
|
||||||
className="text-base font-medium"
|
|
||||||
href="docs"
|
|
||||||
>
|
|
||||||
Docs
|
Docs
|
||||||
</NavigationMenuLink>
|
</NavigationMenuLink>
|
||||||
</NavigationMenuItem>
|
</NavigationMenuItem>
|
||||||
|
|
||||||
<NavigationMenuItem className="pl-5 flex">
|
<NavigationMenuItem className="pl-5 flex">
|
||||||
<Search
|
<Search onClick={() => setSearchActive(!searchActive)} className="cursor-pointer" />
|
||||||
onClick={() => setSearchActive(!searchActive)}
|
|
||||||
className="cursor-pointer"
|
|
||||||
/>
|
|
||||||
{/* search bar's input */}
|
{/* search bar's input */}
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
|
|||||||
36
src/components/siteFooter.tsx
Normal file
36
src/components/siteFooter.tsx
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
import Link from "next/link";
|
||||||
|
|
||||||
|
export function SiteFooter() {
|
||||||
|
return (
|
||||||
|
<footer className="pt-6">
|
||||||
|
<div className="flex flex-col items-center justify-between gap-4 md:h-24 md:flex-row bg-foreground text-background">
|
||||||
|
<div className="container max-w-screen-xl flex flex-col md:flex-row justify-between items-center py-6">
|
||||||
|
{/* Logo or Brand */}
|
||||||
|
<div className="flex items-center space-x-4">
|
||||||
|
<div className="text-xl font-bold">B2DVentures</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Navigation Links */}
|
||||||
|
<div className="flex space-x-6">
|
||||||
|
<Link href="/" className="hover:underline">
|
||||||
|
Home
|
||||||
|
</Link>
|
||||||
|
<Link href="/about" className="hover:underline">
|
||||||
|
About Us
|
||||||
|
</Link>
|
||||||
|
<Link href="/services" className="hover:underline">
|
||||||
|
Services
|
||||||
|
</Link>
|
||||||
|
<Link href="/contact" className="hover:underline">
|
||||||
|
Contact
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
{/* Copyright */}
|
||||||
|
<div className="text-sm text-center mt-4 md:mt-0 md:ml-6">
|
||||||
|
© {new Date().getFullYear()} B2DVentures. All rights reserved.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
);
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user