Skip to content

Commit 5d82ea0

Browse files
committed
stylistic fixes
1 parent 9eaf941 commit 5d82ea0

3 files changed

Lines changed: 24 additions & 9 deletions

File tree

components/homepage/partnerSection.jsx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ export default function PartnerSection({ partners }) {
2020
<h3 className="tier-label">{tier}</h3>
2121
<div className="sponsor-row">
2222
{tierPartners.map(({ name, logoUrl, link }) => (
23-
<a href={link} key={name}>
23+
<a href={link} key={name} className="sponsor-item">
2424
<img width="150" src={logoUrl} className="partner-logos" alt={`${name} logo`} />
25+
<p className="sponsor-name">{name}</p>
2526
</a>
2627
))}
2728
</div>
@@ -69,6 +70,18 @@ export default function PartnerSection({ partners }) {
6970
justify-content: space-evenly;
7071
align-items: center;
7172
}
73+
.sponsor-item {
74+
display: flex;
75+
flex-direction: column;
76+
align-items: center;
77+
}
78+
.sponsor-name {
79+
margin: 8px 0 0;
80+
font-size: 14px;
81+
color: #373f46;
82+
opacity: 0.7;
83+
text-align: center;
84+
}
7285
`}</style>
7386
</Section>
7487
);

public/images/placeholder.webp

19.6 KB
Loading

utils/fetchContent.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ const notion = new Client({
88
const space = process.env.NEXT_PUBLIC_CONTENTFUL_SPACE_ID;
99
const accessToken = process.env.NEXT_PUBLIC_CONTENTFUL_ACCESS_TOKEN;
1010

11+
const PLACEHOLDER_IMAGE = '/images/placeholder.webp';
12+
1113
const safeExtract = (value, fallback = '') => {
1214
const result = extractPlainText(value || []);
1315
return result || fallback;
@@ -26,7 +28,7 @@ function formatMemberData(page) {
2628
name: safeExtract(properties.name?.title),
2729
title: properties.title?.select?.name || '',
2830
image: {
29-
url: properties.image?.url || ''
31+
url: properties.image?.url || PLACEHOLDER_IMAGE
3032
},
3133
linkedIn: properties.linkedIn?.url || properties.linkedin?.url || '',
3234
classOf: properties.class?.select?.name || '',
@@ -47,7 +49,7 @@ function formatProjectData(page) {
4749
team: properties.team?.people?.map(person => person.name || person.id).join(', ') || '',
4850
description: safeExtract(properties.description?.rich_text || []),
4951
thumbnail: {
50-
url: properties.thumbnail?.url || '',
52+
url: properties.thumbnail?.url || PLACEHOLDER_IMAGE,
5153
description: safeExtract(properties.thumbnailDescription?.rich_text) || ''
5254
},
5355
urlSlug: safeExtract(properties.urlSlug?.rich_text) ||
@@ -60,7 +62,7 @@ function formatPartnerData(page) {
6062
const properties = page.properties;
6163
return {
6264
name: safeExtract(properties.name?.title),
63-
logoUrl: properties.logoUrl?.url || '',
65+
logoUrl: properties.logoUrl?.url || PLACEHOLDER_IMAGE,
6466
link: properties.link?.url || '',
6567
tier: properties.tier?.select?.name || '',
6668
order: properties.order?.number ?? 0,
@@ -85,7 +87,7 @@ function formatTimelineStep(page) {
8587
header: safeExtract(properties.header?.rich_text || []),
8688
body: safeExtract(properties.bodyText?.rich_text || []),
8789
image: {
88-
url: properties.imageUrl?.url || '',
90+
url: properties.imageUrl?.url || PLACEHOLDER_IMAGE,
8991
description: safeExtract(properties.imageDescription?.rich_text || []),
9092
},
9193
};
@@ -148,7 +150,7 @@ export async function fetchProjectDetail(urlSlug) {
148150
title: safeExtract(properties.title?.title || properties.name?.title || []),
149151
description: safeExtract(properties.description?.rich_text || []),
150152
thumbnail: {
151-
url: properties.thumbnail?.url || properties.thumbnail?.files?.[0]?.file?.url || '',
153+
url: properties.thumbnail?.url || properties.thumbnail?.files?.[0]?.file?.url || PLACEHOLDER_IMAGE,
152154
description: safeExtract(properties.thumbnail_description?.rich_text || [])
153155
},
154156
finalProductLink: properties.final_product_link?.url || '',
@@ -169,13 +171,13 @@ export async function fetchProjectDetail(urlSlug) {
169171
pmtlCollection: {
170172
items: properties.pmtl?.people?.map(person => ({
171173
name: person.name || 'Team Member',
172-
image: { url: person.avatar_url || '' },
174+
image: { url: person.avatar_url || PLACEHOLDER_IMAGE },
173175
})) || []
174176
},
175177
teamMembersCollection: {
176178
items: properties.team?.people?.map(person => ({
177179
name: person.name || 'Team Member',
178-
image: { url: person.avatar_url || '' },
180+
image: { url: person.avatar_url || PLACEHOLDER_IMAGE },
179181
})) || []
180182
}
181183
};
@@ -278,7 +280,7 @@ export async function fetchMemberDetail(urlSlug) {
278280
name: safeExtract(properties.name?.title || []),
279281
title: properties.title?.select?.name || '',
280282
image: {
281-
url: properties.image?.url || '',
283+
url: properties.image?.url || PLACEHOLDER_IMAGE,
282284
description: safeExtract(properties.name?.title || []) + ' profile photo'
283285
},
284286
linkedIn: properties.linkedin?.url || '',

0 commit comments

Comments
 (0)