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

Add affiliates section #61

Merged
merged 16 commits into from
Sep 9, 2024
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
Binary file added public/affiliates/hello_prenup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
52 changes: 52 additions & 0 deletions src/app/components/AffiliatesSection.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import Link from 'next/link';
import Image from 'next/image';
import { Interface } from 'readline';
import styles from '../css/AffiliatesSection.module.css';

interface Affiliate {
name: string;
filename: string;
url: string;
height: number;
width: number;
}

const affiliates: Array<Affiliate> = [
{
name: 'Hello Prenup',
filename: 'hello_prenup.png',
url: 'https://helloprenup.com/',
height: 226,
width: 1280,
},
];

export default function AffiliatesBlock() {
return (
<section
id="affiliates-section"
className={styles.AffiliatesSection + ' container-fluid my-5 p-4'}
>
<div className={styles.AffiliatesContainer}>
<p className="text-center">
We would also like to thank the LIT Lab's{' '}
<a href="https://suffolklitlab.org/#affiliates">affiliates</a>,
including:
</p>
{affiliates.map((affiliate) => {
return (
<Link href={affiliate.url} className="d-block" key={affiliate.name}>
<Image
src={'affiliates/' + affiliate.filename}
alt={affiliate.name}
className={styles.AffiliateLogo}
height={affiliate.height}
width={affiliate.width}
/>
</Link>
);
})}
</div>
</section>
);
}
19 changes: 19 additions & 0 deletions src/app/css/AffiliatesSection.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.AffiliatesSection {
background: rgba(0,0,0,.1);

}

.AffiliatesContainer {
margin-right: auto;
margin-left: auto;
max-width: 576px;

& > :not(:last-child) {
margin-bottom: 1em;
}
}

.AffiliateLogo {
height: auto;
max-width: 100%;
}
4 changes: 3 additions & 1 deletion src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import AffiliatesSection from './components/AffiliatesSection';
import HeroSection from './components/HeroSection';
import HowItWorksSection from './components/HowItWorksSection';
import TopicsSection from './components/TopicsSection';
import HeroSection from './components/HeroSection';
import { fetchInterviews } from '../data/fetchInterviewData';

export default async function Page() {
Expand All @@ -19,6 +20,7 @@ export default async function Page() {
interviews={interviewsByTopic}
isError={isError}
/>
<AffiliatesSection />
</div>
);
}