mirror of
https://github.com/Snigdha-OS/Snigdha-OS.github.io.git
synced 2026-01-04 01:53:52 +01:00
Prepare for GitHub Pages deployment
This commit is contained in:
29
src/components/gallery/CategoryFilter.tsx
Normal file
29
src/components/gallery/CategoryFilter.tsx
Normal file
@@ -0,0 +1,29 @@
|
||||
import { motion } from 'framer-motion';
|
||||
|
||||
interface CategoryFilterProps {
|
||||
categories: string[];
|
||||
selectedCategory: string;
|
||||
onSelect: (category: string) => void;
|
||||
}
|
||||
|
||||
export function CategoryFilter({ categories, selectedCategory, onSelect }: CategoryFilterProps) {
|
||||
return (
|
||||
<div className="flex flex-wrap justify-center gap-3 mb-8">
|
||||
{categories.map((category) => (
|
||||
<motion.button
|
||||
key={category}
|
||||
whileHover={{ scale: 1.05 }}
|
||||
whileTap={{ scale: 0.95 }}
|
||||
onClick={() => onSelect(category)}
|
||||
className={`px-4 py-2 rounded-full text-sm font-medium transition-colors ${
|
||||
selectedCategory === category
|
||||
? 'bg-cornflower-blue text-white'
|
||||
: 'bg-white text-gray-600 hover:bg-gray-100'
|
||||
}`}
|
||||
>
|
||||
{category}
|
||||
</motion.button>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
30
src/components/gallery/GalleryImage.tsx
Normal file
30
src/components/gallery/GalleryImage.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import { motion } from 'framer-motion';
|
||||
|
||||
interface GalleryImageProps {
|
||||
src: string;
|
||||
alt: string;
|
||||
category: string;
|
||||
}
|
||||
|
||||
export function GalleryImage({ src, alt, category }: GalleryImageProps) {
|
||||
return (
|
||||
<motion.div
|
||||
initial={{ opacity: 0, scale: 0.9 }}
|
||||
whileInView={{ opacity: 1, scale: 1 }}
|
||||
whileHover={{ y: -5 }}
|
||||
className="relative group overflow-hidden rounded-lg"
|
||||
>
|
||||
<img
|
||||
src={src}
|
||||
alt={alt}
|
||||
className="w-full h-64 object-cover transform group-hover:scale-110 transition-transform duration-500"
|
||||
/>
|
||||
<div className="absolute inset-0 bg-gradient-to-t from-black/70 to-transparent opacity-0 group-hover:opacity-100 transition-opacity">
|
||||
<div className="absolute bottom-0 left-0 right-0 p-4">
|
||||
<p className="text-white font-medium">{alt}</p>
|
||||
<span className="text-sm text-gray-300">{category}</span>
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user