Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gallery section #364

Closed
wants to merge 3 commits into from
Closed
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
Binary file added src/assets/gallery/image1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/gallery/image2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/gallery/image3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/gallery/image4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/gallery/image5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/gallery/image6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/gallery/image7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/gallery/image8.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/gallery/image9.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions src/assets/gallery/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import image1 from './image1.png';
import image2 from './image2.png';
import image3 from './image3.png';
import image4 from './image4.png';
import image5 from './image5.png';
import image6 from './image6.png';
import image7 from './image7.png';
import image8 from './image8.jpg';
import image9 from './image9.jpeg';

const images = [image1, image2, image3, image4, image5, image6, image7,image8,image9];

export default images;
1 change: 1 addition & 0 deletions src/components/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const Navbar = () => {
{ name: "Home", link: "/" },
{ name: "About Us", link: "/#aboutCommunity" },
{ name: "Events", link: "/events" },
{ name: "Gallery", link: "/gallery" },
{ name: "Team", link: "/team" },
{ name: "FAQs", link: "/#faqs" },
{ name: "Contributors", link: "/Contributors" },
Expand Down
52 changes: 52 additions & 0 deletions src/pages/gallery/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import images from '@/assets/gallery/index';
import Footer from '@/components/Footer';
import Navbar from '@/components/Navbar';
import ScrollToTop from '@/components/ScrollToTop';
import Image from 'next/image';
import { useState } from 'react';

const Gallery = () => {
const [hoveredIndex, setHoveredIndex] = useState(null);

return (
<>
<Navbar />
<div style={{ marginTop: 80, marginBottom: 50, color: 'white', alignItems: 'center' }}>
<h1 className="text-5xl font-bold text-center text-blue-500">Welcome to the DevsinTech Community Gallery Page!</h1>
</div>

<div className="flex flex-wrap justify-center">
{images.map((image, index) => (
<div
key={index}
className="w-1/2 sm:w-1/3 lg:w-1/6 p-4 relative overflow-hidden transition duration-500 transform hover:-translate-y-1 hover:scale-110"
onMouseEnter={() => setHoveredIndex(index)}
onMouseLeave={() => setHoveredIndex(null)}
>
<div
className={`w-full h-40 ${hoveredIndex === index ? 'grayscale-0' : 'grayscale'}`}
style={{
border: '2px solid',
borderColor: hoveredIndex === index ? '#AF7AF2' : 'transparent',
borderWidth: hoveredIndex === index ? '4px' : '2px',
background: 'linear-gradient(to right, #AF7AF2, #A5F7A8, #AF7AF2)',
}}
>
<Image
src={image}
alt={`Image ${index + 1}`}
layout="fill"
objectFit="cover"
/>
</div>
</div>
))}
</div>

<ScrollToTop />
<Footer />
</>
);
};

export default Gallery;