Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions frontend/src/components/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ const Footer = () => {
];

return (
<footer className="bg-white text-gray-600 pt-12 pb-6 border-t border-blue-100">
<footer className="bg-white dark:bg-gray-900 text-gray-600 dark:text-gray-300 pt-12 pb-6">
<div className="max-w-6xl mx-auto px-4">
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8 mb-8">
{/* Brand Info */}
<div className="lg:col-span-1">
<h2 className="text-2xl font-bold bg-gradient-to-r from-blue-500 to-purple-600 bg-clip-text text-transparent">
<h2 className="text-2xl font-bold text-blue-600 dark:text-violet-500 bg-clip-text text-transparent">
IdeaVault
</h2>
<p className="mt-4 text-gray-600 max-w-md">
<p className="mt-4 text-gray-600 dark:text-gray-300 max-w-md">
IdeaVault is a platform to license your software project ideas with proof and attribution.
Protect your creativity and earn recognition with our 1% model.
</p>
Expand All @@ -79,7 +79,7 @@ const Footer = () => {
href={socialLink.to}
target="_blank"
rel="noopener noreferrer"
className="text-gray-500 hover:text-black transition-colors duration-200"
className="text-gray-500 hover:text-black dark:text-gray-200 dark:hover:text-white transition-colors duration-200"
>
{socialLink.icon}
</a>
Expand All @@ -90,13 +90,13 @@ const Footer = () => {

{/* Quick Links */}
<div>
<h3 className="text-gray-800 font-semibold mb-4">Quick Links</h3>
<h3 className="text-gray-800 dark:text-gray-100 font-semibold mb-4">Quick Links</h3>
<ul className="space-y-3">
{quickLinks.map((link) => (
<li key={link.name}>
<Link
to={link.href}
className="text-gray-600 hover:text-gray-900 transition-colors duration-200 flex items-center gap-2 group"
className="text-gray-600 dark:text-gray-300 hover:text-gray-900 transition-colors duration-200 flex items-center gap-2 group"
>
<link.icon className={`w-4 h-4 ${link.color}`} />
<span>{link.name}</span>
Expand All @@ -108,13 +108,13 @@ const Footer = () => {

{/* Legal Links */}
<div>
<h3 className="text-gray-800 font-semibold mb-4">Legal</h3>
<h3 className="text-gray-800 dark:text-gray-100 font-semibold mb-4">Legal</h3>
<ul className="space-y-3">
{legalLinks.map((link) => (
<li key={link.name}>
<a
href={link.href}
className="text-gray-600 hover:text-gray-900 transition-colors duration-200 flex items-center gap-2 group"
className="text-gray-600 dark:text-gray-300 hover:text-gray-900 transition-colors duration-200 flex items-center gap-2 group"
>
<link.icon className={`w-4 h-4 ${link.color}`} />
<span>{link.name}</span>
Expand All @@ -128,10 +128,10 @@ const Footer = () => {
{/* Divider */}
<div className="border-t border-gray-200 mt-8 pt-8">
<div className="flex flex-col md:flex-row justify-between items-center space-y-4 md:space-y-0">
<div className="text-center md:text-left text-sm text-gray-500">
<div className="text-center md:text-left text-sm text-gray-500 dark:text-gray-50">
<p>Β© {currentYear} IdeaVault. All rights reserved.</p>
</div>
<div className="flex items-center text-sm text-gray-500">
<div className="flex items-center text-sm text-gray-500 dark:text-gray-50">
<span>Made with</span>
<Heart className="w-4 h-4 mx-1 text-red-500" />
<span>
Expand All @@ -142,7 +142,7 @@ const Footer = () => {
rel="noopener noreferrer"
className="text-blue-500 hover:text-blue-600 transition-colors"
>
vinit105
Vinit
</a>
</span>
</div>
Expand Down
125 changes: 76 additions & 49 deletions frontend/src/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,55 +1,82 @@
import React from 'react';
import { Link } from 'react-router-dom';
import React from "react";
import { Link } from "react-router-dom";
import { useTheme } from "../hooks/useTheme.js";
import { Sun, Moon } from "lucide-react";

const Header: React.FC = () => {
const { theme, toggleTheme } = useTheme();

const navLinks = [
{
name:"Home",
to:"/"
},
{
name:"Browse Ideas",
to:"/ideas"
},
{
name:"About",
to:"/about"
}
]


return (
<header className="bg-white shadow-lg sticky top-0 z-50">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div className="flex justify-between items-center py-6">
<div className="flex items-center">
<Link to="/" className="text-2xl font-bold text-blue-600">
πŸ’‘ IdeaVault
</Link>
</div>
<nav className="hidden md:flex space-x-8">
{navLinks.map((navLink)=>(
<Link
key={navLink.name}
to={navLink.to}
className='text-gray-700 hover:text-blue-600 px-3 py-2 rounded-md text-sm font-medium'>
{navLink.name}
</Link>
))}
</nav>
<div className="flex items-center space-x-4">
<button className="bg-blue-600 text-white px-4 py-2 rounded-md text-sm font-medium hover:bg-blue-700">
Submit Idea
</button>
<button className="text-gray-700 hover:text-blue-600 px-3 py-2 rounded-md text-sm font-medium">
Sign In
</button>
</div>
</div>
</div>
</header>
);
const navLinks = [
{
name: "Home",
to: "/",
},
{
name: "Browse Ideas",
to: "/ideas",
},
{
name: "About",
to: "/about",
},
];

return (
<header className="bg-white dark:bg-gray-900 shadow-lg sticky top-0 z-50">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div className="flex justify-between items-center py-6">
{/* Logo */}
<div className="flex items-center">
<Link
to="/"
className="text-2xl font-bold text-blue-600 dark:text-violet-500"
>
πŸ’‘ IdeaVault
</Link>
</div>

{/* Navigation Links */}
<nav className="hidden md:flex space-x-8">
{navLinks.map((navLink) => (
<Link
key={navLink.name}
to={navLink.to}
className="text-gray-700 dark:text-gray-300 hover:text-blue-600 dark:hover:text-blue-400 px-3 py-2 rounded-md text-sm font-medium"
>
{navLink.name}
</Link>
))}
</nav>

{/* Buttons */}
<div className="flex items-center space-x-4">
{/* Submit Idea Button */}
<button className="bg-blue-600 text-white px-4 py-2 rounded-md text-sm font-medium hover:bg-blue-700 dark:bg-violet-500 dark:hover:bg-violet-600">
Submit Idea
</button>

{/* Sign In Button */}
<button className="text-gray-700 dark:text-gray-300 hover:text-blue-600 dark:hover:text-blue-400 px-3 py-2 rounded-md text-sm font-medium">
Sign In
</button>

{/* Theme Toggle Button */}
<button
onClick={toggleTheme}
aria-label="Toggle Theme"
className="transition duration-300 ease-in-out cursor-pointer flex items-center justify-center p-2 rounded-full border bg-white dark:bg-gray-900 text-blue-800 dark:text-white border-blue-300 dark:border-purple-600 hover:bg-blue-100 dark:hover:bg-purple-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-400 dark:focus:ring-purple-500"
>
{theme === "dark" ? (
<Sun className="w-5 h-5 text-yellow-400" />
) : (
<Moon className="w-5 h-5 text-blue-600" />
)}
</button>
</div>
</div>
</div>
</header>
);
};

export default Header;
26 changes: 26 additions & 0 deletions frontend/src/hooks/useTheme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { useEffect, useState } from 'react';

export const useTheme = () => {
const [theme, setTheme] = useState('light');

useEffect(() => {
const savedTheme = localStorage.getItem('theme');
const initialTheme = savedTheme === 'dark' ? 'dark' : 'light';

document.documentElement.classList.add(initialTheme);
document.documentElement.classList.remove(initialTheme === 'dark' ? 'light' : 'dark');
setTheme(initialTheme);
}, []);

const toggleTheme = () => {
const isDark = theme === 'dark';
const newTheme = isDark ? 'light' : 'dark';

document.documentElement.classList.remove(theme);
document.documentElement.classList.add(newTheme);
localStorage.setItem('theme', newTheme);
setTheme(newTheme);
};

return { theme, toggleTheme };
};
Loading
Loading