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

feat: added gallery section #32

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions src/app/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default function App() {
<Routes>
<Route exact path='/' element={<Pages.Home />} />
<Route path='/play' element={<Pages.Playground />} />
<Route path='/play/gallery' element={<Pages.Gallery />} />
</Routes>
</Suspense>
</>
Expand Down
71 changes: 71 additions & 0 deletions src/components/GallerySection/GalleryMain.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import { Heading, Text } from '../shared/index.js';
import galleryData from '../../config/content/galleryData.js';
import { useNavigate } from 'react-router-dom';

function GalleryMain() {
const navigate = useNavigate();

const goToGalleryPage = () => {
navigate('./gallery');
};

return (
<div className='w-90 mx-auto flex flex-col items-center mb-[40px] gap-y-[80px]'>
<Heading
variant='h1'
style={{
fontSize: '80px',
color: '#F2DA05',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can use this class instead of inline css, text-primary-yellow

textShadow: '4.608px 4.608px 0px #000',
webkitTextStrokeWidth: '0px',
webkitTextStrokeColor: '#252525',
}}>
25 YEARS SINCE....
</Heading>
<div className='flex flex-col gap-y-[90px]'>
<div className='w-full flex flex-row gap-x-[150px]'>
{galleryData.firstRowImages.map(({ src, alt, id }) => (
<div
key={id}
style={{
borderRadius: '4.5px',
border: '0.75px solid #000',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

border-black border-solid rounded-s
px-[9px]

padding: '10.2px 9px 55.3px 9px',
background: '#FFF',
boxShadow: '1.5px 2.25px 0px 0px #000',
}}>
<img src={src} alt={alt} className='w-full h-auto object-cover rounded-md' />
</div>
))}
</div>
<div className='w-full flex flex-row justify-around mx-auto'>
{galleryData.secondRowImages.map(({ src, alt, id }) => (
<div
key={id}
style={{
borderRadius: '4.5px',
border: '0.75px solid #000',
padding: '10.2px 9px 55.3px 9px',
background: '#FFF',
boxShadow: '1.5px 2.25px 0px 0px #000',
}}>
<img src={src} alt={alt} className='w-full h-auto object-cover rounded-md' />
</div>
))}
</div>
</div>
<div className='w-full flex justify-center'>
<button
onClick={goToGalleryPage}
className='px-[18px] py-[12px] rounded-[14px] border-[3px] border-solid border-[#000]'
style={{
background: 'var(--Accent-Yellow, #F2DA05)',
}}>
<Text variant='navButton'>{galleryData.mainButtonText}</Text>
</button>
</div>
</div>
);
}

export default GalleryMain;
54 changes: 54 additions & 0 deletions src/components/GallerySection/GalleryPage.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import galleryData from '../../config/content/galleryData.js';
import { Heading, Text } from '../shared/index.js';
import { useNavigate } from 'react-router-dom';

function GalleryPage() {
const navigate = useNavigate();

const goToGalleryMain = () => {
navigate('/play');
};

return (
<div className='w-[90%] mx-auto flex flex-col items-center mb-[40px] gap-y-[105px]'>
<Heading
variant='h1'
style={{
fontSize: '80px',
color: '#F2DA05',
Copy link
Member

@Srish-ty Srish-ty Apr 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

text-primary-yellow

textShadow: '4.608px 4.608px 0px #000',
webkitTextStrokeWidth: '2.71052622795105',
webkitTextStrokeColor: '#252525',
}}>
{galleryData.headerText}
</Heading>
<div className='w-full grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-[45px] gap-y-[70px]'>
{galleryData.images.map(({ id, src, alt }) => (
<div
key={id}
style={{
borderRadius: '4.5px',
border: '0.75px solid #000',
padding: '10.2px 9px 55.3px 9px',
background: '#FFF',
boxShadow: '1.5px 2.25px 0px 0px #000',
}}>
<img src={src} alt={alt} className='w-full h-auto object-cover' />
</div>
))}
</div>
<div className='w-full flex justify-end'>
<button
onClick={goToGalleryMain}
className='px-[18px] py-[12px] rounded-[14px] border-[3px] border-solid border-[#000]'
style={{
background: 'var(--Accent-Yellow, #F2DA05)',
}}>
<Text variant='navButton'>{galleryData.buttonText}</Text>
</button>
</div>
</div>
);
}

export default GalleryPage;
117 changes: 117 additions & 0 deletions src/config/content/galleryData.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
export default {
id: 'Gallery',
headerText: 'GALLERY',
buttonText: 'Back',
mainButtonText: 'View More',
images: [
{
id: 1,
src: 'https://res.cloudinary.com/dv1src8un/image/upload/v1711788300/gallery_z7ofs5.png',
alt: '',
},
{
id: 1,
src: 'https://res.cloudinary.com/dv1src8un/image/upload/v1711788300/gallery_z7ofs5.png',
alt: '',
},
{
id: 1,
src: 'https://res.cloudinary.com/dv1src8un/image/upload/v1711788300/gallery_z7ofs5.png',
alt: '',
},
{
id: 1,
src: 'https://res.cloudinary.com/dv1src8un/image/upload/v1711788300/gallery_z7ofs5.png',
alt: '',
},
{
id: 1,
src: 'https://res.cloudinary.com/dv1src8un/image/upload/v1711788300/gallery_z7ofs5.png',
alt: '',
},
{
id: 1,
src: 'https://res.cloudinary.com/dv1src8un/image/upload/v1711788300/gallery_z7ofs5.png',
alt: '',
},
{
id: 1,
src: 'https://res.cloudinary.com/dv1src8un/image/upload/v1711788300/gallery_z7ofs5.png',
alt: '',
},
{
id: 1,
src: 'https://res.cloudinary.com/dv1src8un/image/upload/v1711788300/gallery_z7ofs5.png',
alt: '',
},
{
id: 1,
src: 'https://res.cloudinary.com/dv1src8un/image/upload/v1711788300/gallery_z7ofs5.png',
alt: '',
},
{
id: 1,
src: 'https://res.cloudinary.com/dv1src8un/image/upload/v1711788300/gallery_z7ofs5.png',
alt: '',
},
{
id: 1,
src: 'https://res.cloudinary.com/dv1src8un/image/upload/v1711788300/gallery_z7ofs5.png',
alt: '',
},
{
id: 1,
src: 'https://res.cloudinary.com/dv1src8un/image/upload/v1711788300/gallery_z7ofs5.png',
alt: '',
},
{
id: 1,
src: 'https://res.cloudinary.com/dv1src8un/image/upload/v1711788300/gallery_z7ofs5.png',
alt: '',
},
{
id: 1,
src: 'https://res.cloudinary.com/dv1src8un/image/upload/v1711788300/gallery_z7ofs5.png',
alt: '',
},
{
id: 1,
src: 'https://res.cloudinary.com/dv1src8un/image/upload/v1711788300/gallery_z7ofs5.png',
alt: '',
},
{
id: 1,
src: 'https://res.cloudinary.com/dv1src8un/image/upload/v1711788300/gallery_z7ofs5.png',
alt: '',
},
],
firstRowImages: [
{
id: 1,
src: 'https://res.cloudinary.com/dv1src8un/image/upload/v1711788300/gallery_z7ofs5.png',
alt: '',
},
{
id: 1,
src: 'https://res.cloudinary.com/dv1src8un/image/upload/v1711788300/gallery_z7ofs5.png',
alt: '',
},
{
id: 1,
src: 'https://res.cloudinary.com/dv1src8un/image/upload/v1711788300/gallery_z7ofs5.png',
alt: '',
},
],
secondRowImages: [
{
id: 1,
src: 'https://res.cloudinary.com/dv1src8un/image/upload/v1711788300/gallery_z7ofs5.png',
alt: '',
},
{
id: 1,
src: 'https://res.cloudinary.com/dv1src8un/image/upload/v1711788300/gallery_z7ofs5.png',
alt: '',
},
],
};
13 changes: 13 additions & 0 deletions src/pages/gallery.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import GalleryPage from '../components/GallerySection/GalleryPage.jsx';
import Navbar from '../components/shared/NavBar';
import Footer from '../components/shared/marginals/footer';

export default function Gallery() {
return (
<div>
<Navbar />;
<GalleryPage />;
<Footer />
</div>
);
}
1 change: 1 addition & 0 deletions src/pages/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ import { lazy } from 'react';
export default {
Home: lazy(() => import('./home')),
Playground: lazy(() => import('./playground')),
Gallery: lazy(() => import('./gallery')),
};
4 changes: 2 additions & 2 deletions src/pages/playground.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Hero from '../components/Hero';
import GalleryMain from '../components/GallerySection/GalleryMain.jsx';
export default function Playground() {
return <Hero />;
return <GalleryMain />;
}