-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1388ee7
commit 2ea1709
Showing
13 changed files
with
160 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"title": "Solana Blinks", | ||
"description": "Solana の Blockchain Links (通称: Blinks) を使えば、X や Discord など、インターネット上のあらゆる場所でトランザクションを行うことができます。Blinks はウェブサイトやアプリにも簡単に統合可能です。" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"title": "Solana Blinks", | ||
"description": "With Solana’s Blockchain Links (commonly known as Blinks), you can perform transactions anywhere on the internet, including platforms like X and Discord. Blinks can be easily integrated into websites and apps." | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
102 changes: 102 additions & 0 deletions
102
routes/[locale]/(default)/blinks/(_rows)/BlinksHeroRow.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
'use client' | ||
|
||
import { cn } from '@/lib/utils.ts' | ||
import { ExtendedState } from '@/utils/state.ts' | ||
import Image from '@/islands/ui/Image.tsx' | ||
import { | ||
lightTextColor, | ||
mainShardGradation, | ||
} from '@/components/utils/tailwinds.ts' | ||
import { createTranslator } from 'fresh-i18n' | ||
import { asset } from 'fresh/runtime' | ||
import { | ||
ICON_OPOS_COMPRESSED_COIL, | ||
SOLANA_BLINKS_IMG, | ||
SOLANA_LOGO_HORIZONTAL, | ||
SOLANA_LOGO_INVERT_HORIZONTAL, | ||
} from '@/components/utils/img.ts' | ||
import { SOLANA_ACTIONS_WEB_LINK } from '@/constants/links.ts' | ||
|
||
const logos = [ | ||
{ | ||
title: 'Solana', | ||
logo: asset(SOLANA_LOGO_HORIZONTAL), | ||
logoInvert: asset(SOLANA_LOGO_INVERT_HORIZONTAL), | ||
href: SOLANA_ACTIONS_WEB_LINK, | ||
}, | ||
] | ||
|
||
type Props = { | ||
state: ExtendedState | ||
} | ||
|
||
export default function BlinksHeroRow( | ||
{ state }: Props, | ||
) { | ||
const t = createTranslator(state.translationData) | ||
console.log('BlinksHeroRow', state) | ||
|
||
return ( | ||
<> | ||
<div className='relative mx-auto max-w-7xl p-3'> | ||
<div className='absolute left-0 top-0 opacity-20 dark:opacity-40'> | ||
<img | ||
src={asset(ICON_OPOS_COMPRESSED_COIL)} | ||
alt='Background' | ||
className='h-56 w-56 sm:h-64 sm:w-64 md:h-96 md:w-96 lg:h-[512px] lg:w-[512px]' | ||
/> | ||
</div> | ||
|
||
<div className='relative mx-auto grid items-center gap-8 py-24 md:grid-cols-2 md:py-48'> | ||
<div className='grid w-full gap-4 p-4'> | ||
<h2 | ||
className={cn( | ||
'py-2', | ||
'font-bold tracking-tighter', | ||
'text-5xl sm:text-7xl lg:text-8xl', | ||
mainShardGradation, | ||
)} | ||
> | ||
{t('blinks.title')} | ||
</h2> | ||
<p | ||
className={cn( | ||
'max-w-96 lg:-mt-2', | ||
'font-medium tracking-tight', | ||
'text-lg sm:max-w-lg sm:text-xl lg:max-w-xl lg:text-2xl', | ||
lightTextColor, | ||
)} | ||
> | ||
{t('blinks.description')} | ||
</p> | ||
<div className='mt-4 flex flex-wrap items-center justify-start gap-4'> | ||
{logos.map((item) => ( | ||
<a | ||
key={item.title} | ||
href={item.href} | ||
className='hover:opacity-80' | ||
target='_blank' | ||
rel='noopener noreferrer' | ||
> | ||
<Image | ||
lightSrc={item.logo} | ||
darkSrc={item.logoInvert} | ||
alt={item.title} | ||
className='w-20 sm:w-24 md:w-28' | ||
/> | ||
</a> | ||
))} | ||
</div> | ||
</div> | ||
<div className='mx-auto w-full p-4'> | ||
<img | ||
src={asset(SOLANA_BLINKS_IMG)} | ||
alt='Solana Actions & Blinks' | ||
className='w-full' | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { define } from '@/utils/state.ts' | ||
import { asset } from 'fresh/runtime' | ||
import { page } from 'fresh' | ||
import CTARow from '@/routes/[locale]/(default)/(_rows)/CTARow.tsx' | ||
import ProductsSlideRow from '@/islands/rows/products/ProductsSlideRow.tsx' | ||
import NewsIndexRow from '@/islands/rows/news/NewsIndexRow.tsx' | ||
import BlinksHeroRow from '@/routes/[locale]/(default)/blinks/(_rows)/BlinksHeroRow.tsx' | ||
|
||
export const handler = define.handlers({ | ||
GET(ctx) { | ||
ctx.state.title = 'blinks.title' | ||
ctx.state.description = 'blinks.description' | ||
ctx.state.ogImage = new URL(asset('/ogp.jpg'), ctx.url).href | ||
return page() | ||
}, | ||
}) | ||
|
||
export default define.page<typeof handler>(function BlinksPage(props) { | ||
return ( | ||
<> | ||
<BlinksHeroRow state={props.state} /> | ||
<CTARow state={props.state} /> | ||
<ProductsSlideRow /> | ||
<NewsIndexRow defaultShowCounts={3} /> | ||
</> | ||
) | ||
}) |
Binary file not shown.