@antv/dumi-theme-antv 0.2.2 → 0.3.0-beta.10
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/LICENSE +21 -0
- package/README.md +32 -33
- package/dist/builtins/Playground/index.d.ts +21 -0
- package/dist/builtins/Playground/index.js +69 -0
- package/dist/builtins/Playground/index.module.less +15 -0
- package/dist/context.d.ts +6 -0
- package/dist/context.js +2 -0
- package/dist/layouts/DocLayout.d.ts +7 -0
- package/dist/layouts/DocLayout.js +48 -0
- package/dist/layouts/entry/API.d.ts +10 -0
- package/dist/layouts/entry/API.js +12 -0
- package/dist/layouts/entry/Index.d.ts +7 -0
- package/dist/layouts/entry/Index.js +79 -0
- package/dist/layouts/entry/Manual.d.ts +8 -0
- package/dist/layouts/entry/Manual.js +13 -0
- package/dist/locales/en.json +98 -0
- package/dist/locales/zh.json +98 -0
- package/dist/pages/404.d.ts +6 -0
- package/dist/pages/404.js +18 -0
- package/dist/pages/Example/index.d.ts +6 -0
- package/dist/pages/Example/index.js +115 -0
- package/dist/pages/Example/index.module.less +82 -0
- package/dist/pages/Example/utils.d.ts +1 -0
- package/dist/pages/Example/utils.js +9 -0
- package/dist/pages/Examples/components/Accouncement/index.d.ts +6 -0
- package/dist/pages/Examples/components/Accouncement/index.js +60 -0
- package/dist/pages/Examples/components/Accouncement/index.module.less +9 -0
- package/dist/pages/Examples/components/Article/index.d.ts +2 -0
- package/dist/pages/Examples/components/Article/index.js +8 -0
- package/dist/pages/Examples/components/Article/index.module.less +2 -0
- package/dist/pages/Examples/components/ExampleTopicMenu/components/LeftMenu/index.d.ts +10 -0
- package/dist/pages/Examples/components/ExampleTopicMenu/components/LeftMenu/index.js +74 -0
- package/dist/pages/Examples/components/ExampleTopicMenu/index.d.ts +9 -0
- package/{es/builtins/Example.js → dist/pages/Examples/components/ExampleTopicMenu/index.js} +47 -33
- package/dist/pages/Examples/components/GalleryPageContent/DemoCard/index.d.ts +10 -0
- package/dist/pages/Examples/components/GalleryPageContent/DemoCard/index.js +33 -0
- package/dist/pages/Examples/components/GalleryPageContent/index.d.ts +10 -0
- package/dist/pages/Examples/components/GalleryPageContent/index.js +81 -0
- package/dist/pages/Examples/index.d.ts +8 -0
- package/dist/pages/Examples/index.js +95 -0
- package/dist/pages/Examples/index.module.less +607 -0
- package/dist/pages/Examples/types.d.ts +34 -0
- package/dist/pages/Examples/types.js +1 -0
- package/dist/plugin/examples.d.ts +21 -0
- package/dist/plugin/examples.js +105 -0
- package/dist/plugin/index.d.ts +3 -0
- package/dist/plugin/index.js +113 -0
- package/dist/plugin/utils.d.ts +5 -0
- package/dist/plugin/utils.js +46 -0
- package/dist/slots/404.d.ts +2 -0
- package/{es/antv/404/index.js → dist/slots/404.js} +4 -9
- package/{es/antv/Cases/Cases.d.ts → dist/slots/Cases/index.d.ts} +5 -4
- package/{es/antv/Cases/Cases.js → dist/slots/Cases/index.js} +25 -25
- package/{src/antv/Cases/Cases.module.less → dist/slots/Cases/index.module.less} +36 -5
- package/dist/slots/CodeEditor/Toolbar.d.ts +67 -0
- package/dist/slots/CodeEditor/Toolbar.js +140 -0
- package/dist/slots/CodeEditor/Toolbar.module.less +81 -0
- package/dist/slots/CodeEditor/index.d.ts +58 -0
- package/dist/slots/CodeEditor/index.js +226 -0
- package/dist/slots/CodeEditor/index.module.less +11 -0
- package/dist/slots/CodeEditor/utils.d.ts +42 -0
- package/dist/slots/CodeEditor/utils.js +157 -0
- package/dist/slots/CodePreview/CodeHeader.d.ts +19 -0
- package/dist/slots/CodePreview/CodeHeader.js +32 -0
- package/dist/slots/CodePreview/CodeHeader.module.less +0 -0
- package/dist/slots/CodePreview/index.d.ts +17 -0
- package/dist/slots/CodePreview/index.js +29 -0
- package/dist/slots/CodePreview/index.module.less +43 -0
- package/dist/slots/CodeRunner/index.d.ts +15 -0
- package/dist/slots/CodeRunner/index.js +79 -0
- package/dist/slots/CodeRunner/index.module.less +0 -0
- package/dist/slots/CodeRunner/utils.d.ts +11 -0
- package/dist/slots/CodeRunner/utils.js +36 -0
- package/dist/slots/Companies/index.d.ts +13 -0
- package/dist/slots/Companies/index.js +49 -0
- package/dist/slots/Companies/index.module.less +82 -0
- package/dist/slots/Detail/News.d.ts +10 -0
- package/{es/antv/Banner/Notification.js → dist/slots/Detail/News.js} +8 -11
- package/{src/antv/Banner/Notification.module.less → dist/slots/Detail/News.module.less} +15 -3
- package/dist/slots/Detail/index.d.ts +27 -0
- package/dist/slots/Detail/index.js +124 -0
- package/{src/antv/Banner/Banner.module.less → dist/slots/Detail/index.module.less} +42 -74
- package/dist/slots/ExampleSider/index.d.ts +21 -0
- package/dist/slots/ExampleSider/index.js +196 -0
- package/dist/slots/ExampleSider/index.module.less +141 -0
- package/{es/antv → dist/slots}/Features/FeatureCard.d.ts +2 -1
- package/{es/antv → dist/slots}/Features/FeatureCard.js +6 -6
- package/{src/antv → dist/slots}/Features/FeatureCard.module.less +8 -1
- package/{es/antv → dist/slots}/Features/index.d.ts +2 -2
- package/{es/antv → dist/slots}/Features/index.js +19 -26
- package/{src/antv/Features/Features.module.less → dist/slots/Features/index.module.less} +34 -3
- package/dist/slots/Footer/index.d.ts +18 -0
- package/dist/slots/Footer/index.js +188 -0
- package/dist/slots/Footer/index.module.less +86 -0
- package/dist/slots/Header/Logo.d.ts +7 -0
- package/{es/antv → dist/slots}/Header/Logo.js +6 -2
- package/dist/slots/Header/LogoWhite.d.ts +7 -0
- package/dist/slots/Header/LogoWhite.js +19 -0
- package/dist/slots/Header/Navs.d.ts +26 -0
- package/dist/slots/Header/Navs.js +63 -0
- package/dist/slots/Header/Products/NavigatorBanner.d.ts +10 -0
- package/dist/slots/Header/Products/NavigatorBanner.js +34 -0
- package/dist/slots/Header/Products/NavigatorBanner.module.less +39 -0
- package/{es/antv → dist/slots/Header}/Products/Product.d.ts +3 -3
- package/{es/antv → dist/slots/Header}/Products/Product.js +11 -16
- package/{src/antv → dist/slots/Header}/Products/Product.module.less +10 -8
- package/{es/antv → dist/slots/Header}/Products/getProducts.d.ts +2 -7
- package/dist/slots/Header/Products/getProducts.js +67 -0
- package/dist/slots/Header/Products/index.d.ts +9 -0
- package/{es/antv → dist/slots/Header}/Products/index.js +15 -22
- package/dist/slots/Header/Search.d.ts +12 -0
- package/dist/slots/Header/Search.js +90 -0
- package/dist/slots/Header/Search.module.less +39 -0
- package/dist/slots/Header/index.d.ts +66 -0
- package/dist/slots/Header/index.js +380 -0
- package/dist/slots/Header/index.module.less +382 -0
- package/dist/slots/Header/utils.d.ts +1 -0
- package/dist/slots/Header/utils.js +26 -0
- package/dist/slots/Loading/index.d.ts +7 -0
- package/dist/slots/Loading/index.js +79 -0
- package/dist/slots/Loading/index.module.less +279 -0
- package/dist/slots/ManualContent/NavigatorBanner.d.ts +9 -0
- package/dist/slots/ManualContent/NavigatorBanner.js +36 -0
- package/dist/slots/ManualContent/NavigatorBanner.module.less +39 -0
- package/dist/slots/ManualContent/ReadingTime.d.ts +3 -0
- package/dist/slots/ManualContent/ReadingTime.js +10 -0
- package/dist/slots/ManualContent/index.d.ts +9 -0
- package/dist/slots/ManualContent/index.js +344 -0
- package/dist/slots/ManualContent/index.module.less +668 -0
- package/dist/slots/ManualContent/utils.d.ts +3 -0
- package/dist/slots/ManualContent/utils.js +35 -0
- package/dist/slots/SEO.d.ts +10 -0
- package/dist/slots/SEO.js +59 -0
- package/dist/slots/TOC.d.ts +5 -0
- package/dist/slots/TOC.js +6 -0
- package/dist/slots/_.less +83 -0
- package/dist/slots/global.d.ts +1 -0
- package/dist/slots/global.js +7 -0
- package/dist/slots/hooks.d.ts +16 -0
- package/{es/antv → dist/slots}/hooks.js +60 -37
- package/dist/slots/utils.d.ts +5 -0
- package/dist/slots/utils.js +112 -0
- package/dist/types.d.ts +86 -0
- package/dist/types.js +1 -0
- package/dist/typings.d.ts +24 -0
- package/package.json +110 -47
- package/es/antv/404/index.d.ts +0 -2
- package/es/antv/Banner/Banner.module.less +0 -412
- package/es/antv/Banner/Notification.d.ts +0 -10
- package/es/antv/Banner/Notification.module.less +0 -108
- package/es/antv/Banner/index.d.ts +0 -25
- package/es/antv/Banner/index.js +0 -104
- package/es/antv/Cases/Cases.module.less +0 -203
- package/es/antv/Features/FeatureCard.module.less +0 -51
- package/es/antv/Features/Features.module.less +0 -169
- package/es/antv/Footer/Footer.module.less +0 -36
- package/es/antv/Footer/index.d.ts +0 -12
- package/es/antv/Footer/index.js +0 -237
- package/es/antv/Header/Logo.d.ts +0 -4
- package/es/antv/Products/Product.module.less +0 -146
- package/es/antv/Products/getNewProducts.d.ts +0 -24
- package/es/antv/Products/getNewProducts.js +0 -35
- package/es/antv/Products/getProducts.js +0 -460
- package/es/antv/Products/index.d.ts +0 -9
- package/es/antv/hooks.d.ts +0 -14
- package/es/antv/mixins.less +0 -21
- package/es/antv/utils.d.ts +0 -5
- package/es/antv/utils.js +0 -49
- package/es/builtins/API.d.ts +0 -3
- package/es/builtins/API.js +0 -37
- package/es/builtins/Alert.d.ts +0 -3
- package/es/builtins/Alert.js +0 -7
- package/es/builtins/Alert.less +0 -62
- package/es/builtins/Badge.d.ts +0 -3
- package/es/builtins/Badge.js +0 -7
- package/es/builtins/Badge.less +0 -31
- package/es/builtins/Example.d.ts +0 -5
- package/es/builtins/Example.less +0 -47
- package/es/builtins/Previewer.d.ts +0 -39
- package/es/builtins/Previewer.js +0 -225
- package/es/builtins/Previewer.less +0 -406
- package/es/builtins/SourceCode.d.ts +0 -10
- package/es/builtins/SourceCode.js +0 -70
- package/es/builtins/SourceCode.less +0 -103
- package/es/builtins/Table.d.ts +0 -4
- package/es/builtins/Table.js +0 -56
- package/es/builtins/Table.less +0 -43
- package/es/builtins/Tree.d.ts +0 -4
- package/es/builtins/Tree.js +0 -213
- package/es/builtins/Tree.less +0 -159
- package/es/components/Dark.d.ts +0 -9
- package/es/components/Dark.js +0 -125
- package/es/components/Dark.less +0 -121
- package/es/components/LocaleSelect.d.ts +0 -6
- package/es/components/LocaleSelect.js +0 -53
- package/es/components/LocaleSelect.less +0 -59
- package/es/components/Navbar.d.ts +0 -10
- package/es/components/Navbar.js +0 -155
- package/es/components/Navbar.less +0 -180
- package/es/components/SearchBar.d.ts +0 -4
- package/es/components/SearchBar.js +0 -81
- package/es/components/SearchBar.less +0 -165
- package/es/components/SideMenu.d.ts +0 -10
- package/es/components/SideMenu.js +0 -99
- package/es/components/SideMenu.less +0 -379
- package/es/components/SlugList.d.ts +0 -7
- package/es/components/SlugList.js +0 -38
- package/es/components/SlugList.less +0 -18
- package/es/declaration.d.ts +0 -1
- package/es/layout.d.ts +0 -5
- package/es/layout.js +0 -276
- package/es/style/layout.less +0 -402
- package/es/style/markdown.less +0 -240
- package/es/style/variables.less +0 -37
- package/src/antv/404/index.tsx +0 -25
- package/src/antv/Banner/Notification.tsx +0 -45
- package/src/antv/Banner/index.tsx +0 -139
- package/src/antv/Cases/Cases.tsx +0 -116
- package/src/antv/Features/FeatureCard.tsx +0 -24
- package/src/antv/Features/index.tsx +0 -86
- package/src/antv/Footer/Footer.module.less +0 -36
- package/src/antv/Footer/index.tsx +0 -272
- package/src/antv/Header/Logo.tsx +0 -85
- package/src/antv/Products/Product.tsx +0 -80
- package/src/antv/Products/getNewProducts.tsx +0 -53
- package/src/antv/Products/getProducts.tsx +0 -626
- package/src/antv/Products/index.tsx +0 -70
- package/src/antv/hooks.ts +0 -87
- package/src/antv/mixins.less +0 -21
- package/src/antv/utils.ts +0 -44
- package/src/builtins/API.tsx +0 -57
- package/src/builtins/Alert.less +0 -62
- package/src/builtins/Alert.tsx +0 -4
- package/src/builtins/Badge.less +0 -31
- package/src/builtins/Badge.tsx +0 -4
- package/src/builtins/Example.less +0 -47
- package/src/builtins/Example.tsx +0 -34
- package/src/builtins/Previewer.less +0 -406
- package/src/builtins/Previewer.tsx +0 -264
- package/src/builtins/SourceCode.less +0 -103
- package/src/builtins/SourceCode.tsx +0 -55
- package/src/builtins/Table.less +0 -43
- package/src/builtins/Table.tsx +0 -42
- package/src/builtins/Tree.less +0 -159
- package/src/builtins/Tree.tsx +0 -130
- package/src/components/Dark.less +0 -121
- package/src/components/Dark.tsx +0 -78
- package/src/components/LocaleSelect.less +0 -59
- package/src/components/LocaleSelect.tsx +0 -53
- package/src/components/Navbar.less +0 -180
- package/src/components/Navbar.tsx +0 -152
- package/src/components/SearchBar.less +0 -165
- package/src/components/SearchBar.tsx +0 -68
- package/src/components/SideMenu.less +0 -379
- package/src/components/SideMenu.tsx +0 -148
- package/src/components/SlugList.less +0 -18
- package/src/components/SlugList.tsx +0 -20
- package/src/declaration.d.ts +0 -1
- package/src/layout.tsx +0 -225
- package/src/style/layout.less +0 -402
- package/src/style/markdown.less +0 -240
- package/src/style/variables.less +0 -37
- package/src/test/SearchBar.test.ts +0 -32
- package/src/test/Table.test.tsx +0 -41
- package/src/test/index.test.tsx +0 -377
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FooterProps as RcFooterProps } from 'rc-footer';
|
|
3
|
+
import 'rc-footer/assets/index.less';
|
|
4
|
+
interface FooterProps extends RcFooterProps {
|
|
5
|
+
rootDomain?: string;
|
|
6
|
+
language?: string;
|
|
7
|
+
githubUrl?: string;
|
|
8
|
+
/**
|
|
9
|
+
* 是否为动态 footer
|
|
10
|
+
*/
|
|
11
|
+
isDynamicFooter?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 底部菜单
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
17
|
+
export declare const Footer: React.FC<FooterProps>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
var _excluded = ["columns", "bottom", "theme", "language", "isDynamicFooter", "rootDomain", "className"];
|
|
2
|
+
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
|
|
5
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
|
|
7
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
8
|
+
|
|
9
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
10
|
+
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import { default as RCFooter } from 'rc-footer';
|
|
13
|
+
import { GithubOutlined, WeiboOutlined, ZhihuOutlined, QuestionCircleOutlined } from '@ant-design/icons';
|
|
14
|
+
import { omit } from 'lodash-es';
|
|
15
|
+
import classnames from 'classnames';
|
|
16
|
+
import { useLocale } from 'dumi';
|
|
17
|
+
import { useT } from "../hooks";
|
|
18
|
+
import 'rc-footer/assets/index.less';
|
|
19
|
+
import styles from "./index.module.less";
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 底部菜单
|
|
23
|
+
* @returns
|
|
24
|
+
*/
|
|
25
|
+
export var Footer = function Footer(props) {
|
|
26
|
+
var columns = props.columns,
|
|
27
|
+
bottom = props.bottom,
|
|
28
|
+
_props$theme = props.theme,
|
|
29
|
+
theme = _props$theme === void 0 ? 'dark' : _props$theme,
|
|
30
|
+
language = props.language,
|
|
31
|
+
isDynamicFooter = props.isDynamicFooter,
|
|
32
|
+
_props$rootDomain = props.rootDomain,
|
|
33
|
+
rootDomain = _props$rootDomain === void 0 ? '' : _props$rootDomain,
|
|
34
|
+
className = props.className,
|
|
35
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
36
|
+
|
|
37
|
+
var locale = useLocale();
|
|
38
|
+
var lang = locale.id;
|
|
39
|
+
|
|
40
|
+
var getColumns = function getColumns() {
|
|
41
|
+
// 如果外部没有传入 columns,则默认展示 antv footer
|
|
42
|
+
var col1 = {
|
|
43
|
+
title: 'Resources',
|
|
44
|
+
items: [{
|
|
45
|
+
title: 'Ant Design',
|
|
46
|
+
url: 'https://ant.design',
|
|
47
|
+
openExternal: true
|
|
48
|
+
}, {
|
|
49
|
+
title: 'Ant Design Mobile',
|
|
50
|
+
url: 'https://mobile.ant.design',
|
|
51
|
+
openExternal: true
|
|
52
|
+
}, {
|
|
53
|
+
title: 'Umi',
|
|
54
|
+
description: useT('React 应用开发框架'),
|
|
55
|
+
url: 'https://umijs.org',
|
|
56
|
+
openExternal: true
|
|
57
|
+
}, {
|
|
58
|
+
title: 'Dumi',
|
|
59
|
+
description: useT('组件/文档研发工具'),
|
|
60
|
+
url: 'https://d.umijs.org',
|
|
61
|
+
openExternal: true
|
|
62
|
+
}, {
|
|
63
|
+
title: 'ahooks',
|
|
64
|
+
description: useT('React Hooks 库'),
|
|
65
|
+
url: 'https://github.com/alibaba/hooks',
|
|
66
|
+
openExternal: true
|
|
67
|
+
}, {
|
|
68
|
+
title: useT('国内镜像'),
|
|
69
|
+
url: 'https://antv.antgroup.com/'
|
|
70
|
+
}]
|
|
71
|
+
};
|
|
72
|
+
var col2 = {
|
|
73
|
+
title: useT('社区'),
|
|
74
|
+
items: [{
|
|
75
|
+
icon: /*#__PURE__*/React.createElement(ZhihuOutlined, {
|
|
76
|
+
style: {
|
|
77
|
+
color: '#0084ff'
|
|
78
|
+
}
|
|
79
|
+
}),
|
|
80
|
+
title: useT('体验科技专栏'),
|
|
81
|
+
url: 'http://zhuanlan.zhihu.com/xtech',
|
|
82
|
+
openExternal: true
|
|
83
|
+
}, {
|
|
84
|
+
icon: /*#__PURE__*/React.createElement("img", {
|
|
85
|
+
src: "https://gw.alipayobjects.com/zos/rmsportal/mZBWtboYbnMkTBaRIuWQ.png",
|
|
86
|
+
alt: "seeconf"
|
|
87
|
+
}),
|
|
88
|
+
title: 'SEE Conf',
|
|
89
|
+
description: useT('蚂蚁体验科技大会'),
|
|
90
|
+
url: 'https://seeconf.antfin.com/',
|
|
91
|
+
openExternal: true
|
|
92
|
+
}]
|
|
93
|
+
};
|
|
94
|
+
var col3 = {
|
|
95
|
+
title: useT('帮助'),
|
|
96
|
+
items: [{
|
|
97
|
+
icon: /*#__PURE__*/React.createElement(GithubOutlined, null),
|
|
98
|
+
title: 'GitHub',
|
|
99
|
+
url: 'https://github.com/antvis',
|
|
100
|
+
openExternal: true
|
|
101
|
+
}, {
|
|
102
|
+
icon: /*#__PURE__*/React.createElement(QuestionCircleOutlined, null),
|
|
103
|
+
title: useT('StackOverflow'),
|
|
104
|
+
url: 'http://stackoverflow.com/questions/tagged/antv',
|
|
105
|
+
openExternal: true
|
|
106
|
+
}]
|
|
107
|
+
};
|
|
108
|
+
var more = {
|
|
109
|
+
icon: /*#__PURE__*/React.createElement("img", {
|
|
110
|
+
src: "https://gw.alipayobjects.com/zos/rmsportal/nBVXkrFdWHxbZlmMbsaH.svg",
|
|
111
|
+
alt: "more products"
|
|
112
|
+
}),
|
|
113
|
+
title: '更多产品',
|
|
114
|
+
items: [{
|
|
115
|
+
icon: /*#__PURE__*/React.createElement("img", {
|
|
116
|
+
src: "https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg",
|
|
117
|
+
alt: "Ant Design"
|
|
118
|
+
}),
|
|
119
|
+
title: 'Ant Design',
|
|
120
|
+
url: 'https://ant.design',
|
|
121
|
+
description: '企业级 UI 设计语言',
|
|
122
|
+
openExternal: true
|
|
123
|
+
}, {
|
|
124
|
+
icon: /*#__PURE__*/React.createElement("img", {
|
|
125
|
+
src: "https://gw.alipayobjects.com/zos/rmsportal/XuVpGqBFxXplzvLjJBZB.svg",
|
|
126
|
+
alt: "yuque"
|
|
127
|
+
}),
|
|
128
|
+
title: '语雀',
|
|
129
|
+
url: 'https://yuque.com',
|
|
130
|
+
description: '知识创作与分享工具',
|
|
131
|
+
openExternal: true
|
|
132
|
+
}, {
|
|
133
|
+
icon: /*#__PURE__*/React.createElement("img", {
|
|
134
|
+
src: "https://gw.alipayobjects.com/zos/antfincdn/v2%24rh7lqpu/82f338dd-b0a6-41bc-9a86-58aaa9df217b.png",
|
|
135
|
+
alt: "Egg"
|
|
136
|
+
}),
|
|
137
|
+
title: 'Egg',
|
|
138
|
+
url: 'https://eggjs.org',
|
|
139
|
+
description: '企业级 Node 开发框架',
|
|
140
|
+
openExternal: true
|
|
141
|
+
}, {
|
|
142
|
+
icon: /*#__PURE__*/React.createElement("img", {
|
|
143
|
+
src: "https://gw.alipayobjects.com/zos/rmsportal/DMDOlAUhmktLyEODCMBR.ico",
|
|
144
|
+
alt: "kitchen"
|
|
145
|
+
}),
|
|
146
|
+
title: 'Kitchen',
|
|
147
|
+
description: 'Sketch 工具集',
|
|
148
|
+
url: 'https://kitchen.alipay.com',
|
|
149
|
+
openExternal: true
|
|
150
|
+
}, {
|
|
151
|
+
icon: /*#__PURE__*/React.createElement("img", {
|
|
152
|
+
src: "https://gw.alipayobjects.com/zos/rmsportal/nBVXkrFdWHxbZlmMbsaH.svg",
|
|
153
|
+
alt: "xtech"
|
|
154
|
+
}),
|
|
155
|
+
title: '蚂蚁体验科技',
|
|
156
|
+
url: 'https://xtech.antfin.com/',
|
|
157
|
+
openExternal: true
|
|
158
|
+
}]
|
|
159
|
+
};
|
|
160
|
+
return [col1, col2, col3, more];
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
return /*#__PURE__*/React.createElement(RCFooter, _extends({
|
|
164
|
+
maxColumnsPerRow: 5,
|
|
165
|
+
theme: theme,
|
|
166
|
+
columns: columns || getColumns(),
|
|
167
|
+
className: classnames(styles.footer, className, _defineProperty({}, styles.withMenu, isDynamicFooter)),
|
|
168
|
+
bottom: bottom || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
169
|
+
className: styles.bottom
|
|
170
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("a", {
|
|
171
|
+
href: "https://weibo.com/antv2017",
|
|
172
|
+
target: "_blank",
|
|
173
|
+
rel: "noopener noreferrer"
|
|
174
|
+
}, /*#__PURE__*/React.createElement(WeiboOutlined, null)), /*#__PURE__*/React.createElement("a", {
|
|
175
|
+
href: "https://zhuanlan.zhihu.com/aiux-antv",
|
|
176
|
+
target: "_blank",
|
|
177
|
+
rel: "noopener noreferrer"
|
|
178
|
+
}, /*#__PURE__*/React.createElement(ZhihuOutlined, null)), /*#__PURE__*/React.createElement("a", {
|
|
179
|
+
href: "https://github.com/antvis",
|
|
180
|
+
target: "_blank",
|
|
181
|
+
rel: "noopener noreferrer"
|
|
182
|
+
}, /*#__PURE__*/React.createElement(GithubOutlined, null)), /*#__PURE__*/React.createElement("a", {
|
|
183
|
+
href: "".concat(rootDomain, "/").concat(lang, "/about")
|
|
184
|
+
}, useT('关于我们'))), /*#__PURE__*/React.createElement("div", null, "\xA9 ", new Date().getFullYear(), " Made with \u2764 by", ' ', /*#__PURE__*/React.createElement("a", {
|
|
185
|
+
href: "https://xtech.antfin.com/"
|
|
186
|
+
}, "AntV"))))
|
|
187
|
+
}, omit(restProps, ['githubUrl'])));
|
|
188
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
@import '~antd/es/style/themes/default.less';
|
|
2
|
+
@import '../_.less';
|
|
3
|
+
|
|
4
|
+
.footer {
|
|
5
|
+
width: 100%;
|
|
6
|
+
font-family: Avenir, @font-family;
|
|
7
|
+
|
|
8
|
+
:global(.rc-footer-container),
|
|
9
|
+
:global(.rc-footer-bottom-container) {
|
|
10
|
+
.container1440;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.description {
|
|
14
|
+
opacity: 0.6;
|
|
15
|
+
font-weight: normal;
|
|
16
|
+
margin-left: 0.5em;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.more {
|
|
20
|
+
display: flex;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
font-size: 14px;
|
|
23
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.25);
|
|
24
|
+
margin-bottom: 16px;
|
|
25
|
+
box-sizing: border-box;
|
|
26
|
+
padding-bottom: 16px;
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
flex-wrap: wrap;
|
|
29
|
+
|
|
30
|
+
.title {
|
|
31
|
+
font-size: 15px;
|
|
32
|
+
color: #fff;
|
|
33
|
+
margin-right: 8px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:global(.anticon),
|
|
37
|
+
a {
|
|
38
|
+
margin-right: 5px;
|
|
39
|
+
color: #fff;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
img {
|
|
43
|
+
width: 14px;
|
|
44
|
+
height: 14px;
|
|
45
|
+
margin-right: 4px;
|
|
46
|
+
position: relative;
|
|
47
|
+
top: -2px;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.bottom {
|
|
52
|
+
display: flex;
|
|
53
|
+
justify-content: space-between;
|
|
54
|
+
font-size: 14px;
|
|
55
|
+
|
|
56
|
+
:global(.anticon),
|
|
57
|
+
a {
|
|
58
|
+
margin-right: 8px;
|
|
59
|
+
color: rgba(255, 255, 255, 0.6);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@media only screen and (max-width: 767.99px) {
|
|
65
|
+
.footer {
|
|
66
|
+
.bottom {
|
|
67
|
+
display: block;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.withMenu {
|
|
73
|
+
margin-left: 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@media only screen and (min-width: 767.99px) {
|
|
77
|
+
.withMenu {
|
|
78
|
+
margin-left: 240px;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@media only screen and (min-width: 991.99px) {
|
|
83
|
+
.withMenu {
|
|
84
|
+
margin-left: 280px;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Header.LOGO
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export var Logo = function Logo(_ref) {
|
|
3
7
|
var style = _ref.style;
|
|
4
8
|
return /*#__PURE__*/React.createElement("svg", {
|
|
5
9
|
width: "94",
|
|
@@ -127,4 +131,4 @@ export default (function (_ref) {
|
|
|
127
131
|
fill: "url(#linearGradient-4)",
|
|
128
132
|
d: "M19.8878401,7.40978464 C19.7383064,7.15620152 19.4618641,6.99998235 19.1626937,7.00000003 L12.8373895,7.00000003 C12.5382281,6.9999242 12.261761,7.15608029 12.1121725,7.40962229 C11.962584,7.66316428 11.9626109,7.97555472 12.112243,8.22907204 L15.2751831,13.5903738 C15.4247323,13.8438523 15.7011,14 16.0001856,14 C16.2992712,14 16.5756388,13.8438523 16.725188,13.5903738 L19.8878401,8.22935388 C20.0373866,7.97586547 20.0373866,7.66355488 19.8878401,7.41006648 L19.8878401,7.40978464 Z"
|
|
129
133
|
})))));
|
|
130
|
-
}
|
|
134
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Header.LogoWhite
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export var LogoWhite = function LogoWhite(_ref) {
|
|
7
|
+
var style = _ref.style;
|
|
8
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
9
|
+
viewBox: "0 0 94 28",
|
|
10
|
+
style: style,
|
|
11
|
+
version: "1.1",
|
|
12
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
13
|
+
width: "94",
|
|
14
|
+
height: "28"
|
|
15
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
16
|
+
d: "M651.186899 0c30.027294 0 57.825882 20.510118 62.674823 50.115765a60.295529 60.295529 0 0 1-55.055058 70.204235L654.439605 120.470588H181.050428c-9.035294 0-14.968471 8.975059-12.107294 17.016471l1.024 2.16847 389.451294 674.544942c4.487529 7.770353 15.058824 8.463059 20.630588 2.108235l1.505883-2.108235 232.538353-402.733177c15.751529-27.256471 49.754353-40.809412 78.516706-27.858823a60.235294 60.235294 0 0 1 29.665882 81.106823l-2.108235 4.035765-290.725647 503.567059a68.306824 68.306824 0 0 1-58.910118 34.032941c-22.588235 0-43.670588-11.294118-56.229647-29.756235l-2.740706-4.397177L9.078664 102.038588a68.216471 68.216471 0 0 1 0-68.005647A68.246588 68.246588 0 0 1 62.898899 0.210824L68.018899 0H651.186899z m1542.806588 369.302588c97.942588 0 158.900706 57.584941 162.002824 152.877177l0.12047 7.408941v277.202823c-5.421176 21.504-24.094118 36.502588-45.447529 36.502589-19.907765 0-37.496471-13.040941-44.152471-32.286118l-1.264941-4.216471v-260.999529c0-65.716706-36.080941-102.339765-102.580706-102.339765s-111.013647 42.616471-113.754353 107.218824l-0.12047 6.324706v249.795764c-5.481412 21.473882-24.094118 36.382118-45.417412 36.382118-19.877647 0-37.436235-13.010824-44.122353-32.165647l-1.264941-4.216471V374.091294h86.497882v72.944941h1.656471c27.648-50.989176 77.462588-77.703529 147.847529-77.703529zM1593.929487 196.065882c20.781176 0 39.574588 12.348235 48.730353 31.472942l1.807059 4.21647 218.202353 574.945882c-8.071529 21.202824-27.708235 35.087059-49.603765 35.087059a53.187765 53.187765 0 0 1-47.826823-30.930823l-1.746824-4.156236-55.416471-155.346823h-229.918117l-55.416471 155.346823-1.927529 4.306824c-9.035294 18.070588-27.015529 29.605647-46.832941 29.605647a52.585412 52.585412 0 0 1-46.832942-29.605647L1325.21984 806.671059l218.172235-574.945883 1.807059-4.21647a54.241882 54.241882 0 0 1 48.730353-31.472941z m968.432941 83.365647c17.468235 0 33.551059 9.306353 42.857412 24.425412l2.198588 3.915294h0.301177v97.28h87.250823c10.782118 7.800471 17.257412 20.510118 17.257412 34.123294 0 12.047059-5.12 23.491765-13.854118 31.201883l-3.403294 2.740706h-86.949647v241.995294c0 37.647059 17.347765 54.994824 55.416471 54.994823 8.252235 0 20.841412-0.873412 27.979294-1.596235l3.041882-0.391529c10.631529 7.920941 16.956235 20.600471 16.956236 34.123294a42.164706 42.164706 0 0 1-13.552942 31.171764l-3.403294 2.740706-10.149647 1.686589c-13.552941 1.957647-27.226353 2.861176-40.96 2.710588-88.335059 0-124.024471-31.232-125.952-109.869177l-0.090353-6.836706v-250.608941h-62.765176a41.562353 41.562353 0 0 1-17.016471-33.792c0-11.986824 5.029647-23.311059 13.613177-31.021176l3.403294-2.770824v-0.602353h62.765176v-97.28l2.198588-3.915294a50.447059 50.447059 0 0 1 42.857412-24.395294zM2830.289016 180.705882c20.871529 0 39.815529 12.318118 49.091765 31.503059l1.807059 4.216471h-0.301176l164.562823 474.563764h2.499765l165.285647-474.563764 1.776941-4.186353a53.428706 53.428706 0 0 1 48.097882-31.232c20.570353 0 39.152941 12.227765 48.097883 31.232l1.776941 4.21647-215.401412 574.945883c-5.752471 24.696471-26.985412 42.104471-51.410823 42.10447-22.889412 0-42.977882-15.299765-50.176-37.586823l-1.234824-4.517647-215.401412-574.945883 1.837177-4.246588A54.784 54.784 0 0 1 2830.289016 180.705882zM1594.170428 327.499294h-2.499764l-90.051765 252.084706 182.603294 0.120471-90.051765-252.205177zM689.737487 274.642824c24.576 0 40.357647 25.419294 30.539294 47.134117l-1.596235 3.072-108.93553 188.717177a33.490824 33.490824 0 0 1-55.777882 3.343058l-2.198588-3.312941-108.93553-188.747294a33.490824 33.490824 0 0 1 25.539765-50.025412l3.433412-0.180705h217.931294zM1072.954428 0c24.274824 0 46.802824 13.040941 58.940236 34.032941 11.143529 19.335529 11.986824 43.068235 2.529882 63.096471l-2.590118 4.909176-119.205647 206.516706a60.144941 60.144941 0 0 1-89.569882 17.106824c-22.618353-17.769412-27.708235-49.904941-15.450353-75.685647l2.499765-4.758589 60.928-105.562353a12.8 12.8 0 0 0-8.673883-18.974117L959.953016 120.470588h-105.953882c-29.997176 0-57.825882-20.510118-62.644706-50.115764a60.325647 60.325647 0 0 1 55.115294-70.174118L850.776546 0h222.147765z",
|
|
17
|
+
fill: "#ffffff"
|
|
18
|
+
}));
|
|
19
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type dropdownItem = {
|
|
3
|
+
label: {
|
|
4
|
+
[key: string]: string;
|
|
5
|
+
};
|
|
6
|
+
key: string;
|
|
7
|
+
};
|
|
8
|
+
export declare type INav = {
|
|
9
|
+
slug?: string;
|
|
10
|
+
order: number;
|
|
11
|
+
title: {
|
|
12
|
+
[key: string]: string;
|
|
13
|
+
};
|
|
14
|
+
target?: '_blank';
|
|
15
|
+
notPage?: boolean;
|
|
16
|
+
dropdownItems?: dropdownItem[];
|
|
17
|
+
};
|
|
18
|
+
export declare type NavProps = {
|
|
19
|
+
navs: INav[];
|
|
20
|
+
path: string;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Header 中的导航菜单
|
|
24
|
+
*/
|
|
25
|
+
export declare const Navs: React.FC<NavProps>;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import cx from 'classnames';
|
|
5
|
+
import { isEqual } from 'lodash-es';
|
|
6
|
+
import { Link, useLocale } from 'dumi';
|
|
7
|
+
import { Dropdown, Menu } from 'antd';
|
|
8
|
+
import { DownOutlined, LinkOutlined } from '@ant-design/icons';
|
|
9
|
+
import styles from "./index.module.less";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Header 中的导航菜单
|
|
13
|
+
*/
|
|
14
|
+
export var Navs = function Navs(_ref) {
|
|
15
|
+
var navs = _ref.navs,
|
|
16
|
+
path = _ref.path;
|
|
17
|
+
var locale = useLocale();
|
|
18
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, navs.map(function (nav) {
|
|
19
|
+
var title = nav.title[locale.id];
|
|
20
|
+
var href = '';
|
|
21
|
+
var className = '';
|
|
22
|
+
|
|
23
|
+
if (nav.slug) {
|
|
24
|
+
href = nav.slug.startsWith('http') ? nav.slug : "/".concat(nav.slug);
|
|
25
|
+
|
|
26
|
+
if (locale.id == 'en' && !href.startsWith('http')) {
|
|
27
|
+
href = "/en".concat(href);
|
|
28
|
+
} // 去除 docs 防止二次点击相同nav跳转出现04
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
href = href.replace('/docs/', '/');
|
|
32
|
+
className = cx('header-menu-item-active', _defineProperty({}, styles.activeItem, path.startsWith(href) || isEqual(path.split('/').slice(0, 4), href.split('/').slice(0, 4))));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return nav.notPage ? /*#__PURE__*/React.createElement("li", {
|
|
36
|
+
key: title,
|
|
37
|
+
className: className
|
|
38
|
+
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
39
|
+
className: styles.ecoSystems,
|
|
40
|
+
placement: "bottom",
|
|
41
|
+
overlay: /*#__PURE__*/React.createElement(Menu, null, nav.dropdownItems.map(function (_ref2) {
|
|
42
|
+
var label = _ref2.label,
|
|
43
|
+
key = _ref2.key;
|
|
44
|
+
return /*#__PURE__*/React.createElement(Menu.Item, {
|
|
45
|
+
key: key
|
|
46
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
47
|
+
target: "_blank",
|
|
48
|
+
rel: "noreferrer",
|
|
49
|
+
href: key
|
|
50
|
+
}, label[locale.id], " ", /*#__PURE__*/React.createElement(LinkOutlined, null)));
|
|
51
|
+
}))
|
|
52
|
+
}, /*#__PURE__*/React.createElement("span", null, title, /*#__PURE__*/React.createElement(DownOutlined, null)))) : /*#__PURE__*/React.createElement("li", {
|
|
53
|
+
key: title,
|
|
54
|
+
className: className
|
|
55
|
+
}, nav.target === '_blank' || href.startsWith('http') ? /*#__PURE__*/React.createElement("a", {
|
|
56
|
+
href: href,
|
|
57
|
+
target: "_blank",
|
|
58
|
+
rel: "noreferrer"
|
|
59
|
+
}, title, /*#__PURE__*/React.createElement(LinkOutlined, null)) : /*#__PURE__*/React.createElement(Link, {
|
|
60
|
+
to: href
|
|
61
|
+
}, title));
|
|
62
|
+
}));
|
|
63
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { Link } from 'dumi';
|
|
4
|
+
import styles from "./NavigatorBanner.module.less";
|
|
5
|
+
import { useT } from "../../hooks";
|
|
6
|
+
|
|
7
|
+
var NavigatorBanner = function NavigatorBanner(_ref) {
|
|
8
|
+
var post = _ref.post,
|
|
9
|
+
type = _ref.type;
|
|
10
|
+
|
|
11
|
+
if (!post) {
|
|
12
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
13
|
+
className: classNames(styles.button, styles.hidden)
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
var slug = post.slug,
|
|
18
|
+
title = post.title;
|
|
19
|
+
|
|
20
|
+
if (!slug || !title) {
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return /*#__PURE__*/React.createElement(Link, {
|
|
25
|
+
to: slug,
|
|
26
|
+
className: classNames(styles.button, styles[type])
|
|
27
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
28
|
+
className: styles.label
|
|
29
|
+
}, useT(type === 'prev' ? '上一篇' : '下一篇')), /*#__PURE__*/React.createElement("div", {
|
|
30
|
+
className: styles.title
|
|
31
|
+
}, title));
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default NavigatorBanner;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
.button {
|
|
2
|
+
width: 50%;
|
|
3
|
+
display: inline-block;
|
|
4
|
+
margin-top: 32px;
|
|
5
|
+
padding: 32px 0 0;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
border-top: 1px solid #e8e8e8;
|
|
8
|
+
line-height: 1.5;
|
|
9
|
+
vertical-align: top;
|
|
10
|
+
|
|
11
|
+
&.hidden {
|
|
12
|
+
height: 86px;
|
|
13
|
+
cursor: auto;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.label {
|
|
17
|
+
margin-bottom: 8px;
|
|
18
|
+
font-size: 14px;
|
|
19
|
+
color: #bfbfbf;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.title {
|
|
23
|
+
font-size: 16px;
|
|
24
|
+
font-weight: 500;
|
|
25
|
+
color: #333;
|
|
26
|
+
transition: all 0.3s;
|
|
27
|
+
white-space: nowrap;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
text-overflow: ellipsis;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&:hover .title {
|
|
33
|
+
color: #000;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&.next {
|
|
37
|
+
text-align: right;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { ProductType } from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ProductType } from './getProducts';
|
|
3
3
|
interface ProductProps {
|
|
4
4
|
name?: string;
|
|
5
5
|
icon?: string;
|
|
6
6
|
slogan?: string;
|
|
7
7
|
description?: string;
|
|
8
8
|
url?: string;
|
|
9
|
-
links: ProductType[
|
|
9
|
+
links: ProductType['links'];
|
|
10
10
|
style?: React.CSSProperties;
|
|
11
11
|
language?: string;
|
|
12
12
|
}
|
|
@@ -1,29 +1,24 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useT } from "../../hooks";
|
|
4
3
|
import styles from "./Product.module.less";
|
|
5
4
|
|
|
6
5
|
var getTarget = function getTarget(url) {
|
|
7
|
-
return url.startsWith(
|
|
6
|
+
return url.startsWith('http') && !url.includes('gitee.io') && !url.includes('antv.vision') ? '_blank' : '_self';
|
|
8
7
|
};
|
|
9
8
|
|
|
10
9
|
var Product = function Product(_ref) {
|
|
10
|
+
var _links$home$title, _links$example$title;
|
|
11
|
+
|
|
11
12
|
var name = _ref.name,
|
|
12
13
|
icon = _ref.icon,
|
|
13
14
|
_ref$url = _ref.url,
|
|
14
|
-
url = _ref$url === void 0 ?
|
|
15
|
+
url = _ref$url === void 0 ? '' : _ref$url,
|
|
15
16
|
slogan = _ref.slogan,
|
|
16
17
|
description = _ref.description,
|
|
17
18
|
_ref$links = _ref.links,
|
|
18
19
|
links = _ref$links === void 0 ? {} : _ref$links,
|
|
19
20
|
style = _ref.style,
|
|
20
21
|
language = _ref.language;
|
|
21
|
-
|
|
22
|
-
var _a, _b;
|
|
23
|
-
|
|
24
|
-
var _useTranslation = useTranslation(),
|
|
25
|
-
t = _useTranslation.t;
|
|
26
|
-
|
|
27
22
|
return /*#__PURE__*/React.createElement("li", {
|
|
28
23
|
className: styles.product,
|
|
29
24
|
style: style
|
|
@@ -41,7 +36,7 @@ var Product = function Product(_ref) {
|
|
|
41
36
|
}, /*#__PURE__*/React.createElement("h4", null, name, /*#__PURE__*/React.createElement("span", {
|
|
42
37
|
className: styles.productSlogan,
|
|
43
38
|
style: {
|
|
44
|
-
opacity: language ===
|
|
39
|
+
opacity: language === 'en' ? 0.7 : ''
|
|
45
40
|
}
|
|
46
41
|
}, slogan))), /*#__PURE__*/React.createElement("div", {
|
|
47
42
|
className: styles.productDescription
|
|
@@ -49,13 +44,13 @@ var Product = function Product(_ref) {
|
|
|
49
44
|
className: styles.productLinks
|
|
50
45
|
}, links.home && /*#__PURE__*/React.createElement("a", {
|
|
51
46
|
href: links.home.url,
|
|
52
|
-
target: getTarget(links.home.url ||
|
|
47
|
+
target: getTarget(links.home.url || ''),
|
|
53
48
|
key: links.home.url
|
|
54
|
-
}, (
|
|
49
|
+
}, (_links$home$title = links.home.title) !== null && _links$home$title !== void 0 ? _links$home$title : useT('产品首页')), links.example && /*#__PURE__*/React.createElement("a", {
|
|
55
50
|
href: links.example.url,
|
|
56
|
-
target: getTarget(links.example.url ||
|
|
51
|
+
target: getTarget(links.example.url || ''),
|
|
57
52
|
key: links.example.url
|
|
58
|
-
}, (
|
|
53
|
+
}, (_links$example$title = links.example.title) !== null && _links$example$title !== void 0 ? _links$example$title : useT('图表示例')))));
|
|
59
54
|
};
|
|
60
55
|
|
|
61
56
|
export default Product;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
@import '
|
|
1
|
+
@import '~antd/es/style/themes/default.less';
|
|
2
|
+
@import '../../_.less';
|
|
2
3
|
|
|
3
4
|
.products {
|
|
4
5
|
width: 100%;
|
|
@@ -7,11 +8,12 @@
|
|
|
7
8
|
left: 0;
|
|
8
9
|
top: 64px;
|
|
9
10
|
opacity: 0;
|
|
11
|
+
max-height: calc(100vh - 64px);
|
|
10
12
|
transform: translateY(-12px);
|
|
11
13
|
transition: all 0.3s ease-in;
|
|
12
14
|
background: #fff;
|
|
13
|
-
padding: 0;
|
|
14
|
-
overflow:
|
|
15
|
+
padding: 8px 0 0;
|
|
16
|
+
overflow: auto;
|
|
15
17
|
box-shadow: none;
|
|
16
18
|
line-height: 1.5;
|
|
17
19
|
font-weight: normal;
|
|
@@ -26,18 +28,18 @@
|
|
|
26
28
|
opacity: 1;
|
|
27
29
|
box-shadow: 0 2px 8px #f0f1f2 inset;
|
|
28
30
|
pointer-events: auto;
|
|
29
|
-
max-height: unset !important;
|
|
30
31
|
transform: translateY(0);
|
|
32
|
+
height: auto !important;
|
|
31
33
|
}
|
|
32
34
|
|
|
33
|
-
&.show
|
|
35
|
+
&.show+.mask {
|
|
34
36
|
opacity: 1;
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
h3 {
|
|
38
40
|
font-size: 14px;
|
|
39
41
|
line-height: 22px;
|
|
40
|
-
margin:
|
|
42
|
+
margin: 24px 0;
|
|
41
43
|
color: #a3b1bf;
|
|
42
44
|
font-weight: normal;
|
|
43
45
|
padding-bottom: 8px;
|
|
@@ -97,7 +99,7 @@
|
|
|
97
99
|
}
|
|
98
100
|
|
|
99
101
|
.productLinks {
|
|
100
|
-
>
|
|
102
|
+
>a {
|
|
101
103
|
margin-right: 12px;
|
|
102
104
|
font-size: 12px;
|
|
103
105
|
line-height: 20px;
|
|
@@ -143,4 +145,4 @@
|
|
|
143
145
|
padding-right: 0;
|
|
144
146
|
}
|
|
145
147
|
}
|
|
146
|
-
}
|
|
148
|
+
}
|