@antv/dumi-theme-antv 0.3.20-beta.1 → 0.3.20-beta.2

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.
@@ -12,6 +12,7 @@ type DetailProps = {
12
12
  className?: string;
13
13
  style?: React.CSSProperties;
14
14
  title: IC;
15
+ engine?: IC;
15
16
  description: IC;
16
17
  image?: string;
17
18
  buttons?: DetailButtonProps[];
@@ -1,4 +1,5 @@
1
1
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["className", "style", "title", "engine", "description", "image", "githubUrl", "showGithubStars", "buttons", "news"];
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); }
3
4
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
5
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -11,6 +12,8 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
11
12
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
12
13
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
13
14
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
15
+ 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; }
16
+ 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; }
14
17
  import React, { useState, useEffect } from 'react';
15
18
  import cx from 'classnames';
16
19
  import gh from 'parse-github-url';
@@ -29,6 +32,7 @@ export var Detail = function Detail(_ref) {
29
32
  var className = _ref.className,
30
33
  style = _ref.style,
31
34
  title = _ref.title,
35
+ engine = _ref.engine,
32
36
  description = _ref.description,
33
37
  image = _ref.image,
34
38
  githubUrl = _ref.githubUrl,
@@ -36,7 +40,8 @@ export var Detail = function Detail(_ref) {
36
40
  showGithubStars = _ref$showGithubStars === void 0 ? true : _ref$showGithubStars,
37
41
  _ref$buttons = _ref.buttons,
38
42
  buttons = _ref$buttons === void 0 ? [] : _ref$buttons,
39
- news = _ref.news;
43
+ news = _ref.news,
44
+ v = _objectWithoutProperties(_ref, _excluded);
40
45
  var _useState = useState([]),
41
46
  _useState2 = _slicedToArray(_useState, 2),
42
47
  remoteNews = _useState2[0],
@@ -53,6 +58,7 @@ export var Detail = function Detail(_ref) {
53
58
  }, []);
54
59
  var githubObj = gh(githubUrl);
55
60
  var showGitHubStarsButton = showGithubStars && githubObj && githubObj.owner && githubObj.name;
61
+ var engineText = ic(engine);
56
62
  return /*#__PURE__*/React.createElement("section", {
57
63
  className: cx(styles.wrapper, className),
58
64
  style: style
@@ -62,7 +68,9 @@ export var Detail = function Detail(_ref) {
62
68
  className: styles.text
63
69
  }, /*#__PURE__*/React.createElement("div", {
64
70
  className: cx(styles.title, 'detail-title')
65
- }, ic(title)), /*#__PURE__*/React.createElement("div", {
71
+ }, /*#__PURE__*/React.createElement("span", {
72
+ className: cx(styles.engine, 'detail-engine')
73
+ }, engineText), ic(title).replace(engineText, '')), /*#__PURE__*/React.createElement("div", {
66
74
  className: cx(styles.description, 'detail-description')
67
75
  }, ic(description)), /*#__PURE__*/React.createElement("div", {
68
76
  className: cx(styles.buttons, 'detail-buttons')
@@ -76,10 +84,12 @@ export var Detail = function Detail(_ref) {
76
84
  key: ic(text),
77
85
  className: cx(styles.buttonLink, styles[type || ''], type === 'primary' ? 'primary-button' : 'common-button'),
78
86
  style: _objectSpread({
79
- borderRadius: shape === 'square' ? '4px' : '1000px'
87
+ borderRadius: shape === 'round' ? '1000px' : '12px'
80
88
  }, style),
81
89
  href: link[lang] ? link[lang] : link
82
- }, /*#__PURE__*/React.createElement("span", {
90
+ }, /*#__PURE__*/React.createElement("div", {
91
+ className: styles.icon
92
+ }), /*#__PURE__*/React.createElement("span", {
83
93
  className: styles.button
84
94
  }, ic(text)));
85
95
  }), showGitHubStarsButton && /*#__PURE__*/React.createElement("div", {
@@ -1,5 +1,10 @@
1
1
  @import '../_.less';
2
2
 
3
+ @font-face {
4
+ font-family: AlibabaPuHuiTiRHeavy;
5
+ src: url(../../font/Alibaba-PuHuiTi-Heavy.otf);
6
+ }
7
+
3
8
  .container1440() {
4
9
  width: 1440px;
5
10
  max-width: calc(100% - 80px);
@@ -41,159 +46,143 @@
41
46
 
42
47
  .title {
43
48
  font-size: 3.4em; //2.875em;
44
- font-weight: 800;
45
49
  color: rgba(0, 0, 0, 1);
46
50
  position: relative;
51
+ font-family: AlibabaPuHuiTiRHeavy;
52
+
53
+ .engine {
54
+ color: #691EFF;
55
+ }
47
56
  }
48
57
 
49
58
  .description {
50
59
  margin-top: 0.83%; //12px;
51
60
  margin-bottom: 0px;
52
61
  color: rgba(106, 123, 140, 1);
53
- font-size: 1.14em;
54
62
  font-weight: 200;
55
63
  position: relative;
56
64
  width: 40%;
57
65
  max-width: 700px;
66
+ font-family: AlibabaPuHuiTiR;
67
+ font-size: 18px;
68
+ color: #424E66;
58
69
  }
59
70
 
60
71
  .buttons {
61
72
  display: flex;
62
73
  margin-top: 5.56%;
63
74
 
64
- .buttonLink+.buttonLink {
65
- margin-left: 16px;
66
- }
67
-
68
75
  .buttonLink {
76
+ display: flex;
77
+ align-items: center;
78
+ justify-content: center;
69
79
  cursor: pointer;
70
- border-radius: 50px;
71
- min-width: 134px;
72
- padding-left: 15px;
73
- padding-right: 15px;
74
- height: 40px;
80
+ border-radius: 12px;
75
81
  z-index: 10;
76
82
  position: relative;
77
83
  transition: all 0.3s;
78
- border: 1px solid @primary-color;
79
- color: @primary-color;
80
- background: transparent;
81
84
  text-align: center;
82
- font-size: 1.14em;
83
- line-height: 40px;
85
+ height: 54px;
86
+ width: 166px;
87
+ box-shadow: 0 8px 28px 0 rgba(0, 0, 0, 0.10);
88
+ background-color: #691EFF;
89
+ font-size: 18px;
90
+ cursor: pointer;
91
+ box-shadow: 0 8px 28px 0 #f2f2f2;
92
+ margin-right: 20px;
93
+ color: #FFFFFF;
94
+ overflow: hidden;
95
+
96
+ .icon {
97
+ width: 20px;
98
+ height: 20px;
99
+ background-image: url(https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*lo_5RYdqKLsAAAAAAAAAAAAADmJ7AQ/original);
100
+ margin-right: 6px;
101
+ }
84
102
 
85
103
  &:hover {
86
- color: tint(@primary-color, 25%);
87
- border: 1px solid tint(@primary-color, 25%);
88
- background-color: fade(@primary-color, 3%);
104
+ opacity: 0.8;
89
105
  }
90
106
 
91
107
  &.primary {
92
- border: none;
93
- outline: none;
94
108
  color: #fff;
95
- background: linear-gradient(60deg, fade(@primary-color, 70%), shade(@primary-color, 20%));
96
- opacity: 0.8;
97
- box-shadow: 0 8px 10px fade(@primary-color, 20%);
109
+ background-color: #FFFFFF;
110
+ color: #000;
111
+ border: 1px solid #E8E8E8;
112
+
113
+ .icon {
114
+ position: relative;
115
+ background-image: url(https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*_xFsQbWE_AYAAAAAAAAAAAAADmJ7AQ/original);
116
+ }
98
117
 
99
118
  &:hover {
100
- opacity: 1;
119
+ color: #691EFF;
120
+
121
+ .icon {
122
+ left: -80px;
123
+ filter: drop-shadow(#691EFF 80px 0);
124
+ }
101
125
  }
102
126
  }
103
127
  }
104
128
 
105
129
  .githubWrapper {
106
- margin-left: 16px;
107
130
  display: flex;
108
131
 
109
132
  :global {
110
- .gh-btn {
111
- width: 40px;
112
- height: 40px;
113
- border-radius: 20px;
114
- padding: 9px;
115
- border: 1px solid #ced4d9;
116
- background: transparent;
117
- text-decoration: none;
118
- white-space: nowrap;
133
+ .github-btn {
119
134
  display: flex;
135
+ height: 54px;
136
+ padding: 0 16px;
120
137
  cursor: pointer;
121
- float: left;
138
+ box-shadow: 0 8px 28px 0 rgba(0, 0, 0, 0.05);
139
+ background-color: #FFFFFF;
140
+ border: 1px solid #E8E8E8;
141
+ justify-content: center;
142
+ align-items: center;
143
+ border-radius: 12px;
144
+ overflow: hidden;
122
145
  transition: all 0.15s;
123
146
 
124
147
  &:hover {
125
- background: #f2f4f5;
148
+ .gh-btn {
149
+ >.gh-ico {
150
+ filter: drop-shadow(#691EFF 80px 0);
151
+ }
152
+ }
153
+
154
+ .gh-count {
155
+ color: #691EFF;
156
+ }
126
157
  }
127
158
 
128
- .gh-ico {
129
- width: 16px;
130
- height: 16px;
131
- margin-left: 2px;
132
- margin-top: 2px;
133
- background-image: url(https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*Nk9mQ48ZoZMAAAAAAAAAAABkARQnAQ);
134
- background-size: 100% 100%;
135
- background-repeat: no-repeat;
136
- box-sizing: border-box;
137
- cursor: pointer;
138
- color: #333;
159
+ .gh-btn {
160
+ .gh-ico {
161
+ display: block;
162
+ width: 20px;
163
+ height: 20px;
164
+ background-image: url(https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*Nk9mQ48ZoZMAAAAAAAAAAABkARQnAQ);
165
+ background-size: 100% 100%;
166
+ background-repeat: no-repeat;
167
+ position: relative;
168
+ left: -80px;
169
+ filter: drop-shadow(#1D2129 80px 0);
170
+ }
171
+
172
+ .gh-text {
173
+ display: none;
174
+ }
139
175
  }
140
176
 
141
- .gh-text {
142
- display: none;
177
+ .gh-count {
178
+ position: relative;
179
+ font-size: 18px;
180
+ margin-left: 8px;
181
+ color: #1D2129;
182
+ letter-spacing: 0;
183
+ font-family: AlibabaSans102-Medium;
143
184
  }
144
185
  }
145
-
146
- .gh-count {
147
- position: relative;
148
- display: none;
149
- /* hidden to start */
150
- margin-left: 52px;
151
- margin-top: 7px;
152
- border: 1px solid #d4d4d4;
153
- padding: 2px 10px;
154
- font-weight: 700;
155
- height: 65%;
156
- border-radius: 5px;
157
- color: rgb(49, 70, 89);
158
-
159
- &:hover {
160
- background: #f2f4f5;
161
- transition: all 0.15s;
162
- }
163
- }
164
-
165
- .gh-count:hover,
166
- .gh-count:focus {
167
- color: #4183c4;
168
- }
169
-
170
- .gh-count:before,
171
- .gh-count:after {
172
- content: '';
173
- position: absolute;
174
- display: inline-block;
175
- width: 0;
176
- height: 0;
177
- border-color: transparent;
178
- border-style: solid;
179
- }
180
-
181
- .gh-count:before {
182
- top: 50%;
183
- left: -3px;
184
- margin-top: -5px;
185
- border-width: 4px 4px 4px 0;
186
- border-right-color: #fafafa;
187
- }
188
-
189
- .gh-count:after {
190
- top: 50%;
191
- border-width: 5px 5px 5px 0;
192
- border-right-color: #d4d4d4;
193
- left: -5px;
194
- z-index: -1;
195
- margin-top: -6px;
196
- }
197
186
  }
198
187
  }
199
188
  }
@@ -227,6 +216,7 @@
227
216
  position: relative;
228
217
  }
229
218
  }
219
+
230
220
  .backLeftBottom {
231
221
  position: absolute;
232
222
  left: -8%;
@@ -377,4 +367,4 @@
377
367
  top: 14%;
378
368
  }
379
369
  }
380
- }
370
+ }
@@ -17,7 +17,7 @@ import { useNavigate } from "react-router-dom";
17
17
  import cx from 'classnames';
18
18
  import { useSiteData, useLocale, FormattedMessage } from 'dumi';
19
19
  import { GithubOutlined, MenuOutlined, CaretDownFilled, DownOutlined, WechatOutlined, LinkOutlined, CheckOutlined } from '@ant-design/icons';
20
- import { Alert, Modal, Button, Popover, Menu, Dropdown, Select } from 'antd';
20
+ import { Modal, Button, Popover, Menu, Dropdown, Select } from 'antd';
21
21
  import { get, map, size } from 'lodash-es';
22
22
  import { Search } from "./Search";
23
23
  import { Products } from "./Products";
@@ -416,19 +416,7 @@ var HeaderComponent = function HeaderComponent(_ref) {
416
416
  }, /*#__PURE__*/React.createElement(GithubOutlined, null))));
417
417
  return /*#__PURE__*/React.createElement("header", {
418
418
  className: cx(styles.header, (_cx4 = {}, _defineProperty(_cx4, styles.transparent, !!transparent && !productMenuVisible), _defineProperty(_cx4, styles.isHomePage, !!isHomePage && !isAntVHome), _defineProperty(_cx4, styles.lightTheme, !!isAntVHome && !productMenuVisible && isWide), _defineProperty(_cx4, styles.isAntVHome, !!isAntVHome), _defineProperty(_cx4, styles.fixed, popupMenuVisible), _cx4))
419
- }, bannerVisible && /*#__PURE__*/React.createElement(Alert, {
420
- className: styles.banner,
421
- message: /*#__PURE__*/React.createElement("div", {
422
- dangerouslySetInnerHTML: {
423
- __html: banner.html
424
- }
425
- }),
426
- type: "info",
427
- banner: true,
428
- closable: true,
429
- showIcon: false,
430
- onClose: onBannerClose
431
- }), /*#__PURE__*/React.createElement("div", {
419
+ }, /*#__PURE__*/React.createElement("div", {
432
420
  className: styles.container
433
421
  }, /*#__PURE__*/React.createElement("div", {
434
422
  className: styles.left
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antv/dumi-theme-antv",
3
- "version": "0.3.20-beta.1",
3
+ "version": "0.3.20-beta.2",
4
4
  "description": "AntV website theme based on dumi2.",
5
5
  "types": "dist/types.d.ts",
6
6
  "scripts": {