@antv/dumi-theme-antv 0.3.0-beta.19 → 0.3.0-beta.21
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/dist/layouts/entry/Index.js +0 -1
- package/dist/plugin/index.js +9 -0
- package/dist/slots/Banner/index.module.less +1 -1
- package/dist/slots/Cases/index.d.ts +1 -1
- package/dist/slots/Cases/index.js +4 -2
- package/dist/slots/Detail/News.js +3 -2
- package/dist/slots/Detail/index.js +3 -1
- package/dist/slots/Features/index.js +1 -1
- package/dist/slots/Header/index.js +1 -1
- package/package.json +1 -1
package/dist/plugin/index.js
CHANGED
|
@@ -34,6 +34,7 @@ var plugin_default = (api) => {
|
|
|
34
34
|
memo.resolve.codeBlockMode = "passive";
|
|
35
35
|
memo.exportStatic.extraRoutePaths = (0, import_examples.getExamplePaths)();
|
|
36
36
|
memo.mfsu = false;
|
|
37
|
+
memo.jsMinifier = "terser";
|
|
37
38
|
memo.favicons = ["https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*7svFR6wkPMoAAAAAAAAAAAAADmJ7AQ/original"];
|
|
38
39
|
return memo;
|
|
39
40
|
});
|
|
@@ -42,6 +43,14 @@ var plugin_default = (api) => {
|
|
|
42
43
|
id: "dumi-theme-antv-homepage",
|
|
43
44
|
absPath: "/"
|
|
44
45
|
},
|
|
46
|
+
{
|
|
47
|
+
id: "dumi-theme-antv-en-homepage",
|
|
48
|
+
absPath: "/en/"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: "dumi-theme-antv-zh-homepage",
|
|
52
|
+
absPath: "/zh/"
|
|
53
|
+
},
|
|
45
54
|
{
|
|
46
55
|
id: "dumi-theme-antv-example-list-zh",
|
|
47
56
|
absPath: "/examples",
|
|
@@ -5,9 +5,10 @@ import { ArrowLeftOutlined, ArrowRightOutlined } from '@ant-design/icons';
|
|
|
5
5
|
import { Link, FormattedMessage } from 'dumi';
|
|
6
6
|
import Slider from 'react-slick';
|
|
7
7
|
import cx from 'classnames';
|
|
8
|
+
import { useLocale } from 'dumi';
|
|
9
|
+
import { ic } from "../hooks";
|
|
8
10
|
import 'slick-carousel/slick/slick.css';
|
|
9
11
|
import 'slick-carousel/slick/slick-theme.css';
|
|
10
|
-
import { ic } from "../hooks";
|
|
11
12
|
import styles from "./index.module.less";
|
|
12
13
|
export var Cases = function Cases(_ref) {
|
|
13
14
|
var _ref$cases = _ref.cases,
|
|
@@ -15,6 +16,7 @@ export var Cases = function Cases(_ref) {
|
|
|
15
16
|
_ref$style = _ref.style,
|
|
16
17
|
style = _ref$style === void 0 ? {} : _ref$style,
|
|
17
18
|
className = _ref.className;
|
|
19
|
+
var lang = useLocale().id;
|
|
18
20
|
var slider = React.useRef(null);
|
|
19
21
|
|
|
20
22
|
var clickPrevious = function clickPrevious() {
|
|
@@ -72,7 +74,7 @@ export var Cases = function Cases(_ref) {
|
|
|
72
74
|
id: "\u67E5\u770B\u8BE6\u60C5"
|
|
73
75
|
})) : /*#__PURE__*/React.createElement(Link, {
|
|
74
76
|
className: styles.detail,
|
|
75
|
-
to: app.link ? app.link :
|
|
77
|
+
to: app.link[lang] ? app.link[lang] : app.link
|
|
76
78
|
}, /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
77
79
|
id: "\u67E5\u770B\u8BE6\u60C5"
|
|
78
80
|
})));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Link } from 'dumi';
|
|
2
|
+
import { Link, useLocale } from 'dumi';
|
|
3
3
|
import { ic } from "../hooks";
|
|
4
4
|
import styles from "./News.module.less";
|
|
5
5
|
var numberImages = ['https://gw.alipayobjects.com/zos/antfincdn/IqREAm36K7/1.png', 'https://gw.alipayobjects.com/zos/antfincdn/3fG1Iqjfnz/2.png'];
|
|
@@ -11,6 +11,7 @@ export var News = function News(_ref) {
|
|
|
11
11
|
date = _ref.date,
|
|
12
12
|
_ref$link = _ref.link,
|
|
13
13
|
link = _ref$link === void 0 ? '' : _ref$link;
|
|
14
|
+
var lang = useLocale().id;
|
|
14
15
|
var children = /*#__PURE__*/React.createElement("div", {
|
|
15
16
|
className: styles.container
|
|
16
17
|
}, /*#__PURE__*/React.createElement("img", {
|
|
@@ -35,7 +36,7 @@ export var News = function News(_ref) {
|
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
return /*#__PURE__*/React.createElement(Link, {
|
|
38
|
-
to: link,
|
|
39
|
+
to: link[lang] ? link[lang] : link,
|
|
39
40
|
className: styles.news
|
|
40
41
|
}, children);
|
|
41
42
|
};
|
|
@@ -22,6 +22,7 @@ import React, { useState, useEffect } from 'react';
|
|
|
22
22
|
import cx from 'classnames';
|
|
23
23
|
import gh from 'parse-github-url';
|
|
24
24
|
import GitHubButton from 'react-github-button';
|
|
25
|
+
import { useLocale } from 'dumi/dist/client/theme-api';
|
|
25
26
|
import { ic } from "../hooks";
|
|
26
27
|
import { News } from "./News";
|
|
27
28
|
import styles from "./index.module.less";
|
|
@@ -50,6 +51,7 @@ export var Detail = function Detail(_ref) {
|
|
|
50
51
|
removeNews = _useState2[0],
|
|
51
52
|
setRemoteNews = _useState2[1];
|
|
52
53
|
|
|
54
|
+
var lang = useLocale().id;
|
|
53
55
|
useEffect(function () {
|
|
54
56
|
fetch(AssetsNewsURL).then(function (res) {
|
|
55
57
|
return res.json();
|
|
@@ -86,7 +88,7 @@ export var Detail = function Detail(_ref) {
|
|
|
86
88
|
style: _objectSpread({
|
|
87
89
|
borderRadius: shape === 'square' ? '4px' : '1000px'
|
|
88
90
|
}, style),
|
|
89
|
-
href: link
|
|
91
|
+
href: link[lang] ? link[lang] : link
|
|
90
92
|
}, /*#__PURE__*/React.createElement("span", {
|
|
91
93
|
className: styles.button
|
|
92
94
|
}, ic(text)));
|
|
@@ -88,7 +88,7 @@ export var Features = function Features(_ref) {
|
|
|
88
88
|
}, /*#__PURE__*/React.createElement("p", {
|
|
89
89
|
key: "title",
|
|
90
90
|
className: styles.title
|
|
91
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
91
|
+
}, title ? title : ''), /*#__PURE__*/React.createElement("div", {
|
|
92
92
|
key: "block",
|
|
93
93
|
className: styles.cardsContainer
|
|
94
94
|
}, /*#__PURE__*/React.createElement(Row, {
|
|
@@ -420,7 +420,7 @@ var HeaderComponent = function HeaderComponent(_ref) {
|
|
|
420
420
|
}, /*#__PURE__*/React.createElement("div", {
|
|
421
421
|
className: styles.left
|
|
422
422
|
}, /*#__PURE__*/React.createElement("h1", null, /*#__PURE__*/React.createElement("a", {
|
|
423
|
-
href: siteUrl
|
|
423
|
+
href: siteUrl[lang] ? siteUrl[lang] : siteUrl
|
|
424
424
|
}, img)), !isAntVHome && subTitle && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
425
425
|
className: styles.divider
|
|
426
426
|
}), /*#__PURE__*/React.createElement("h2", {
|