Skip to content

Commit 766bda1

Browse files
committed
feat: add Rstack title and desc
1 parent 9da45ea commit 766bda1

3 files changed

Lines changed: 55 additions & 38 deletions

File tree

src/section-style/shared.module.scss

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,13 @@
55
// M 601 - 834
66
// S < 601
77

8-
// XXL
9-
@media screen and (min-width: 1441px) {
10-
.container {
11-
padding: 96px 144px !important;
12-
}
13-
.titleAndDesc {
14-
padding: 0px 144px 32px 144px !important;
15-
}
16-
}
17-
188
// XL
19-
@media screen and (min-width: 1281px) and (max-width: 1440px) {
9+
@media screen and (min-width: 1281px) {
2010
.container {
2111
padding: 96px 144px !important;
2212
}
2313
.titleAndDesc {
24-
padding: 0px 144px 32px 144px !important;
14+
padding: 0px 144px 36px 144px !important;
2515
}
2616
}
2717

@@ -31,24 +21,28 @@
3121
padding: 80px 80px !important;
3222
}
3323
.titleAndDesc {
34-
padding: 0px 16px !important;
24+
padding: 0px 16px 32px !important;
3525
}
3626
}
3727

3828
// M
3929
@media screen and (min-width: 601px) and (max-width: 834px) {
4030
.container {
4131
padding: 64px 32px !important;
32+
4233
.innerContainer {
4334
gap: 16px !important;
4435
}
4536
}
37+
4638
.titleAndDesc {
47-
padding: 0px 16px !important;
39+
padding: 0px 16px 32px !important;
4840
gap: 16px !important;
41+
4942
.title {
5043
font-size: 32px !important;
5144
}
45+
5246
.desc {
5347
font-size: 16px !important;
5448
line-height: 28px !important;

src/tool-stack/index.module.scss

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
// L - Large screens: three cards per row
12
@media screen and (min-width: 1001px) {
23
.tools {
34
.tool {
4-
min-width: calc(33.33% - 11px);
5-
max-width: calc(33.33% - 11px);
6-
flex: 0 0 calc(33.33% - 11px);
5+
min-width: calc(33.33% - 21.33px);
6+
max-width: calc(33.33% - 21.33px);
7+
flex: 0 0 calc(33.33% - 21.33px);
78
}
89
}
910
}
@@ -12,9 +13,9 @@
1213
@media screen and (min-width: 601px) and (max-width: 1000px) {
1314
.tools {
1415
.tool {
15-
min-width: calc(50% - 8px);
16-
max-width: calc(50% - 8px);
17-
flex: 0 0 calc(50% - 8px);
16+
min-width: calc(50% - 16px);
17+
max-width: calc(50% - 16px);
18+
flex: 0 0 calc(50% - 16px);
1819
}
1920
}
2021
}
@@ -60,7 +61,7 @@
6061
align-items: center;
6162
justify-content: center;
6263
flex-wrap: wrap;
63-
gap: 16px;
64+
gap: 32px;
6465
}
6566

6667
.tool {
@@ -69,7 +70,7 @@
6970

7071
display: flex;
7172
flex: 1 1 0;
72-
padding: 24px 16px;
73+
padding: 24px;
7374
box-sizing: border-box;
7475

7576
flex-direction: column;
@@ -110,5 +111,6 @@
110111
font-style: normal;
111112
font-weight: 400;
112113
line-height: 24px;
114+
margin: 0;
113115
}
114116
}

src/tool-stack/index.tsx

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
import type React from 'react';
22
import { memo } from 'react';
3+
import {
4+
descStyle,
5+
innerContainerStyle,
6+
titleAndDescStyle,
7+
titleStyle,
8+
} from '../section-style';
39
import styles from './index.module.scss';
410

511
export const ToolStack: React.FC<{ lang: string }> = memo(({ lang }) => {
@@ -56,22 +62,37 @@ export const ToolStack: React.FC<{ lang: string }> = memo(({ lang }) => {
5662
];
5763

5864
return (
59-
<div className={styles.tools}>
60-
{tools.map(({ name, desc, logo, url }) => {
61-
return (
62-
<a
63-
target="_blank"
64-
rel="noreferrer"
65-
className={styles.tool}
66-
key={name}
67-
href={url}
68-
>
69-
<img src={logo} alt={name} className={styles.logo} loading="lazy" />
70-
<div className={styles.toolTitle}>{name}</div>
71-
<p className={styles.toolDescription}>{desc}</p>
72-
</a>
73-
);
74-
})}
65+
<div className={innerContainerStyle}>
66+
<div className={titleAndDescStyle}>
67+
<h1 className={titleStyle}>Rstack</h1>
68+
<p className={descStyle}>
69+
{isEn
70+
? 'A unified JavaScript toolchain built around Rspack, with consistent architecture and ultimate performance'
71+
: '围绕 Rspack 打造的统一 JavaScript 工具链,一致的底层架构,极致的性能体验'}
72+
</p>
73+
</div>
74+
<div className={styles.tools}>
75+
{tools.map(({ name, desc, logo, url }) => {
76+
return (
77+
<a
78+
target="_blank"
79+
rel="noreferrer"
80+
className={styles.tool}
81+
key={name}
82+
href={url}
83+
>
84+
<img
85+
src={logo}
86+
alt={name}
87+
className={styles.logo}
88+
loading="lazy"
89+
/>
90+
<div className={styles.toolTitle}>{name}</div>
91+
<p className={styles.toolDescription}>{desc}</p>
92+
</a>
93+
);
94+
})}
95+
</div>
7596
</div>
7697
);
7798
});

0 commit comments

Comments
 (0)