-
Notifications
You must be signed in to change notification settings - Fork 2k
/
index.tsx
191 lines (183 loc) · 5.84 KB
/
index.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
import React, { useLayoutEffect } from 'react'
import CometIcon from '../Comet'
import ApplaunchpadIcon from '@site/static/icons/applaunchpad.svg'
import ServerlessIcon from '@site/static/icons/serverless.svg'
import DataBaseIcon from '@site/static/icons/database.svg'
import useIsBrowser from '@docusaurus/useIsBrowser'
import './index.scss'
import Translate from '@docusaurus/Translate'
const i18nObj = {
capability: <Translate>The Capabilities of Sealos</Translate>,
appMan: <Translate>Application Management</Translate>,
appManagement_introduce: (
<Translate>
Rapidly deploy any distributed application with the ability to access the
public network.
</Translate>
),
database: <Translate>Database</Translate>,
database_introduce: (
<Translate>
Create highly available databases in seconds that support MySQL,
PostgreSQL, MongoDB, and Redis.
</Translate>
),
serverless: <Translate>Serverless</Translate>,
serverless_introduce: (
<Translate>
Serverless computing makes writing code as easy as blogging, allowing you
to launch and deploy your business code anytime, anywhere.
</Translate>
),
}
const Capability = ({ isPc }: { isPc: boolean }) => {
const isBrowser = useIsBrowser()
useLayoutEffect(() => {
// @ts-ignore nextline
if (isBrowser && isPc && WOW) {
// @ts-ignore nextline
new WOW({
boxClass: 'animate__fadeIn',
animateClass: 'animate__fadeIn',
offset: 0,
mobile: false,
live: false,
}).init()
}
}, [isBrowser])
if (!isPc) {
return (
<div className="capability">
<div className="comet-icon">
<CometIcon />
</div>
<h1>{i18nObj.capability}</h1>
<div className="app-management">
<div className="app-management-text">
<div className="logo">
<ApplaunchpadIcon width={20} height={20} />
</div>
<h3> {i18nObj.appMan} </h3>
<h4>{i18nObj.appManagement_introduce}</h4>
<a
href="https://cloud.sealos.io/?openapp=system-applaunchpad%3F"
target="_black">
Explore {'>'}
</a>
</div>
<img
draggable="false"
className="app-management-img"
src={
require('@site/static/illustrations/app-launchpad-detail.png')
.default
}
alt="app-management"
/>
</div>
<div className="application" data-wow-duration="1s">
<div className="logo">
<DataBaseIcon />
</div>
<div className="application-title">{i18nObj.database} </div>
<div className="application-text">{i18nObj.database_introduce}</div>
<a
href="https://cloud.sealos.io/?openapp=system-dbprovider%3F"
target="_black">
Explore {'>'}
</a>
<img
draggable="false"
className="database-img"
src={
require('@site/static/illustrations/capability-dabase.png')
.default
}
alt="app-management"
/>
</div>
<div className="application">
<div className="logo">
<ServerlessIcon />
</div>
<div className="application-title">{i18nObj.serverless}</div>
<div className="application-text">{i18nObj.serverless_introduce}</div>
<a
className="application-link"
href="https://github.com/labring/laf"
target="_black">
Explore {'>'}
</a>
</div>
</div>
)
}
return (
<div className="capability">
<div className="comet-icon">
<CometIcon />
</div>
<h1>{i18nObj.capability}</h1>
<div className="app-management animate__fadeIn" data-wow-duration="1s">
<div className="app-management-text">
<div className="logo">
<ApplaunchpadIcon />
</div>
<h3> {i18nObj.appMan} </h3>
<h4>{i18nObj.appManagement_introduce}</h4>
<a
href="https://cloud.sealos.io/?openapp=system-applaunchpad%3F"
target="_black">
Explore {'>'}
</a>
</div>
<img
draggable="false"
className="app-management-img"
src={
require('@site/static/illustrations/app-launchpad-detail.png')
.default
}
alt="app-management"
/>
</div>
<div className="applications" data-wow-duration="1s">
<div className="application animate__fadeIn" data-wow-duration="1s">
<div className="logo">
<DataBaseIcon />
</div>
<div className="application-title">{i18nObj.database}</div>
<div className="application-text">{i18nObj.database_introduce}</div>
<a
href="https://cloud.sealos.io/?openapp=system-dbprovider%3F"
target="_black">
Explore {'>'}
</a>
<img
draggable="false"
className="database-img"
src={
require('@site/static/illustrations/capability-dabase.png')
.default
}
alt="app-management"
/>
</div>
<div className="application animate__fadeIn" data-wow-duration="1s">
<div className="logo">
<ServerlessIcon />
</div>
<div className="application-title">{i18nObj.serverless}</div>
<div className="application-text">{i18nObj.serverless_introduce}</div>
<a
className="application-link"
href="https://github.com/labring/laf"
target="_black">
Explore {'>'}
</a>
</div>
</div>
</div>
)
}
export default React.memo(Capability)