Skip to content

Commit

Permalink
Merge pull request #24 from plastic-labs/dm/partners-update
Browse files Browse the repository at this point in the history
Partners Update
  • Loading branch information
mckelvey authored Dec 10, 2024
2 parents 0a45ac5 + fd680c4 commit 82a7bf2
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 11 deletions.
2 changes: 2 additions & 0 deletions components/composed/partners/partners.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ const partnerHref: Record<PartnerName, string> = {
'white-star-capital': 'https://whitestarcapital.com/digital-asset-fund/',
'seed-club-ventures': 'https://seedclub.ventures/',
'thomas-howell': 'https://x.com/seethomasowl',
'nima-ashgari': 'https://x.com/insideNiMA',
triplicate: 'https://www.triplicate.xyz/',
}

const partnersScroll = keyframes`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,21 @@ export const PARTNERS: Record<PartnerName, Partner> = {
name: 'White Star Capital',
},
'seed-club-ventures': {
imageSrc: '/partner/seed-club-ventures.svg',
imageScale: 0.7,
imageSrc: '/partner/seed-club-ventures.png',
imageScale: 0.6,
name: 'Seed Club Ventures',
offsetX: -5,
offsetY: -10,
},
'thomas-howell': {
name: 'Thomas Howell',
},
'nima-ashgari': {
name: 'NiMA Asghari',
},
triplicate: {
imageSrc: '/partner/triplicate.svg',
imageScale: 0.55,
name: 'Triplicate',
},
}
30 changes: 22 additions & 8 deletions components/interactive/links/link-partner/link-partner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ const StyledPartner = styled.a`
}
`

const StyledImage = styled.img<{ $imageScale?: number }>`
const StyledImage = styled.img<{
$imageScale?: number
$offsetX?: number
$offsetY?: number
}>`
width: 100%;
transition: filter var(--ui-transition-speed) ease;
Expand All @@ -68,28 +72,38 @@ const StyledImage = styled.img<{ $imageScale?: number }>`
`
: ''}
${({ $imageScale }) =>
$imageScale
${({ $imageScale, $offsetX, $offsetY }) =>
$imageScale || $offsetX || $offsetY
? css`
transform: scale(${$imageScale});
transform: ${$imageScale ? `scale(${$imageScale}) ` : ''}${$offsetX || $offsetY ? `translate(${$offsetX || 0}%, ${$offsetY || 0}%)` : ''};
`
: ''}
`

const StyledPartnerNameOnly = styled(Text)`
text-transform: none;
`

export const LinkPartner: React.FC<LinkPartnerProps> = ({
partnerName,
...props
}) => {
const { imageScale, imageSrc, name } = PARTNERS[partnerName]
const { imageScale, imageSrc, name, offsetX, offsetY } = PARTNERS[partnerName]

return (
<StyledPartner target="_blank" rel="noopener" {...props}>
{imageSrc ? (
<StyledImage alt={name} src={imageSrc} $imageScale={imageScale} />
<StyledImage
alt={name}
src={imageSrc}
$imageScale={imageScale}
$offsetX={offsetX}
$offsetY={offsetY}
/>
) : (
<Text align="center" variant="H3">
<StyledPartnerNameOnly align="center" variant="H3">
{name}
</Text>
</StyledPartnerNameOnly>
)}
</StyledPartner>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export const partnerNames = [
'white-star-capital',
'seed-club-ventures',
'thomas-howell',
'nima-ashgari',
'triplicate',
] as const
export type PartnerName = (typeof partnerNames)[number]

Expand All @@ -22,4 +24,6 @@ export interface Partner {
imageSrc?: string
imageScale?: number
name: string
offsetX?: number // +/- integer percent
offsetY?: number // +/- integer percent
}
Binary file added public/partner/seed-club-ventures.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion public/partner/seed-club-ventures.svg

This file was deleted.

Loading

0 comments on commit 82a7bf2

Please sign in to comment.