Skip to content

Commit c9492d3

Browse files
authored
Merge pull request #29 from GoBuildOrg/devSam
Dev sam
2 parents 2d204ab + b1b09e7 commit c9492d3

17 files changed

Lines changed: 504 additions & 81 deletions

File tree

526 KB
Loading
570 KB
Loading
494 KB
Loading
324 KB
Loading
1.81 MB
Loading
17.8 MB
Loading

src/App.tsx

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,13 @@ import ContactUs from "./pages/ContactUs";
1717
import ScrollToTop from "./components/ScrollToTop";
1818
import Profile from "./pages/Profile";
1919
import ForgotPassword from "./pages/auth/Forgot";
20-
20+
import Workers from "./pages/categories/Workers";
21+
import Suppliers from "./pages/categories/Suppliers";
22+
import HouseOwner from "./pages/categories/HouseOwner";
23+
import Developers from "./pages/categories/Developers";
24+
import Architects from "./pages/categories/Architects";
25+
import Contractors from "./pages/categories/Contractors";
26+
import CategoriesLayout from "./pages/categories/CategoriesLayout";
2127
// Import i18n configuration
2228
import './i18n';
2329

@@ -35,6 +41,14 @@ const AppRoutes = () => {
3541
<Route path="/about" element={<AboutUs />} />
3642
<Route path="/contact" element={<ContactUs />} />
3743
<Route path="/profile" element={<Profile />} />
44+
<Route path="/categories" element={<CategoriesLayout />}>
45+
<Route path="workers" element={<Workers />} />
46+
<Route path="suppliers" element={<Suppliers />} />
47+
<Route path="houseowners" element={<HouseOwner />} />
48+
<Route path="developers" element={<Developers />} />
49+
<Route path="architects" element={<Architects />} />
50+
<Route path="contractors" element={<Contractors />} />
51+
</Route>
3852
<Route path="/auth" element={<AuthLayout />}>
3953
<Route path="login" element={<Login />} />
4054
<Route path="register" element={<Register />} />

src/components/Bmodel.tsx

Lines changed: 39 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import React from 'react';
2+
import { Link } from "react-router-dom";
23

34
function Bmodel() {
45
const stakeholders = [
5-
{ name: 'Workers', position: 'left-top', side: 'left', icon: '👷', color: 'from-orange-400 to-red-500' },
6-
{ name: 'Home Owners', position: 'left-middle', side: 'left', icon: '🏠', color: 'from-green-400 to-emerald-500' },
7-
{ name: 'Architects/\nDesigners', position: 'left-bottom', side: 'left', icon: '📐', color: 'from-purple-400 to-violet-500' },
8-
{ name: 'Contractors', position: 'right-top', side: 'right', icon: '🔨', color: 'from-yellow-400 to-amber-500' },
9-
{ name: 'Developers', position: 'right-middle', side: 'right', icon: '🏗️', color: 'from-blue-400 to-cyan-500' },
10-
{ name: 'Material\nSuppliers', position: 'right-bottom', side: 'right', icon: '📦', color: 'from-teal-400 to-green-500' }
6+
{ name: 'Workers', position: 'left-top', side: 'left', icon: '👷', color: 'from-orange-400 to-red-500',link: '/categories/workers' },
7+
{ name: 'Home Owners', position: 'left-middle', side: 'left', icon: '🏠', color: 'from-green-400 to-emerald-500',link: '/categories/houseowners' },
8+
{ name: 'Architects/\nDesigners', position: 'left-bottom', side: 'left', icon: '📐', color: 'from-purple-400 to-violet-500',link: '/categories/architects' },
9+
{ name: 'Contractors', position: 'right-top', side: 'right', icon: '🔨', color: 'from-yellow-400 to-amber-500',link: '/categories/contractors' },
10+
{ name: 'Developers', position: 'right-middle', side: 'right', icon: '🏗️', color: 'from-blue-400 to-cyan-500',link: '/categories/developers' },
11+
{ name: 'Material\nSuppliers', position: 'right-bottom', side: 'right', icon: '📦', color: 'from-teal-400 to-green-500',link: '/categories/suppliers' }
1112
];
1213

1314
const getPositionClasses = (position: string) => {
@@ -126,49 +127,41 @@ function Bmodel() {
126127
</div>
127128
))}
128129

129-
{/* Stakeholder Circles */}
130-
{stakeholders.map((stakeholder, index) => (
131-
<div key={index}
132-
className={`absolute ${getPositionClasses(stakeholder.position)} z-30 group cursor-pointer`}>
133-
<div className="relative">
134-
{/* Outer glow ring */}
135-
<div className={`absolute inset-0 w-24 h-24 sm:w-36 sm:h-36 lg:w-40 lg:h-40 rounded-full bg-gradient-to-r ${stakeholder.color} opacity-0 group-hover:opacity-40 transition-all duration-700 scale-125 blur-xl -m-1 sm:-m-3 lg:-m-4`}></div>
136-
137-
{/* Animated border ring */}
138-
<div className={`absolute inset-0 w-22 h-22 sm:w-32 sm:h-32 lg:w-36 lg:h-36 rounded-full bg-gradient-to-r ${stakeholder.color} opacity-15 animate-pulse -m-0.5 sm:-m-2 lg:-m-2`}
139-
style={{ animationDelay: `${index * 0.5}s` }}></div>
140-
141-
{/* Glass morphism circle */}
142-
<div className="relative w-20 h-20 sm:w-28 sm:h-28 lg:w-32 lg:h-32 bg-white/80 backdrop-blur-md rounded-full shadow-xl border border-gray-200/40 flex flex-col items-center justify-center
143-
transform transition-all duration-500 group-hover:scale-110 group-hover:shadow-2xl
144-
group-hover:bg-white/90 group-hover:border-gray-300/50 group-hover:-translate-y-2 sm:group-hover:-translate-y-3">
145-
146-
{/* Icon */}
147-
<div className="text-lg sm:text-2xl lg:text-3xl mb-0.5 sm:mb-1 lg:mb-1 transition-all duration-300 group-hover:scale-125 group-hover:animate-bounce">
148-
{stakeholder.icon}
149-
</div>
150-
151-
{/* Text */}
152-
<div className="text-center px-0.5 sm:px-2">
153-
<div className="text-xs sm:text-sm lg:text-sm font-bold text-gray-800 leading-tight whitespace-pre-line group-hover:text-gray-900 transition-all duration-300">
154-
{stakeholder.name}
155-
</div>
156-
</div>
157-
158-
{/* Connection dots */}
159-
<div className={`absolute -top-0.5 -right-0.5 sm:-top-1 sm:-right-1 w-1.5 h-1.5 sm:w-2.5 sm:h-2.5 lg:w-3 lg:h-3 bg-gradient-to-r ${stakeholder.color} rounded-full animate-ping`}
160-
style={{ animationDelay: `${index * 0.8}s` }}></div>
161-
</div>
130+
{/* Stakeholder Circles */}
131+
{stakeholders.map((stakeholder, index) => (
132+
<Link
133+
key={index}
134+
to={stakeholder.link}
135+
className={`absolute ${getPositionClasses(stakeholder.position)} z-30 group cursor-pointer`}
136+
>
137+
<div className="relative">
138+
{/* Outer glow ring */}
139+
<div className={`absolute inset-0 w-24 h-24 sm:w-36 sm:h-36 lg:w-40 lg:h-40 rounded-full bg-gradient-to-r ${stakeholder.color} opacity-0 group-hover:opacity-40 transition-all duration-700 scale-125 blur-xl -m-1 sm:-m-3 lg:-m-4`}></div>
162140

163-
{/* Floating animation with trail effect */}
164-
<div className="absolute inset-0 w-20 h-20 sm:w-28 sm:h-28 lg:w-32 lg:h-32 rounded-full"
165-
style={{ animation: `float 5s ease-in-out infinite ${index * 0.8}s` }}>
166-
<div className={`w-1 h-1 sm:w-2 sm:h-2 lg:w-2 lg:h-2 bg-gradient-to-r ${stakeholder.color} rounded-full absolute top-0 left-1/2 transform -translate-x-1/2 opacity-40 animate-ping`}
167-
style={{ animationDelay: `${index * 0.3}s` }}></div>
168-
</div>
141+
{/* Animated border ring */}
142+
<div className={`absolute inset-0 w-22 h-22 sm:w-32 sm:h-32 lg:w-36 lg:h-36 rounded-full bg-gradient-to-r ${stakeholder.color} opacity-15 animate-pulse -m-0.5 sm:-m-2 lg:-m-2`}
143+
style={{ animationDelay: `${index * 0.5}s` }}></div>
144+
145+
{/* Glass morphism circle */}
146+
<div className="relative w-20 h-20 sm:w-28 sm:h-28 lg:w-32 lg:h-32 bg-white/80 backdrop-blur-md rounded-full shadow-xl border border-gray-200/40 flex flex-col items-center justify-center
147+
transform transition-all duration-500 group-hover:scale-110 group-hover:shadow-2xl
148+
group-hover:bg-white/90 group-hover:border-gray-300/50 group-hover:-translate-y-2 sm:group-hover:-translate-y-3">
149+
150+
{/* Icon */}
151+
<div className="text-lg sm:text-2xl lg:text-3xl mb-0.5 sm:mb-1 lg:mb-1 transition-all duration-300 group-hover:scale-125 group-hover:animate-bounce">
152+
{stakeholder.icon}
153+
</div>
154+
155+
{/* Text */}
156+
<div className="text-center px-0.5 sm:px-2">
157+
<div className="text-xs sm:text-sm lg:text-sm font-bold text-gray-800 leading-tight whitespace-pre-line group-hover:text-gray-900 transition-all duration-300">
158+
{stakeholder.name}
169159
</div>
170160
</div>
171-
))}
161+
</div>
162+
</div>
163+
</Link>
164+
))}
172165

173166
{/* Artistic decorative elements */}
174167
<div className="absolute top-[8%] left-[42%] sm:left-[45%] w-8 h-8 sm:w-10 sm:h-10 lg:w-12 lg:h-12 opacity-20">

src/components/Navbar.tsx

Lines changed: 60 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ import { useNavigate } from 'react-router-dom';
1212
const Navbar: React.FC = () => {
1313
const [isOpen, setIsOpen] = useState(false);
1414
const [isScrolled, setIsScrolled] = useState(false);
15-
const { user, signOut } = useAuth();
15+
const [isServicesOpen, setIsServicesOpen] = useState(false); // Desktop dropdown
16+
const [isMobileServicesOpen, setIsMobileServicesOpen] = useState(false); // Mobile dropdown
17+
const { user } = useAuth();
1618
const { t } = useTranslation();
1719
const navigate = useNavigate();
1820

@@ -74,6 +76,34 @@ const Navbar: React.FC = () => {
7476
</div>
7577
<Link to="/" className="text-foreground hover:text-primary transition-colors">{t('common.home')}</Link>
7678
<Link to="/services" className="text-foreground hover:text-primary transition-colors">{t('common.services')}</Link>
79+
80+
{/* New "All Services" dropdown button */}
81+
<div
82+
className="relative"
83+
onMouseEnter={() => setIsServicesOpen(true)}
84+
onMouseLeave={() => setIsServicesOpen(false)}
85+
>
86+
<button
87+
className="text-foreground hover:text-primary px-1 py-2 rounded-md text-base font-low transition-colors "
88+
>
89+
{t('common.solutions')}
90+
</button>
91+
<div
92+
className={`absolute top-full left-0 mt-2 w-48 bg-white shadow-lg rounded-md border border-gray-200 z-50
93+
overflow-hidden transition-all duration-300 ease-in-out
94+
${isServicesOpen ? 'max-h-[500px] opacity-100' : 'max-h-0 opacity-0'}`}
95+
onMouseEnter={() => setIsServicesOpen(true)}
96+
onMouseLeave={() => setIsServicesOpen(false)}
97+
>
98+
<Link to="/categories/workers" className="block px-4 py-2 text-gray-700 hover:bg-gray-100">Worker</Link>
99+
{/* <Link to="/categories/houseowners" className="block px-4 py-2 text-gray-700 hover:bg-gray-100">Home Owners</Link> */}
100+
<Link to="/categories/architects" className="block px-4 py-2 text-gray-700 hover:bg-gray-100">Architects/Designers</Link>
101+
<Link to="/categories/contractors" className="block px-4 py-2 text-gray-700 hover:bg-gray-100">Contractors</Link>
102+
<Link to="/categories/developers" className="block px-4 py-2 text-gray-700 hover:bg-gray-100">Developers</Link>
103+
<Link to="/categories/suppliers" className="block px-4 py-2 text-gray-700 hover:bg-gray-100">Material Suppliers</Link>
104+
</div>
105+
</div>
106+
77107
<Link to="/blog" className="text-foreground hover:text-primary transition-colors">{t('common.blog')}</Link>
78108
<Link to="/about" className="text-foreground hover:text-primary transition-colors">{t('common.about')}</Link>
79109
<Link to="/contact" className="text-foreground hover:text-primary transition-colors">{t('common.contact')}</Link>
@@ -129,40 +159,36 @@ const Navbar: React.FC = () => {
129159
}}
130160
/>
131161
</div>
132-
<Link
133-
to="/"
134-
className="block px-3 py-2 rounded-md text-base font-medium text-foreground hover:bg-muted hover:text-primary transition-colors"
135-
onClick={() => setIsOpen(false)}
136-
>
137-
{"Home"}
138-
</Link>
139-
<Link
140-
to="/services"
141-
className="block px-3 py-2 rounded-md text-base font-medium text-foreground hover:bg-muted hover:text-primary transition-colors"
142-
onClick={() => setIsOpen(false)}
143-
>
144-
{t('common.services')}
145-
</Link>
146-
<Link to="/blog"
147-
className="block px-3 py-2 rounded-md text-base font-medium text-foreground hover:bg-muted hover:text-primary transition-colors"
148-
onClick={() => setIsOpen(false)}
149-
>
150-
{t('common.blog')}
151-
</Link>
152-
<Link
153-
to="/about"
154-
className="block px-3 py-2 rounded-md text-base font-medium text-foreground hover:bg-muted hover:text-primary transition-colors"
155-
onClick={() => setIsOpen(false)}
156-
>
157-
{t('common.about')}
158-
</Link>
159-
<Link
160-
to="/contact"
161-
className="block px-3 py-2 rounded-md text-base font-medium text-foreground hover:bg-muted hover:text-primary transition-colors"
162-
onClick={() => setIsOpen(false)}
162+
163+
<Link to="/" className="block px-3 py-2 rounded-md text-base font-medium text-foreground hover:bg-muted hover:text-primary transition-colors" onClick={() => setIsOpen(false)}>Home</Link>
164+
165+
{/* Services main link (redirect only) */}
166+
<Link to="/services" className="block px-3 py-2 rounded-md text-base font-medium text-foreground hover:bg-muted hover:text-primary transition-colors" onClick={() => setIsOpen(false)}>Services</Link>
167+
168+
{/* New "All Services" mobile button */}
169+
<button
170+
className="w-full text-left px-3 py-2 rounded-md text-base font-medium text-foreground hover:bg-muted hover:text-primary transition-colors flex justify-between items-center"
171+
onClick={() => setIsMobileServicesOpen(!isMobileServicesOpen)}
163172
>
164-
{t('common.contact')}
165-
</Link>
173+
{t('common.solutions')}
174+
<span className={`transform transition-transform duration-200 ${isMobileServicesOpen ? 'rotate-180' : 'rotate-0'}`}></span>
175+
</button>
176+
177+
{isMobileServicesOpen && (
178+
<div className="pl-4 mt-2 space-y-1">
179+
<Link to="/categories/workers" className="block px-4 py-2 text-gray-700 hover:bg-gray-100 rounded-md" onClick={() => setIsOpen(false)}>Worker</Link>
180+
{/* <Link to="/categories/houseowners" className="block px-4 py-2 text-gray-700 hover:bg-gray-100 rounded-md" onClick={() => setIsOpen(false)}>Home Owners</Link> */}
181+
<Link to="/categories/architects" className="block px-4 py-2 text-gray-700 hover:bg-gray-100 rounded-md" onClick={() => setIsOpen(false)}>Architects/Designers</Link>
182+
<Link to="/categories/contractors" className="block px-4 py-2 text-gray-700 hover:bg-gray-100 rounded-md" onClick={() => setIsOpen(false)}>Contractors</Link>
183+
<Link to="/categories/developers" className="block px-4 py-2 text-gray-700 hover:bg-gray-100 rounded-md" onClick={() => setIsOpen(false)}>Developers</Link>
184+
<Link to="/categories/suppliers" className="block px-4 py-2 text-gray-700 hover:bg-gray-100 rounded-md" onClick={() => setIsOpen(false)}>Material Suppliers</Link>
185+
</div>
186+
)}
187+
188+
<Link to="/blog" className="block px-3 py-2 rounded-md text-base font-medium text-foreground hover:bg-muted hover:text-primary transition-colors" onClick={() => setIsOpen(false)}>Blog</Link>
189+
<Link to="/about" className="block px-3 py-2 rounded-md text-base font-medium text-foreground hover:bg-muted hover:text-primary transition-colors" onClick={() => setIsOpen(false)}>About</Link>
190+
<Link to="/contact" className="block px-3 py-2 rounded-md text-base font-medium text-foreground hover:bg-muted hover:text-primary transition-colors" onClick={() => setIsOpen(false)}>Contact</Link>
191+
166192
<div className="pt-2 space-y-2">
167193

168194
{/* Profile Button added above sign out */}

src/locales/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"common": {
33
"home": "Home",
44
"services": "Services",
5+
"solutions": "Solutions",
56
"blog": "Blog",
67
"about": "About",
78
"contact": "Contact",

0 commit comments

Comments
 (0)