@@ -2,10 +2,12 @@ import { GetStaticProps, type NextPage } from 'next'
2
2
import { Trans , useTranslation } from 'next-i18next'
3
3
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
4
4
import Image , { StaticImageData } from 'next/image'
5
- import { ComponentProps , FC , PropsWithChildren , useEffect , useMemo , useState } from 'react'
5
+ import { ComponentProps , FC , PropsWithChildren , useCallback , useEffect , useMemo , useState } from 'react'
6
6
import clsx from 'clsx'
7
7
import Link from 'next/link'
8
8
import { UAParser } from 'ua-parser-js'
9
+ import Spline from '@splinetool/react-spline'
10
+ import { Application } from '@splinetool/runtime'
9
11
import { Page } from '../../components/Page'
10
12
import styles from './index.module.scss'
11
13
import TopShadow from './top-shadow.svg'
@@ -14,9 +16,6 @@ import IconOval from './oval.svg'
14
16
import IconGithub from './github.svg'
15
17
import ImgNeuronOverviewEN from './neuron-overview-en.png'
16
18
import ImgNeuronOverviewZH from './neuron-overview-zh.png'
17
- import ImgEasy from './easy.png'
18
- import ImgPrivate from './private.png'
19
- import ImgReliable from './reliable.png'
20
19
import ImgNeuronLogo from './neuron-logo.png'
21
20
import { ParsedAsset , Release , getAssetsFromNeuronRelease , getLatestRelease } from '../../utils'
22
21
@@ -30,6 +29,12 @@ const Home: NextPage<PageProps> = ({ locale, release }) => {
30
29
31
30
const ImgNeuronOverview = getNeuronOverviewImg ( locale )
32
31
32
+ const initFeatureSpline = useCallback ( ( spline : Application ) => {
33
+ spline . canvas . style . width = ''
34
+ spline . canvas . style . height = ''
35
+ spline . canvas . classList . add ( styles . spline ?? '' )
36
+ } , [ ] )
37
+
33
38
return (
34
39
< Page className = { styles . page } contentWrapper = { { className : styles . contentWrapper } } >
35
40
< TopShadow className = { styles . topShadow } />
@@ -67,7 +72,11 @@ const Home: NextPage<PageProps> = ({ locale, release }) => {
67
72
68
73
< div className = { styles . features } >
69
74
< div className = { styles . feature } >
70
- < Image src = { ImgEasy } width = { 400 } height = { 400 } alt = "Easy CKB wallet concept map" />
75
+ < Spline
76
+ scene = "https://prod.spline.design/WulXRsTwZxwaILcy/scene.splinecode"
77
+ style = { { width : 'auto' , height : 'auto' } }
78
+ onLoad = { initFeatureSpline }
79
+ />
71
80
< div className = { styles . textWrapper } >
72
81
< div className = { styles . title } > { t ( 'Easy to use' ) } </ div >
73
82
< div className = { styles . description } >
@@ -79,7 +88,11 @@ const Home: NextPage<PageProps> = ({ locale, release }) => {
79
88
</ div >
80
89
81
90
< div className = { styles . feature } >
82
- < Image src = { ImgPrivate } width = { 400 } height = { 400 } alt = "Shields with a sci-fi feel" />
91
+ < Spline
92
+ scene = "https://prod.spline.design/dODJjWBI8TGyDe3f/scene.splinecode"
93
+ style = { { width : 'auto' , height : 'auto' } }
94
+ onLoad = { initFeatureSpline }
95
+ />
83
96
< div className = { styles . textWrapper } >
84
97
< div className = { styles . title } > { t ( 'Private and Secure' ) } </ div >
85
98
< div className = { styles . description } >
@@ -91,7 +104,11 @@ const Home: NextPage<PageProps> = ({ locale, release }) => {
91
104
</ div >
92
105
93
106
< div className = { styles . feature } >
94
- < Image src = { ImgReliable } width = { 400 } height = { 400 } alt = "Frosted Glass Textured Statistical Statements" />
107
+ < Spline
108
+ scene = "https://prod.spline.design/T6POKwH2p9nWnNm9/scene.splinecode"
109
+ style = { { width : 'auto' , height : 'auto' } }
110
+ onLoad = { initFeatureSpline }
111
+ />
95
112
< div className = { styles . textWrapper } >
96
113
< div className = { styles . title } > { t ( 'Reliable Support' ) } </ div >
97
114
< div className = { styles . description } >
0 commit comments