@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,279 @@
|
|
|
1
|
+
.loading {
|
|
2
|
+
position: absolute;
|
|
3
|
+
left: 0;
|
|
4
|
+
top: 0;
|
|
5
|
+
z-index: 9999;
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: 100%;
|
|
8
|
+
background-color: #fff;
|
|
9
|
+
border: 1px solid #f0f0f0;
|
|
10
|
+
|
|
11
|
+
:global {
|
|
12
|
+
.container {
|
|
13
|
+
display: inline-block;
|
|
14
|
+
position: absolute;
|
|
15
|
+
left: 50%;
|
|
16
|
+
top: 50%;
|
|
17
|
+
margin: -50px 0 0 -120px;
|
|
18
|
+
}
|
|
19
|
+
.loader {
|
|
20
|
+
--duration: 3s;
|
|
21
|
+
width: 44px;
|
|
22
|
+
height: 44px;
|
|
23
|
+
position: relative;
|
|
24
|
+
display: inline-block;
|
|
25
|
+
margin: 0 16px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.loader:before {
|
|
29
|
+
content: ' ';
|
|
30
|
+
width: 6px;
|
|
31
|
+
height: 6px;
|
|
32
|
+
border-radius: 50%;
|
|
33
|
+
position: absolute;
|
|
34
|
+
display: block;
|
|
35
|
+
background: #ff700a;
|
|
36
|
+
top: 37px;
|
|
37
|
+
left: 19px;
|
|
38
|
+
-webkit-transform: translate(-18px, -18px);
|
|
39
|
+
transform: translate(-18px, -18px);
|
|
40
|
+
-webkit-animation: dotRect var(--duration) cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
|
|
41
|
+
animation: dotRect var(--duration) cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.loader svg {
|
|
45
|
+
display: block;
|
|
46
|
+
width: 100%;
|
|
47
|
+
height: 100%;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.loader svg rect,
|
|
51
|
+
.loader svg polygon,
|
|
52
|
+
.loader svg circle {
|
|
53
|
+
fill: none;
|
|
54
|
+
stroke-width: 10px;
|
|
55
|
+
stroke-linejoin: round;
|
|
56
|
+
stroke-linecap: round;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.loader svg polygon {
|
|
60
|
+
stroke-dasharray: 145 76 145 76;
|
|
61
|
+
stroke-dashoffset: 0;
|
|
62
|
+
-webkit-animation: pathTriangle var(--duration) cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
|
|
63
|
+
animation: pathTriangle var(--duration) cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.loader svg rect {
|
|
67
|
+
stroke-dasharray: 192 64 192 64;
|
|
68
|
+
stroke-dashoffset: 0;
|
|
69
|
+
-webkit-animation: pathRect 3s cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
|
|
70
|
+
animation: pathRect 3s cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.loader svg circle {
|
|
74
|
+
stroke-dasharray: 150 50 150 50;
|
|
75
|
+
stroke-dashoffset: 75;
|
|
76
|
+
-webkit-animation: pathCircle var(--duration) cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
|
|
77
|
+
animation: pathCircle var(--duration) cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.loader.triangle {
|
|
81
|
+
width: 48px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.loader.triangle:before {
|
|
85
|
+
left: 21px;
|
|
86
|
+
-webkit-transform: translate(-10px, -18px);
|
|
87
|
+
transform: translate(-10px, -18px);
|
|
88
|
+
-webkit-animation: dotTriangle var(--duration) cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
|
|
89
|
+
animation: dotTriangle var(--duration) cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.loading-text {
|
|
93
|
+
text-align: center;
|
|
94
|
+
height: 40px;
|
|
95
|
+
line-height: 40px;
|
|
96
|
+
font-size: 12px;
|
|
97
|
+
letter-spacing: 0.1em;
|
|
98
|
+
color: #666;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@-webkit-keyframes ~":global(pathTriangle)" {
|
|
104
|
+
33% {
|
|
105
|
+
stroke-dashoffset: 74;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
66% {
|
|
109
|
+
stroke-dashoffset: 147;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
100% {
|
|
113
|
+
stroke-dashoffset: 221;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
@keyframes ~":global(pathTriangle)" {
|
|
118
|
+
33% {
|
|
119
|
+
stroke-dashoffset: 74;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
66% {
|
|
123
|
+
stroke-dashoffset: 147;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
100% {
|
|
127
|
+
stroke-dashoffset: 221;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@-webkit-keyframes ~":global(dotTriangle)" {
|
|
132
|
+
33% {
|
|
133
|
+
-webkit-transform: translate(0, 0);
|
|
134
|
+
transform: translate(0, 0);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
66% {
|
|
138
|
+
-webkit-transform: translate(10px, -18px);
|
|
139
|
+
transform: translate(10px, -18px);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
100% {
|
|
143
|
+
-webkit-transform: translate(-10px, -18px);
|
|
144
|
+
transform: translate(-10px, -18px);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
@keyframes ~":global(dotTriangle)" {
|
|
149
|
+
33% {
|
|
150
|
+
-webkit-transform: translate(0, 0);
|
|
151
|
+
transform: translate(0, 0);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
66% {
|
|
155
|
+
-webkit-transform: translate(10px, -18px);
|
|
156
|
+
transform: translate(10px, -18px);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
100% {
|
|
160
|
+
-webkit-transform: translate(-10px, -18px);
|
|
161
|
+
transform: translate(-10px, -18px);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
@-webkit-keyframes ~":global(pathRect)" {
|
|
166
|
+
25% {
|
|
167
|
+
stroke-dashoffset: 64;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
50% {
|
|
171
|
+
stroke-dashoffset: 128;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
75% {
|
|
175
|
+
stroke-dashoffset: 192;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
100% {
|
|
179
|
+
stroke-dashoffset: 256;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@keyframes ~":global(pathRect)" {
|
|
184
|
+
25% {
|
|
185
|
+
stroke-dashoffset: 64;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
50% {
|
|
189
|
+
stroke-dashoffset: 128;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
75% {
|
|
193
|
+
stroke-dashoffset: 192;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
100% {
|
|
197
|
+
stroke-dashoffset: 256;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
@-webkit-keyframes ~":global(dotRect)" {
|
|
202
|
+
25% {
|
|
203
|
+
-webkit-transform: translate(0, 0);
|
|
204
|
+
transform: translate(0, 0);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
50% {
|
|
208
|
+
-webkit-transform: translate(18px, -18px);
|
|
209
|
+
transform: translate(18px, -18px);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
75% {
|
|
213
|
+
-webkit-transform: translate(0, -36px);
|
|
214
|
+
transform: translate(0, -36px);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
100% {
|
|
218
|
+
-webkit-transform: translate(-18px, -18px);
|
|
219
|
+
transform: translate(-18px, -18px);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
@keyframes ~":global(dotRect)" {
|
|
224
|
+
25% {
|
|
225
|
+
-webkit-transform: translate(0, 0);
|
|
226
|
+
transform: translate(0, 0);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
50% {
|
|
230
|
+
-webkit-transform: translate(18px, -18px);
|
|
231
|
+
transform: translate(18px, -18px);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
75% {
|
|
235
|
+
-webkit-transform: translate(0, -36px);
|
|
236
|
+
transform: translate(0, -36px);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
100% {
|
|
240
|
+
-webkit-transform: translate(-18px, -18px);
|
|
241
|
+
transform: translate(-18px, -18px);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
@-webkit-keyframes ~":global(pathCircle)" {
|
|
246
|
+
25% {
|
|
247
|
+
stroke-dashoffset: 125;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
50% {
|
|
251
|
+
stroke-dashoffset: 175;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
75% {
|
|
255
|
+
stroke-dashoffset: 225;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
100% {
|
|
259
|
+
stroke-dashoffset: 275;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
@keyframes ~":global(pathCircle)" {
|
|
264
|
+
25% {
|
|
265
|
+
stroke-dashoffset: 125;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
50% {
|
|
269
|
+
stroke-dashoffset: 175;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
75% {
|
|
273
|
+
stroke-dashoffset: 225;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
100% {
|
|
277
|
+
stroke-dashoffset: 275;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { history } from 'dumi';
|
|
4
|
+
import styles from "./NavigatorBanner.module.less";
|
|
5
|
+
import { useScrollToTop, useT } from "../hooks";
|
|
6
|
+
export var NavigatorBanner = function NavigatorBanner(_ref) {
|
|
7
|
+
var post = _ref.post,
|
|
8
|
+
type = _ref.type;
|
|
9
|
+
|
|
10
|
+
if (!post) {
|
|
11
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
12
|
+
className: classNames(styles.button, styles.hidden)
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
var slug = post.slug,
|
|
17
|
+
title = post.title;
|
|
18
|
+
|
|
19
|
+
if (!slug || !title) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function go() {
|
|
24
|
+
history.push(slug);
|
|
25
|
+
useScrollToTop();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
29
|
+
className: classNames(styles.button, styles[type]),
|
|
30
|
+
onClick: go
|
|
31
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
32
|
+
className: styles.label
|
|
33
|
+
}, useT(type === 'prev' ? '上一篇' : '下一篇')), /*#__PURE__*/React.createElement("div", {
|
|
34
|
+
className: styles.title
|
|
35
|
+
}, title));
|
|
36
|
+
};
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Tag } from 'antd';
|
|
3
|
+
import { useT } from "../hooks";
|
|
4
|
+
|
|
5
|
+
var ReadingTime = function ReadingTime(_ref) {
|
|
6
|
+
var readingTime = _ref.readingTime;
|
|
7
|
+
return /*#__PURE__*/React.createElement(Tag, null, "".concat(useT('阅读时间约'), " ").concat(Math.ceil(readingTime / 60000), " ").concat(useT('分钟')));
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default ReadingTime;
|