Skip to content

Commit 28041b7

Browse files
committed
Updates
0 parents  commit 28041b7

258 files changed

Lines changed: 13499 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dumi/global.css

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
.dumi-default-header-left {
2+
width: 268px !important;
3+
}
4+
5+
.dumi-default-header-left .dumi-default-logo {
6+
font-size: 18px;
7+
display: flex;
8+
align-items: center;
9+
}
10+
11+
.dumi-default-navbar a {
12+
font-size: 16px;
13+
}
14+
15+
@media only screen and (min-width: 768px) {
16+
.dumi-default-content.home {
17+
padding-left: 184px;
18+
}
19+
}
20+
21+
.red {
22+
color: #f51d2c;
23+
24+
/* text-decoration: underline; */
25+
}
26+
27+
.banner {
28+
display: flex;
29+
justify-content: center;
30+
align-items: end;
31+
font-size: 22px;
32+
}
33+
34+
.banner img {
35+
margin-right: 6px;
36+
}
37+
38+
.word {
39+
margin-right: 2px;
40+
}
41+
42+
.slogon {
43+
/* font-size: 14px; */
44+
/* border-bottom: 2px solid #f51d2c; */
45+
46+
/* font-style: italic; */
47+
48+
/* text-decoration: ; */
49+
}
50+
51+
.dumi-default-doc-layout .dumi-default-sidebar {
52+
width: 220px;
53+
padding-inline-end: 16px;
54+
}
55+
56+
.dumi-default-doc-layout .dumi-default-sidebar > dl > dd > a {
57+
font-size: 14px;
58+
}
59+
60+
.dumi-default-content .markdown p {
61+
text-align: unset;
62+
}

.dumi/pages/index.less

Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
@textLight2: rgba(0, 0, 0, 0.7);
2+
// @textLight2: rgba(60, 60, 60, 0.7);
3+
@textLight1: #213547;
4+
5+
.home {
6+
section {
7+
padding: 42px 32px;
8+
}
9+
10+
.first-letter {
11+
color: #1677ff;
12+
}
13+
14+
#hero {
15+
text-align: center;
16+
padding: 88px 32px;
17+
}
18+
19+
.tagline-inner {
20+
background: linear-gradient(315deg, #42d392 25%, #647eff);
21+
padding: 0 20px 5px;
22+
}
23+
24+
.tagline {
25+
font-size: 72px;
26+
line-height: 1.25;
27+
font-weight: 900;
28+
letter-spacing: -1.5px;
29+
max-width: 960px;
30+
margin: 0 auto;
31+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
32+
Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
33+
}
34+
35+
.slogon {
36+
max-width: 960px;
37+
line-height: 1.5;
38+
color: @textLight1;
39+
transition: color 0.5s;
40+
font-size: 42px;
41+
font-weight: 600;
42+
letter-spacing: 3px;
43+
margin: 60px auto 40px auto;
44+
font-family: MiSans, sans-serif;
45+
background-image: linear-gradient(315deg, #42d392 25%, #1677ff);
46+
background-clip: text;
47+
-webkit-text-fill-color: transparent;
48+
}
49+
50+
.description {
51+
max-width: 960px;
52+
line-height: 1.5;
53+
color: @textLight2;
54+
transition: color 0.5s;
55+
font-size: 18px;
56+
letter-spacing: 1.2px;
57+
margin: 0 auto 48px auto;
58+
}
59+
60+
.actions a {
61+
text-decoration: none;
62+
outline: none;
63+
position: relative;
64+
display: inline-block;
65+
font-weight: 400;
66+
white-space: nowrap;
67+
text-align: center;
68+
background-image: none;
69+
background-color: transparent;
70+
border: 1px solid transparent;
71+
cursor: pointer;
72+
transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
73+
user-select: none;
74+
touch-action: manipulation;
75+
line-height: 1.57;
76+
color: rgba(0, 0, 0, 88%);
77+
font-size: 16px;
78+
padding: 6.429px 15px;
79+
border-radius: 8px;
80+
}
81+
82+
.actions .get-started {
83+
color: #fff;
84+
background-color: #1677ff;
85+
box-shadow: 0 2px 0 rgba(5, 145, 255, 10%);
86+
margin-right: 18px;
87+
}
88+
89+
.actions .intro {
90+
background-color: #fff;
91+
border-color: #d9d9d9;
92+
box-shadow: 0 2px 0 rgba(0, 0, 0, 2%);
93+
}
94+
95+
.actions .get-started:hover {
96+
color: #fff;
97+
background-color: #4096ff;
98+
}
99+
100+
.actions .intro:hover {
101+
color: #4096ff;
102+
border-color: #4096ff;
103+
}
104+
105+
#highlights {
106+
max-width: 960px;
107+
margin: 0 auto;
108+
color: @textLight2;
109+
}
110+
111+
.box-container {
112+
display: flex;
113+
flex-wrap: wrap;
114+
justify-content: space-between;
115+
}
116+
117+
.box-container .box {
118+
transition: color 0.5s, background-color 0.5s;
119+
padding: 28px 36px;
120+
border-radius: 8px;
121+
flex: 0 32%;
122+
font-size: 14px;
123+
font-weight: 500;
124+
}
125+
126+
#highlights h2 {
127+
font-weight: 600;
128+
font-size: 20px;
129+
letter-spacing: -0.4px;
130+
color: @textLight1;
131+
transition: color 0.5s;
132+
margin-bottom: 0.75em;
133+
}
134+
135+
#highlights p {
136+
font-weight: 400;
137+
font-size: 15px;
138+
}
139+
140+
@media (max-width: 960px) {
141+
.tagline {
142+
font-size: 64px;
143+
letter-spacing: -0.5px;
144+
}
145+
146+
.description {
147+
font-size: 18px;
148+
margin-bottom: 48px;
149+
}
150+
}
151+
152+
@media (max-width: 768px) {
153+
.tagline {
154+
font-size: 48px;
155+
letter-spacing: -0.5px;
156+
}
157+
158+
.box-container .box {
159+
flex: 0 100%;
160+
margin-bottom: 20px;
161+
}
162+
}
163+
164+
@media (max-width: 576px) {
165+
#hero {
166+
padding: 38px 0;
167+
}
168+
169+
.tagline-inner {
170+
font-size: 36px;
171+
padding: 10px 20px;
172+
}
173+
174+
.description {
175+
font-size: 16px;
176+
margin: 38px 0 30px;
177+
}
178+
179+
#highlights h3 {
180+
margin-bottom: 0.6em;
181+
}
182+
183+
#highlights .box {
184+
padding: 20px 36px;
185+
}
186+
187+
.actions a {
188+
margin: 18px 0;
189+
}
190+
}
191+
192+
@media (max-width: 370px) {
193+
.tagline {
194+
font-size: 36px;
195+
}
196+
}
197+
}

.dumi/pages/index.tsx

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
import { Helmet, Link } from 'dumi';
2+
import './index.less';
3+
4+
const title = 'React Admin Kit | 快速构建表单表格';
5+
const description =
6+
'React Admin Kit (简称RAK) 是一个基于 React 和 Ant Design 的组件库, 用于在中后台系统中快速的构建表单表格. RAK 的使用不仅能极大的提升开发效率, 而且由于其约定式的 api 还能降低后期不同开发人员的维护成本. 另外由于表单和表格都是由配置式数组生成, 使得不同页面间的表单和表格的复用变得非常简单.';
7+
8+
const Home = () => {
9+
return (
10+
<div className="home">
11+
<Helmet>
12+
<html lang="zh-CN" />
13+
<title>{title}</title>
14+
<link
15+
rel="stylesheet"
16+
crossorigin="anonymous"
17+
href="https://cdn.jsdelivr.net/npm/misans@4.0.0/lib/Normal/MiSans-Bold.min.css"
18+
/>
19+
<meta property="og:title" content={title} />
20+
<meta name="description" content={description} />
21+
<meta property="og:description" content={description} />
22+
</Helmet>
23+
<section id="hero">
24+
<h1 className="tagline">
25+
<span className="tagline-inner">
26+
<span className="word">
27+
<span className="first-letter">R</span>eact{' '}
28+
</span>
29+
<span className="word">
30+
<span className="first-letter">A</span>dmin{' '}
31+
</span>
32+
<span className="word">
33+
<span className="first-letter">K</span>it
34+
</span>
35+
</span>
36+
</h1>
37+
<div className="slogon">中后台应用的最佳伴侣</div>
38+
<p className="description">构建高质量的表单和表格</p>
39+
<p className="actions">
40+
<Link className="get-started" to="/components/schema-form">
41+
开始使用
42+
</Link>
43+
<Link className="intro" to="/intro">
44+
介绍
45+
</Link>
46+
</p>
47+
</section>
48+
49+
<section id="highlights" className="box-container">
50+
<div className="box">
51+
<h2>丰富的文档用例</h2>
52+
<p>每个组件都配合丰富的用例,用例层层递进, 新手友好。</p>
53+
</div>
54+
<div className="box">
55+
<h2>有限的组件</h2>
56+
<p>组件分类清晰,数量有限, 与 Ant Design 深度配合.</p>
57+
</div>
58+
<div className="box">
59+
<h2>API 提示友好</h2>
60+
<p>TS编写,api 提示方便.</p>
61+
</div>
62+
</section>
63+
</div>
64+
);
65+
};
66+
67+
export default Home;

.dumi/theme/builtins/API/index.tsx

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import { useSiteData } from 'dumi';
2+
import Table from '../Table';
3+
4+
const API = (props) => {
5+
const siteData = useSiteData();
6+
const docs = siteData.themeConfig.apiDoc || [];
7+
const { name } = props;
8+
const data = docs.find((doc) => doc.displayName === name);
9+
10+
const texts = {
11+
name: '属性名',
12+
description: '描述',
13+
type: '类型',
14+
default: '默认值',
15+
required: '(必选)',
16+
};
17+
18+
if (!data) return null;
19+
20+
const apis = Object.values(data.props);
21+
22+
const getDesc = (desc: string) => {
23+
if (!desc) return '--';
24+
25+
return desc.replace('@description ', '');
26+
};
27+
28+
return (
29+
<div className="markdown">
30+
<Table>
31+
<thead>
32+
<tr>
33+
<th>{texts.name}</th>
34+
<th>{texts.description}</th>
35+
<th>{texts.type}</th>
36+
<th>{texts.default}</th>
37+
</tr>
38+
</thead>
39+
<tbody>
40+
{apis.map((row) => (
41+
<tr key={row.name}>
42+
<td>{row.name}</td>
43+
<td>{getDesc(row.description)}</td>
44+
<td>
45+
<code>{row.type?.name}</code>
46+
</td>
47+
<td>
48+
<code>
49+
{row.defaultValue?.value ||
50+
(row.required && texts.required) ||
51+
'--'}
52+
</code>
53+
</td>
54+
</tr>
55+
))}
56+
</tbody>
57+
</Table>
58+
</div>
59+
);
60+
};
61+
62+
export default API;

0 commit comments

Comments
 (0)