Skip to content

Commit 197b195

Browse files
authored
Merge pull request #5 from codefuse-ai/feat_init
Feat init
2 parents a941a63 + c665a8c commit 197b195

File tree

545 files changed

+53041
-11377
lines changed

Some content is hidden

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

545 files changed

+53041
-11377
lines changed

.dumi/theme/layouts/DocLayout/index.less

Lines changed: 119 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
11
@import (reference) '../../styles/variables.less';
22

3-
// @{dark-selector} {
4-
// color-scheme: dark;
5-
// }
3+
@{dark-selector} {
4+
color-scheme: light;
5+
}
66

77
body {
88
margin: 0;
99
padding: 0;
1010
background-color: @c-site-bg;
11-
// @{dark-selector} & {
12-
// background-color: @c-site-bg-dark;
13-
// }
11+
12+
@{dark-selector} & {
13+
// background-color: @c-site-bg-dark;
14+
background: #f8f9fb;
15+
}
1416
}
1517

1618
.@{prefix}-doc-layout {
1719
font-family: sans-serif;
1820
background-color: @c-site-bg;
1921

20-
// @{dark-selector} & {
21-
// background-color: @c-site-bg-dark;
22-
// }
22+
@{dark-selector} & {
23+
background-color: #f8f9fb;
24+
}
2325

2426
@media @mobile {
2527
&::before {
@@ -127,6 +129,11 @@ body {
127129
.dumi-default-article .dumi-default-content:not([data-no-sidebar]) {
128130
background-color: #070b13;
129131
box-shadow: 0px 2px 4px 0px #000000ff;
132+
133+
@{dark-selector} & {
134+
background: #ffffff;
135+
box-shadow: 0px 2px 4px 0px rgb(249, 249, 249);
136+
}
130137
}
131138

132139
.markdown {
@@ -136,12 +143,30 @@ body {
136143
letter-spacing: 0.61px;
137144
font-weight: 300;
138145
margin: 0 auto;
146+
// line-height: 1.5;
147+
148+
@{dark-selector} & {
149+
font-size: 18px;
150+
color: #1b1b1b;
151+
line-height: 30px;
152+
153+
}
139154

140155
a {
141156
color: #9999FF;
142157
}
143158
}
144159

160+
.markdown th {
161+
background-color: #828287;
162+
163+
@{dark-selector} & {
164+
background-color: #bcbec1;
165+
border-bottom-left-radius: 4px;
166+
border-bottom-right-radius: 4px;
167+
}
168+
}
169+
145170
.dumi-default-content-tool {
146171
color: #b5b5b5;
147172
}
@@ -150,9 +175,9 @@ body {
150175
color: #b5b5b5;
151176
}
152177

153-
.dumi-default-toc>li>a.active {
154-
color: #fff !important;
155-
}
178+
// .dumi-default-toc>li>a.active {
179+
// color: #fff !important;
180+
// }
156181

157182
.dumi-default-toc>li>a {
158183
color: #b5b5b5;
@@ -161,11 +186,33 @@ body {
161186
.dumi-default-source-code {
162187
background: #2c2d2e;
163188
border-radius: 4px;
189+
190+
@{dark-selector} & {
191+
background-color: #fbfcfd;
192+
border-bottom-left-radius: 4px;
193+
border-bottom-right-radius: 4px;
194+
}
195+
}
196+
197+
.markdown *:not(pre) code {
198+
background: #2c2d2e;
199+
200+
@{dark-selector} & {
201+
background: #f0f4f8;
202+
}
164203
}
165204

205+
166206
.dumi-default-source-code>pre.prism-code {
167207
color: #e4e9ec;
168208
background: #2c2d2e;
209+
210+
@{dark-selector} & {
211+
color: #383a42;
212+
background-color: #fbfcfd;
213+
border-bottom-left-radius: 4px;
214+
border-bottom-right-radius: 4px;
215+
}
169216
}
170217

171218
.dumi-default-source-code-copy {
@@ -174,40 +221,84 @@ body {
174221

175222
.dumi-default-article .dumi-default-content:not([data-no-sidebar]) {
176223
padding: 10px 18px 48px 28px;
177-
}
178224

179-
.ant-select-outlined:not(.ant-select-customize-input) .ant-select-selector {
180-
background: #070b13;
225+
@{dark-selector} & {
226+
padding: 55px;
227+
}
181228
}
182229

183-
.ant-menu-light .ant-menu-item {
184-
color: #b5b5b5;
185-
}
186230

231+
// .ant-select-outlined:not(.ant-select-customize-input) .ant-select-selector {
232+
// background: #070b13;
233+
// }
234+
235+
// .ant-menu-light .ant-menu-item {
236+
// color: #b5b5b5;
237+
// }
238+
.dumi-default-navbar .ant-menu-light {
239+
240+
}
187241
.ant-menu-light:not(.ant-menu-horizontal) .ant-menu-submenu-title:active {
188242
background-color: #181d29;
189-
border-radius: 5px;
190243

191-
}
244+
@{dark-selector} & {
245+
background-color: #f0f4ff;
246+
}
192247

193-
.ant-menu-light:not(.ant-menu-horizontal) .ant-menu-item:not(.ant-menu-item-selected):hover {
194-
background-color: #181d29;
195-
color: #fff;
196248
}
197249

198-
.ant-select-single .ant-select-selector {
199-
color: #fff;
250+
// .ant-menu-light:not(.ant-menu-horizontal) .ant-menu-item:not(.ant-menu-item-selected):hover {
251+
// background-color: #181d29;
252+
// color: #fff;
253+
// }
254+
255+
// .ant-select-single .ant-select-selector {
256+
// color: #fff;
257+
// }
258+
259+
// .ant-select .ant-select-arrow {
260+
// color: #fff;
261+
// }
262+
.ant-menu-light .ant-menu-submenu-title {
263+
color: #f0f4ff;
264+
265+
@{dark-selector} & {
266+
color: #000;
267+
}
200268
}
201269

202-
.ant-select .ant-select-arrow {
203-
color: #fff;
270+
.ant-menu-light .ant-menu-item {
271+
color: #f0f4ff;
272+
273+
@{dark-selector} & {
274+
color: #000;
275+
}
204276
}
205277

206278
.ant-menu-light .ant-menu-item-selected {
207279
background-color: #181d29;
280+
// color: #fff;
281+
color: #000;
282+
283+
@{dark-selector} & {
284+
background-color: #f0f4ff;
285+
color: #000;
286+
}
287+
288+
}
289+
290+
.ant-menu-light:not(.ant-menu-horizontal) .ant-menu-item:not(.ant-menu-item-selected):active {
291+
background-color: #181d29;
292+
293+
@{dark-selector} & {
294+
background-color: #f0f4ff;
295+
}
296+
208297
}
209298
}
210-
.markdown:not(:lang(zh)):not(:lang(ja)):not(:lang(kr)), .markdown:not(:lang(zh)) {
299+
300+
.markdown:not(:lang(zh)):not(:lang(ja)):not(:lang(kr)),
301+
.markdown:not(:lang(zh)) {
211302
letter-spacing: 0.61px;
212303
}
213304

.dumi/theme/slots/AboutDocs/index.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
justify-content: center;
3535
flex-direction: column;
3636

37+
3738
.bannerContent {
3839
padding: 0px 24px;
3940
margin-top: 30px;
@@ -117,4 +118,3 @@
117118
}
118119
}
119120
}
120-

.dumi/theme/slots/AutomatedTesting/index.less

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,49 @@
5050
.desc {
5151
width: 542px;
5252
margin-top: 48px;
53-
font-size: 18px;
53+
font-size: 16px;
5454
color: #ffffff;
55-
letter-spacing: 0.61px;
55+
letter-spacing: 1px;
5656
opacity: 0.8;
5757
}
58+
59+
.buttom {
60+
cursor: pointer;
61+
width: 150px;
62+
height: 37px;
63+
background-image: url("https://mdn.alipayobjects.com/huamei_bvbxju/afts/img/A*eMQHT670srQAAAAAAAAAAAAADlHYAQ/original");
64+
background-repeat: no-repeat;
65+
background-size: contain;
66+
background-position: center;
67+
border-radius: 7px;
68+
margin-top: 32px;
69+
color: #a8abff;
70+
display: flex;
71+
align-items: center;
72+
justify-content: center;
73+
position: relative;
74+
75+
.anticon {
76+
svg {
77+
width: 30px;
78+
height: 23px;
79+
position: absolute;
80+
bottom: 5px;
81+
}
82+
83+
margin-left: 8px;
84+
width: 25px;
85+
height: 25px;
86+
}
87+
88+
&:hover {
89+
background-image: url("https://mdn.alipayobjects.com/huamei_bvbxju/afts/img/A*Pm85SKQpQ88AAAAAAAAAAAAADlHYAQ/original");
90+
background-repeat: no-repeat;
91+
background-size: contain;
92+
background-position: center;
93+
color: #fff;
94+
}
95+
}
5896
}
5997
}
6098
}

.dumi/theme/slots/AutomatedTesting/index.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
import { useRouteMeta } from 'dumi';
1+
import { useRouteMeta,useLocale } from 'dumi';
22
import './index.less';
33
import React, { type FC } from 'react';
4+
import { SwapRightOutlined } from '@ant-design/icons';
45

56
const AutomatedTesting: FC = () => {
67
const { frontmatter } = useRouteMeta();
8+
const locale = useLocale();
9+
710
if (!('AutomatedTesting' in frontmatter)) return null;
811
return <div className="automatedTesting">
912
<div className="automatedTesting-center">
@@ -16,6 +19,10 @@ const AutomatedTesting: FC = () => {
1619
<div className="desc">
1720
{frontmatter.AutomatedTesting.description}
1821
</div>
22+
<div className="buttom" onClick={() => { window.open(frontmatter.AutomatedTesting.link) }}>
23+
{locale.id==='zh-CN'?'了解更多':'Learn more'}
24+
<SwapRightOutlined />
25+
</div>
1926
</div>
2027
</div>
2128
</div>

.dumi/theme/slots/CodeAnalysis/index.less

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,47 @@
4343
.desc {
4444
width: 542px;
4545
margin-top: 48px;
46-
font-size: 18px;
46+
font-size: 16px;
4747
color: #ffffff;
48-
letter-spacing: 0.61px;
48+
letter-spacing: 1px;
4949
opacity: 0.8;
5050
}
51+
.buttom {
52+
cursor: pointer;
53+
width: 150px;
54+
height: 37px;
55+
background-image: url("https://mdn.alipayobjects.com/huamei_bvbxju/afts/img/A*eMQHT670srQAAAAAAAAAAAAADlHYAQ/original");
56+
background-repeat: no-repeat;
57+
background-size: contain;
58+
background-position: center;
59+
border-radius: 7px;
60+
margin-top: 32px;
61+
color: #a8abff;
62+
display: flex;
63+
align-items: center;
64+
justify-content: center;
65+
position: relative;
66+
67+
.anticon {
68+
svg {
69+
width: 30px;
70+
height: 23px;
71+
position: absolute;
72+
bottom: 5px;
73+
}
74+
margin-left: 8px;
75+
width: 25px;
76+
height: 25px;
77+
}
78+
79+
&:hover {
80+
background-image: url("https://mdn.alipayobjects.com/huamei_bvbxju/afts/img/A*Pm85SKQpQ88AAAAAAAAAAAAADlHYAQ/original");
81+
background-repeat: no-repeat;
82+
background-size: contain;
83+
background-position: center;
84+
color: #fff;
85+
}
86+
}
5187
}
5288
}
5389
}

.dumi/theme/slots/CodeAnalysis/index.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
import { Link, useLocale, useSiteData, useRouteMeta} from 'dumi';
1+
import { Link, useLocale, useSiteData, useRouteMeta } from 'dumi';
22
import './index.less';
33
import React, { type FC } from 'react';
4+
import { SwapRightOutlined } from '@ant-design/icons';
45

56
const CodeAnalysis: FC = () => {
67
const { frontmatter } = useRouteMeta();
8+
const locale = useLocale();
79
if (!('CodeAnalysis' in frontmatter)) return null;
810
return <div className="codeAnalysis">
911
<div className="codeAnalysis-center">
@@ -16,6 +18,11 @@ const CodeAnalysis: FC = () => {
1618
<div className="desc">
1719
{frontmatter.CodeAnalysis.description}
1820
</div>
21+
<div className="buttom" onClick={() => { window.open(frontmatter.CodeAnalysis.link) }}>
22+
23+
{locale.id === 'zh-CN' ? '了解更多' : 'Learn more'}
24+
<SwapRightOutlined />
25+
</div>
1926
</div>
2027
</div>
2128
</div>

0 commit comments

Comments
 (0)