Skip to content

Commit

Permalink
ui: Update Photo-Reels & Landing Page UI
Browse files Browse the repository at this point in the history
  • Loading branch information
marcdhi committed Jan 23, 2025
1 parent 0904e47 commit 6f2e926
Show file tree
Hide file tree
Showing 13 changed files with 847 additions and 339 deletions.
23 changes: 20 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"react-dom": "^18.3.1",
"react-icons": "^5.4.0",
"react-router": "^7.1.1",
"react-router-dom": "^7.1.3",
"react-typed": "^2.0.12",
"tailwind-merge": "^2.6.0"
},
Expand Down
45 changes: 45 additions & 0 deletions src/components/Button.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import PropTypes from 'prop-types'

const Button = ({
children,
onClick,
className = "",
variant = "primary",
icon = null,
size = "md"
}) => {
const baseStyles = "flex items-center justify-center gap-2 font-medium transition-all duration-300 rounded-full"

const variants = {
primary: "bg-black/80 backdrop-blur-sm text-white hover:bg-black",
secondary: "bg-white/80 backdrop-blur-sm text-black hover:bg-gray-50",
outline: "border-2 border-black text-black hover:bg-black hover:text-white"
}

const sizes = {
sm: "px-5 py-2 text-sm",
md: "px-7 py-3 text-[14px]",
lg: "px-9 py-4 text-base"
}

return (
<button
onClick={onClick}
className={`${baseStyles} ${variants[variant]} ${sizes[size]} ${className}`}
>
{children}
{icon && <span className="text-lg">{icon}</span>}
</button>
)
}

Button.propTypes = {
children: PropTypes.node.isRequired,
onClick: PropTypes.func,
className: PropTypes.string,
variant: PropTypes.oneOf(['primary', 'secondary', 'outline']),
icon: PropTypes.node,
size: PropTypes.oneOf(['sm', 'md', 'lg'])
}

export default Button
66 changes: 64 additions & 2 deletions src/components/footer/index.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,67 @@
export default function Footer () {
import { Link } from "react-router"
import { FiCamera, FiInstagram, FiTwitter, FiYoutube } from "react-icons/fi"

export default function Footer() {
return (
<h1>Footer!</h1>
<footer className="bg-white border-t border-gray-100">
<div className="max-w-7xl mx-auto px-6 py-12">
<div className="grid grid-cols-1 md:grid-cols-4 gap-8">
{/* Brand */}
<div className="col-span-1">
<div className="flex items-center gap-2">
<FiCamera size={24} />
<span className="font-playfair text-xl">Photography Club NITK</span>
</div>
<p className="mt-4 text-sm text-gray-600">
Capturing moments, creating memories, and fostering a community of passionate photographers.
</p>
</div>

{/* Quick Links */}
<div className="col-span-1">
<h3 className="font-medium mb-4">Quick Links</h3>
<div className="flex flex-col gap-2 text-sm text-gray-600">
<Link to="/" className="hover:text-red-500 transition-colors">Events</Link>
<Link to="/portfolio" className="hover:text-red-500 transition-colors">Members</Link>
<Link to="/" className="hover:text-red-500 transition-colors">Blogs</Link>
<Link to="/photo-reels" className="hover:text-red-500 transition-colors">Photo Reel</Link>
</div>
</div>

{/* Resources */}
<div className="col-span-1">
<h3 className="font-medium mb-4">Resources</h3>
<div className="flex flex-col gap-2 text-sm text-gray-600">
<Link to="/" className="hover:text-red-500 transition-colors">Photography Tips</Link>
<Link to="/" className="hover:text-red-500 transition-colors">Equipment Guide</Link>
<Link to="/" className="hover:text-red-500 transition-colors">Join the Club</Link>
<Link to="/" className="hover:text-red-500 transition-colors">Contact Us</Link>
</div>
</div>

{/* Social */}
<div className="col-span-1">
<h3 className="font-medium mb-4">Follow Us</h3>
<div className="flex gap-4">
<a href="#" className="text-gray-600 hover:text-red-500 transition-colors">
<FiInstagram size={20} />
</a>
<a href="#" className="text-gray-600 hover:text-red-500 transition-colors">
<FiTwitter size={20} />
</a>
<a href="#" className="text-gray-600 hover:text-red-500 transition-colors">
<FiYoutube size={20} />
</a>
</div>
</div>
</div>

<div className="mt-12 pt-8 border-t border-gray-100">
<p className="text-center text-sm text-gray-600">
© {new Date().getFullYear()} Photography Club NITK. All rights reserved.
</p>
</div>
</div>
</footer>
)
}
82 changes: 44 additions & 38 deletions src/components/header/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { FaRegUser } from "react-icons/fa";
import { AiOutlineClose, AiOutlineMenu } from 'react-icons/ai'
import { useState } from "react";
import { useTheme } from "../../context/ThemeContext"
import Button from "../Button"

export default function Header() {
const [nav, setNav] = useState(false)
Expand All @@ -19,78 +20,83 @@ export default function Header() {
<header className="
z-10
fixed top-0 left-0 right-0
h-[65px]
bg-navbar bg-opacity-50 backdrop-blur-lg font-test text-primary
border-b-2 border-b-secondary
h-[70px]
bg-white/80 backdrop-blur-xl
border-b border-gray-100
flex justify-between items-center
px-10
px-container-px md:px-container-px-md
">
<Link to="/">
<img
src={logo}
alt="PClub Logo"
className={`w-[90px] ${theme === 'light' ? 'invert' : ''}`}
alt="Photography Club NITK"
className={`w-[50px] ${theme === 'light' ? 'invert' : ''}`}
/>
</Link>
<div className="hidden md:flex items-center justify-center gap-5">
<Link to="/">
<div className="hidden md:flex items-center justify-center gap-8 text-sm tracking-wide">
<Link to="/" className="hover:text-red-500 transition-colors">
Events
</Link>
<Link to="/portfolio">
<Link to="/portfolio" className="hover:text-red-500 transition-colors">
Members
</Link>
<Link to="/">
<Link to="/" className="hover:text-red-500 transition-colors">
Blogs
</Link>
|
<Link to="/photo-reels">
<div className="flex items-center gap-2">
<FiCamera size={20} />
<p>Photo Reel</p>
</div>
<Button variant="outline" size="sm" icon={<FiCamera />}>
Photo Reel
</Button>
</Link>
</div>
<div onClick={handleNav} className='block md:hidden'>
<AiOutlineMenu size={20} />
</div>
<div className="hidden md:block">
<div className="flex items-center gap-2">
<FaRegUser className="w-[17px] h-[17px]" />
<p>Club Member</p>
</div>
<Button variant="secondary" size="sm" icon={<FaRegUser />}>
Club Member
</Button>
</div>
</header>

</header >
<div className={`fixed ease-in duration-100 ${nav ? "z-20 text-primary left-0 top-0 w-[70%] border-r-2 border-secondary h-screen bg-green/50 backdrop-blur-2xl" : "left-[-100%]"}`}>
<div className="pt-10 pr-4 flex justify-between flex-col items-end w-[100%] text-primary">
<div onClick={handleNav} >
<AiOutlineClose size={30} />
{/* Mobile Menu */}
<div className={`fixed ease-in duration-200 ${nav ? "z-20 left-0 top-0 w-[70%] h-screen bg-white/95 backdrop-blur-xl" : "left-[-100%]"}`}>
<div className="px-container-px py-8 flex flex-col h-full">
<div className="flex justify-between items-center">
<img
src={logo}
alt="Photography Club NITK"
className={`w-[40px] ${theme === 'light' ? 'invert' : ''}`}
/>
<div onClick={handleNav} className="cursor-pointer">
<AiOutlineClose size={20} />
</div>
</div>
<ul className='p-4 pt-10 flex flex-col gap-5 w-full'>
<Link onClick={handleNav} to="/">
<div className='flex flex-col gap-6 mt-12'>
<Link onClick={handleNav} to="/" className="hover:text-red-500 transition-colors">
Events
</Link>
<Link onClick={handleNav} to="/portfolio">
<Link onClick={handleNav} to="/portfolio" className="hover:text-red-500 transition-colors">
Members
</Link>
<Link onClick={handleNav} to="/">
<Link onClick={handleNav} to="/" className="hover:text-red-500 transition-colors">
Blogs
</Link>
<hr className="border-tertiary" />
<Link onClick={handleNav} to="/photo-reels">
<hr className="border-gray-100" />
<Link onClick={handleNav} to="/photo-reels" className="hover:text-red-500 transition-colors">
<div className="flex items-center gap-2">
<FiCamera size={20} />
<p>Photo Reel</p>
<FiCamera size={18} />
<span>Photo Reel</span>
</div>
</Link>
<hr className="border-tertiary" />
<div onClick={handleNav} className="flex items-center gap-2">
<FaRegUser className="w-[17px] h-[17px]" />
<p>Club Member</p>
<hr className="border-gray-100" />
<div onClick={handleNav} className="flex items-center gap-2 hover:text-red-500 transition-colors">
<FaRegUser size={16} />
<span>Club Member</span>
</div>
</ul>
</div>
</div>
</div >
</div>
</>
)
}
Loading

0 comments on commit 6f2e926

Please sign in to comment.