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

Partners Update #24

Merged
merged 4 commits into from
Dec 10, 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
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
Loading