oipage 1.4.0-alpha.1 → 1.4.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.
- package/.github/FUNDING.yml +11 -11
- package/AUTHORS.txt +6 -6
- package/CHANGELOG +94 -83
- package/LICENSE +20 -20
- package/README.md +80 -80
- package/bin/data/mineTypes.json +104 -104
- package/bin/disk.js +31 -31
- package/bin/help.js +25 -24
- package/bin/intercept.js +15 -15
- package/bin/run +98 -96
- package/bin/serve.d.ts +55 -50
- package/bin/serve.js +147 -131
- package/bin/template/404.html +183 -171
- package/bin/tools/format.js +75 -75
- package/bin/tools/network.js +42 -42
- package/bin/tools/resolve404.js +83 -83
- package/bin/tools/resolveImport.js +88 -88
- package/bin/website-htmls/dialogs/index.js +43 -0
- package/bin/website-htmls/index.html +18 -0
- package/bin/website-htmls/logo.png +0 -0
- package/bin/website-htmls/main.js +10 -0
- package/bin/website-htmls/pages/App/index.html +4 -0
- package/bin/website-htmls/pages/App/index.js +23 -0
- package/bin/website-htmls/pages/App/index.scss +43 -0
- package/bin/website-htmls/pages/appStore/index.html +6 -0
- package/bin/website-htmls/pages/appStore/index.js +18 -0
- package/bin/website-htmls/pages/appStore/index.scss +27 -0
- package/bin/website-htmls/router.config.js +11 -0
- package/bin/website-htmls/styles/common.css +3 -0
- package/bin/website-htmls/styles/normalize.css +95 -0
- package/bin/website-plugins/intercept/head.js +9 -0
- package/bin/website-plugins/intercept/index.js +5 -0
- package/bin/website-plugins/intercept/oipage-zipaper-intercept.js +40 -0
- package/bin/website-plugins/loader/index.js +12 -0
- package/bin/website-plugins/loader/oipage-html-loader.js +8 -0
- package/bin/website-plugins/loader/oipage-scss-loader.js +150 -0
- package/nodejs/animation/index.d.ts +19 -19
- package/nodejs/animation/index.js +104 -104
- package/nodejs/cmdlog/index.d.ts +20 -20
- package/nodejs/cmdlog/index.js +75 -75
- package/nodejs/disk/index.d.ts +16 -16
- package/nodejs/disk/index.js +78 -78
- package/nodejs/format/index.d.ts +29 -0
- package/nodejs/format/index.js +114 -0
- package/nodejs/json/index.d.ts +9 -9
- package/nodejs/json/index.js +206 -206
- package/nodejs/logform/index.d.ts +18 -18
- package/nodejs/logform/index.js +94 -94
- package/nodejs/reader/index.d.ts +32 -32
- package/nodejs/reader/index.js +20 -20
- package/nodejs/throttle/index.d.ts +30 -30
- package/nodejs/throttle/index.js +50 -50
- package/package.json +42 -40
- package/web/XMLHttpRequest/index.d.ts +18 -0
- package/web/XMLHttpRequest/index.js +65 -0
- package/web/animation/index.d.ts +19 -19
- package/web/animation/index.js +104 -104
- package/web/format/index.d.ts +29 -0
- package/web/format/index.js +112 -0
- package/web/json/index.d.ts +9 -9
- package/web/json/index.js +206 -206
- package/web/onReady/index.d.ts +7 -7
- package/web/onReady/index.js +8 -8
- package/web/performChunk/index.d.ts +4 -4
- package/web/performChunk/index.js +19 -19
- package/web/reader/index.d.ts +32 -32
- package/web/reader/index.js +20 -20
- package/web/style/index.d.ts +21 -21
- package/web/style/index.js +19 -19
- package/web/throttle/index.d.ts +30 -30
- package/web/throttle/index.js +50 -50
package/bin/serve.js
CHANGED
|
@@ -1,132 +1,148 @@
|
|
|
1
|
-
const { join } = require("path");
|
|
2
|
-
const { existsSync, lstatSync, statSync, createReadStream } = require("fs");
|
|
3
|
-
const { createServer } = require('http');
|
|
4
|
-
const packageValue = require("../package.json");
|
|
5
|
-
const network = require("./tools/network.js");
|
|
6
|
-
const mineTypes = require("./data/mineTypes.json");
|
|
7
|
-
const resolve404 = require("./tools/resolve404.js");
|
|
8
|
-
const resolveImportFactory = require("./tools/resolveImport.js");
|
|
9
|
-
const { doIntercept } = require("./intercept.js");
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
let
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
1
|
+
const { join } = require("path");
|
|
2
|
+
const { existsSync, lstatSync, statSync, createReadStream } = require("fs");
|
|
3
|
+
const { createServer } = require('http');
|
|
4
|
+
const packageValue = require("../package.json");
|
|
5
|
+
const network = require("./tools/network.js");
|
|
6
|
+
const mineTypes = require("./data/mineTypes.json");
|
|
7
|
+
const resolve404 = require("./tools/resolve404.js");
|
|
8
|
+
const resolveImportFactory = require("./tools/resolveImport.js");
|
|
9
|
+
const { doIntercept } = require("./intercept.js");
|
|
10
|
+
|
|
11
|
+
const webisteIntercept = require("./website-plugins/intercept/index.js");
|
|
12
|
+
const webisteLoader = require("./website-plugins/loader/index.js");
|
|
13
|
+
|
|
14
|
+
// 开发服务器
|
|
15
|
+
module.exports = function (config) {
|
|
16
|
+
let startTime = new Date().valueOf();
|
|
17
|
+
|
|
18
|
+
const cache = "cache" in config.devServer ? config.devServer.cache : true;
|
|
19
|
+
const port = config.devServer.port; // 端口号
|
|
20
|
+
const basePath = (/^\./.test(config.devServer.baseUrl)) ? join(process.cwd(), config.devServer.baseUrl) : config.devServer.baseUrl; // 服务器根路径
|
|
21
|
+
|
|
22
|
+
const name = (config.name || "OIPage") + "-http-server";
|
|
23
|
+
const version = config.version || packageValue.version;
|
|
24
|
+
|
|
25
|
+
let Server = createServer(function (request, response) {
|
|
26
|
+
let headers = request.headers;
|
|
27
|
+
let url = decodeURIComponent(request.url);
|
|
28
|
+
|
|
29
|
+
let urlArray = url.split("?");
|
|
30
|
+
url = urlArray[0];
|
|
31
|
+
|
|
32
|
+
// 请求的文件路径
|
|
33
|
+
let filePath;
|
|
34
|
+
|
|
35
|
+
let isWebsite = /^\/_oipage_website_\//.test(url);
|
|
36
|
+
if (isWebsite) {
|
|
37
|
+
filePath = join(__dirname, "./website-htmls/", url.replace(/^\/_oipage_website_\//, ""));
|
|
38
|
+
} else {
|
|
39
|
+
filePath = join(basePath, url == "/" ? "index.html" : url.replace(/^\//, ""));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// 请求拦截
|
|
43
|
+
if (doIntercept(url.replace(/^\/_oipage_website_/, "").replace(/^\/@modules\//, ""), isWebsite ? webisteIntercept : config.devServer.intercept, request, response)) {
|
|
44
|
+
console.log("<i> \x1b[1m\x1b[32m[" + name + "] intercept: " + url + '\x1b[0m ' + new Date().toLocaleString());
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// 如果存在且是文件
|
|
48
|
+
else if (existsSync(filePath) && !lstatSync(filePath).isDirectory()) {
|
|
49
|
+
|
|
50
|
+
let dotName = /\./.test(filePath) ? filePath.match(/\.([^.]+)$/)[1] : "";
|
|
51
|
+
let fileType = mineTypes[dotName]; // 文件类型
|
|
52
|
+
let fileInfo = statSync(filePath);
|
|
53
|
+
|
|
54
|
+
let fileModifiedTime = new Date(fileInfo.mtime).toGMTString();
|
|
55
|
+
|
|
56
|
+
let responseHeader = {
|
|
57
|
+
'Content-type': (fileType || "text/plain") + ";charset=utf-8",
|
|
58
|
+
'Access-Control-Allow-Origin': '*',
|
|
59
|
+
'Server': 'Powered by ' + name + '@' + version,
|
|
60
|
+
'Cache-Control': 'no-cache',
|
|
61
|
+
// 'Content-Length': fileInfo.size, // 会导致拦截修改的文本内容不对
|
|
62
|
+
'Last-Modified': fileModifiedTime
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
if (cache && headers["if-modified-since"]) {
|
|
66
|
+
let ifModifiedSince = new Date(headers["if-modified-since"]).valueOf()
|
|
67
|
+
let lastModified = new Date(fileModifiedTime).valueOf()
|
|
68
|
+
if (lastModified <= ifModifiedSince) {
|
|
69
|
+
response.writeHead('304', responseHeader);
|
|
70
|
+
response.end();
|
|
71
|
+
console.log("<i> \x1b[1m\x1b[32m[" + name + "] Cache File: " + url + "\x1b[0m " + new Date().toLocaleString() + "\x1b[33m\x1b[1m 304\x1b[0m");
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
let sendType = "";
|
|
77
|
+
let entry = headers.accept !== "*/*";
|
|
78
|
+
|
|
79
|
+
// 如果文件小于10M,认为不大,直接读取
|
|
80
|
+
if (fileInfo.size < 10 * 1024 * 1024) {
|
|
81
|
+
let { source, resolveImport } = resolveImportFactory(basePath, filePath, entry, isWebsite ? webisteIntercept : config.devServer.intercept, urlArray[1] === "download", isWebsite)
|
|
82
|
+
|
|
83
|
+
// 只处理非下载文件
|
|
84
|
+
// 过大的也不进行处理
|
|
85
|
+
// (对webiste无效)
|
|
86
|
+
if (urlArray[1] !== "download") {
|
|
87
|
+
let loaders = isWebsite ? webisteLoader : config.module;
|
|
88
|
+
|
|
89
|
+
for (let i = 0; i < loaders.rules.length; i++) {
|
|
90
|
+
if (loaders.rules[i].test.test(filePath)) {
|
|
91
|
+
source = loaders.rules[i].use.call({
|
|
92
|
+
root: basePath, // 服务器根路径
|
|
93
|
+
path: filePath.replace(basePath, ""), // 文件相对路径
|
|
94
|
+
entry, // 是否是浏览器地址栏直接访问
|
|
95
|
+
setFileType(_fileType) { // 设置文件类型
|
|
96
|
+
fileType = _fileType;
|
|
97
|
+
responseHeader['Content-type'] = _fileType + ";charset=utf-8";
|
|
98
|
+
}
|
|
99
|
+
}, source);
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
sendType = "Read";
|
|
107
|
+
response.writeHead('200', responseHeader);
|
|
108
|
+
response.write(resolveImport(source, fileType !== "application/javascript"));
|
|
109
|
+
response.end();
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// 对于大文件,使用流读取
|
|
113
|
+
else {
|
|
114
|
+
sendType = "Stream";
|
|
115
|
+
response.writeHead('200', responseHeader);
|
|
116
|
+
createReadStream(filePath).pipe(response);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
console.log("<i> \x1b[1m\x1b[32m[" + name + "] " + sendType + " File: " + url + '\x1b[0m ' + new Date().toLocaleString());
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// 否则就是404
|
|
123
|
+
else {
|
|
124
|
+
response.writeHead(404, {
|
|
125
|
+
'Content-type': "text/html;charset=utf-8",
|
|
126
|
+
'Access-Control-Allow-Origin': '*',
|
|
127
|
+
'Server': 'Powered by ' + name + '@' + version
|
|
128
|
+
});
|
|
129
|
+
response.write(resolve404(filePath, url));
|
|
130
|
+
response.end();
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
Server.listen(port);
|
|
136
|
+
|
|
137
|
+
// 获取网络信息
|
|
138
|
+
let networkValue = network();
|
|
139
|
+
|
|
140
|
+
// 打印成功提示
|
|
141
|
+
console.log('<i> \x1b[1m\x1b[32m[' + name + '] Project is running at:\x1b[0m');
|
|
142
|
+
console.log('<i> \x1b[1m\x1b[32m[' + name + '] Loopback: \x1b[36mhttp://localhost:' + port + '/\x1b[0m');
|
|
143
|
+
for (let ipv4Item of networkValue.IPv4) console.log('<i> \x1b[1m\x1b[32m[' + name + '] On Your Network (IPv4):\x1b[36m http://' + ipv4Item.address + ':' + port + '/\x1b[0m');
|
|
144
|
+
for (let ipv6Item of networkValue.IPv6) console.log('<i> \x1b[1m\x1b[32m[' + name + '] On Your Network (IPv6): \x1b[36mhttp://[' + ipv6Item.address + ']:' + port + '/\x1b[0m');
|
|
145
|
+
console.log('<i> \x1b[1m\x1b[32m[' + name + '] Content not from ' + (config.name || "OIPage") + ' is served from \x1b[36m"' + basePath + '" \x1b[0mdirectory');
|
|
146
|
+
if (!cache) console.log('<i> \x1b[1m\x1b[32m[' + name + '] Cancel 304 Cache!\x1b[0m');
|
|
147
|
+
console.log('\n' + (config.name || "OIPage") + ' ' + version + ' compiled \x1b[1m\x1b[32msuccessfully\x1b[0m in ' + (new Date().valueOf() - startTime) + ' ms\n')
|
|
132
148
|
};
|
package/bin/template/404.html
CHANGED
|
@@ -1,172 +1,184 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="zh-cn">
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="UTF-8">
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
-
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
8
|
-
<title>404 Not Found</title>
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
color:
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
background-
|
|
106
|
-
background-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
</
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
<th>
|
|
147
|
-
|
|
148
|
-
</th>
|
|
149
|
-
<th>
|
|
150
|
-
|
|
151
|
-
</th>
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
<th>
|
|
159
|
-
|
|
160
|
-
</th>
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="zh-cn">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
|
+
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
8
|
+
<title>404 Not Found</title>
|
|
9
|
+
<link rel="shortcut icon" href="/_oipage_website_/logo.png">
|
|
10
|
+
<style>
|
|
11
|
+
body {
|
|
12
|
+
margin: 0px;
|
|
13
|
+
background-color: #ffffff;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-wrap: wrap;
|
|
16
|
+
padding: 100px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
a {
|
|
20
|
+
text-decoration: none;
|
|
21
|
+
color: #284259;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
a:hover {
|
|
25
|
+
text-decoration: underline;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.fork {
|
|
29
|
+
width: 160px;
|
|
30
|
+
line-height: 30px;
|
|
31
|
+
position: fixed;
|
|
32
|
+
background-color: #607D8B;
|
|
33
|
+
text-align: center;
|
|
34
|
+
color: white;
|
|
35
|
+
outline: 2px dashed #607D8B;
|
|
36
|
+
width: 200px;
|
|
37
|
+
transform: rotate(45deg);
|
|
38
|
+
right: -45px;
|
|
39
|
+
top: 45px;
|
|
40
|
+
z-index: 1;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.current {
|
|
44
|
+
box-sizing: border-box;
|
|
45
|
+
position: fixed;
|
|
46
|
+
left: 0;
|
|
47
|
+
top: 0;
|
|
48
|
+
line-height: 50px;
|
|
49
|
+
padding-left: 20px;
|
|
50
|
+
font-size: 14px;
|
|
51
|
+
color: #000000;
|
|
52
|
+
font-style: italic;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.filelist {
|
|
56
|
+
box-sizing: border-box;
|
|
57
|
+
position: fixed;
|
|
58
|
+
left: 20px;
|
|
59
|
+
top: 50px;
|
|
60
|
+
outline: 1px solid #9E9E9E;
|
|
61
|
+
width: calc(100vw - 40px);
|
|
62
|
+
height: calc(100vh - 100px);
|
|
63
|
+
overflow: auto;
|
|
64
|
+
padding: 20px;
|
|
65
|
+
border-radius: 5px;
|
|
66
|
+
background-color: #fcfcfc;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.filelist>table {
|
|
70
|
+
width: 100%;
|
|
71
|
+
text-align: left;
|
|
72
|
+
border-collapse: collapse;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.filelist>table tr>th {
|
|
76
|
+
white-space: nowrap;
|
|
77
|
+
padding: 0 10px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.filelist>table>thead>tr>th {
|
|
81
|
+
color: #284259;
|
|
82
|
+
font-size: 13px;
|
|
83
|
+
line-height: 40px;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.filelist>table>tbody>tr>th {
|
|
87
|
+
text-decoration: none;
|
|
88
|
+
font-size: 12px;
|
|
89
|
+
color: #3c3c3c;
|
|
90
|
+
word-break: break-all;
|
|
91
|
+
font-weight: 400;
|
|
92
|
+
line-height: 30px;
|
|
93
|
+
border-top: 1px solid #e4e4e4;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.filelist>table>tbody>tr>th>.btn {
|
|
97
|
+
color: white;
|
|
98
|
+
background-color: #2196F3;
|
|
99
|
+
padding: 2px 5px;
|
|
100
|
+
border-radius: 5px;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.filelist>table>tbody>tr>th.name {
|
|
104
|
+
background-repeat: no-repeat;
|
|
105
|
+
background-position: left center;
|
|
106
|
+
background-size: auto 90%;
|
|
107
|
+
padding-left: 30px;
|
|
108
|
+
color: #000000;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.filelist>table>tbody>tr>th.name>span {
|
|
112
|
+
white-space: nowrap;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.filelist>table>tbody>tr.file>th.name {
|
|
116
|
+
background-image: url('${img_file}');
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.filelist>table>tbody>tr.folder>th.name {
|
|
120
|
+
background-image: url('${img_folder}');
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.website-link {
|
|
124
|
+
position: fixed;
|
|
125
|
+
bottom: 10px;
|
|
126
|
+
line-height: 30px;
|
|
127
|
+
left: 16px;
|
|
128
|
+
font-size: 14px;
|
|
129
|
+
text-decoration: underline;
|
|
130
|
+
font-weight: 800;
|
|
131
|
+
}
|
|
132
|
+
</style>
|
|
133
|
+
</head>
|
|
134
|
+
|
|
135
|
+
<body>
|
|
136
|
+
<a href="https://github.com/oi-contrib/OIPage" target="_blank" class="fork">
|
|
137
|
+
Fork me on Github
|
|
138
|
+
</a>
|
|
139
|
+
<div class="current">
|
|
140
|
+
当前位置:${current}
|
|
141
|
+
</div>
|
|
142
|
+
<div class="filelist">
|
|
143
|
+
<table>
|
|
144
|
+
<thead>
|
|
145
|
+
<tr>
|
|
146
|
+
<th>
|
|
147
|
+
名称
|
|
148
|
+
</th>
|
|
149
|
+
<th>
|
|
150
|
+
修改日期
|
|
151
|
+
</th>
|
|
152
|
+
<th>
|
|
153
|
+
类型
|
|
154
|
+
</th>
|
|
155
|
+
<th>
|
|
156
|
+
大小
|
|
157
|
+
</th>
|
|
158
|
+
<th>
|
|
159
|
+
操作
|
|
160
|
+
</th>
|
|
161
|
+
</tr>
|
|
162
|
+
</thead>
|
|
163
|
+
<tbody>
|
|
164
|
+
<tr class="folder">
|
|
165
|
+
<th class="name"><a href='../'>..</a></th>
|
|
166
|
+
<th>-</th>
|
|
167
|
+
<th>
|
|
168
|
+
文件夹
|
|
169
|
+
</th>
|
|
170
|
+
<th>-</th>
|
|
171
|
+
<th>
|
|
172
|
+
<a href='../' class="btn">打开</a>
|
|
173
|
+
</th>
|
|
174
|
+
</tr>
|
|
175
|
+
${template}
|
|
176
|
+
</tbody>
|
|
177
|
+
</table>
|
|
178
|
+
</div>
|
|
179
|
+
<a class="website-link" href="/_oipage_website_/index.html">
|
|
180
|
+
打开应用市场
|
|
181
|
+
</a>
|
|
182
|
+
</body>
|
|
183
|
+
|
|
172
184
|
</html>
|