diff --git a/app/(landing)/projects/layout.tsx b/app/(landing)/projects/layout.tsx new file mode 100644 index 000000000..3a31c0cee --- /dev/null +++ b/app/(landing)/projects/layout.tsx @@ -0,0 +1,12 @@ +import { Metadata } from 'next'; +import { generatePageMetadata } from '@/lib/metadata'; + +export const metadata: Metadata = generatePageMetadata('projects'); + +export default function ProjectsLayout({ + children, +}: { + children: React.ReactNode; +}) { + return <>{children}; +} diff --git a/app/(landing)/projects/page.tsx b/app/(landing)/projects/page.tsx index cd2692254..fbdeb8d10 100644 --- a/app/(landing)/projects/page.tsx +++ b/app/(landing)/projects/page.tsx @@ -1,18 +1,38 @@ +'use client'; + import React from 'react'; -import { Metadata } from 'next'; -import { generatePageMetadata } from '@/lib/metadata'; import ProjectPageHero from '@/components/Project-Page-Hero'; +import ExploreHeader from '@/components/projects/ExploreHeader'; + +function ProjectsPage() { + const handleSearch = (searchTerm: string) => { + console.log('Search:', searchTerm); + }; + + const handleSort = (sortType: string) => { + console.log('Sort:', sortType); + }; + + const handleStatus = (status: string) => { + console.log('Status:', status); + }; -export const metadata: Metadata = generatePageMetadata('projects'); + const handleCategory = (category: string) => { + console.log('Category:', category); + }; -const ProjectsPage = () => { return ( -
+
-

Projects

-
+ +
); -}; +} export default ProjectsPage; diff --git a/components/projects/ExploreHeader.tsx b/components/projects/ExploreHeader.tsx new file mode 100644 index 000000000..d948816d0 --- /dev/null +++ b/components/projects/ExploreHeader.tsx @@ -0,0 +1,194 @@ +'use client'; + +import React, { useState } from 'react'; +import { Search, ChevronDown } from 'lucide-react'; +import { Input } from '@/components/ui/input'; +import { Button } from '@/components/ui/button'; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, +} from '@/components/ui/dropdown-menu'; +import { cn } from '@/lib/utils'; +import Image from 'next/image'; + +interface ExploreHeaderProps { + onSearch?: (searchTerm: string) => void; + onSortChange?: (sortType: string) => void; + onStatusChange?: (status: string) => void; + onCategoryChange?: (category: string) => void; + className?: string; +} + +const ExploreHeader = ({ + onSearch, + onSortChange, + onStatusChange, + onCategoryChange, + className, +}: ExploreHeaderProps) => { + const [searchTerm, setSearchTerm] = useState(''); + const [selectedSort, setSelectedSort] = useState('Sort'); + const [selectedStatus, setSelectedStatus] = useState('Status'); + const [selectedCategory, setSelectedCategory] = useState('Category'); + + const handleSearch = (value: string) => { + setSearchTerm(value); + if (onSearch) onSearch(value); + }; + + const handleSort = (sortType: string) => { + setSelectedSort(sortType); + if (onSortChange) onSortChange(sortType); + }; + + const handleStatus = (status: string) => { + setSelectedStatus(status); + if (onStatusChange) onStatusChange(status); + }; + + const handleCategory = (category: string) => { + setSelectedCategory(category); + if (onCategoryChange) onCategoryChange(category); + }; + + const sortOptions = [ + 'Newest First', + 'Oldest First', + 'Most Funded', + 'Least Funded', + 'Ending Soon', + 'Recently Started', + ]; + const statusOptions = [ + 'All Status', + 'Active', + 'Completed', + 'Draft', + 'Under Review', + 'Validated', + 'Approved', + ]; + const categoryOptions = [ + 'All Categories', + 'Technology', + 'Art & Creative', + 'Environment', + 'Education', + 'Healthcare', + 'Community', + 'DeFi', + 'NFT', + 'Web3', + ]; + + return ( +
+
+
+

+ Explore Boundless Projects +

+
+ +
+
+ + + + + + {sortOptions.map(option => ( + handleSort(option)} + className='cursor-pointer hover:bg-gray-800' + > + {option} + + ))} + + + + + + + + + {statusOptions.map(option => ( + handleStatus(option)} + className='cursor-pointer hover:bg-gray-800' + > + {option} + + ))} + + + + + + + + + {categoryOptions.map(option => ( + handleCategory(option)} + className='cursor-pointer hover:bg-gray-800' + > + {option} + + ))} + + +
+ +
+
+ + handleSearch(e.target.value)} + className='w-full rounded-lg border-gray-600 bg-transparent py-3 pr-4 pl-10 text-base text-white placeholder-gray-400 focus:border-gray-400 focus:ring-1 focus:ring-gray-400' + /> +
+
+
+
+
+ ); +}; + +export default ExploreHeader; diff --git a/public/sort.svg b/public/sort.svg new file mode 100644 index 000000000..1b813fb38 --- /dev/null +++ b/public/sort.svg @@ -0,0 +1,3 @@ + + +