Skip to content

Commit abeb9d6

Browse files
author
seiyan-writer
authored
Merge pull request #164 from sei-protocol/feat/docs-revamp-2
feat: new docs structure (2/n)
2 parents 8b33ecf + 8fbfefd commit abeb9d6

34 files changed

+1388
-469
lines changed

components/AppCard/AppCard.v2.tsx

Lines changed: 57 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,42 +3,65 @@ import Image from 'next/image';
33
import { EcosystemItem } from '../../data/ecosystemData';
44

55
interface AppCardProps {
6-
app: EcosystemItem;
6+
app: EcosystemItem;
77
}
8+
89
const AppCardV2 = ({ app }: AppCardProps) => {
9-
if (!app) return null;
10-
const fields = app.fieldData;
11-
const { name, logo, link, 'integration-guide-link': integration, 'short-description': shortDescription } = fields;
12-
return (
13-
<div className='group flex flex-col'>
14-
<div className='border dark:border-gray-800 rounded-lg overflow-hidden flex flex-row lg:flex-col grow h-ull'>
15-
<div className='relative overflow-hidden grid place-items-center aspect-square border-r lg:border-b lg:border-r-0 dark:border-gray-800'>
16-
<a href={link} rel='noopener noreferrer' target='_blank' className='group'>
17-
<Image src={logo.url} alt={logo.alt} width={300} height={300} className='transition-all group-hover:scale-[1.15]' />
18-
</a>
19-
</div>
20-
<div className='px-3 pt-2 pb-3 bg-gray-100 dark:bg-gray-800 w-full flex flex-col grow space-y-1'>
21-
<h3 className='text-lg font-semibold inline-flex items-center gap-2' title={name}>
22-
{name}
23-
</h3>
24-
{shortDescription && (
25-
<p className='opacity-75 text-sm line-clamp-4' title={shortDescription}>
26-
{shortDescription}
27-
</p>
28-
)}
29-
{integration && (
30-
<a
31-
href={integration}
32-
rel='noopener noreferrer'
33-
target='_blank'
34-
className='inline-flex items-center gap-2 bg-black text-white dark:bg-white dark:text-black px-3 py-1 self-start rounded-lg mt-2 text-sm font-medium tracking-tight'>
35-
Integration <ExternalLinkIcon className='inline-block w-3 h-4 hover:underline' />
36-
</a>
37-
)}
38-
</div>
39-
</div>
40-
</div>
41-
);
10+
if (!app || !app.fieldData) return null;
11+
12+
const fields = app.fieldData;
13+
const {
14+
name,
15+
logo,
16+
link,
17+
'integration-guide-link': integration,
18+
'short-description': shortDescription,
19+
} = fields;
20+
21+
const defaultLogo = {
22+
url: '/path/to/default-logo.png',
23+
alt: 'Default Logo',
24+
};
25+
26+
const displayLogo = logo && logo.url ? logo : defaultLogo;
27+
28+
return (
29+
<div className='group flex flex-col'>
30+
<div className='border dark:border-gray-800 rounded-lg overflow-hidden flex flex-row lg:flex-col grow h-full'>
31+
<div className='relative overflow-hidden grid place-items-center aspect-square border-r lg:border-b lg:border-r-0 dark:border-gray-800'>
32+
<a href={link} rel='noopener noreferrer' target='_blank' className='group'>
33+
<Image
34+
src={displayLogo.url}
35+
alt={displayLogo.alt}
36+
width={300}
37+
height={300}
38+
className='transition-all group-hover:scale-[1.15]'
39+
/>
40+
</a>
41+
</div>
42+
<div className='px-3 pt-2 pb-3 bg-gray-100 dark:bg-gray-800 w-full flex flex-col grow space-y-1'>
43+
<h3 className='text-lg font-semibold inline-flex items-center gap-2' title={name}>
44+
{name}
45+
</h3>
46+
{shortDescription && (
47+
<p className='opacity-75 text-sm line-clamp-4' title={shortDescription}>
48+
{shortDescription}
49+
</p>
50+
)}
51+
{integration && (
52+
<a
53+
href={integration}
54+
rel='noopener noreferrer'
55+
target='_blank'
56+
className='inline-flex items-center gap-2 bg-black text-white dark:bg-white dark:text-black px-3 py-1 self-start rounded-lg mt-2 text-sm font-medium tracking-tight'
57+
>
58+
Integration <ExternalLinkIcon className='inline-block w-3 h-4 hover:underline' />
59+
</a>
60+
)}
61+
</div>
62+
</div>
63+
</div>
64+
);
4265
};
4366

4467
export default AppCardV2;

components/Homepage/SeiIntro.tsx

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
import React, { useEffect, useState } from 'react';
2+
import {
3+
Container,
4+
Title,
5+
Text,
6+
Button,
7+
Group,
8+
useMantineTheme,
9+
Transition,
10+
} from '@mantine/core';
11+
import { IconArrowRight, IconChevronDown } from '@tabler/icons-react';
12+
import v2BannerImg from '../../public/assets/sei-v2-banner.jpg';
13+
14+
const SeiIntro: React.FC = () => {
15+
const theme = useMantineTheme();
16+
const [mounted, setMounted] = useState(false);
17+
18+
useEffect(() => {
19+
setMounted(true);
20+
}, []);
21+
22+
// Styles
23+
const heroStyles = {
24+
position: 'relative' as const,
25+
height: '80vh',
26+
backgroundImage: `url(${v2BannerImg.src})`,
27+
backgroundSize: 'cover',
28+
backgroundPosition: 'center',
29+
backgroundAttachment: 'fixed',
30+
display: 'flex',
31+
alignItems: 'center',
32+
justifyContent: 'center',
33+
color: theme.white,
34+
textShadow: '0 2px 4px rgba(0, 0, 0, 0.6)',
35+
overflow: 'hidden',
36+
};
37+
38+
const overlayStyles = {
39+
position: 'absolute' as const,
40+
inset: 0,
41+
backgroundColor: 'rgba(0, 0, 0, 0.5)',
42+
};
43+
44+
const contentStyles = {
45+
position: 'relative' as const,
46+
zIndex: 1,
47+
maxWidth: '800px',
48+
margin: '0 auto',
49+
padding: `${theme.spacing.lg}px ${theme.spacing.md}px`,
50+
textAlign: 'center' as const,
51+
fontFamily: 'Satoshi, sans-serif',
52+
};
53+
54+
const titleStyles = {
55+
fontSize: '3.5rem',
56+
fontWeight: 500,
57+
marginBottom: theme.spacing.md,
58+
lineHeight: 1.1,
59+
color: '#ECEDEE',
60+
};
61+
62+
const subtitleStyles = {
63+
fontSize: '1.25rem',
64+
marginBottom: theme.spacing.md,
65+
lineHeight: 1.5,
66+
color: '#ECEDEE',
67+
fontWeight: 500,
68+
};
69+
70+
const buttonsStyles = {
71+
marginTop: theme.spacing.md,
72+
justifyContent: 'center',
73+
};
74+
75+
const buttonStyles = {
76+
height: '2.5rem',
77+
padding: '0 1.5rem',
78+
fontSize: '0.9rem',
79+
fontFamily: 'Satoshi, sans-serif',
80+
fontWeight: 500,
81+
display: 'flex',
82+
alignItems: 'center',
83+
gap: '0.5rem',
84+
};
85+
86+
const scrollIndicatorContainerStyles = {
87+
position: 'absolute' as const,
88+
bottom: theme.spacing.lg,
89+
left: '50%',
90+
transform: 'translateX(-50%)',
91+
textAlign: 'center' as const,
92+
zIndex: 1,
93+
};
94+
95+
const scrollTextStyles = {
96+
color: '#ECEDEE',
97+
fontFamily: 'Satoshi, sans-serif',
98+
fontSize: '1rem',
99+
marginBottom: theme.spacing.xs,
100+
};
101+
102+
const scrollIconStyles = {
103+
animation: 'bounce 2s infinite',
104+
color: '#ECEDEE',
105+
};
106+
107+
const bounceAnimation = `
108+
@keyframes bounce {
109+
0%, 20%, 50%, 80%, 100% {
110+
transform: translateY(0);
111+
}
112+
40% {
113+
transform: translateY(-10px);
114+
}
115+
60% {
116+
transform: translateY(-5px);
117+
}
118+
}
119+
`;
120+
121+
const keyframesStyle = <style>{bounceAnimation}</style>;
122+
123+
return (
124+
<section style={heroStyles}>
125+
{keyframesStyle}
126+
<div style={overlayStyles} />
127+
<Transition
128+
mounted={mounted}
129+
transition="fade"
130+
duration={800}
131+
timingFunction="ease"
132+
>
133+
{(styles) => (
134+
<div style={{ ...contentStyles, ...styles }}>
135+
<Title style={titleStyles}>Welcome to Sei Network</Title>
136+
<Text style={subtitleStyles}>
137+
The first parallelized EVM blockchain delivering unmatched
138+
scalability with a developer-focused approach.
139+
</Text>
140+
<Group style={buttonsStyles}>
141+
<Button
142+
variant="gradient"
143+
gradient={{ from: '#9E1F19', to: '#780000', deg: 135 }}
144+
size="md"
145+
style={buttonStyles}
146+
component="a"
147+
href="/users/user-quickstart"
148+
>
149+
Get Started <IconArrowRight size={18} />
150+
</Button>
151+
<Button
152+
variant="outline"
153+
color="light"
154+
size="md"
155+
style={{
156+
...buttonStyles,
157+
borderColor: '#ECEDEE',
158+
color: '#ECEDEE',
159+
}}
160+
component="a"
161+
href="/learn/general-overview"
162+
>
163+
Learn More
164+
</Button>
165+
</Group>
166+
</div>
167+
)}
168+
</Transition>
169+
<div style={scrollIndicatorContainerStyles}>
170+
<Text style={scrollTextStyles}>Find your starting point</Text>
171+
<IconChevronDown
172+
size={32}
173+
style={scrollIconStyles}
174+
aria-hidden="true"
175+
/>
176+
</div>
177+
</section>
178+
);
179+
};
180+
181+
export default SeiIntro;

0 commit comments

Comments
 (0)