main layout

This commit is contained in:
pradeepkumar
2026-01-11 22:09:41 +05:30
parent 500c8b6e5d
commit 0c7239d7a8
22 changed files with 1847 additions and 369 deletions

View File

@@ -0,0 +1,131 @@
'use client';
import { useState } from 'react';
import Link from 'next/link';
import Image from 'next/image';
import { signOut } from 'next-auth/react';
interface AgentHeaderProps {
userName?: string | null;
userEmail?: string | null;
}
const navLinks = [
{ label: 'Education', href: '/education' },
{ label: 'About Us', href: '/about' },
{ label: "FAQ's", href: '/faq' },
];
export function AgentHeader({ userName, userEmail }: AgentHeaderProps) {
const [showProfileMenu, setShowProfileMenu] = useState(false);
return (
<header className="bg-[#648188] rounded-[20px] px-8">
<div className="flex justify-between items-center h-[70px]">
{/* Logo */}
<Link href="/agent/dashboard">
<Image
src="/assets/logo.svg"
alt="RE-QuestN"
width={150}
height={40}
className="h-10 w-auto"
/>
</Link>
{/* Navigation */}
<nav className="hidden md:flex items-center gap-8 ml-auto mr-8">
{navLinks.map((link) => (
<Link
key={link.href}
href={link.href}
className="font-bold text-[#00293d] text-base hover:text-[#e58625] transition-colors"
>
{link.label}
</Link>
))}
</nav>
{/* Right Side Icons */}
<div className="flex items-center gap-3">
{/* Notification Bell */}
<button className="relative p-1 hover:opacity-80 transition-opacity">
<Image
src="/assets/notification-icon.svg"
alt="Notifications"
width={18}
height={21}
/>
{/* Notification Dot */}
<span className="absolute top-0 right-0 w-1.5 h-1.5 bg-red-500 rounded-full"></span>
</button>
{/* Profile Icon with Dropdown */}
<div className="relative">
<button
onClick={() => setShowProfileMenu(!showProfileMenu)}
className="w-6 h-6 rounded-full overflow-hidden hover:opacity-80 transition-opacity"
>
<Image
src="/assets/profile-icon.svg"
alt="Profile"
width={24}
height={24}
className="w-full h-full"
/>
</button>
{/* Profile Dropdown Menu */}
{showProfileMenu && (
<div className="absolute right-0 mt-2 w-48 bg-white rounded-lg shadow-lg py-2 z-50">
<div className="px-4 py-2 border-b border-gray-100">
<p className="text-sm font-medium text-[#00293d]">
{userName || 'Agent'}
</p>
<p className="text-xs text-gray-500">{userEmail}</p>
</div>
<Link
href="/agent/dashboard"
className="block px-4 py-2 text-sm text-[#00293d] hover:bg-gray-50"
onClick={() => setShowProfileMenu(false)}
>
Dashboard
</Link>
<Link
href="/agent/settings"
className="block px-4 py-2 text-sm text-[#00293d] hover:bg-gray-50"
onClick={() => setShowProfileMenu(false)}
>
Settings
</Link>
<button
onClick={() => signOut({ callbackUrl: '/login' })}
className="w-full text-left px-4 py-2 text-sm text-red-600 hover:bg-gray-50"
>
Sign Out
</button>
</div>
)}
</div>
{/* Mobile Menu Button */}
<button className="md:hidden p-2 hover:opacity-80 transition-opacity">
<svg
className="w-6 h-6 text-[#00293d]"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="M4 6h16M4 12h16M4 18h16"
/>
</svg>
</button>
</div>
</div>
</header>
);
}

View File

@@ -0,0 +1,220 @@
'use client';
import Link from 'next/link';
import Image from 'next/image';
const footerLinks = {
services: {
title: 'Services',
links: [
{ label: 'Neighborhood Guides', href: '/neighborhood-guides' },
{ label: 'Home Loan & EMI Calculator', href: '/calculator' },
],
},
serviceProviders: {
title: 'Service Providers',
links: [
{ label: 'Agent', href: '/agents' },
{ label: 'Lenders', href: '/lenders' },
],
},
resources: {
title: 'Resources',
links: [
{ label: "Buyer's Guide", href: '/buyers-guide' },
{ label: "Seller's Guide", href: '/sellers-guide' },
{ label: 'FAQs', href: '/faq' },
{ label: 'Blogs', href: '/blogs' },
{ label: 'Legal & Documentation Help', href: '/legal-help' },
],
},
aboutContact: {
title: 'About & Contact',
links: [
{ label: 'About Our Agency', href: '/about' },
{ label: 'Our Agents', href: '/agents' },
{ label: 'Testimonials', href: '/testimonials' },
{ label: 'Careers', href: '/careers' },
{ label: 'Contact Us', href: '/contact' },
{ label: 'Privacy Policy', href: '/privacy-policy' },
{ label: 'Terms & Conditions', href: '/terms' },
],
},
};
const socialLinks = [
{
name: 'LinkedIn',
href: '#',
icon: (
<svg className="w-4 h-4" fill="currentColor" viewBox="0 0 24 24">
<path d="M19 0h-14c-2.761 0-5 2.239-5 5v14c0 2.761 2.239 5 5 5h14c2.762 0 5-2.239 5-5v-14c0-2.761-2.238-5-5-5zm-11 19h-3v-11h3v11zm-1.5-12.268c-.966 0-1.75-.79-1.75-1.764s.784-1.764 1.75-1.764 1.75.79 1.75 1.764-.783 1.764-1.75 1.764zm13.5 12.268h-3v-5.604c0-3.368-4-3.113-4 0v5.604h-3v-11h3v1.765c1.396-2.586 7-2.777 7 2.476v6.759z" />
</svg>
),
bgColor: 'bg-[#0077b5]',
},
{
name: 'Instagram',
href: '#',
icon: (
<svg className="w-4 h-4" fill="currentColor" viewBox="0 0 24 24">
<path d="M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073zm0 5.838c-3.403 0-6.162 2.759-6.162 6.162s2.759 6.163 6.162 6.163 6.162-2.759 6.162-6.163c0-3.403-2.759-6.162-6.162-6.162zm0 10.162c-2.209 0-4-1.79-4-4 0-2.209 1.791-4 4-4s4 1.791 4 4c0 2.21-1.791 4-4 4zm6.406-11.845c-.796 0-1.441.645-1.441 1.44s.645 1.44 1.441 1.44c.795 0 1.439-.645 1.439-1.44s-.644-1.44-1.439-1.44z" />
</svg>
),
bgColor: 'bg-gradient-to-br from-[#f09433] via-[#e6683c] to-[#bc1888]',
},
{
name: 'Facebook',
href: '#',
icon: (
<svg className="w-4 h-4" fill="currentColor" viewBox="0 0 24 24">
<path d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z" />
</svg>
),
bgColor: 'bg-[#1877f2]',
},
{
name: 'Twitter',
href: '#',
icon: (
<svg className="w-4 h-4" fill="currentColor" viewBox="0 0 24 24">
<path d="M23.953 4.57a10 10 0 01-2.825.775 4.958 4.958 0 002.163-2.723c-.951.555-2.005.959-3.127 1.184a4.92 4.92 0 00-8.384 4.482C7.69 8.095 4.067 6.13 1.64 3.162a4.822 4.822 0 00-.666 2.475c0 1.71.87 3.213 2.188 4.096a4.904 4.904 0 01-2.228-.616v.06a4.923 4.923 0 003.946 4.827 4.996 4.996 0 01-2.212.085 4.936 4.936 0 004.604 3.417 9.867 9.867 0 01-6.102 2.105c-.39 0-.779-.023-1.17-.067a13.995 13.995 0 007.557 2.209c9.053 0 13.998-7.496 13.998-13.985 0-.21 0-.42-.015-.63A9.935 9.935 0 0024 4.59z" />
</svg>
),
bgColor: 'bg-[#1da1f2]',
},
];
export function Footer() {
return (
<footer className="bg-[#8fa9a8] text-[#00293d]">
{/* Main Footer Content */}
<div className="max-w-7xl mx-auto px-6 py-12">
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-8 lg:gap-12">
{/* Services */}
<div>
<h3 className="font-bold text-[#e58625] text-sm mb-4 pb-2 border-b-2 border-[#e58625] inline-block">
{footerLinks.services.title}
</h3>
<ul className="space-y-3">
{footerLinks.services.links.map((link) => (
<li key={link.href}>
<Link
href={link.href}
className="text-sm hover:text-[#e58625] transition-colors"
>
{link.label}
</Link>
</li>
))}
</ul>
</div>
{/* Service Providers */}
<div>
<h3 className="font-bold text-[#e58625] text-sm mb-4 pb-2 border-b-2 border-[#e58625] inline-block">
{footerLinks.serviceProviders.title}
</h3>
<ul className="space-y-3">
{footerLinks.serviceProviders.links.map((link) => (
<li key={link.href}>
<Link
href={link.href}
className="text-sm hover:text-[#e58625] transition-colors"
>
{link.label}
</Link>
</li>
))}
</ul>
</div>
{/* Resources */}
<div>
<h3 className="font-bold text-[#e58625] text-sm mb-4 pb-2 border-b-2 border-[#e58625] inline-block">
{footerLinks.resources.title}
</h3>
<ul className="space-y-3">
{footerLinks.resources.links.map((link) => (
<li key={link.href}>
<Link
href={link.href}
className="text-sm hover:text-[#e58625] transition-colors"
>
{link.label}
</Link>
</li>
))}
</ul>
</div>
{/* About & Contact */}
<div>
<h3 className="font-bold text-[#e58625] text-sm mb-4 pb-2 border-b-2 border-[#e58625] inline-block">
{footerLinks.aboutContact.title}
</h3>
<ul className="space-y-3">
{footerLinks.aboutContact.links.map((link) => (
<li key={link.href}>
<Link
href={link.href}
className="text-sm hover:text-[#e58625] transition-colors"
>
{link.label}
</Link>
</li>
))}
</ul>
</div>
</div>
</div>
{/* Logo and Social Section */}
<div className="border-t border-[#00293d]/20">
<div className="max-w-7xl mx-auto px-6 py-6">
<div className="flex flex-col md:flex-row items-center justify-between gap-6">
{/* Logo and Tagline */}
<div className="flex items-center gap-4">
<Image
src="/assets/logo.svg"
alt="RE-Quest"
width={150}
height={40}
className="h-10 w-auto"
/>
<span className="text-sm text-[#00293d]">
"Your Trusted Real Estate Partner"
</span>
</div>
{/* Social Links */}
<div className="flex items-center gap-3">
{socialLinks.map((social) => (
<a
key={social.name}
href={social.href}
className={`w-7 h-7 ${social.bgColor} rounded flex items-center justify-center text-white hover:opacity-80 transition-opacity`}
aria-label={social.name}
>
{social.icon}
</a>
))}
</div>
</div>
</div>
</div>
{/* Copyright Section */}
<div className="border-t border-[#00293d]/20">
<div className="max-w-7xl mx-auto px-6 py-4">
<div className="flex flex-col md:flex-row items-center justify-between gap-4 text-sm">
<p>Copyright © 2025 Your Agency Name. All rights reserved.</p>
<Link href="/privacy-policy" className="hover:text-[#e58625] transition-colors">
Privacy Policy
</Link>
</div>
</div>
</div>
</footer>
);
}

View File

@@ -0,0 +1,82 @@
'use client';
import Link from 'next/link';
import Image from 'next/image';
import { useSession } from 'next-auth/react';
import { Button } from '../ui/Button';
export function Header() {
const { data: session } = useSession();
return (
<header className="bg-[#00293d] text-white">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div className="flex items-center justify-between h-20">
{/* Logo */}
<Link href="/" className="flex items-center gap-2">
<Image
src="/assets/logo-white.svg"
alt="RE-Quest"
width={150}
height={40}
className="h-10 w-auto"
/>
</Link>
{/* Navigation */}
<nav className="hidden md:flex items-center gap-8">
<Link href="/education" className="hover:text-[#f5a623] transition-colors">
Education
</Link>
<Link href="/about" className="hover:text-[#f5a623] transition-colors">
About Us
</Link>
<Link href="/faq" className="hover:text-[#f5a623] transition-colors">
FAQ&apos;s
</Link>
</nav>
{/* Right Side */}
<div className="flex items-center gap-4">
{session ? (
<>
{/* Notification Bell */}
<button className="p-2 hover:bg-white/10 rounded-full transition-colors">
<svg className="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9" />
</svg>
</button>
{/* Profile */}
<Link href="/user/userprofile" className="p-2 hover:bg-white/10 rounded-full transition-colors">
<svg className="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z" />
</svg>
</Link>
</>
) : (
<div className="flex items-center gap-3">
<Link href="/login">
<Button variant="outline" size="sm" className="border-white text-white hover:bg-white hover:text-[#00293d]">
Login
</Button>
</Link>
<Link href="/register">
<Button variant="primary" size="sm">
Sign Up
</Button>
</Link>
</div>
)}
{/* Mobile Menu Button */}
<button className="md:hidden p-2 hover:bg-white/10 rounded-lg transition-colors">
<svg className="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 6h16M4 12h16M4 18h16" />
</svg>
</button>
</div>
</div>
</div>
</header>
);
}