@antv/dumi-theme-antv 0.7.1 → 0.7.3-beta.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.
|
@@ -42,7 +42,7 @@ var path = __toESM(require("path"));
|
|
|
42
42
|
var defaultConfig = {
|
|
43
43
|
enable: true,
|
|
44
44
|
distDir: "dist",
|
|
45
|
-
checkExternalLinks:
|
|
45
|
+
checkExternalLinks: false,
|
|
46
46
|
ignorePatterns: ["^#", "^mailto:", "^tel:", "^javascript:", "^data:", ".*stackoverflow\\.com.*"],
|
|
47
47
|
fileExtensions: [".html"],
|
|
48
48
|
failOnError: false,
|
|
@@ -85,6 +85,13 @@ function writeSitemap(config, urls) {
|
|
|
85
85
|
import_fs.default.writeFileSync(import_path.default.join(config.outputDir, config.filename), sitemapContent);
|
|
86
86
|
console.log(import_chalk.default.green(`✅ Sitemap generated including ${urls.length} urls. `));
|
|
87
87
|
}
|
|
88
|
+
function generateRobotsTxt(config) {
|
|
89
|
+
const robotsContent = `User-agent: *
|
|
90
|
+
Allow: /
|
|
91
|
+
|
|
92
|
+
Sitemap: ${config.siteUrl}/sitemap.xml`;
|
|
93
|
+
import_fs.default.writeFileSync(import_path.default.join(config.outputDir, "robots.txt"), robotsContent);
|
|
94
|
+
}
|
|
88
95
|
function generateSitemap(api) {
|
|
89
96
|
const getConfig = () => {
|
|
90
97
|
const themeConfig = api.config.themeConfig || {};
|
|
@@ -100,4 +107,5 @@ function generateSitemap(api) {
|
|
|
100
107
|
}
|
|
101
108
|
const urls = generateUrls(config);
|
|
102
109
|
writeSitemap(config, urls);
|
|
110
|
+
generateRobotsTxt(config);
|
|
103
111
|
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
.loading-container {
|
|
2
|
+
position: relative;
|
|
3
|
+
height: 100%;
|
|
4
|
+
width: 100%;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.loading-wrapper {
|
|
8
|
+
position: absolute;
|
|
9
|
+
left: 0;
|
|
10
|
+
top: 0;
|
|
11
|
+
z-index: 9999;
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: 100%;
|
|
14
|
+
background-color: #fff;
|
|
15
|
+
border: 1px solid #f0f0f0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.container {
|
|
19
|
+
display: inline-block;
|
|
20
|
+
position: absolute;
|
|
21
|
+
left: 50%;
|
|
22
|
+
top: 50%;
|
|
23
|
+
margin: -50px 0 0 -120px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.loader {
|
|
27
|
+
--duration: 3s;
|
|
28
|
+
width: 44px;
|
|
29
|
+
height: 44px;
|
|
30
|
+
position: relative;
|
|
31
|
+
display: inline-block;
|
|
32
|
+
margin: 0 16px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.loader:before {
|
|
36
|
+
content: ' ';
|
|
37
|
+
width: 6px;
|
|
38
|
+
height: 6px;
|
|
39
|
+
border-radius: 50%;
|
|
40
|
+
position: absolute;
|
|
41
|
+
display: block;
|
|
42
|
+
background: #ff700a;
|
|
43
|
+
top: 37px;
|
|
44
|
+
left: 19px;
|
|
45
|
+
transform: translate(-18px, -18px);
|
|
46
|
+
animation: dotRect var(--duration) cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.loader svg {
|
|
50
|
+
display: block;
|
|
51
|
+
width: 100%;
|
|
52
|
+
height: 100%;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.loader svg rect,
|
|
56
|
+
.loader svg polygon,
|
|
57
|
+
.loader svg circle {
|
|
58
|
+
fill: none;
|
|
59
|
+
stroke-width: 10px;
|
|
60
|
+
stroke-linejoin: round;
|
|
61
|
+
stroke-linecap: round;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.loader svg polygon {
|
|
65
|
+
stroke-dasharray: 145 76 145 76;
|
|
66
|
+
stroke-dashoffset: 0;
|
|
67
|
+
animation: pathTriangle var(--duration) cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.loader svg rect {
|
|
71
|
+
stroke-dasharray: 192 64 192 64;
|
|
72
|
+
stroke-dashoffset: 0;
|
|
73
|
+
animation: pathRect 3s cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.loader svg circle {
|
|
77
|
+
stroke-dasharray: 150 50 150 50;
|
|
78
|
+
stroke-dashoffset: 75;
|
|
79
|
+
animation: pathCircle var(--duration) cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.loader.triangle {
|
|
83
|
+
width: 48px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.loader.triangle:before {
|
|
87
|
+
left: 21px;
|
|
88
|
+
transform: translate(-10px, -18px);
|
|
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
|
+
@keyframes pathTriangle {
|
|
102
|
+
33% {
|
|
103
|
+
stroke-dashoffset: 74;
|
|
104
|
+
}
|
|
105
|
+
66% {
|
|
106
|
+
stroke-dashoffset: 147;
|
|
107
|
+
}
|
|
108
|
+
100% {
|
|
109
|
+
stroke-dashoffset: 221;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@keyframes dotTriangle {
|
|
114
|
+
33% {
|
|
115
|
+
transform: translate(0, 0);
|
|
116
|
+
}
|
|
117
|
+
66% {
|
|
118
|
+
transform: translate(10px, -18px);
|
|
119
|
+
}
|
|
120
|
+
100% {
|
|
121
|
+
transform: translate(-10px, -18px);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@keyframes pathRect {
|
|
126
|
+
25% {
|
|
127
|
+
stroke-dashoffset: 64;
|
|
128
|
+
}
|
|
129
|
+
50% {
|
|
130
|
+
stroke-dashoffset: 128;
|
|
131
|
+
}
|
|
132
|
+
75% {
|
|
133
|
+
stroke-dashoffset: 192;
|
|
134
|
+
}
|
|
135
|
+
100% {
|
|
136
|
+
stroke-dashoffset: 256;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
@keyframes dotRect {
|
|
141
|
+
25% {
|
|
142
|
+
transform: translate(0, 0);
|
|
143
|
+
}
|
|
144
|
+
50% {
|
|
145
|
+
transform: translate(18px, -18px);
|
|
146
|
+
}
|
|
147
|
+
75% {
|
|
148
|
+
transform: translate(0, -36px);
|
|
149
|
+
}
|
|
150
|
+
100% {
|
|
151
|
+
transform: translate(-18px, -18px);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
@keyframes pathCircle {
|
|
156
|
+
25% {
|
|
157
|
+
stroke-dashoffset: 125;
|
|
158
|
+
}
|
|
159
|
+
50% {
|
|
160
|
+
stroke-dashoffset: 175;
|
|
161
|
+
}
|
|
162
|
+
75% {
|
|
163
|
+
stroke-dashoffset: 225;
|
|
164
|
+
}
|
|
165
|
+
100% {
|
|
166
|
+
stroke-dashoffset: 275;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Loading
|
|
6
|
-
*/
|
|
2
|
+
import "./index.css";
|
|
7
3
|
var Loading = function Loading() {
|
|
8
4
|
return /*#__PURE__*/React.createElement("div", {
|
|
9
|
-
|
|
10
|
-
position: 'relative',
|
|
11
|
-
height: '100%',
|
|
12
|
-
width: '100%'
|
|
13
|
-
}
|
|
5
|
+
className: "loading-container"
|
|
14
6
|
}, /*#__PURE__*/React.createElement("div", {
|
|
15
|
-
className:
|
|
7
|
+
className: "loading-wrapper"
|
|
16
8
|
}, /*#__PURE__*/React.createElement("div", {
|
|
17
9
|
className: "container"
|
|
18
10
|
}, /*#__PURE__*/React.createElement("div", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antv/dumi-theme-antv",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3-beta.0",
|
|
4
4
|
"description": "AntV website theme based on dumi2.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dumi",
|
|
@@ -136,7 +136,8 @@
|
|
|
136
136
|
"react-dom": ">=16.9.0"
|
|
137
137
|
},
|
|
138
138
|
"publishConfig": {
|
|
139
|
-
"access": "public"
|
|
139
|
+
"access": "public",
|
|
140
|
+
"tag": "beta"
|
|
140
141
|
},
|
|
141
142
|
"authors": [
|
|
142
143
|
"dumi",
|