@modern-js/main-doc 0.0.0-next-1682345215633 → 0.0.0-next-1682397076713
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -2
- package/docs/en/about/showcase.mdx +15 -0
- package/docs/en/about/team.mdx +3 -3
- package/docs/zh/about/showcase.mdx +15 -0
- package/docs/zh/about/team.mdx +3 -3
- package/modern.config.ts +1 -1
- package/package.json +5 -5
- package/src/.eslintrc.json +3 -0
- package/src/components/ShowcaseList/index.module.scss +80 -0
- package/src/components/ShowcaseList/index.tsx +39 -0
- package/src/components/ShowcaseList/useShowcases.ts +66 -0
- package/src/i18n/enUS.ts +7 -0
- package/src/i18n/zhCN.ts +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @modern-js/main-doc
|
|
2
2
|
|
|
3
|
-
## 0.0.0-next-
|
|
3
|
+
## 0.0.0-next-1682397076713
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
fix(builder): 修复 browserslist 配置会对 node 产物生效的问题
|
|
14
14
|
|
|
15
15
|
- Updated dependencies [fe92de6a5]
|
|
16
|
-
- @modern-js/builder-doc@0.0.0-next-
|
|
16
|
+
- @modern-js/builder-doc@0.0.0-next-1682397076713
|
|
17
17
|
|
|
18
18
|
## 2.15.0
|
|
19
19
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 0
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Showcase
|
|
6
|
+
|
|
7
|
+
Welcome to the Modern.js showcase page! Here, we present a collection of websites that have been built using Modern.js.
|
|
8
|
+
|
|
9
|
+
If you have built a website using Modern.js, we would love for you to share it with the community. Simply reply to the GitHub discussion thread with a link to your website. We will collect content on a regular basis and display it on the current page.
|
|
10
|
+
|
|
11
|
+
## The Cases
|
|
12
|
+
|
|
13
|
+
import { ShowcaseList } from '@site/src/components/ShowcaseList';
|
|
14
|
+
|
|
15
|
+
<ShowcaseList />
|
package/docs/en/about/team.mdx
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
sidebar_position: 1
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
#
|
|
5
|
+
# Meet the Team
|
|
6
6
|
|
|
7
|
-
Modern.js
|
|
7
|
+
The development of Modern.js is driven by ByteDance's Modern.js team and community contributors.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Core Team Members
|
|
10
10
|
|
|
11
11
|
import { RandomMemberList } from '@site/src/components/RandomMemberList';
|
|
12
12
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
sidebar_position: 0
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# 案例展示
|
|
6
|
+
|
|
7
|
+
欢迎来到 Modern.js 的案例展示页面!在这里,我们展示了一些基于 Modern.js 所实现的网站。
|
|
8
|
+
|
|
9
|
+
如果你使用 Modern.js 构建了一个网站,欢迎你与社区分享它。只需回复 [GitHub 讨论贴](https://github.com/web-infra-dev/modern.js/discussions/3554) 并附上你网站的链接即可。我们会定期收集内容,并将它们展示在当前页面。
|
|
10
|
+
|
|
11
|
+
## 案例
|
|
12
|
+
|
|
13
|
+
import { ShowcaseList } from '@site/src/components/ShowcaseList';
|
|
14
|
+
|
|
15
|
+
<ShowcaseList />
|
package/docs/zh/about/team.mdx
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
sidebar_position: 1
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
#
|
|
5
|
+
# 团队
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Modern.js 的开发由字节跳动的 Modern.js 团队和社区贡献者驱动。
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## 核心团队成员
|
|
10
10
|
|
|
11
11
|
import { RandomMemberList } from '@site/src/components/RandomMemberList';
|
|
12
12
|
|
package/modern.config.ts
CHANGED
package/package.json
CHANGED
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "0.0.0-next-
|
|
14
|
+
"version": "0.0.0-next-1682397076713",
|
|
15
15
|
"publishConfig": {
|
|
16
16
|
"registry": "https://registry.npmjs.org/",
|
|
17
17
|
"access": "public"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@modern-js/builder-doc": "0.0.0-next-
|
|
20
|
+
"@modern-js/builder-doc": "0.0.0-next-1682397076713"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"classnames": "^2",
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"fs-extra": "^10",
|
|
30
30
|
"@types/node": "^16",
|
|
31
31
|
"@types/fs-extra": "^9",
|
|
32
|
-
"@modern-js/builder-doc": "0.0.0-next-
|
|
33
|
-
"@modern-js/doc-tools": "0.0.0-next-
|
|
34
|
-
"@modern-js/doc-plugin-auto-sidebar": "0.0.0-next-
|
|
32
|
+
"@modern-js/builder-doc": "0.0.0-next-1682397076713",
|
|
33
|
+
"@modern-js/doc-tools": "0.0.0-next-1682397076713",
|
|
34
|
+
"@modern-js/doc-plugin-auto-sidebar": "0.0.0-next-1682397076713"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"dev": "modern dev",
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
.wrapper {
|
|
2
|
+
display: grid;
|
|
3
|
+
grid-template-columns: repeat(2, 1fr);
|
|
4
|
+
grid-gap: 32px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@media (max-width: 600px) {
|
|
8
|
+
.wrapper {
|
|
9
|
+
grid-template-columns: repeat(1, 1fr);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.card {
|
|
14
|
+
display: block;
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
age-break-inside: avoid;
|
|
17
|
+
break-inside: avoid;
|
|
18
|
+
border-radius: 20px;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
transition: 0.15s ease-in;
|
|
21
|
+
border: 1px solid var(--modern-c-divider-light);
|
|
22
|
+
|
|
23
|
+
&:hover {
|
|
24
|
+
border-color: var(--modern-c-brand);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.preview {
|
|
29
|
+
display: block;
|
|
30
|
+
width: 100%;
|
|
31
|
+
aspect-ratio: 1.84;
|
|
32
|
+
object-fit: contain;
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
|
|
35
|
+
pointer-events: none;
|
|
36
|
+
background-color: var(--modern-c-bg-soft);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.bottom {
|
|
40
|
+
padding: 12px 18px 14px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.name {
|
|
44
|
+
display: flex;
|
|
45
|
+
justify-content: space-between;
|
|
46
|
+
font-weight: 600;
|
|
47
|
+
font-size: 18px;
|
|
48
|
+
line-height: 28px;
|
|
49
|
+
color: var(--modern-c-text-1);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.type {
|
|
53
|
+
display: block;
|
|
54
|
+
color: #fff;
|
|
55
|
+
font-size: 12px;
|
|
56
|
+
background: -webkit-linear-gradient(
|
|
57
|
+
305deg,
|
|
58
|
+
hsl(166deg, 77%, 43%) 10%,
|
|
59
|
+
hsl(198deg, 100%, 50%)
|
|
60
|
+
);
|
|
61
|
+
background-clip: text;
|
|
62
|
+
-webkit-background-clip: text;
|
|
63
|
+
-webkit-text-fill-color: transparent;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:global(.dark) .type {
|
|
67
|
+
background: -webkit-linear-gradient(
|
|
68
|
+
305deg,
|
|
69
|
+
hsl(166deg, 77%, 53%) 10%,
|
|
70
|
+
hsl(198deg, 100%, 60%)
|
|
71
|
+
);
|
|
72
|
+
background-clip: text;
|
|
73
|
+
-webkit-background-clip: text;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.domain {
|
|
77
|
+
font-size: 13px;
|
|
78
|
+
line-height: 24px;
|
|
79
|
+
color: var(--modern-c-text-2);
|
|
80
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { useShowcases } from './useShowcases';
|
|
2
|
+
import styles from './index.module.scss';
|
|
3
|
+
|
|
4
|
+
const getDomain = (url: string) => new URL(url).hostname;
|
|
5
|
+
|
|
6
|
+
const TYPE_MAP = {
|
|
7
|
+
doc: 'Modern.js Doc',
|
|
8
|
+
module: 'Modern.js Module',
|
|
9
|
+
builder: 'Modern.js Builder',
|
|
10
|
+
framework: 'Modern.js Framework',
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const ShowcaseList = () => {
|
|
14
|
+
const showcases = useShowcases();
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<div className={styles.wrapper}>
|
|
18
|
+
{showcases.map(item => {
|
|
19
|
+
return (
|
|
20
|
+
<a
|
|
21
|
+
key={item.url}
|
|
22
|
+
href={item.url}
|
|
23
|
+
target="_blank"
|
|
24
|
+
className={styles.card}
|
|
25
|
+
>
|
|
26
|
+
<img src={item.preview} className={styles.preview} />
|
|
27
|
+
<div className={styles.bottom}>
|
|
28
|
+
<div className={styles.name}>
|
|
29
|
+
{item.name}
|
|
30
|
+
<span className={styles.type}>{TYPE_MAP[item.type]}</span>
|
|
31
|
+
</div>
|
|
32
|
+
<div className={styles.domain}>{getDomain(item.url)}</div>
|
|
33
|
+
</div>
|
|
34
|
+
</a>
|
|
35
|
+
);
|
|
36
|
+
})}
|
|
37
|
+
</div>
|
|
38
|
+
);
|
|
39
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { useI18n } from '../../i18n';
|
|
2
|
+
|
|
3
|
+
export type ShowcaseType = 'framework' | 'builder' | 'doc' | 'module';
|
|
4
|
+
|
|
5
|
+
export type ShowcaseItem = {
|
|
6
|
+
url: string;
|
|
7
|
+
name: string;
|
|
8
|
+
preview: string;
|
|
9
|
+
type: ShowcaseType;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const useShowcases = (): ShowcaseItem[] => {
|
|
13
|
+
const t = useI18n();
|
|
14
|
+
|
|
15
|
+
return [
|
|
16
|
+
{
|
|
17
|
+
name: t('volctrans'),
|
|
18
|
+
url: 'https://translate.volcengine.com/',
|
|
19
|
+
preview:
|
|
20
|
+
'https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/showcase/volctrans-0424.jpeg',
|
|
21
|
+
type: 'framework',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: t('writingo'),
|
|
25
|
+
url: 'https://writingo.net/',
|
|
26
|
+
preview:
|
|
27
|
+
'https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/showcase/writingo-0424.jpeg',
|
|
28
|
+
type: 'framework',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'Rspack',
|
|
32
|
+
url: 'https://rspack.dev/',
|
|
33
|
+
preview:
|
|
34
|
+
'https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/showcase/rspack-0424.jpeg',
|
|
35
|
+
type: 'doc',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: 'Modern.js',
|
|
39
|
+
url: 'https://modernjs.dev/en/',
|
|
40
|
+
preview:
|
|
41
|
+
'https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/showcase/modernjs-dev-0425.jpeg',
|
|
42
|
+
type: 'doc',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: t('shidianbaike'),
|
|
46
|
+
url: 'https://shidian.baike.com/',
|
|
47
|
+
preview:
|
|
48
|
+
'https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/showcase/shidianbaike-0424.jpeg',
|
|
49
|
+
type: 'framework',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: t('xiaohe'),
|
|
53
|
+
url: 'https://xiaohe.cn/',
|
|
54
|
+
preview:
|
|
55
|
+
'https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/showcase/xiaohe-0424.png',
|
|
56
|
+
type: 'framework',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: t('dongchedi'),
|
|
60
|
+
url: 'https://m.dcdapp.com/motor/feoffline/usedcar_channel/channel.html',
|
|
61
|
+
preview:
|
|
62
|
+
'https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/showcase/dongchedi-0425.png',
|
|
63
|
+
type: 'builder',
|
|
64
|
+
},
|
|
65
|
+
];
|
|
66
|
+
};
|
package/src/i18n/enUS.ts
CHANGED
|
@@ -47,4 +47,11 @@ export const EN_US = {
|
|
|
47
47
|
projectGenerator: 'Project Generator',
|
|
48
48
|
githubDiscussion: 'Github Discussion',
|
|
49
49
|
changelog: 'Changelog',
|
|
50
|
+
|
|
51
|
+
// Showcases
|
|
52
|
+
writingo: 'Writingo',
|
|
53
|
+
volctrans: 'Volctrans',
|
|
54
|
+
shidianbaike: 'Shidian Baike',
|
|
55
|
+
xiaohe: 'Xiaohe',
|
|
56
|
+
dongchedi: 'Dongchedi',
|
|
50
57
|
} as const;
|
package/src/i18n/zhCN.ts
CHANGED
|
@@ -47,4 +47,11 @@ export const ZH_CN: Record<keyof typeof EN_US, string> = {
|
|
|
47
47
|
projectGenerator: '项目生成器',
|
|
48
48
|
githubDiscussion: 'Github 讨论区',
|
|
49
49
|
changelog: '更新日志',
|
|
50
|
+
|
|
51
|
+
// Showcase
|
|
52
|
+
writingo: '火山写作',
|
|
53
|
+
volctrans: '火山翻译',
|
|
54
|
+
shidianbaike: '识典百科',
|
|
55
|
+
xiaohe: '小荷健康',
|
|
56
|
+
dongchedi: '懂车帝',
|
|
50
57
|
};
|