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

make section for large meetup image (WEB-35) #73 #84

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
18 changes: 18 additions & 0 deletions src/app/components/groupPhotoSection/groupPhotoSection.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@800&display=swap');

.groupPhotoSection {
background-color: #3c3db9;
display: flex;
align-items: center;
justify-content: center;
padding: 2em 1.5em;
}

.groupPhotoImg {
border: #eeeeee 5px solid;
width: 100%;
height: auto;
justify-content: center;
align-items: center;
border-radius: 10px;
}
14 changes: 14 additions & 0 deletions src/app/components/groupPhotoSection/groupPhotoSection.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react'; // Import React
import { render, screen } from '@testing-library/react';
import GroupPhotoSection from './heroSection';

describe('GroupPhotoSection component', () => {
const labelMap = {
lblHero: "You don't have to code alone.",
};
test('renders the component', () => {
render(<GroupPhotoSection label={labelMap.lblHero} />);
const groupPhotoElement = screen.getByTestId('hero');
expect(groupPhotoElement).toBeInTheDocument();
});
});
20 changes: 20 additions & 0 deletions src/app/components/groupPhotoSection/groupPhotoSection.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
'use client';

import React from 'react';
import styles from './groupPhotoSection.module.css';
import Image from 'next/image';
import { detectContentType } from 'next/dist/server/image-optimizer';

export default function GroupPhotoSection({ label }: { label: string }) {
return (
<div className={styles.groupPhotoSection} data-testid='groupPhoto'>
<Image
className={styles.groupPhotoImg}
src='/assets/meetupGroupShot5.png'
alt='Meetup Group Shot image'
width={1450}
height={500}
/>
</div>
);
}
2 changes: 2 additions & 0 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import BannerSection from './components/bannerSection/bannerSection';
import HeroSection from './components/heroSection/heroSection';
import Navbar from './components/navbar/navbar';
import styles from './page.module.css';
import GroupPhotoSection from './components/groupPhotoSection/groupPhotoSection';

export default function Home() {
const labelMap = {
Expand Down Expand Up @@ -41,6 +42,7 @@ export default function Home() {
<HeroSection label={labelMap.lblHero} />
<BannerSection label={labelMap} />
<CardsSection label={labelMap} />
<GroupPhotoSection label='' />
</main>
);
}
Loading