@antv/dumi-theme-antv 0.1.0

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.
Files changed (111) hide show
  1. package/README.md +9 -0
  2. package/es/antv/404/index.js +20 -0
  3. package/es/antv/Banner/Banner.module.less +412 -0
  4. package/es/antv/Banner/Notification.js +44 -0
  5. package/es/antv/Banner/Notification.module.less +108 -0
  6. package/es/antv/Banner/index.js +115 -0
  7. package/es/antv/Cases/Cases.js +124 -0
  8. package/es/antv/Cases/Cases.module.less +203 -0
  9. package/es/antv/Features/FeatureCard.js +25 -0
  10. package/es/antv/Features/FeatureCard.module.less +51 -0
  11. package/es/antv/Features/Features.module.less +169 -0
  12. package/es/antv/Features/index.js +102 -0
  13. package/es/antv/Footer/Footer.module.less +36 -0
  14. package/es/antv/Footer/index.js +232 -0
  15. package/es/antv/Header/Logo.js +130 -0
  16. package/es/antv/Products/Product.js +61 -0
  17. package/es/antv/Products/Product.module.less +146 -0
  18. package/es/antv/Products/getNewProducts.js +41 -0
  19. package/es/antv/Products/getProducts.js +466 -0
  20. package/es/antv/Products/index.js +81 -0
  21. package/es/antv/hooks.js +81 -0
  22. package/es/antv/mixins.less +21 -0
  23. package/es/antv/utils.js +49 -0
  24. package/es/builtins/API.js +37 -0
  25. package/es/builtins/Alert.js +9 -0
  26. package/es/builtins/Alert.less +62 -0
  27. package/es/builtins/Badge.js +9 -0
  28. package/es/builtins/Badge.less +31 -0
  29. package/es/builtins/Example.js +48 -0
  30. package/es/builtins/Example.less +47 -0
  31. package/es/builtins/Previewer.js +225 -0
  32. package/es/builtins/Previewer.less +406 -0
  33. package/es/builtins/SourceCode.js +72 -0
  34. package/es/builtins/SourceCode.less +103 -0
  35. package/es/builtins/Table.js +56 -0
  36. package/es/builtins/Table.less +43 -0
  37. package/es/builtins/Tree.js +219 -0
  38. package/es/builtins/Tree.less +159 -0
  39. package/es/components/Dark.js +125 -0
  40. package/es/components/Dark.less +121 -0
  41. package/es/components/LocaleSelect.js +53 -0
  42. package/es/components/LocaleSelect.less +59 -0
  43. package/es/components/Navbar.js +155 -0
  44. package/es/components/Navbar.less +180 -0
  45. package/es/components/SearchBar.js +83 -0
  46. package/es/components/SearchBar.less +165 -0
  47. package/es/components/SideMenu.js +99 -0
  48. package/es/components/SideMenu.less +379 -0
  49. package/es/components/SlugList.js +33 -0
  50. package/es/components/SlugList.less +18 -0
  51. package/es/layout.js +276 -0
  52. package/es/style/layout.less +402 -0
  53. package/es/style/markdown.less +240 -0
  54. package/es/style/variables.less +37 -0
  55. package/package.json +58 -0
  56. package/src/antv/404/index.tsx +25 -0
  57. package/src/antv/Banner/Banner.module.less +412 -0
  58. package/src/antv/Banner/Notification.module.less +108 -0
  59. package/src/antv/Banner/Notification.tsx +45 -0
  60. package/src/antv/Banner/index.tsx +121 -0
  61. package/src/antv/Cases/Cases.module.less +203 -0
  62. package/src/antv/Cases/Cases.tsx +116 -0
  63. package/src/antv/Features/FeatureCard.module.less +51 -0
  64. package/src/antv/Features/FeatureCard.tsx +24 -0
  65. package/src/antv/Features/Features.module.less +169 -0
  66. package/src/antv/Features/index.tsx +86 -0
  67. package/src/antv/Footer/Footer.module.less +36 -0
  68. package/src/antv/Footer/index.tsx +272 -0
  69. package/src/antv/Header/Logo.tsx +85 -0
  70. package/src/antv/Products/Product.module.less +146 -0
  71. package/src/antv/Products/Product.tsx +80 -0
  72. package/src/antv/Products/getNewProducts.tsx +53 -0
  73. package/src/antv/Products/getProducts.tsx +626 -0
  74. package/src/antv/Products/index.tsx +70 -0
  75. package/src/antv/hooks.ts +87 -0
  76. package/src/antv/mixins.less +21 -0
  77. package/src/antv/utils.ts +44 -0
  78. package/src/builtins/API.tsx +57 -0
  79. package/src/builtins/Alert.less +62 -0
  80. package/src/builtins/Alert.tsx +4 -0
  81. package/src/builtins/Badge.less +31 -0
  82. package/src/builtins/Badge.tsx +4 -0
  83. package/src/builtins/Example.less +47 -0
  84. package/src/builtins/Example.tsx +34 -0
  85. package/src/builtins/Previewer.less +406 -0
  86. package/src/builtins/Previewer.tsx +264 -0
  87. package/src/builtins/SourceCode.less +103 -0
  88. package/src/builtins/SourceCode.tsx +55 -0
  89. package/src/builtins/Table.less +43 -0
  90. package/src/builtins/Table.tsx +42 -0
  91. package/src/builtins/Tree.less +159 -0
  92. package/src/builtins/Tree.tsx +130 -0
  93. package/src/components/Dark.less +121 -0
  94. package/src/components/Dark.tsx +78 -0
  95. package/src/components/LocaleSelect.less +59 -0
  96. package/src/components/LocaleSelect.tsx +53 -0
  97. package/src/components/Navbar.less +180 -0
  98. package/src/components/Navbar.tsx +152 -0
  99. package/src/components/SearchBar.less +165 -0
  100. package/src/components/SearchBar.tsx +68 -0
  101. package/src/components/SideMenu.less +379 -0
  102. package/src/components/SideMenu.tsx +148 -0
  103. package/src/components/SlugList.less +18 -0
  104. package/src/components/SlugList.tsx +20 -0
  105. package/src/layout.tsx +225 -0
  106. package/src/style/layout.less +402 -0
  107. package/src/style/markdown.less +240 -0
  108. package/src/style/variables.less +37 -0
  109. package/src/test/SearchBar.test.ts +32 -0
  110. package/src/test/Table.test.tsx +41 -0
  111. package/src/test/index.test.tsx +377 -0
@@ -0,0 +1,412 @@
1
+ @import '../mixins';
2
+ .container1440() {
3
+ width: 1440px;
4
+ max-width: calc(100% - 80px);
5
+ margin-left: auto;
6
+ margin-right: auto;
7
+
8
+ @media only screen and (max-width: 931.99px) {
9
+ & {
10
+ max-width: calc(100% - 60px);
11
+ }
12
+ }
13
+
14
+ @media only screen and (max-width: 767.99px) {
15
+ & {
16
+ max-width: calc(100% - 32px);
17
+ }
18
+ }
19
+ }
20
+
21
+ .wrapper {
22
+ min-height: 650px;
23
+ max-height: 803px;
24
+ background: linear-gradient(225deg, #ffffff, #f0f5ff);
25
+ height: calc(94vh);
26
+ position: relative;
27
+ overflow: hidden;
28
+ .content {
29
+ .container1440;
30
+ height: 100%;
31
+ position: relative;
32
+ }
33
+ .text {
34
+ position: relative;
35
+ top: 26%;
36
+ z-index: 1;
37
+ margin-left: 4.5%;
38
+ .title {
39
+ font-size: 3.4em; //2.875em;
40
+ font-weight: 800;
41
+ color: rgba(0, 0, 0, 1);
42
+ position: relative;
43
+ }
44
+ .description {
45
+ margin-top: 0.83%; //12px;
46
+ margin-bottom: 0px;
47
+ color: rgba(106, 123, 140, 1);
48
+ font-size: 1.14em;
49
+ font-weight: 200;
50
+ position: relative;
51
+ width: 40%;
52
+ max-width: 700px;
53
+ }
54
+ .buttons {
55
+ display: flex;
56
+ margin-top: 5.56%;
57
+
58
+ .buttonLink + .buttonLink {
59
+ margin-left: 16px;
60
+ }
61
+
62
+ .buttonLink {
63
+ cursor: pointer;
64
+ border-radius: 50px;
65
+ min-width: 134px;
66
+ padding-left: 15px;
67
+ padding-right: 15px;
68
+ height: 40px;
69
+ z-index: 10;
70
+ position: relative;
71
+ transition: all 0.3s;
72
+ border: 1px solid @primary-color;
73
+ color: @primary-color;
74
+ background: transparent;
75
+ text-align: center;
76
+ font-size: 1.14em;
77
+ line-height: 40px;
78
+
79
+ &:hover {
80
+ color: tint(@primary-color, 25%);
81
+ border: 1px solid tint(@primary-color, 25%);
82
+ background-color: fade(@primary-color, 3%);
83
+ }
84
+
85
+ &.primary {
86
+ border: none;
87
+ outline: none;
88
+ color: #fff;
89
+ background: linear-gradient(60deg, fade(@primary-color, 70%), shade(@primary-color, 20%));
90
+ opacity: 0.8;
91
+ box-shadow: 0 8px 10px fade(@primary-color, 20%);
92
+
93
+ &:hover {
94
+ opacity: 1;
95
+ }
96
+ }
97
+ }
98
+ .videoButtonWrapper {
99
+ margin-left: 16px;
100
+ width: fit-content;
101
+ height: fit-content;
102
+ .videoButton {
103
+ width: 40px;
104
+ height: 40px;
105
+ background-size: contain;
106
+ border: 1px solid @primary-color;
107
+ border-radius: 20px;
108
+ transition: all 0.15s;
109
+ display: flex;
110
+ cursor: pointer;
111
+ overflow: hidden;
112
+ .videoButtonIcon {
113
+ margin-left: 12px;
114
+ font-size: 16px;
115
+ color: @primary-color;
116
+ line-height: 44px;
117
+ }
118
+ .videoButtonText {
119
+ line-height: 40px;
120
+ margin-left: 10px;
121
+ color: @primary-color;
122
+ }
123
+ &:hover {
124
+ width: 134px;
125
+ }
126
+ }
127
+ }
128
+ .githubWrapper {
129
+ margin-left: 16px;
130
+ display: flex;
131
+ :global {
132
+ .gh-btn {
133
+ width: 40px;
134
+ height: 40px;
135
+ border-radius: 20px;
136
+ padding: 9px;
137
+ border: 1px solid #ced4d9;
138
+ background: transparent;
139
+ text-decoration: none;
140
+ white-space: nowrap;
141
+ display: flex;
142
+ cursor: pointer;
143
+ float: left;
144
+ transition: all 0.15s;
145
+ &:hover {
146
+ background: #f2f4f5;
147
+ }
148
+ .gh-ico {
149
+ width: 16px;
150
+ height: 16px;
151
+ margin-left: 2px;
152
+ margin-top: 2px;
153
+ background-image: url(https://gw.alipayobjects.com/mdn/rms_f8c6a0/afts/img/A*Nk9mQ48ZoZMAAAAAAAAAAABkARQnAQ);
154
+ background-size: 100% 100%;
155
+ background-repeat: no-repeat;
156
+ box-sizing: border-box;
157
+ cursor: pointer;
158
+ color: #333;
159
+ }
160
+ .gh-text {
161
+ display: none;
162
+ }
163
+ }
164
+ .gh-count {
165
+ position: relative;
166
+ display: none;
167
+ /* hidden to start */
168
+ margin-left: 52px;
169
+ margin-top: 7px;
170
+ border: 1px solid #d4d4d4;
171
+ padding: 2px 10px;
172
+ font-weight: 700;
173
+ height: 65%;
174
+ border-radius: 5px;
175
+ color: rgb(49, 70, 89);
176
+ &:hover {
177
+ background: #f2f4f5;
178
+ transition: all 0.15s;
179
+ }
180
+ }
181
+ .gh-count:hover,
182
+ .gh-count:focus {
183
+ color: #4183c4;
184
+ }
185
+ .gh-count:before,
186
+ .gh-count:after {
187
+ content: '';
188
+ position: absolute;
189
+ display: inline-block;
190
+ width: 0;
191
+ height: 0;
192
+ border-color: transparent;
193
+ border-style: solid;
194
+ }
195
+ .gh-count:before {
196
+ top: 50%;
197
+ left: -3px;
198
+ margin-top: -5px;
199
+ border-width: 4px 4px 4px 0;
200
+ border-right-color: #fafafa;
201
+ }
202
+ .gh-count:after {
203
+ top: 50%;
204
+ border-width: 5px 5px 5px 0;
205
+ border-right-color: #d4d4d4;
206
+ left: -5px;
207
+ z-index: -1;
208
+ margin-top: -6px;
209
+ }
210
+ }
211
+ }
212
+ }
213
+ }
214
+ .notifications {
215
+ width: 80%;
216
+ display: flex;
217
+ bottom: 40px;
218
+ position: absolute;
219
+ z-index: 3;
220
+ margin-left: 4.5%;
221
+ }
222
+ .teaser {
223
+ display: flex;
224
+ position: absolute;
225
+ right: 0;
226
+ margin-top: -300px;
227
+ width: 52%;
228
+ max-width: 598px;
229
+ height: 324px;
230
+ margin: auto;
231
+ margin-top: 0;
232
+ top: 0;
233
+ bottom: 0;
234
+ .teaserimg {
235
+ width: 100%;
236
+ height: auto;
237
+ position: relative;
238
+ }
239
+ }
240
+ .backLeftBottom {
241
+ position: absolute;
242
+ left: -8%;
243
+ bottom: -20px;
244
+ }
245
+ }
246
+ .videoModal {
247
+ :global {
248
+ .video-react-big-play-button {
249
+ display: none !important;
250
+ }
251
+ .video-react-control-bar {
252
+ border-radius: 0 0 4px 4px;
253
+ }
254
+ .video-react {
255
+ border-radius: 4px;
256
+ .video-react-video {
257
+ border-radius: 4px;
258
+ }
259
+ }
260
+ .ant-modal-close {
261
+ right: -50px;
262
+ top: -12px;
263
+ color: #fff;
264
+ }
265
+ .anticon-info-circle {
266
+ display: none !important;
267
+ }
268
+ .ant-modal-confirm-btns {
269
+ display: none !important;
270
+ }
271
+ .ant-modal-confirm-title {
272
+ display: none !important;
273
+ }
274
+ .ant-modal-close {
275
+ display: block !important;
276
+ }
277
+ .ant-modal-body {
278
+ padding: 0 !important;
279
+ .ant-modal-confirm-content {
280
+ margin: 0 !important;
281
+ }
282
+ }
283
+ }
284
+ }
285
+
286
+ @media (max-width: 1144px) {
287
+ .wrapper {
288
+ .teaser {
289
+ transition: 0.3s all;
290
+ margin: auto;
291
+ margin-top: 0;
292
+ top: 0;
293
+ bottom: 0;
294
+ }
295
+ }
296
+ }
297
+
298
+ @media (max-width: 900px) {
299
+ .wrapper {
300
+ .content {
301
+ width: 91.46%;
302
+ margin-left: 4.27%;
303
+ margin-bottom: 5%;
304
+ position: relative;
305
+ }
306
+ .text {
307
+ top: 16.7%;
308
+ text-align: center;
309
+ margin-left: 0;
310
+ .title {
311
+ font-size: 2.857em;
312
+ margin-left: 0;
313
+ }
314
+ .description {
315
+ width: 100%;
316
+ max-width: 100%;
317
+ margin-left: 0;
318
+ font-size: 1em;
319
+ }
320
+ .buttons {
321
+ display: inline-flex;
322
+ .more {
323
+ font-size: 1em;
324
+ }
325
+ .githubIframe {
326
+ height: 40px;
327
+ }
328
+ .videoButtonWrapper {
329
+ width: fit-content;
330
+ height: fit-content;
331
+ }
332
+ }
333
+ }
334
+ .notifications {
335
+ width: 100%;
336
+ display: block;
337
+ bottom: 20px;
338
+ height: 44px;
339
+ overflow: hidden;
340
+ }
341
+ .teaser {
342
+ width: 100%;
343
+ max-width: 1200px;
344
+ margin-top: auto;
345
+ margin-left: unset;
346
+ margin-right: unset;
347
+ right: unset;
348
+ top: 30%;
349
+ display: flex;
350
+ justify-content: center;
351
+ .teaserimg {
352
+ width: 40%;
353
+ margin-left: unset;
354
+ margin-right: unset;
355
+ }
356
+ }
357
+ }
358
+ }
359
+
360
+ @media (max-width: 786px) {
361
+ .wrapper {
362
+ .text {
363
+ .buttons {
364
+ .videoButtonWrapper {
365
+ display: none;
366
+ }
367
+ }
368
+ }
369
+ }
370
+ }
371
+
372
+ @media (max-width: 510px) {
373
+ .wrapper {
374
+ .text {
375
+ .buttons {
376
+ margin-top: 70%;
377
+ .githubWrapper {
378
+ display: none;
379
+ }
380
+ }
381
+ }
382
+ .teaser {
383
+ width: 100%;
384
+ top: 5%;
385
+ .teaserimg {
386
+ width: 100%;
387
+ }
388
+ }
389
+ .backLeftBottom {
390
+ display: none;
391
+ }
392
+ }
393
+ }
394
+ @media (max-width: 480px) {
395
+ .wrapper {
396
+ .text {
397
+ height: 70%;
398
+ .buttons {
399
+ bottom: 10px;
400
+ margin-top: unset;
401
+ z-index: 1;
402
+ position: absolute;
403
+ left: 0;
404
+ width: 100%;
405
+ justify-content: center;
406
+ }
407
+ }
408
+ .teaser {
409
+ top: 14%;
410
+ }
411
+ }
412
+ }
@@ -0,0 +1,108 @@
1
+ .notification {
2
+ width: 50%;
3
+ margin-right: 2%;
4
+
5
+ &:last-child {
6
+ margin-right: 0;
7
+ }
8
+
9
+ .container {
10
+ height: 44px;
11
+ display: flex;
12
+ .number {
13
+ height: 100%;
14
+ width: 44px;
15
+ }
16
+ .content {
17
+ padding-left: 20px;
18
+ color: rgba(49, 70, 89, 1);
19
+ text-align: left;
20
+ .description {
21
+ top: 0;
22
+ font-size: 1.14em;
23
+ margin-bottom: 0;
24
+ transition: all 0.3s;
25
+ }
26
+ .date {
27
+ color: rgba(216, 203, 249, 1);
28
+ bottom: 0;
29
+ font-size: 1em;
30
+ margin-top: 4px;
31
+ margin-bottom: 0;
32
+ }
33
+ }
34
+ }
35
+
36
+ &:hover .description {
37
+ color: rgba(89, 126, 247, 1);
38
+ }
39
+ }
40
+
41
+ @media (max-width: 900px) {
42
+ .notification {
43
+ position: absolute;
44
+ width: 100%;
45
+
46
+ &:nth-child(1) {
47
+ animation: showAndHide0 6s infinite;
48
+ }
49
+
50
+ &:nth-child(2) {
51
+ top: 44px;
52
+ animation: showAndHide1 6s infinite;
53
+ }
54
+ }
55
+ }
56
+
57
+ @media (max-width: 768px) {
58
+ .notification {
59
+ width: 100%;
60
+ }
61
+ }
62
+
63
+ @keyframes showAndHide0 {
64
+ 0% {
65
+ opacity: 1;
66
+ top: 0px;
67
+ }
68
+ 33.3% {
69
+ opacity: 1;
70
+ top: 0px;
71
+ }
72
+ 50% {
73
+ opacity: 0;
74
+ top: -30px;
75
+ }
76
+ 83.3% {
77
+ opacity: 0;
78
+ top: 30px;
79
+ }
80
+ 100% {
81
+ opacity: 1;
82
+ top: 0px;
83
+ }
84
+ }
85
+
86
+ /* Standard syntax */
87
+ @keyframes showAndHide1 {
88
+ 0% {
89
+ opacity: 0;
90
+ top: 30px;
91
+ }
92
+ 33.3% {
93
+ opacity: 0;
94
+ top: 30px;
95
+ }
96
+ 50% {
97
+ opacity: 1;
98
+ top: 0px;
99
+ }
100
+ 83.3% {
101
+ opacity: 1;
102
+ top: 0px;
103
+ }
104
+ 100% {
105
+ opacity: 0;
106
+ top: -30px;
107
+ }
108
+ }
@@ -0,0 +1,45 @@
1
+ import React from 'react';
2
+ import { Link } from 'react-router-dom';
3
+ // @ts-ignore
4
+ import styles from './Notification.module.less';
5
+
6
+ export interface NotificationProps {
7
+ index?: number;
8
+ type: string;
9
+ title: string;
10
+ date: string;
11
+ link: string;
12
+ }
13
+
14
+ const numberImages = [
15
+ 'https://gw.alipayobjects.com/zos/antfincdn/IqREAm36K7/1.png',
16
+ 'https://gw.alipayobjects.com/zos/antfincdn/3fG1Iqjfnz/2.png',
17
+ ];
18
+
19
+ const Notification: React.FC<NotificationProps> = ({ index = 0, type, title, date, link = '' }) => {
20
+ const children = (
21
+ <div className={styles.container}>
22
+ <img className={styles.number} src={numberImages[index]} alt={index.toString()} />
23
+ <div className={styles.content}>
24
+ <p className={styles.description}>
25
+ {type} ‧ {title}
26
+ </p>
27
+ <p className={styles.date}>{date}</p>
28
+ </div>
29
+ </div>
30
+ );
31
+ if (link.startsWith('http')) {
32
+ return (
33
+ <a href={link} target="_blank" rel="noopener noreferrer" className={styles.notification}>
34
+ {children}
35
+ </a>
36
+ );
37
+ }
38
+ return (
39
+ <Link to={link} className={styles.notification}>
40
+ {children}
41
+ </Link>
42
+ );
43
+ };
44
+
45
+ export default Notification;
@@ -0,0 +1,121 @@
1
+ /* eslint-disable react/no-array-index-key */
2
+ /* eslint-disable @typescript-eslint/no-explicit-any */
3
+ import React, { useContext } from 'react';
4
+
5
+ import GitHubButton from 'react-github-button';
6
+ import gh from 'parse-github-url';
7
+ import classNames from 'classnames';
8
+ import { context } from 'dumi/theme';
9
+ // @ts-ignore
10
+ import styles from './Banner.module.less';
11
+ import Notification, { NotificationProps } from './Notification';
12
+
13
+ type BannerButtonShape = 'round' | 'square';
14
+
15
+ interface BannerButton {
16
+ text: string;
17
+ link: string;
18
+ style?: React.CSSProperties;
19
+ type?: string;
20
+ shape?: BannerButtonShape;
21
+ }
22
+
23
+ interface BannerProps {
24
+ coverImage?: React.ReactNode;
25
+ title: string;
26
+ description: string;
27
+ notifications?: NotificationProps[];
28
+ style?: React.CSSProperties;
29
+ className?: string;
30
+ video?: string;
31
+ showGithubStars?: boolean;
32
+ buttons?: BannerButton[];
33
+ onCloseVideo?: () => void;
34
+ onPlayVideo?: () => void;
35
+ }
36
+
37
+ const backLeftBottom = 'https://gw.alipayobjects.com/zos/basement_prod/441d5eaf-e623-47cd-b9b9-2a581d9ce1e3.svg';
38
+
39
+ const Banner: React.FC<BannerProps> = ({
40
+ coverImage,
41
+ title,
42
+ description,
43
+ notifications,
44
+ style = {},
45
+ className,
46
+ showGithubStars = true,
47
+ buttons = [],
48
+ }) => {
49
+ const {
50
+ config: { repository },
51
+ } = useContext(context);
52
+
53
+ const githubUrl = repository.url;
54
+
55
+ const notificationsNode = notifications
56
+ .slice(0, 2)
57
+ .map((notification, i) => <Notification index={i} key={i} {...notification} />);
58
+
59
+ const renderButtons = buttons.map((button: BannerButton, i) => {
60
+ const ButtonLink = 'a';
61
+ const buttonProps = {} as any;
62
+ if (button.link.startsWith('http')) {
63
+ buttonProps.target = '_blank';
64
+ buttonProps.rel = 'noopener noreferrer';
65
+ }
66
+ if (ButtonLink === 'a') {
67
+ buttonProps.href = button.link;
68
+ } else {
69
+ buttonProps.to = button.link;
70
+ }
71
+ const { shape = 'round' } = button;
72
+ return (
73
+ <ButtonLink
74
+ {...buttonProps}
75
+ className={classNames(
76
+ styles.buttonLink,
77
+ styles[button.type || ''],
78
+ button.type === 'primary' ? 'primary-button' : 'common-button',
79
+ )}
80
+ key={i}
81
+ style={{
82
+ borderRadius: shape === 'round' ? '1000px' : '4px',
83
+ ...button.style,
84
+ }}
85
+ >
86
+ <span className={styles.button}>{button.text}</span>
87
+ </ButtonLink>
88
+ );
89
+ });
90
+
91
+ if (showGithubStars) {
92
+ const githubObj = gh(githubUrl);
93
+
94
+ if (githubObj && githubObj.owner && githubObj.name) {
95
+ renderButtons.push(
96
+ <div key="github" className={styles.githubWrapper}>
97
+ <GitHubButton type="stargazers" size="large" namespace={githubObj.owner} repo={githubObj.name} />
98
+ </div>,
99
+ );
100
+ }
101
+ }
102
+
103
+ return (
104
+ <section className={classNames(styles.wrapper, className)} style={style}>
105
+ <div className={styles.content}>
106
+ <div className={styles.text}>
107
+ <div className={classNames(styles.title, 'banner-title')}>{title}</div>
108
+ <div className={classNames(styles.description, 'banner-description')}>{description}</div>
109
+ <div className={classNames(styles.buttons, 'banner-buttons')}>{renderButtons}</div>
110
+ </div>
111
+ <div className={classNames(styles.notifications, 'notifications')}>{notificationsNode}</div>
112
+ <div className={classNames(styles.teaser, 'teaser')}>
113
+ <div className={classNames(styles.teaserimg, 'teaser-img')}>{coverImage}</div>
114
+ </div>
115
+ <img className={styles.backLeftBottom} src={backLeftBottom} alt="back" />
116
+ </div>
117
+ </section>
118
+ );
119
+ };
120
+
121
+ export default Banner;