njk-tool 0.0.26 → 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.
- package/.env.example +11 -0
- package/dist/bundle/app.min.cjs +917 -899
- package/dist/bundle/app.min.cjs.map +1 -1
- package/dist/bundle/app.min.js +917 -899
- package/dist/bundle/app.min.js.map +1 -1
- package/dist/bundle/type.d.ts +63 -12
- package/package.json +58 -59
- package/readme.md +87 -9
package/dist/bundle/app.min.cjs
CHANGED
|
@@ -4974,7 +4974,7 @@ var hasRequiredUtils$1;
|
|
|
4974
4974
|
function requireUtils$1 () {
|
|
4975
4975
|
if (hasRequiredUtils$1) return utils$1;
|
|
4976
4976
|
hasRequiredUtils$1 = 1;
|
|
4977
|
-
(function (exports) {
|
|
4977
|
+
(function (exports$1) {
|
|
4978
4978
|
|
|
4979
4979
|
const path = require$$0$3;
|
|
4980
4980
|
const win32 = process.platform === 'win32';
|
|
@@ -4985,19 +4985,19 @@ function requireUtils$1 () {
|
|
|
4985
4985
|
REGEX_SPECIAL_CHARS_GLOBAL
|
|
4986
4986
|
} = requireConstants$2();
|
|
4987
4987
|
|
|
4988
|
-
exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
|
|
4989
|
-
exports.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
|
|
4990
|
-
exports.isRegexChar = str => str.length === 1 && exports.hasRegexChars(str);
|
|
4991
|
-
exports.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
|
|
4992
|
-
exports.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');
|
|
4988
|
+
exports$1.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
|
|
4989
|
+
exports$1.hasRegexChars = str => REGEX_SPECIAL_CHARS.test(str);
|
|
4990
|
+
exports$1.isRegexChar = str => str.length === 1 && exports$1.hasRegexChars(str);
|
|
4991
|
+
exports$1.escapeRegex = str => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, '\\$1');
|
|
4992
|
+
exports$1.toPosixSlashes = str => str.replace(REGEX_BACKSLASH, '/');
|
|
4993
4993
|
|
|
4994
|
-
exports.removeBackslashes = str => {
|
|
4994
|
+
exports$1.removeBackslashes = str => {
|
|
4995
4995
|
return str.replace(REGEX_REMOVE_BACKSLASH, match => {
|
|
4996
4996
|
return match === '\\' ? '' : match;
|
|
4997
4997
|
});
|
|
4998
4998
|
};
|
|
4999
4999
|
|
|
5000
|
-
exports.supportsLookbehinds = () => {
|
|
5000
|
+
exports$1.supportsLookbehinds = () => {
|
|
5001
5001
|
const segs = process.version.slice(1).split('.').map(Number);
|
|
5002
5002
|
if (segs.length === 3 && segs[0] >= 9 || (segs[0] === 8 && segs[1] >= 10)) {
|
|
5003
5003
|
return true;
|
|
@@ -5005,21 +5005,21 @@ function requireUtils$1 () {
|
|
|
5005
5005
|
return false;
|
|
5006
5006
|
};
|
|
5007
5007
|
|
|
5008
|
-
exports.isWindows = options => {
|
|
5008
|
+
exports$1.isWindows = options => {
|
|
5009
5009
|
if (options && typeof options.windows === 'boolean') {
|
|
5010
5010
|
return options.windows;
|
|
5011
5011
|
}
|
|
5012
5012
|
return win32 === true || path.sep === '\\';
|
|
5013
5013
|
};
|
|
5014
5014
|
|
|
5015
|
-
exports.escapeLast = (input, char, lastIdx) => {
|
|
5015
|
+
exports$1.escapeLast = (input, char, lastIdx) => {
|
|
5016
5016
|
const idx = input.lastIndexOf(char, lastIdx);
|
|
5017
5017
|
if (idx === -1) return input;
|
|
5018
|
-
if (input[idx - 1] === '\\') return exports.escapeLast(input, char, idx - 1);
|
|
5018
|
+
if (input[idx - 1] === '\\') return exports$1.escapeLast(input, char, idx - 1);
|
|
5019
5019
|
return `${input.slice(0, idx)}\\${input.slice(idx)}`;
|
|
5020
5020
|
};
|
|
5021
5021
|
|
|
5022
|
-
exports.removePrefix = (input, state = {}) => {
|
|
5022
|
+
exports$1.removePrefix = (input, state = {}) => {
|
|
5023
5023
|
let output = input;
|
|
5024
5024
|
if (output.startsWith('./')) {
|
|
5025
5025
|
output = output.slice(2);
|
|
@@ -5028,7 +5028,7 @@ function requireUtils$1 () {
|
|
|
5028
5028
|
return output;
|
|
5029
5029
|
};
|
|
5030
5030
|
|
|
5031
|
-
exports.wrapOutput = (input, state = {}, options = {}) => {
|
|
5031
|
+
exports$1.wrapOutput = (input, state = {}, options = {}) => {
|
|
5032
5032
|
const prepend = options.contains ? '' : '^';
|
|
5033
5033
|
const append = options.contains ? '' : '$';
|
|
5034
5034
|
|
|
@@ -7600,9 +7600,9 @@ var hasRequiredUtils;
|
|
|
7600
7600
|
function requireUtils () {
|
|
7601
7601
|
if (hasRequiredUtils) return utils;
|
|
7602
7602
|
hasRequiredUtils = 1;
|
|
7603
|
-
(function (exports) {
|
|
7603
|
+
(function (exports$1) {
|
|
7604
7604
|
|
|
7605
|
-
exports.isInteger = num => {
|
|
7605
|
+
exports$1.isInteger = num => {
|
|
7606
7606
|
if (typeof num === 'number') {
|
|
7607
7607
|
return Number.isInteger(num);
|
|
7608
7608
|
}
|
|
@@ -7616,15 +7616,15 @@ function requireUtils () {
|
|
|
7616
7616
|
* Find a node of the given type
|
|
7617
7617
|
*/
|
|
7618
7618
|
|
|
7619
|
-
exports.find = (node, type) => node.nodes.find(node => node.type === type);
|
|
7619
|
+
exports$1.find = (node, type) => node.nodes.find(node => node.type === type);
|
|
7620
7620
|
|
|
7621
7621
|
/**
|
|
7622
7622
|
* Find a node of the given type
|
|
7623
7623
|
*/
|
|
7624
7624
|
|
|
7625
|
-
exports.exceedsLimit = (min, max, step = 1, limit) => {
|
|
7625
|
+
exports$1.exceedsLimit = (min, max, step = 1, limit) => {
|
|
7626
7626
|
if (limit === false) return false;
|
|
7627
|
-
if (!exports.isInteger(min) || !exports.isInteger(max)) return false;
|
|
7627
|
+
if (!exports$1.isInteger(min) || !exports$1.isInteger(max)) return false;
|
|
7628
7628
|
return ((Number(max) - Number(min)) / Number(step)) >= limit;
|
|
7629
7629
|
};
|
|
7630
7630
|
|
|
@@ -7632,7 +7632,7 @@ function requireUtils () {
|
|
|
7632
7632
|
* Escape the given node with '\\' before node.value
|
|
7633
7633
|
*/
|
|
7634
7634
|
|
|
7635
|
-
exports.escapeNode = (block, n = 0, type) => {
|
|
7635
|
+
exports$1.escapeNode = (block, n = 0, type) => {
|
|
7636
7636
|
const node = block.nodes[n];
|
|
7637
7637
|
if (!node) return;
|
|
7638
7638
|
|
|
@@ -7648,7 +7648,7 @@ function requireUtils () {
|
|
|
7648
7648
|
* Returns true if the given brace node should be enclosed in literal braces
|
|
7649
7649
|
*/
|
|
7650
7650
|
|
|
7651
|
-
exports.encloseBrace = node => {
|
|
7651
|
+
exports$1.encloseBrace = node => {
|
|
7652
7652
|
if (node.type !== 'brace') return false;
|
|
7653
7653
|
if ((node.commas >> 0 + node.ranges >> 0) === 0) {
|
|
7654
7654
|
node.invalid = true;
|
|
@@ -7661,7 +7661,7 @@ function requireUtils () {
|
|
|
7661
7661
|
* Returns true if a brace node is invalid.
|
|
7662
7662
|
*/
|
|
7663
7663
|
|
|
7664
|
-
exports.isInvalidBrace = block => {
|
|
7664
|
+
exports$1.isInvalidBrace = block => {
|
|
7665
7665
|
if (block.type !== 'brace') return false;
|
|
7666
7666
|
if (block.invalid === true || block.dollar) return true;
|
|
7667
7667
|
if ((block.commas >> 0 + block.ranges >> 0) === 0) {
|
|
@@ -7679,7 +7679,7 @@ function requireUtils () {
|
|
|
7679
7679
|
* Returns true if a node is an open or close node
|
|
7680
7680
|
*/
|
|
7681
7681
|
|
|
7682
|
-
exports.isOpenOrClose = node => {
|
|
7682
|
+
exports$1.isOpenOrClose = node => {
|
|
7683
7683
|
if (node.type === 'open' || node.type === 'close') {
|
|
7684
7684
|
return true;
|
|
7685
7685
|
}
|
|
@@ -7690,7 +7690,7 @@ function requireUtils () {
|
|
|
7690
7690
|
* Reduce an array of text nodes.
|
|
7691
7691
|
*/
|
|
7692
7692
|
|
|
7693
|
-
exports.reduce = nodes => nodes.reduce((acc, node) => {
|
|
7693
|
+
exports$1.reduce = nodes => nodes.reduce((acc, node) => {
|
|
7694
7694
|
if (node.type === 'text') acc.push(node.value);
|
|
7695
7695
|
if (node.type === 'range') node.type = 'text';
|
|
7696
7696
|
return acc;
|
|
@@ -7700,7 +7700,7 @@ function requireUtils () {
|
|
|
7700
7700
|
* Flatten an array
|
|
7701
7701
|
*/
|
|
7702
7702
|
|
|
7703
|
-
exports.flatten = (...args) => {
|
|
7703
|
+
exports$1.flatten = (...args) => {
|
|
7704
7704
|
const result = [];
|
|
7705
7705
|
|
|
7706
7706
|
const flat = arr => {
|
|
@@ -9410,72 +9410,72 @@ var hasRequiredConstants;
|
|
|
9410
9410
|
function requireConstants () {
|
|
9411
9411
|
if (hasRequiredConstants) return constants;
|
|
9412
9412
|
hasRequiredConstants = 1;
|
|
9413
|
-
(function (exports) {
|
|
9413
|
+
(function (exports$1) {
|
|
9414
9414
|
|
|
9415
9415
|
const {sep} = require$$0$3;
|
|
9416
9416
|
const {platform} = process;
|
|
9417
9417
|
const os = require$$2$1;
|
|
9418
9418
|
|
|
9419
|
-
exports.EV_ALL = 'all';
|
|
9420
|
-
exports.EV_READY = 'ready';
|
|
9421
|
-
exports.EV_ADD = 'add';
|
|
9422
|
-
exports.EV_CHANGE = 'change';
|
|
9423
|
-
exports.EV_ADD_DIR = 'addDir';
|
|
9424
|
-
exports.EV_UNLINK = 'unlink';
|
|
9425
|
-
exports.EV_UNLINK_DIR = 'unlinkDir';
|
|
9426
|
-
exports.EV_RAW = 'raw';
|
|
9427
|
-
exports.EV_ERROR = 'error';
|
|
9428
|
-
|
|
9429
|
-
exports.STR_DATA = 'data';
|
|
9430
|
-
exports.STR_END = 'end';
|
|
9431
|
-
exports.STR_CLOSE = 'close';
|
|
9432
|
-
|
|
9433
|
-
exports.FSEVENT_CREATED = 'created';
|
|
9434
|
-
exports.FSEVENT_MODIFIED = 'modified';
|
|
9435
|
-
exports.FSEVENT_DELETED = 'deleted';
|
|
9436
|
-
exports.FSEVENT_MOVED = 'moved';
|
|
9437
|
-
exports.FSEVENT_CLONED = 'cloned';
|
|
9438
|
-
exports.FSEVENT_UNKNOWN = 'unknown';
|
|
9439
|
-
exports.FSEVENT_FLAG_MUST_SCAN_SUBDIRS = 1;
|
|
9440
|
-
exports.FSEVENT_TYPE_FILE = 'file';
|
|
9441
|
-
exports.FSEVENT_TYPE_DIRECTORY = 'directory';
|
|
9442
|
-
exports.FSEVENT_TYPE_SYMLINK = 'symlink';
|
|
9443
|
-
|
|
9444
|
-
exports.KEY_LISTENERS = 'listeners';
|
|
9445
|
-
exports.KEY_ERR = 'errHandlers';
|
|
9446
|
-
exports.KEY_RAW = 'rawEmitters';
|
|
9447
|
-
exports.HANDLER_KEYS = [exports.KEY_LISTENERS, exports.KEY_ERR, exports.KEY_RAW];
|
|
9448
|
-
|
|
9449
|
-
exports.DOT_SLASH = `.${sep}`;
|
|
9450
|
-
|
|
9451
|
-
exports.BACK_SLASH_RE = /\\/g;
|
|
9452
|
-
exports.DOUBLE_SLASH_RE = /\/\//;
|
|
9453
|
-
exports.SLASH_OR_BACK_SLASH_RE = /[/\\]/;
|
|
9454
|
-
exports.DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/;
|
|
9455
|
-
exports.REPLACER_RE = /^\.[/\\]/;
|
|
9456
|
-
|
|
9457
|
-
exports.SLASH = '/';
|
|
9458
|
-
exports.SLASH_SLASH = '//';
|
|
9459
|
-
exports.BRACE_START = '{';
|
|
9460
|
-
exports.BANG = '!';
|
|
9461
|
-
exports.ONE_DOT = '.';
|
|
9462
|
-
exports.TWO_DOTS = '..';
|
|
9463
|
-
exports.STAR = '*';
|
|
9464
|
-
exports.GLOBSTAR = '**';
|
|
9465
|
-
exports.ROOT_GLOBSTAR = '/**/*';
|
|
9466
|
-
exports.SLASH_GLOBSTAR = '/**';
|
|
9467
|
-
exports.DIR_SUFFIX = 'Dir';
|
|
9468
|
-
exports.ANYMATCH_OPTS = {dot: true};
|
|
9469
|
-
exports.STRING_TYPE = 'string';
|
|
9470
|
-
exports.FUNCTION_TYPE = 'function';
|
|
9471
|
-
exports.EMPTY_STR = '';
|
|
9472
|
-
exports.EMPTY_FN = () => {};
|
|
9473
|
-
exports.IDENTITY_FN = val => val;
|
|
9474
|
-
|
|
9475
|
-
exports.isWindows = platform === 'win32';
|
|
9476
|
-
exports.isMacos = platform === 'darwin';
|
|
9477
|
-
exports.isLinux = platform === 'linux';
|
|
9478
|
-
exports.isIBMi = os.type() === 'OS400';
|
|
9419
|
+
exports$1.EV_ALL = 'all';
|
|
9420
|
+
exports$1.EV_READY = 'ready';
|
|
9421
|
+
exports$1.EV_ADD = 'add';
|
|
9422
|
+
exports$1.EV_CHANGE = 'change';
|
|
9423
|
+
exports$1.EV_ADD_DIR = 'addDir';
|
|
9424
|
+
exports$1.EV_UNLINK = 'unlink';
|
|
9425
|
+
exports$1.EV_UNLINK_DIR = 'unlinkDir';
|
|
9426
|
+
exports$1.EV_RAW = 'raw';
|
|
9427
|
+
exports$1.EV_ERROR = 'error';
|
|
9428
|
+
|
|
9429
|
+
exports$1.STR_DATA = 'data';
|
|
9430
|
+
exports$1.STR_END = 'end';
|
|
9431
|
+
exports$1.STR_CLOSE = 'close';
|
|
9432
|
+
|
|
9433
|
+
exports$1.FSEVENT_CREATED = 'created';
|
|
9434
|
+
exports$1.FSEVENT_MODIFIED = 'modified';
|
|
9435
|
+
exports$1.FSEVENT_DELETED = 'deleted';
|
|
9436
|
+
exports$1.FSEVENT_MOVED = 'moved';
|
|
9437
|
+
exports$1.FSEVENT_CLONED = 'cloned';
|
|
9438
|
+
exports$1.FSEVENT_UNKNOWN = 'unknown';
|
|
9439
|
+
exports$1.FSEVENT_FLAG_MUST_SCAN_SUBDIRS = 1;
|
|
9440
|
+
exports$1.FSEVENT_TYPE_FILE = 'file';
|
|
9441
|
+
exports$1.FSEVENT_TYPE_DIRECTORY = 'directory';
|
|
9442
|
+
exports$1.FSEVENT_TYPE_SYMLINK = 'symlink';
|
|
9443
|
+
|
|
9444
|
+
exports$1.KEY_LISTENERS = 'listeners';
|
|
9445
|
+
exports$1.KEY_ERR = 'errHandlers';
|
|
9446
|
+
exports$1.KEY_RAW = 'rawEmitters';
|
|
9447
|
+
exports$1.HANDLER_KEYS = [exports$1.KEY_LISTENERS, exports$1.KEY_ERR, exports$1.KEY_RAW];
|
|
9448
|
+
|
|
9449
|
+
exports$1.DOT_SLASH = `.${sep}`;
|
|
9450
|
+
|
|
9451
|
+
exports$1.BACK_SLASH_RE = /\\/g;
|
|
9452
|
+
exports$1.DOUBLE_SLASH_RE = /\/\//;
|
|
9453
|
+
exports$1.SLASH_OR_BACK_SLASH_RE = /[/\\]/;
|
|
9454
|
+
exports$1.DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/;
|
|
9455
|
+
exports$1.REPLACER_RE = /^\.[/\\]/;
|
|
9456
|
+
|
|
9457
|
+
exports$1.SLASH = '/';
|
|
9458
|
+
exports$1.SLASH_SLASH = '//';
|
|
9459
|
+
exports$1.BRACE_START = '{';
|
|
9460
|
+
exports$1.BANG = '!';
|
|
9461
|
+
exports$1.ONE_DOT = '.';
|
|
9462
|
+
exports$1.TWO_DOTS = '..';
|
|
9463
|
+
exports$1.STAR = '*';
|
|
9464
|
+
exports$1.GLOBSTAR = '**';
|
|
9465
|
+
exports$1.ROOT_GLOBSTAR = '/**/*';
|
|
9466
|
+
exports$1.SLASH_GLOBSTAR = '/**';
|
|
9467
|
+
exports$1.DIR_SUFFIX = 'Dir';
|
|
9468
|
+
exports$1.ANYMATCH_OPTS = {dot: true};
|
|
9469
|
+
exports$1.STRING_TYPE = 'string';
|
|
9470
|
+
exports$1.FUNCTION_TYPE = 'function';
|
|
9471
|
+
exports$1.EMPTY_STR = '';
|
|
9472
|
+
exports$1.EMPTY_FN = () => {};
|
|
9473
|
+
exports$1.IDENTITY_FN = val => val;
|
|
9474
|
+
|
|
9475
|
+
exports$1.isWindows = platform === 'win32';
|
|
9476
|
+
exports$1.isMacos = platform === 'darwin';
|
|
9477
|
+
exports$1.isLinux = platform === 'linux';
|
|
9478
|
+
exports$1.isIBMi = os.type() === 'OS400';
|
|
9479
9479
|
} (constants));
|
|
9480
9480
|
return constants;
|
|
9481
9481
|
}
|
|
@@ -11820,7 +11820,7 @@ var hasRequiredTests;
|
|
|
11820
11820
|
function requireTests () {
|
|
11821
11821
|
if (hasRequiredTests) return tests;
|
|
11822
11822
|
hasRequiredTests = 1;
|
|
11823
|
-
(function (exports) {
|
|
11823
|
+
(function (exports$1) {
|
|
11824
11824
|
|
|
11825
11825
|
var SafeString = requireRuntime().SafeString;
|
|
11826
11826
|
|
|
@@ -11832,7 +11832,7 @@ function requireTests () {
|
|
|
11832
11832
|
function callable(value) {
|
|
11833
11833
|
return typeof value === 'function';
|
|
11834
11834
|
}
|
|
11835
|
-
exports.callable = callable;
|
|
11835
|
+
exports$1.callable = callable;
|
|
11836
11836
|
|
|
11837
11837
|
/**
|
|
11838
11838
|
* Returns `true` if the object is strictly not `undefined`.
|
|
@@ -11842,7 +11842,7 @@ function requireTests () {
|
|
|
11842
11842
|
function defined(value) {
|
|
11843
11843
|
return value !== undefined;
|
|
11844
11844
|
}
|
|
11845
|
-
exports.defined = defined;
|
|
11845
|
+
exports$1.defined = defined;
|
|
11846
11846
|
|
|
11847
11847
|
/**
|
|
11848
11848
|
* Returns `true` if the operand (one) is divisble by the test's argument
|
|
@@ -11854,7 +11854,7 @@ function requireTests () {
|
|
|
11854
11854
|
function divisibleby(one, two) {
|
|
11855
11855
|
return one % two === 0;
|
|
11856
11856
|
}
|
|
11857
|
-
exports.divisibleby = divisibleby;
|
|
11857
|
+
exports$1.divisibleby = divisibleby;
|
|
11858
11858
|
|
|
11859
11859
|
/**
|
|
11860
11860
|
* Returns true if the string has been escaped (i.e., is a SafeString).
|
|
@@ -11864,7 +11864,7 @@ function requireTests () {
|
|
|
11864
11864
|
function escaped(value) {
|
|
11865
11865
|
return value instanceof SafeString;
|
|
11866
11866
|
}
|
|
11867
|
-
exports.escaped = escaped;
|
|
11867
|
+
exports$1.escaped = escaped;
|
|
11868
11868
|
|
|
11869
11869
|
/**
|
|
11870
11870
|
* Returns `true` if the arguments are strictly equal.
|
|
@@ -11874,11 +11874,11 @@ function requireTests () {
|
|
|
11874
11874
|
function equalto(one, two) {
|
|
11875
11875
|
return one === two;
|
|
11876
11876
|
}
|
|
11877
|
-
exports.equalto = equalto;
|
|
11877
|
+
exports$1.equalto = equalto;
|
|
11878
11878
|
|
|
11879
11879
|
// Aliases
|
|
11880
|
-
exports.eq = exports.equalto;
|
|
11881
|
-
exports.sameas = exports.equalto;
|
|
11880
|
+
exports$1.eq = exports$1.equalto;
|
|
11881
|
+
exports$1.sameas = exports$1.equalto;
|
|
11882
11882
|
|
|
11883
11883
|
/**
|
|
11884
11884
|
* Returns `true` if the value is evenly divisible by 2.
|
|
@@ -11888,7 +11888,7 @@ function requireTests () {
|
|
|
11888
11888
|
function even(value) {
|
|
11889
11889
|
return value % 2 === 0;
|
|
11890
11890
|
}
|
|
11891
|
-
exports.even = even;
|
|
11891
|
+
exports$1.even = even;
|
|
11892
11892
|
|
|
11893
11893
|
/**
|
|
11894
11894
|
* Returns `true` if the value is falsy - if I recall correctly, '', 0, false,
|
|
@@ -11901,7 +11901,7 @@ function requireTests () {
|
|
|
11901
11901
|
function falsy(value) {
|
|
11902
11902
|
return !value;
|
|
11903
11903
|
}
|
|
11904
|
-
exports.falsy = falsy;
|
|
11904
|
+
exports$1.falsy = falsy;
|
|
11905
11905
|
|
|
11906
11906
|
/**
|
|
11907
11907
|
* Returns `true` if the operand (one) is greater or equal to the test's
|
|
@@ -11913,7 +11913,7 @@ function requireTests () {
|
|
|
11913
11913
|
function ge(one, two) {
|
|
11914
11914
|
return one >= two;
|
|
11915
11915
|
}
|
|
11916
|
-
exports.ge = ge;
|
|
11916
|
+
exports$1.ge = ge;
|
|
11917
11917
|
|
|
11918
11918
|
/**
|
|
11919
11919
|
* Returns `true` if the operand (one) is greater than the test's argument
|
|
@@ -11925,10 +11925,10 @@ function requireTests () {
|
|
|
11925
11925
|
function greaterthan(one, two) {
|
|
11926
11926
|
return one > two;
|
|
11927
11927
|
}
|
|
11928
|
-
exports.greaterthan = greaterthan;
|
|
11928
|
+
exports$1.greaterthan = greaterthan;
|
|
11929
11929
|
|
|
11930
11930
|
// alias
|
|
11931
|
-
exports.gt = exports.greaterthan;
|
|
11931
|
+
exports$1.gt = exports$1.greaterthan;
|
|
11932
11932
|
|
|
11933
11933
|
/**
|
|
11934
11934
|
* Returns `true` if the operand (one) is less than or equal to the test's
|
|
@@ -11940,7 +11940,7 @@ function requireTests () {
|
|
|
11940
11940
|
function le(one, two) {
|
|
11941
11941
|
return one <= two;
|
|
11942
11942
|
}
|
|
11943
|
-
exports.le = le;
|
|
11943
|
+
exports$1.le = le;
|
|
11944
11944
|
|
|
11945
11945
|
/**
|
|
11946
11946
|
* Returns `true` if the operand (one) is less than the test's passed argument
|
|
@@ -11952,10 +11952,10 @@ function requireTests () {
|
|
|
11952
11952
|
function lessthan(one, two) {
|
|
11953
11953
|
return one < two;
|
|
11954
11954
|
}
|
|
11955
|
-
exports.lessthan = lessthan;
|
|
11955
|
+
exports$1.lessthan = lessthan;
|
|
11956
11956
|
|
|
11957
11957
|
// alias
|
|
11958
|
-
exports.lt = exports.lessthan;
|
|
11958
|
+
exports$1.lt = exports$1.lessthan;
|
|
11959
11959
|
|
|
11960
11960
|
/**
|
|
11961
11961
|
* Returns `true` if the string is lowercased.
|
|
@@ -11965,7 +11965,7 @@ function requireTests () {
|
|
|
11965
11965
|
function lower(value) {
|
|
11966
11966
|
return value.toLowerCase() === value;
|
|
11967
11967
|
}
|
|
11968
|
-
exports.lower = lower;
|
|
11968
|
+
exports$1.lower = lower;
|
|
11969
11969
|
|
|
11970
11970
|
/**
|
|
11971
11971
|
* Returns `true` if the operand (one) is less than or equal to the test's
|
|
@@ -11977,7 +11977,7 @@ function requireTests () {
|
|
|
11977
11977
|
function ne(one, two) {
|
|
11978
11978
|
return one !== two;
|
|
11979
11979
|
}
|
|
11980
|
-
exports.ne = ne;
|
|
11980
|
+
exports$1.ne = ne;
|
|
11981
11981
|
|
|
11982
11982
|
/**
|
|
11983
11983
|
* Returns true if the value is strictly equal to `null`.
|
|
@@ -11987,7 +11987,7 @@ function requireTests () {
|
|
|
11987
11987
|
function nullTest(value) {
|
|
11988
11988
|
return value === null;
|
|
11989
11989
|
}
|
|
11990
|
-
exports.null = nullTest;
|
|
11990
|
+
exports$1.null = nullTest;
|
|
11991
11991
|
|
|
11992
11992
|
/**
|
|
11993
11993
|
* Returns true if value is a number.
|
|
@@ -11997,7 +11997,7 @@ function requireTests () {
|
|
|
11997
11997
|
function number(value) {
|
|
11998
11998
|
return typeof value === 'number';
|
|
11999
11999
|
}
|
|
12000
|
-
exports.number = number;
|
|
12000
|
+
exports$1.number = number;
|
|
12001
12001
|
|
|
12002
12002
|
/**
|
|
12003
12003
|
* Returns `true` if the value is *not* evenly divisible by 2.
|
|
@@ -12007,7 +12007,7 @@ function requireTests () {
|
|
|
12007
12007
|
function odd(value) {
|
|
12008
12008
|
return value % 2 === 1;
|
|
12009
12009
|
}
|
|
12010
|
-
exports.odd = odd;
|
|
12010
|
+
exports$1.odd = odd;
|
|
12011
12011
|
|
|
12012
12012
|
/**
|
|
12013
12013
|
* Returns `true` if the value is a string, `false` if not.
|
|
@@ -12017,7 +12017,7 @@ function requireTests () {
|
|
|
12017
12017
|
function string(value) {
|
|
12018
12018
|
return typeof value === 'string';
|
|
12019
12019
|
}
|
|
12020
|
-
exports.string = string;
|
|
12020
|
+
exports$1.string = string;
|
|
12021
12021
|
|
|
12022
12022
|
/**
|
|
12023
12023
|
* Returns `true` if the value is not in the list of things considered falsy:
|
|
@@ -12028,7 +12028,7 @@ function requireTests () {
|
|
|
12028
12028
|
function truthy(value) {
|
|
12029
12029
|
return !!value;
|
|
12030
12030
|
}
|
|
12031
|
-
exports.truthy = truthy;
|
|
12031
|
+
exports$1.truthy = truthy;
|
|
12032
12032
|
|
|
12033
12033
|
/**
|
|
12034
12034
|
* Returns `true` if the value is undefined.
|
|
@@ -12038,7 +12038,7 @@ function requireTests () {
|
|
|
12038
12038
|
function undefinedTest(value) {
|
|
12039
12039
|
return value === undefined;
|
|
12040
12040
|
}
|
|
12041
|
-
exports.undefined = undefinedTest;
|
|
12041
|
+
exports$1.undefined = undefinedTest;
|
|
12042
12042
|
|
|
12043
12043
|
/**
|
|
12044
12044
|
* Returns `true` if the string is uppercased.
|
|
@@ -12048,7 +12048,7 @@ function requireTests () {
|
|
|
12048
12048
|
function upper(value) {
|
|
12049
12049
|
return value.toUpperCase() === value;
|
|
12050
12050
|
}
|
|
12051
|
-
exports.upper = upper;
|
|
12051
|
+
exports$1.upper = upper;
|
|
12052
12052
|
|
|
12053
12053
|
/**
|
|
12054
12054
|
* If ES6 features are available, returns `true` if the value implements the
|
|
@@ -12067,7 +12067,7 @@ function requireTests () {
|
|
|
12067
12067
|
return Array.isArray(value) || typeof value === 'string';
|
|
12068
12068
|
}
|
|
12069
12069
|
}
|
|
12070
|
-
exports.iterable = iterable;
|
|
12070
|
+
exports$1.iterable = iterable;
|
|
12071
12071
|
|
|
12072
12072
|
/**
|
|
12073
12073
|
* If ES6 features are available, returns `true` if the value is an object hash
|
|
@@ -12084,7 +12084,7 @@ function requireTests () {
|
|
|
12084
12084
|
return bool;
|
|
12085
12085
|
}
|
|
12086
12086
|
}
|
|
12087
|
-
exports.mapping = mapping;
|
|
12087
|
+
exports$1.mapping = mapping;
|
|
12088
12088
|
} (tests));
|
|
12089
12089
|
return tests;
|
|
12090
12090
|
}
|
|
@@ -13283,7 +13283,10 @@ function requireNunjucks () {
|
|
|
13283
13283
|
var nunjucksExports = requireNunjucks();
|
|
13284
13284
|
var nunjucks = /*@__PURE__*/getDefaultExportFromCjs(nunjucksExports);
|
|
13285
13285
|
|
|
13286
|
-
|
|
13286
|
+
/**
|
|
13287
|
+
* 组件标签类型枚举
|
|
13288
|
+
* 包含所有支持的组件类型
|
|
13289
|
+
*/
|
|
13287
13290
|
var TagType;
|
|
13288
13291
|
(function (TagType) {
|
|
13289
13292
|
TagType["Title"] = "title";
|
|
@@ -13295,796 +13298,811 @@ var TagType;
|
|
|
13295
13298
|
TagType["Notice"] = "notice";
|
|
13296
13299
|
TagType["Block"] = "block";
|
|
13297
13300
|
TagType["Table"] = "table";
|
|
13301
|
+
TagType["Divider"] = "divider";
|
|
13302
|
+
TagType["Tag"] = "tag";
|
|
13303
|
+
TagType["ContentTitle"] = "title_content";
|
|
13304
|
+
TagType["Html"] = "html";
|
|
13298
13305
|
})(TagType || (TagType = {}));
|
|
13299
13306
|
|
|
13300
|
-
const styleText = `<style>/* Components.css */
|
|
13301
|
-
/* END-Components.css */
|
|
13302
|
-
/* ContentTitle.css */
|
|
13303
|
-
.collapsible-container {
|
|
13304
|
-
--margin: 36px 0 20px;
|
|
13305
|
-
width: 100%;
|
|
13306
|
-
overflow: hidden;
|
|
13307
|
-
margin: var(--margin);
|
|
13308
|
-
}
|
|
13309
|
-
.collapsible-input {
|
|
13310
|
-
display: none;
|
|
13311
|
-
}
|
|
13312
|
-
.content-title:hover {
|
|
13313
|
-
color: #409EFF;
|
|
13314
|
-
}
|
|
13315
|
-
.collapsible-label {
|
|
13316
|
-
display: flex;
|
|
13317
|
-
justify-content: space-between;
|
|
13318
|
-
align-items: center;
|
|
13319
|
-
cursor: pointer;
|
|
13320
|
-
}
|
|
13321
|
-
.collapsible-label:hover {
|
|
13322
|
-
color: #409EFF;
|
|
13323
|
-
}
|
|
13324
|
-
.collapsible-input:checked~.collapsible-arrow {
|
|
13325
|
-
transform: rotate(90deg);
|
|
13326
|
-
}
|
|
13327
|
-
.collapsible-content {
|
|
13328
|
-
max-height: 0;
|
|
13329
|
-
overflow: hidden;
|
|
13330
|
-
transition: max-height 0.3s cubic-bezier(0, 1, 0, 1) 0.3s ease;
|
|
13331
|
-
}
|
|
13332
|
-
.collapsible-hover-content {
|
|
13333
|
-
max-height: 0;
|
|
13334
|
-
overflow: hidden;
|
|
13335
|
-
transition: max-height 0.3s cubic-bezier(0, 1, 0, 1) 0.3s ease;
|
|
13336
|
-
}
|
|
13337
|
-
.collapsible-container:hover>.collapsible-hover-content {
|
|
13338
|
-
max-height: 500px;
|
|
13339
|
-
}
|
|
13340
|
-
.collapsible-input:checked~.collapsible-content {
|
|
13341
|
-
max-height: 500px;
|
|
13342
|
-
/* 根据内容调整 */
|
|
13343
|
-
}
|
|
13344
|
-
.title-tag,
|
|
13345
|
-
.title-tag-small {
|
|
13346
|
-
align-items: center;
|
|
13347
|
-
margin-left: 4px;
|
|
13348
|
-
border-radius: 4px;
|
|
13349
|
-
color: white;
|
|
13350
|
-
background-color: #2196F3
|
|
13351
|
-
}
|
|
13352
|
-
.title-tag-titile-container{
|
|
13353
|
-
display: flex;
|
|
13354
|
-
align-items: center
|
|
13355
|
-
}
|
|
13356
|
-
.title-tag-small {
|
|
13357
|
-
font-size: 10px;
|
|
13358
|
-
padding: 2px 8px;
|
|
13359
|
-
}
|
|
13360
|
-
.title-tag {
|
|
13361
|
-
font-size: 10px;
|
|
13362
|
-
padding: 6px 10px;
|
|
13363
|
-
}
|
|
13364
|
-
/* END-ContentTitle.css */
|
|
13365
|
-
/* Divider.css */
|
|
13366
|
-
.divider-base {
|
|
13367
|
-
border: none;
|
|
13368
|
-
height: 1px;
|
|
13369
|
-
background: #e0e0e0;
|
|
13370
|
-
background-size: 100% 100%;
|
|
13371
|
-
margin: 20px 0;
|
|
13372
|
-
}
|
|
13373
|
-
/* END-Divider.css */
|
|
13374
|
-
/* TOC.css */
|
|
13375
|
-
/* 基础样式 */
|
|
13376
|
-
.article-toc {
|
|
13377
|
-
position: fixed;
|
|
13378
|
-
top: 50px;
|
|
13379
|
-
right: 2rem;
|
|
13380
|
-
max-height: calc(100vh - 4rem);
|
|
13381
|
-
margin-left: 2rem;
|
|
13382
|
-
font-size: 0.95rem;
|
|
13383
|
-
}
|
|
13384
|
-
/* 隐藏 checkbox */
|
|
13385
|
-
.toc-toggle-checkbox {
|
|
13386
|
-
position: absolute;
|
|
13387
|
-
opacity: 0;
|
|
13388
|
-
height: 0;
|
|
13389
|
-
width: 0;
|
|
13390
|
-
}
|
|
13391
|
-
/* 切换按钮样式 */
|
|
13392
|
-
.toc-toggle-label {
|
|
13393
|
-
display: flex;
|
|
13394
|
-
align-items: center;
|
|
13395
|
-
background: #f8f9fa;
|
|
13396
|
-
padding: 0.3rem 0.6rem;
|
|
13397
|
-
border-radius: 4px;
|
|
13398
|
-
cursor: pointer;
|
|
13399
|
-
margin-bottom: 0.5rem;
|
|
13400
|
-
}
|
|
13401
|
-
.toc-icon {
|
|
13402
|
-
font-size: 1.2rem;
|
|
13403
|
-
margin-right: 0.3rem;
|
|
13404
|
-
}
|
|
13405
|
-
/* 目录导航 */
|
|
13406
|
-
.toc-nav {
|
|
13407
|
-
padding: 0.5rem;
|
|
13408
|
-
background: white;
|
|
13409
|
-
border-radius: 6px;
|
|
13410
|
-
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
|
|
13411
|
-
}
|
|
13412
|
-
.toc-section {
|
|
13413
|
-
margin-bottom: 0.8rem;
|
|
13414
|
-
}
|
|
13415
|
-
.toc-heading {
|
|
13416
|
-
font-size: 1rem;
|
|
13417
|
-
margin: 0 0 0.4rem 0;
|
|
13418
|
-
padding-bottom: 0.2rem;
|
|
13419
|
-
border-bottom: 1px solid #eee;
|
|
13420
|
-
}
|
|
13421
|
-
.toc-list {
|
|
13422
|
-
list-style: none;
|
|
13423
|
-
padding-left: 0.4rem;
|
|
13424
|
-
margin: 0;
|
|
13425
|
-
}
|
|
13426
|
-
.toc-item {
|
|
13427
|
-
margin: 0.2rem 0;
|
|
13428
|
-
}
|
|
13429
|
-
.toc-link {
|
|
13430
|
-
display: block;
|
|
13431
|
-
padding: 0.2rem 0.4rem;
|
|
13432
|
-
color: #495057;
|
|
13433
|
-
text-decoration: none;
|
|
13434
|
-
border-radius: 3px;
|
|
13435
|
-
transition: all 0.2s;
|
|
13436
|
-
}
|
|
13437
|
-
.toc-link:hover {
|
|
13438
|
-
background: #f0f0f0;
|
|
13439
|
-
color: #007bff;
|
|
13440
|
-
}
|
|
13441
|
-
/* 层级缩进 */
|
|
13442
|
-
.toc-link[data-level="2"] {
|
|
13443
|
-
padding-left: 0.8rem;
|
|
13444
|
-
}
|
|
13445
|
-
.toc-link[data-level="3"] {
|
|
13446
|
-
padding-left: 1.6rem;
|
|
13447
|
-
}
|
|
13448
|
-
/* 激活状态 */
|
|
13449
|
-
.toc-link.active {
|
|
13450
|
-
background: #e7f5ff;
|
|
13451
|
-
color: #0066cc;
|
|
13452
|
-
font-weight: 500;
|
|
13453
|
-
}
|
|
13454
|
-
/* 折叠功能实现 */
|
|
13455
|
-
.toc-toggle-checkbox:not(:checked) ~ .toc-nav {
|
|
13456
|
-
display: none;
|
|
13457
|
-
}
|
|
13458
|
-
/* 响应式设计 */
|
|
13459
|
-
@media (max-width: 768px) {
|
|
13460
|
-
.article-toc {
|
|
13461
|
-
margin-left: 1rem;
|
|
13462
|
-
font-size: 0.9rem;
|
|
13463
|
-
}
|
|
13464
|
-
}
|
|
13465
|
-
/* END-TOC.css */
|
|
13466
|
-
/* Text.css */
|
|
13467
|
-
/* END-Text.css */
|
|
13468
|
-
/* Title.css */
|
|
13469
|
-
.title-base {
|
|
13470
|
-
text-align: center;
|
|
13471
|
-
font-weight: bolder;
|
|
13472
|
-
}
|
|
13473
|
-
.njk-title-h1 {
|
|
13474
|
-
position: relative;
|
|
13475
|
-
padding: 0 0 4.8px;
|
|
13476
|
-
}
|
|
13477
|
-
.njk-title-h2 {
|
|
13478
|
-
position: relative;
|
|
13479
|
-
}
|
|
13480
|
-
.njk-title-h3 {
|
|
13481
|
-
position: relative;
|
|
13482
|
-
margin-bottom: 10px;
|
|
13483
|
-
}
|
|
13484
|
-
/* .njk-title-h2::before,
|
|
13485
|
-
.njk-title-h1::before {
|
|
13486
|
-
display: none;
|
|
13487
|
-
position: absolute;
|
|
13488
|
-
content: "# ";
|
|
13489
|
-
color: #007bff;
|
|
13490
|
-
}
|
|
13491
|
-
.njk-title-h1::before {
|
|
13492
|
-
left: -26px;
|
|
13493
|
-
}
|
|
13494
|
-
.njk-title-h2::before {
|
|
13495
|
-
left: -18px;
|
|
13496
|
-
}
|
|
13497
|
-
.njk-title-h1:hover::before,
|
|
13498
|
-
.njk-title-h2:hover::before {
|
|
13499
|
-
display: inline-block;
|
|
13500
|
-
} */
|
|
13501
|
-
/* END-Title.css */
|
|
13502
|
-
/* Notice.css */
|
|
13503
|
-
/* Notice */
|
|
13504
|
-
.notice {
|
|
13505
|
-
margin: 16px 0;
|
|
13506
|
-
padding: 12px 16px;
|
|
13507
|
-
margin-bottom: 1rem;
|
|
13508
|
-
border-radius: 4px;
|
|
13509
|
-
font-size: 14px;
|
|
13510
|
-
line-height: 1.5rem;
|
|
13511
|
-
}
|
|
13512
|
-
.notice-title {
|
|
13513
|
-
font-weight: bold;
|
|
13514
|
-
margin-bottom: 4px;
|
|
13515
|
-
}
|
|
13516
|
-
/* 不同类型的通知样式 */
|
|
13517
|
-
.notice-info {
|
|
13518
|
-
background-color: #e8f4ff;
|
|
13519
|
-
border-left: 4px solid #1890ff;
|
|
13520
|
-
}
|
|
13521
|
-
.notice-warning {
|
|
13522
|
-
background-color: #fff7e6;
|
|
13523
|
-
border-left: 4px solid #faad14;
|
|
13524
|
-
}
|
|
13525
|
-
.notice-success {
|
|
13526
|
-
background-color: #f6ffed;
|
|
13527
|
-
border-left: 4px solid #52c41a;
|
|
13528
|
-
}
|
|
13529
|
-
.notice-error {
|
|
13530
|
-
background-color: #fff2f0;
|
|
13531
|
-
border-left: 4px solid #f5222d;
|
|
13532
|
-
}
|
|
13533
|
-
/* END-Notice.css */
|
|
13534
|
-
/* Table.css */
|
|
13535
|
-
.my-daframe-default {
|
|
13536
|
-
margin: 0 auto 20px;
|
|
13537
|
-
border-collapse: collapse;
|
|
13538
|
-
border: 2px solid black;
|
|
13539
|
-
/* 合并边框 */
|
|
13540
|
-
font-family: Arial, Helvetica, sans-serif;
|
|
13541
|
-
font-size: 14px;
|
|
13542
|
-
color: #444444;
|
|
13543
|
-
}
|
|
13544
|
-
.my-daframe-default a {
|
|
13545
|
-
text-decoration: none !important;
|
|
13546
|
-
color: #444444 !important;
|
|
13547
|
-
font-family: Arial, Helvetica, sans-serif;
|
|
13548
|
-
font-size: 14px;
|
|
13549
|
-
}
|
|
13550
|
-
.thead-light th {
|
|
13551
|
-
white-space: nowrap;
|
|
13552
|
-
background-color: #e0e3e8;
|
|
13553
|
-
/* background-color: #f5f7fa; */
|
|
13554
|
-
color: #333333;
|
|
13555
|
-
font-weight: 600;
|
|
13556
|
-
padding: 12px 16px;
|
|
13557
|
-
text-align: left;
|
|
13558
|
-
border-right: 1px solid rgba(19, 18, 18, 0.6);
|
|
13559
|
-
border-bottom: 2px solid black;
|
|
13560
|
-
font-size: 16px;
|
|
13561
|
-
}
|
|
13562
|
-
.my-daframe-default tr {
|
|
13563
|
-
border-bottom: 1px solid black;
|
|
13564
|
-
}
|
|
13565
|
-
.my-daframe-default td {
|
|
13566
|
-
border-right: 1px solid rgba(19, 18, 18, 0.6);
|
|
13567
|
-
/* color: #333333; */
|
|
13568
|
-
/* font-weight: 600; */
|
|
13569
|
-
/* text-align: left; */
|
|
13570
|
-
}
|
|
13571
|
-
.default-row {
|
|
13572
|
-
border: 1px solid #eee;
|
|
13573
|
-
background-color: #fff;
|
|
13574
|
-
}
|
|
13575
|
-
.default-row:hover {
|
|
13576
|
-
background-color: #f0f4f8;
|
|
13577
|
-
color: rebeccapurple;
|
|
13578
|
-
}
|
|
13579
|
-
.default-cell {
|
|
13580
|
-
padding: 10px 16px;
|
|
13581
|
-
/* border: 1px solid #e1e4e8; */
|
|
13582
|
-
font-weight: 400;
|
|
13583
|
-
font-size: 14px;
|
|
13584
|
-
color: #444;
|
|
13585
|
-
background-color: transparent;
|
|
13586
|
-
}
|
|
13587
|
-
/* END-Table.css */
|
|
13588
|
-
/* Block.css */
|
|
13589
|
-
/* Block.njk */
|
|
13590
|
-
.code-block {
|
|
13591
|
-
--block-margin: 0px
|
|
13592
|
-
margin: var(--block-margin) 0;
|
|
13593
|
-
border-radius: 4px;
|
|
13594
|
-
overflow: hidden;
|
|
13595
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
13596
|
-
}
|
|
13597
|
-
.code-block pre {
|
|
13598
|
-
margin: 0;
|
|
13599
|
-
padding: 1rem;
|
|
13600
|
-
background-color: #f5f5f5;
|
|
13601
|
-
font-family: 'Courier New', monospace;
|
|
13602
|
-
font-size: 14px;
|
|
13603
|
-
line-height: 1.5;
|
|
13604
|
-
white-space: pre-wrap;
|
|
13605
|
-
}
|
|
13606
|
-
.code-block code {
|
|
13607
|
-
display: block;
|
|
13608
|
-
overflow-x: auto;
|
|
13609
|
-
}
|
|
13610
|
-
/* END-Block.css */
|
|
13611
|
-
/* Date.css */
|
|
13612
|
-
.center-info-box {
|
|
13613
|
-
margin-top: -20px;
|
|
13614
|
-
margin-bottom: 20px;
|
|
13615
|
-
text-align: center;
|
|
13616
|
-
color: black;
|
|
13617
|
-
}
|
|
13618
|
-
/* END-Date.css */
|
|
13619
|
-
/* Tab.css */
|
|
13620
|
-
/* Tab 容器 */
|
|
13621
|
-
.tab-container {
|
|
13622
|
-
max-width: 600px;
|
|
13623
|
-
margin: 0 auto;
|
|
13624
|
-
}
|
|
13625
|
-
/* 隐藏 Radio 按钮 */
|
|
13626
|
-
.tab-radio {
|
|
13627
|
-
display: none;
|
|
13628
|
-
}
|
|
13629
|
-
/* Tab 按钮样式 */
|
|
13630
|
-
.tab-labels {
|
|
13631
|
-
display: flex;
|
|
13632
|
-
border-bottom: 1px solid #ccc;
|
|
13633
|
-
}
|
|
13634
|
-
.tab-label {
|
|
13635
|
-
padding: 5px 10px;
|
|
13636
|
-
cursor: pointer;
|
|
13637
|
-
background-color: #f1f1f1;
|
|
13638
|
-
border: 1px solid #ccc;
|
|
13639
|
-
border-bottom: none;
|
|
13640
|
-
margin-right: 2px;
|
|
13641
|
-
border-radius: 5px 5px 0 0;
|
|
13642
|
-
}
|
|
13643
|
-
.tab-label:hover {
|
|
13644
|
-
background-color: #ddd;
|
|
13645
|
-
}
|
|
13646
|
-
.tab-radio:checked+.tab-label {
|
|
13647
|
-
background-color: #fff;
|
|
13648
|
-
border-bottom: 1px solid #fff;
|
|
13649
|
-
margin-bottom: -1px;
|
|
13650
|
-
}
|
|
13651
|
-
/* Tab 内容区域 */
|
|
13652
|
-
.tab-content {
|
|
13653
|
-
display: none;
|
|
13654
|
-
padding: 20px;
|
|
13655
|
-
border: 1px solid #ccc;
|
|
13656
|
-
border-top: none;
|
|
13657
|
-
}
|
|
13658
|
-
/* END-Tab.css */
|
|
13659
|
-
/* Base.css */
|
|
13660
|
-
body {
|
|
13661
|
-
margin: 0;
|
|
13662
|
-
padding: 0;
|
|
13663
|
-
font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
|
|
13664
|
-
}
|
|
13665
|
-
/* PC端样式 */
|
|
13666
|
-
a {
|
|
13667
|
-
text-decoration: none;
|
|
13668
|
-
}
|
|
13669
|
-
a:hover {
|
|
13670
|
-
color: #409EFF;
|
|
13671
|
-
}
|
|
13672
|
-
.email-main-container {
|
|
13673
|
-
margin: 0;
|
|
13674
|
-
min-width: 1000px;
|
|
13675
|
-
padding: 0 5rem;
|
|
13676
|
-
}
|
|
13677
|
-
:root {
|
|
13678
|
-
--njk-title-color: black;
|
|
13679
|
-
--njk-title-align: center;
|
|
13680
|
-
--njk-title-position: relative;
|
|
13681
|
-
--njk-title-margin: 36px 0 20px;
|
|
13682
|
-
--njk-table-margin: 0 auto 20px;
|
|
13683
|
-
}
|
|
13684
|
-
/* END-Base.css */
|
|
13307
|
+
const styleText = `<style>/* Components.css */
|
|
13308
|
+
/* END-Components.css */
|
|
13309
|
+
/* ContentTitle.css */
|
|
13310
|
+
.collapsible-container {
|
|
13311
|
+
--margin: 36px 0 20px;
|
|
13312
|
+
width: 100%;
|
|
13313
|
+
overflow: hidden;
|
|
13314
|
+
margin: var(--margin);
|
|
13315
|
+
}
|
|
13316
|
+
.collapsible-input {
|
|
13317
|
+
display: none;
|
|
13318
|
+
}
|
|
13319
|
+
.content-title:hover {
|
|
13320
|
+
color: #409EFF;
|
|
13321
|
+
}
|
|
13322
|
+
.collapsible-label {
|
|
13323
|
+
display: flex;
|
|
13324
|
+
justify-content: space-between;
|
|
13325
|
+
align-items: center;
|
|
13326
|
+
cursor: pointer;
|
|
13327
|
+
}
|
|
13328
|
+
.collapsible-label:hover {
|
|
13329
|
+
color: #409EFF;
|
|
13330
|
+
}
|
|
13331
|
+
.collapsible-input:checked~.collapsible-arrow {
|
|
13332
|
+
transform: rotate(90deg);
|
|
13333
|
+
}
|
|
13334
|
+
.collapsible-content {
|
|
13335
|
+
max-height: 0;
|
|
13336
|
+
overflow: hidden;
|
|
13337
|
+
transition: max-height 0.3s cubic-bezier(0, 1, 0, 1) 0.3s ease;
|
|
13338
|
+
}
|
|
13339
|
+
.collapsible-hover-content {
|
|
13340
|
+
max-height: 0;
|
|
13341
|
+
overflow: hidden;
|
|
13342
|
+
transition: max-height 0.3s cubic-bezier(0, 1, 0, 1) 0.3s ease;
|
|
13343
|
+
}
|
|
13344
|
+
.collapsible-container:hover>.collapsible-hover-content {
|
|
13345
|
+
max-height: 500px;
|
|
13346
|
+
}
|
|
13347
|
+
.collapsible-input:checked~.collapsible-content {
|
|
13348
|
+
max-height: 500px;
|
|
13349
|
+
/* 根据内容调整 */
|
|
13350
|
+
}
|
|
13351
|
+
.title-tag,
|
|
13352
|
+
.title-tag-small {
|
|
13353
|
+
align-items: center;
|
|
13354
|
+
margin-left: 4px;
|
|
13355
|
+
border-radius: 4px;
|
|
13356
|
+
color: white;
|
|
13357
|
+
background-color: #2196F3
|
|
13358
|
+
}
|
|
13359
|
+
.title-tag-titile-container{
|
|
13360
|
+
display: flex;
|
|
13361
|
+
align-items: center
|
|
13362
|
+
}
|
|
13363
|
+
.title-tag-small {
|
|
13364
|
+
font-size: 10px;
|
|
13365
|
+
padding: 2px 8px;
|
|
13366
|
+
}
|
|
13367
|
+
.title-tag {
|
|
13368
|
+
font-size: 10px;
|
|
13369
|
+
padding: 6px 10px;
|
|
13370
|
+
}
|
|
13371
|
+
/* END-ContentTitle.css */
|
|
13372
|
+
/* Divider.css */
|
|
13373
|
+
.divider-base {
|
|
13374
|
+
border: none;
|
|
13375
|
+
height: 1px;
|
|
13376
|
+
background: #e0e0e0;
|
|
13377
|
+
background-size: 100% 100%;
|
|
13378
|
+
margin: 20px 0;
|
|
13379
|
+
}
|
|
13380
|
+
/* END-Divider.css */
|
|
13381
|
+
/* TOC.css */
|
|
13382
|
+
/* 基础样式 */
|
|
13383
|
+
.article-toc {
|
|
13384
|
+
position: fixed;
|
|
13385
|
+
top: 50px;
|
|
13386
|
+
right: 2rem;
|
|
13387
|
+
max-height: calc(100vh - 4rem);
|
|
13388
|
+
margin-left: 2rem;
|
|
13389
|
+
font-size: 0.95rem;
|
|
13390
|
+
}
|
|
13391
|
+
/* 隐藏 checkbox */
|
|
13392
|
+
.toc-toggle-checkbox {
|
|
13393
|
+
position: absolute;
|
|
13394
|
+
opacity: 0;
|
|
13395
|
+
height: 0;
|
|
13396
|
+
width: 0;
|
|
13397
|
+
}
|
|
13398
|
+
/* 切换按钮样式 */
|
|
13399
|
+
.toc-toggle-label {
|
|
13400
|
+
display: flex;
|
|
13401
|
+
align-items: center;
|
|
13402
|
+
background: #f8f9fa;
|
|
13403
|
+
padding: 0.3rem 0.6rem;
|
|
13404
|
+
border-radius: 4px;
|
|
13405
|
+
cursor: pointer;
|
|
13406
|
+
margin-bottom: 0.5rem;
|
|
13407
|
+
}
|
|
13408
|
+
.toc-icon {
|
|
13409
|
+
font-size: 1.2rem;
|
|
13410
|
+
margin-right: 0.3rem;
|
|
13411
|
+
}
|
|
13412
|
+
/* 目录导航 */
|
|
13413
|
+
.toc-nav {
|
|
13414
|
+
padding: 0.5rem;
|
|
13415
|
+
background: white;
|
|
13416
|
+
border-radius: 6px;
|
|
13417
|
+
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
|
|
13418
|
+
}
|
|
13419
|
+
.toc-section {
|
|
13420
|
+
margin-bottom: 0.8rem;
|
|
13421
|
+
}
|
|
13422
|
+
.toc-heading {
|
|
13423
|
+
font-size: 1rem;
|
|
13424
|
+
margin: 0 0 0.4rem 0;
|
|
13425
|
+
padding-bottom: 0.2rem;
|
|
13426
|
+
border-bottom: 1px solid #eee;
|
|
13427
|
+
}
|
|
13428
|
+
.toc-list {
|
|
13429
|
+
list-style: none;
|
|
13430
|
+
padding-left: 0.4rem;
|
|
13431
|
+
margin: 0;
|
|
13432
|
+
}
|
|
13433
|
+
.toc-item {
|
|
13434
|
+
margin: 0.2rem 0;
|
|
13435
|
+
}
|
|
13436
|
+
.toc-link {
|
|
13437
|
+
display: block;
|
|
13438
|
+
padding: 0.2rem 0.4rem;
|
|
13439
|
+
color: #495057;
|
|
13440
|
+
text-decoration: none;
|
|
13441
|
+
border-radius: 3px;
|
|
13442
|
+
transition: all 0.2s;
|
|
13443
|
+
}
|
|
13444
|
+
.toc-link:hover {
|
|
13445
|
+
background: #f0f0f0;
|
|
13446
|
+
color: #007bff;
|
|
13447
|
+
}
|
|
13448
|
+
/* 层级缩进 */
|
|
13449
|
+
.toc-link[data-level="2"] {
|
|
13450
|
+
padding-left: 0.8rem;
|
|
13451
|
+
}
|
|
13452
|
+
.toc-link[data-level="3"] {
|
|
13453
|
+
padding-left: 1.6rem;
|
|
13454
|
+
}
|
|
13455
|
+
/* 激活状态 */
|
|
13456
|
+
.toc-link.active {
|
|
13457
|
+
background: #e7f5ff;
|
|
13458
|
+
color: #0066cc;
|
|
13459
|
+
font-weight: 500;
|
|
13460
|
+
}
|
|
13461
|
+
/* 折叠功能实现 */
|
|
13462
|
+
.toc-toggle-checkbox:not(:checked) ~ .toc-nav {
|
|
13463
|
+
display: none;
|
|
13464
|
+
}
|
|
13465
|
+
/* 响应式设计 */
|
|
13466
|
+
@media (max-width: 768px) {
|
|
13467
|
+
.article-toc {
|
|
13468
|
+
margin-left: 1rem;
|
|
13469
|
+
font-size: 0.9rem;
|
|
13470
|
+
}
|
|
13471
|
+
}
|
|
13472
|
+
/* END-TOC.css */
|
|
13473
|
+
/* Text.css */
|
|
13474
|
+
/* END-Text.css */
|
|
13475
|
+
/* Title.css */
|
|
13476
|
+
.title-base {
|
|
13477
|
+
text-align: center;
|
|
13478
|
+
font-weight: bolder;
|
|
13479
|
+
}
|
|
13480
|
+
.njk-title-h1 {
|
|
13481
|
+
position: relative;
|
|
13482
|
+
padding: 0 0 4.8px;
|
|
13483
|
+
}
|
|
13484
|
+
.njk-title-h2 {
|
|
13485
|
+
position: relative;
|
|
13486
|
+
}
|
|
13487
|
+
.njk-title-h3 {
|
|
13488
|
+
position: relative;
|
|
13489
|
+
margin-bottom: 10px;
|
|
13490
|
+
}
|
|
13491
|
+
/* .njk-title-h2::before,
|
|
13492
|
+
.njk-title-h1::before {
|
|
13493
|
+
display: none;
|
|
13494
|
+
position: absolute;
|
|
13495
|
+
content: "# ";
|
|
13496
|
+
color: #007bff;
|
|
13497
|
+
}
|
|
13498
|
+
.njk-title-h1::before {
|
|
13499
|
+
left: -26px;
|
|
13500
|
+
}
|
|
13501
|
+
.njk-title-h2::before {
|
|
13502
|
+
left: -18px;
|
|
13503
|
+
}
|
|
13504
|
+
.njk-title-h1:hover::before,
|
|
13505
|
+
.njk-title-h2:hover::before {
|
|
13506
|
+
display: inline-block;
|
|
13507
|
+
} */
|
|
13508
|
+
/* END-Title.css */
|
|
13509
|
+
/* Notice.css */
|
|
13510
|
+
/* Notice */
|
|
13511
|
+
.notice {
|
|
13512
|
+
margin: 16px 0;
|
|
13513
|
+
padding: 12px 16px;
|
|
13514
|
+
margin-bottom: 1rem;
|
|
13515
|
+
border-radius: 4px;
|
|
13516
|
+
font-size: 14px;
|
|
13517
|
+
line-height: 1.5rem;
|
|
13518
|
+
}
|
|
13519
|
+
.notice-title {
|
|
13520
|
+
font-weight: bold;
|
|
13521
|
+
margin-bottom: 4px;
|
|
13522
|
+
}
|
|
13523
|
+
/* 不同类型的通知样式 */
|
|
13524
|
+
.notice-info {
|
|
13525
|
+
background-color: #e8f4ff;
|
|
13526
|
+
border-left: 4px solid #1890ff;
|
|
13527
|
+
}
|
|
13528
|
+
.notice-warning {
|
|
13529
|
+
background-color: #fff7e6;
|
|
13530
|
+
border-left: 4px solid #faad14;
|
|
13531
|
+
}
|
|
13532
|
+
.notice-success {
|
|
13533
|
+
background-color: #f6ffed;
|
|
13534
|
+
border-left: 4px solid #52c41a;
|
|
13535
|
+
}
|
|
13536
|
+
.notice-error {
|
|
13537
|
+
background-color: #fff2f0;
|
|
13538
|
+
border-left: 4px solid #f5222d;
|
|
13539
|
+
}
|
|
13540
|
+
/* END-Notice.css */
|
|
13541
|
+
/* Table.css */
|
|
13542
|
+
.my-daframe-default {
|
|
13543
|
+
margin: 0 auto 20px;
|
|
13544
|
+
border-collapse: collapse;
|
|
13545
|
+
border: 2px solid black;
|
|
13546
|
+
/* 合并边框 */
|
|
13547
|
+
font-family: Arial, Helvetica, sans-serif;
|
|
13548
|
+
font-size: 14px;
|
|
13549
|
+
color: #444444;
|
|
13550
|
+
}
|
|
13551
|
+
.my-daframe-default a {
|
|
13552
|
+
text-decoration: none !important;
|
|
13553
|
+
color: #444444 !important;
|
|
13554
|
+
font-family: Arial, Helvetica, sans-serif;
|
|
13555
|
+
font-size: 14px;
|
|
13556
|
+
}
|
|
13557
|
+
.thead-light th {
|
|
13558
|
+
white-space: nowrap;
|
|
13559
|
+
background-color: #e0e3e8;
|
|
13560
|
+
/* background-color: #f5f7fa; */
|
|
13561
|
+
color: #333333;
|
|
13562
|
+
font-weight: 600;
|
|
13563
|
+
padding: 12px 16px;
|
|
13564
|
+
text-align: left;
|
|
13565
|
+
border-right: 1px solid rgba(19, 18, 18, 0.6);
|
|
13566
|
+
border-bottom: 2px solid black;
|
|
13567
|
+
font-size: 16px;
|
|
13568
|
+
}
|
|
13569
|
+
.my-daframe-default tr {
|
|
13570
|
+
border-bottom: 1px solid black;
|
|
13571
|
+
}
|
|
13572
|
+
.my-daframe-default td {
|
|
13573
|
+
border-right: 1px solid rgba(19, 18, 18, 0.6);
|
|
13574
|
+
/* color: #333333; */
|
|
13575
|
+
/* font-weight: 600; */
|
|
13576
|
+
/* text-align: left; */
|
|
13577
|
+
}
|
|
13578
|
+
.default-row {
|
|
13579
|
+
border: 1px solid #eee;
|
|
13580
|
+
background-color: #fff;
|
|
13581
|
+
}
|
|
13582
|
+
.default-row:hover {
|
|
13583
|
+
background-color: #f0f4f8;
|
|
13584
|
+
color: rebeccapurple;
|
|
13585
|
+
}
|
|
13586
|
+
.default-cell {
|
|
13587
|
+
padding: 10px 16px;
|
|
13588
|
+
/* border: 1px solid #e1e4e8; */
|
|
13589
|
+
font-weight: 400;
|
|
13590
|
+
font-size: 14px;
|
|
13591
|
+
color: #444;
|
|
13592
|
+
background-color: transparent;
|
|
13593
|
+
}
|
|
13594
|
+
/* END-Table.css */
|
|
13595
|
+
/* Block.css */
|
|
13596
|
+
/* Block.njk */
|
|
13597
|
+
.code-block {
|
|
13598
|
+
--block-margin: 0px
|
|
13599
|
+
margin: var(--block-margin) 0;
|
|
13600
|
+
border-radius: 4px;
|
|
13601
|
+
overflow: hidden;
|
|
13602
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
|
13603
|
+
}
|
|
13604
|
+
.code-block pre {
|
|
13605
|
+
margin: 0;
|
|
13606
|
+
padding: 1rem;
|
|
13607
|
+
background-color: #f5f5f5;
|
|
13608
|
+
font-family: 'Courier New', monospace;
|
|
13609
|
+
font-size: 14px;
|
|
13610
|
+
line-height: 1.5;
|
|
13611
|
+
white-space: pre-wrap;
|
|
13612
|
+
}
|
|
13613
|
+
.code-block code {
|
|
13614
|
+
display: block;
|
|
13615
|
+
overflow-x: auto;
|
|
13616
|
+
}
|
|
13617
|
+
/* END-Block.css */
|
|
13618
|
+
/* Date.css */
|
|
13619
|
+
.center-info-box {
|
|
13620
|
+
margin-top: -20px;
|
|
13621
|
+
margin-bottom: 20px;
|
|
13622
|
+
text-align: center;
|
|
13623
|
+
color: black;
|
|
13624
|
+
}
|
|
13625
|
+
/* END-Date.css */
|
|
13626
|
+
/* Tab.css */
|
|
13627
|
+
/* Tab 容器 */
|
|
13628
|
+
.tab-container {
|
|
13629
|
+
max-width: 600px;
|
|
13630
|
+
margin: 0 auto;
|
|
13631
|
+
}
|
|
13632
|
+
/* 隐藏 Radio 按钮 */
|
|
13633
|
+
.tab-radio {
|
|
13634
|
+
display: none;
|
|
13635
|
+
}
|
|
13636
|
+
/* Tab 按钮样式 */
|
|
13637
|
+
.tab-labels {
|
|
13638
|
+
display: flex;
|
|
13639
|
+
border-bottom: 1px solid #ccc;
|
|
13640
|
+
}
|
|
13641
|
+
.tab-label {
|
|
13642
|
+
padding: 5px 10px;
|
|
13643
|
+
cursor: pointer;
|
|
13644
|
+
background-color: #f1f1f1;
|
|
13645
|
+
border: 1px solid #ccc;
|
|
13646
|
+
border-bottom: none;
|
|
13647
|
+
margin-right: 2px;
|
|
13648
|
+
border-radius: 5px 5px 0 0;
|
|
13649
|
+
}
|
|
13650
|
+
.tab-label:hover {
|
|
13651
|
+
background-color: #ddd;
|
|
13652
|
+
}
|
|
13653
|
+
.tab-radio:checked+.tab-label {
|
|
13654
|
+
background-color: #fff;
|
|
13655
|
+
border-bottom: 1px solid #fff;
|
|
13656
|
+
margin-bottom: -1px;
|
|
13657
|
+
}
|
|
13658
|
+
/* Tab 内容区域 */
|
|
13659
|
+
.tab-content {
|
|
13660
|
+
display: none;
|
|
13661
|
+
padding: 20px;
|
|
13662
|
+
border: 1px solid #ccc;
|
|
13663
|
+
border-top: none;
|
|
13664
|
+
}
|
|
13665
|
+
/* END-Tab.css */
|
|
13666
|
+
/* Base.css */
|
|
13667
|
+
body {
|
|
13668
|
+
margin: 0;
|
|
13669
|
+
padding: 0;
|
|
13670
|
+
font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
|
|
13671
|
+
}
|
|
13672
|
+
/* PC端样式 */
|
|
13673
|
+
a {
|
|
13674
|
+
text-decoration: none;
|
|
13675
|
+
}
|
|
13676
|
+
a:hover {
|
|
13677
|
+
color: #409EFF;
|
|
13678
|
+
}
|
|
13679
|
+
.email-main-container {
|
|
13680
|
+
margin: 0;
|
|
13681
|
+
min-width: 1000px;
|
|
13682
|
+
padding: 0 5rem;
|
|
13683
|
+
}
|
|
13684
|
+
:root {
|
|
13685
|
+
--njk-title-color: black;
|
|
13686
|
+
--njk-title-align: center;
|
|
13687
|
+
--njk-title-position: relative;
|
|
13688
|
+
--njk-title-margin: 36px 0 20px;
|
|
13689
|
+
--njk-table-margin: 0 auto 20px;
|
|
13690
|
+
}
|
|
13691
|
+
/* END-Base.css */
|
|
13685
13692
|
</style>`;
|
|
13686
13693
|
|
|
13687
|
-
const templateText = `<!-- Head.njk -->
|
|
13688
|
-
{% macro use_head(ctx) %}
|
|
13689
|
-
<head>
|
|
13690
|
-
<meta charset="UTF-8" />
|
|
13691
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
13692
|
-
<title>{{ ctx.title }}</title>
|
|
13693
|
-
{% if ctx.jsFiles%}
|
|
13694
|
-
{% for css in ctx.cssFiles %}
|
|
13695
|
-
<link rel="stylesheet" href="{{ css }}" />
|
|
13696
|
-
{% endfor %}
|
|
13697
|
-
{% endif %}
|
|
13698
|
-
</head>
|
|
13699
|
-
{% if ctx.jsFiles%}
|
|
13700
|
-
{% for js in ctx.jsFiles %}
|
|
13701
|
-
<script src="{{ js }}"></script>
|
|
13702
|
-
{% endfor %}
|
|
13703
|
-
{% endif %}
|
|
13704
|
-
{% endmacro %}
|
|
13705
|
-
{% macro use_comp_start(ctx) %}
|
|
13706
|
-
<table style="width: 100%;table-layout: auto">
|
|
13707
|
-
<tr>
|
|
13708
|
-
<td>
|
|
13709
|
-
{% endmacro %}
|
|
13710
|
-
{% macro use_comp_end(ctx) %}
|
|
13711
|
-
</td>
|
|
13712
|
-
</tr>
|
|
13713
|
-
</table>
|
|
13714
|
-
{% endmacro %}
|
|
13715
|
-
<!-- /Head.njk -->
|
|
13716
|
-
<!--
|
|
13717
|
-
{% macro
|
|
13718
|
-
|
|
13719
|
-
|
|
13720
|
-
|
|
13721
|
-
|
|
13722
|
-
|
|
13723
|
-
|
|
13724
|
-
|
|
13725
|
-
|
|
13726
|
-
|
|
13727
|
-
|
|
13728
|
-
<
|
|
13729
|
-
<
|
|
13730
|
-
|
|
13731
|
-
|
|
13732
|
-
|
|
13733
|
-
|
|
13734
|
-
|
|
13735
|
-
|
|
13736
|
-
|
|
13737
|
-
<
|
|
13738
|
-
{
|
|
13739
|
-
|
|
13740
|
-
|
|
13741
|
-
</
|
|
13742
|
-
{%
|
|
13743
|
-
|
|
13744
|
-
|
|
13745
|
-
|
|
13746
|
-
|
|
13747
|
-
|
|
13748
|
-
{
|
|
13749
|
-
|
|
13750
|
-
|
|
13751
|
-
{%
|
|
13752
|
-
|
|
13753
|
-
|
|
13754
|
-
|
|
13755
|
-
|
|
13756
|
-
|
|
13757
|
-
{%
|
|
13758
|
-
|
|
13759
|
-
|
|
13760
|
-
{%
|
|
13761
|
-
|
|
13762
|
-
|
|
13763
|
-
|
|
13764
|
-
|
|
13765
|
-
|
|
13766
|
-
|
|
13767
|
-
|
|
13768
|
-
|
|
13769
|
-
|
|
13770
|
-
|
|
13771
|
-
|
|
13772
|
-
|
|
13773
|
-
|
|
13774
|
-
|
|
13775
|
-
|
|
13776
|
-
|
|
13777
|
-
|
|
13778
|
-
|
|
13779
|
-
|
|
13780
|
-
|
|
13781
|
-
|
|
13782
|
-
|
|
13783
|
-
|
|
13784
|
-
}
|
|
13785
|
-
|
|
13786
|
-
|
|
13787
|
-
|
|
13788
|
-
|
|
13789
|
-
|
|
13790
|
-
.smart-tag.
|
|
13791
|
-
|
|
13792
|
-
|
|
13793
|
-
|
|
13794
|
-
{
|
|
13795
|
-
|
|
13796
|
-
|
|
13797
|
-
|
|
13798
|
-
|
|
13799
|
-
|
|
13800
|
-
|
|
13801
|
-
|
|
13802
|
-
</
|
|
13803
|
-
{% endmacro %}
|
|
13804
|
-
|
|
13805
|
-
|
|
13806
|
-
{%
|
|
13807
|
-
|
|
13808
|
-
<
|
|
13809
|
-
{{
|
|
13810
|
-
</
|
|
13811
|
-
|
|
13812
|
-
{%
|
|
13813
|
-
|
|
13814
|
-
{{ ctx.text }}
|
|
13815
|
-
|
|
13816
|
-
{%
|
|
13817
|
-
{
|
|
13818
|
-
|
|
13819
|
-
|
|
13820
|
-
|
|
13821
|
-
{%
|
|
13822
|
-
{
|
|
13823
|
-
{{
|
|
13824
|
-
|
|
13825
|
-
{
|
|
13826
|
-
|
|
13827
|
-
{{
|
|
13828
|
-
{
|
|
13829
|
-
|
|
13830
|
-
{%
|
|
13831
|
-
{
|
|
13832
|
-
{
|
|
13833
|
-
{{
|
|
13834
|
-
{
|
|
13835
|
-
|
|
13836
|
-
{
|
|
13837
|
-
{
|
|
13838
|
-
{%
|
|
13839
|
-
{%
|
|
13840
|
-
|
|
13841
|
-
|
|
13842
|
-
{
|
|
13843
|
-
{%
|
|
13844
|
-
{
|
|
13845
|
-
{% else %}
|
|
13846
|
-
{
|
|
13847
|
-
{% endif %}
|
|
13848
|
-
|
|
13849
|
-
|
|
13850
|
-
|
|
13851
|
-
|
|
13852
|
-
{%
|
|
13853
|
-
|
|
13854
|
-
|
|
13855
|
-
{%
|
|
13856
|
-
|
|
13857
|
-
<
|
|
13858
|
-
|
|
13859
|
-
{
|
|
13860
|
-
|
|
13861
|
-
|
|
13862
|
-
|
|
13863
|
-
|
|
13864
|
-
{%
|
|
13865
|
-
|
|
13866
|
-
<
|
|
13867
|
-
|
|
13868
|
-
|
|
13869
|
-
<!--
|
|
13870
|
-
|
|
13871
|
-
{%
|
|
13872
|
-
|
|
13873
|
-
{%
|
|
13874
|
-
{%
|
|
13875
|
-
{
|
|
13876
|
-
|
|
13877
|
-
|
|
13878
|
-
|
|
13879
|
-
{%
|
|
13880
|
-
{%
|
|
13881
|
-
{%
|
|
13882
|
-
{%
|
|
13883
|
-
{%
|
|
13884
|
-
{%
|
|
13885
|
-
{
|
|
13886
|
-
{%
|
|
13887
|
-
{%
|
|
13888
|
-
{%
|
|
13889
|
-
{% set
|
|
13890
|
-
{%
|
|
13891
|
-
{%
|
|
13892
|
-
{%
|
|
13893
|
-
{
|
|
13894
|
-
{
|
|
13895
|
-
{
|
|
13896
|
-
{%
|
|
13897
|
-
|
|
13898
|
-
|
|
13899
|
-
|
|
13900
|
-
{%
|
|
13901
|
-
|
|
13902
|
-
{
|
|
13903
|
-
|
|
13904
|
-
|
|
13905
|
-
|
|
13906
|
-
|
|
13907
|
-
<
|
|
13908
|
-
|
|
13909
|
-
{% for column in columns %}
|
|
13910
|
-
{{
|
|
13911
|
-
{% endfor %}
|
|
13912
|
-
|
|
13913
|
-
|
|
13914
|
-
|
|
13915
|
-
{%
|
|
13916
|
-
|
|
13917
|
-
|
|
13918
|
-
{%
|
|
13919
|
-
|
|
13920
|
-
|
|
13921
|
-
{%
|
|
13922
|
-
{%
|
|
13923
|
-
{
|
|
13924
|
-
{
|
|
13925
|
-
{%
|
|
13926
|
-
|
|
13927
|
-
{%
|
|
13928
|
-
|
|
13929
|
-
|
|
13930
|
-
|
|
13931
|
-
{% macro
|
|
13932
|
-
|
|
13933
|
-
|
|
13934
|
-
{%
|
|
13935
|
-
|
|
13936
|
-
|
|
13937
|
-
}
|
|
13938
|
-
|
|
13939
|
-
|
|
13940
|
-
|
|
13941
|
-
|
|
13942
|
-
|
|
13943
|
-
|
|
13944
|
-
{
|
|
13945
|
-
|
|
13946
|
-
|
|
13947
|
-
{%
|
|
13948
|
-
|
|
13949
|
-
|
|
13950
|
-
{%
|
|
13951
|
-
|
|
13952
|
-
|
|
13953
|
-
{%
|
|
13954
|
-
|
|
13955
|
-
|
|
13956
|
-
|
|
13957
|
-
{
|
|
13958
|
-
</
|
|
13959
|
-
{%
|
|
13960
|
-
|
|
13961
|
-
<!--
|
|
13962
|
-
{%
|
|
13963
|
-
<div class="
|
|
13964
|
-
{
|
|
13965
|
-
|
|
13966
|
-
{%
|
|
13967
|
-
|
|
13968
|
-
{%
|
|
13969
|
-
|
|
13970
|
-
|
|
13971
|
-
{%
|
|
13972
|
-
|
|
13973
|
-
|
|
13974
|
-
<
|
|
13975
|
-
|
|
13976
|
-
{{
|
|
13977
|
-
|
|
13978
|
-
<
|
|
13979
|
-
|
|
13980
|
-
|
|
13981
|
-
|
|
13982
|
-
|
|
13983
|
-
{
|
|
13984
|
-
<
|
|
13985
|
-
|
|
13986
|
-
|
|
13987
|
-
|
|
13988
|
-
|
|
13989
|
-
|
|
13990
|
-
</div>
|
|
13991
|
-
|
|
13992
|
-
{%
|
|
13993
|
-
|
|
13994
|
-
<div class="collapsible-
|
|
13995
|
-
{{ h3_handler(ctx) }}
|
|
13996
|
-
|
|
13997
|
-
|
|
13998
|
-
|
|
13999
|
-
</div>
|
|
14000
|
-
|
|
14001
|
-
{%
|
|
14002
|
-
{%
|
|
14003
|
-
|
|
14004
|
-
{
|
|
14005
|
-
|
|
14006
|
-
{
|
|
14007
|
-
|
|
14008
|
-
|
|
14009
|
-
{% endmacro %}
|
|
14010
|
-
{% macro
|
|
14011
|
-
{% if ctx.
|
|
14012
|
-
{
|
|
14013
|
-
{%
|
|
14014
|
-
{
|
|
14015
|
-
{%
|
|
14016
|
-
{
|
|
14017
|
-
{%
|
|
14018
|
-
{%
|
|
14019
|
-
{%
|
|
14020
|
-
{%
|
|
14021
|
-
{
|
|
14022
|
-
{%
|
|
14023
|
-
|
|
14024
|
-
|
|
14025
|
-
{%
|
|
14026
|
-
{% if ctx.
|
|
14027
|
-
{
|
|
14028
|
-
{%
|
|
14029
|
-
{{
|
|
14030
|
-
{
|
|
14031
|
-
{
|
|
14032
|
-
|
|
14033
|
-
|
|
14034
|
-
{%
|
|
14035
|
-
{
|
|
14036
|
-
{
|
|
14037
|
-
{
|
|
14038
|
-
{
|
|
14039
|
-
{
|
|
14040
|
-
{
|
|
14041
|
-
{
|
|
14042
|
-
{
|
|
14043
|
-
{
|
|
14044
|
-
{
|
|
14045
|
-
{
|
|
14046
|
-
{
|
|
14047
|
-
{
|
|
14048
|
-
{
|
|
14049
|
-
{
|
|
14050
|
-
{
|
|
14051
|
-
{
|
|
14052
|
-
{
|
|
14053
|
-
{%
|
|
14054
|
-
{
|
|
14055
|
-
{%
|
|
14056
|
-
{{
|
|
14057
|
-
{
|
|
14058
|
-
{{
|
|
14059
|
-
{%
|
|
14060
|
-
{
|
|
14061
|
-
{%
|
|
14062
|
-
{{
|
|
14063
|
-
{
|
|
14064
|
-
{
|
|
14065
|
-
{%
|
|
14066
|
-
{
|
|
14067
|
-
{
|
|
14068
|
-
{
|
|
14069
|
-
{
|
|
14070
|
-
{%
|
|
14071
|
-
{
|
|
14072
|
-
|
|
14073
|
-
|
|
14074
|
-
{
|
|
14075
|
-
{{
|
|
14076
|
-
{%
|
|
14077
|
-
{
|
|
14078
|
-
{
|
|
14079
|
-
{%
|
|
14080
|
-
{%
|
|
14081
|
-
{%
|
|
14082
|
-
{{
|
|
14083
|
-
|
|
14084
|
-
|
|
14085
|
-
{%
|
|
14086
|
-
{
|
|
14087
|
-
|
|
13694
|
+
const templateText = `<!-- Head.njk -->
|
|
13695
|
+
{% macro use_head(ctx) %}
|
|
13696
|
+
<head>
|
|
13697
|
+
<meta charset="UTF-8" />
|
|
13698
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
13699
|
+
<title>{{ ctx.title }}</title>
|
|
13700
|
+
{% if ctx.jsFiles%}
|
|
13701
|
+
{% for css in ctx.cssFiles %}
|
|
13702
|
+
<link rel="stylesheet" href="{{ css }}" />
|
|
13703
|
+
{% endfor %}
|
|
13704
|
+
{% endif %}
|
|
13705
|
+
</head>
|
|
13706
|
+
{% if ctx.jsFiles%}
|
|
13707
|
+
{% for js in ctx.jsFiles %}
|
|
13708
|
+
<script src="{{ js }}"></script>
|
|
13709
|
+
{% endfor %}
|
|
13710
|
+
{% endif %}
|
|
13711
|
+
{% endmacro %}
|
|
13712
|
+
{% macro use_comp_start(ctx) %}
|
|
13713
|
+
<table style="width: 100%;table-layout: auto">
|
|
13714
|
+
<tr>
|
|
13715
|
+
<td>
|
|
13716
|
+
{% endmacro %}
|
|
13717
|
+
{% macro use_comp_end(ctx) %}
|
|
13718
|
+
</td>
|
|
13719
|
+
</tr>
|
|
13720
|
+
</table>
|
|
13721
|
+
{% endmacro %}
|
|
13722
|
+
<!-- /Head.njk -->
|
|
13723
|
+
<!-- Html.njk -->
|
|
13724
|
+
{% macro use_html(ctx) %}
|
|
13725
|
+
{% if ctx.html %}
|
|
13726
|
+
{{ ctx.html | safe }}
|
|
13727
|
+
{% elif ctx.code %}
|
|
13728
|
+
{{ ctx.code | safe }}
|
|
13729
|
+
{% endif %}
|
|
13730
|
+
{% endmacro %}
|
|
13731
|
+
<!-- /Html.njk -->
|
|
13732
|
+
<!-- TOC.njk -->
|
|
13733
|
+
{% macro use_toc(ctx) %}
|
|
13734
|
+
<div class="article-toc">
|
|
13735
|
+
<input type="checkbox" id="toc-toggle" class="toc-toggle-checkbox">
|
|
13736
|
+
<label for="toc-toggle" class="toc-toggle-label">
|
|
13737
|
+
<span class="toc-icon">≡</span>
|
|
13738
|
+
<span class="toc-text">目录</span>
|
|
13739
|
+
</label>
|
|
13740
|
+
<nav class="toc-nav">
|
|
13741
|
+
{% for section in ctx.data %}
|
|
13742
|
+
<section class="toc-section">
|
|
13743
|
+
{% if section.link %}
|
|
13744
|
+
<h3 class="toc-heading">
|
|
13745
|
+
<a href="{{ section.link }}" class="toc-link">{{ section.text }}</a>
|
|
13746
|
+
</h3>
|
|
13747
|
+
{% else%}
|
|
13748
|
+
<h3 class="toc-heading">{{ section.text }}</h3>
|
|
13749
|
+
{% endif %}
|
|
13750
|
+
<ul class="toc-list">
|
|
13751
|
+
{% for item in section.items %}
|
|
13752
|
+
<li class="toc-item">
|
|
13753
|
+
<a href="{{ item.link }}" class="toc-link" data-level="{{ loop.depth }}">
|
|
13754
|
+
{% if loop.depth > 1 %}•{% endif %}
|
|
13755
|
+
{{ item.text }}
|
|
13756
|
+
</a>
|
|
13757
|
+
</li>
|
|
13758
|
+
{% endfor %}
|
|
13759
|
+
</ul>
|
|
13760
|
+
</section>
|
|
13761
|
+
{% endfor %}
|
|
13762
|
+
</nav>
|
|
13763
|
+
</div>
|
|
13764
|
+
{% endmacro %}
|
|
13765
|
+
<!-- /TOC.njk -->
|
|
13766
|
+
<!-- Divider.njk -->
|
|
13767
|
+
{% macro use_divider(ctx) %}
|
|
13768
|
+
<hr class="divider-base">
|
|
13769
|
+
{% endmacro %}
|
|
13770
|
+
<!-- /Divider.njk -->
|
|
13771
|
+
<!-- Tag.njk -->
|
|
13772
|
+
{% macro use_tag(ctx) %}
|
|
13773
|
+
{% set tagClass = "smart-tag" %}
|
|
13774
|
+
{% set defaultColor = "#4CAF50" %}
|
|
13775
|
+
{% set defaultSize = "medium" %}
|
|
13776
|
+
{% set finalColor = defaultColor %}
|
|
13777
|
+
{% set finalSize = defaultSize %}
|
|
13778
|
+
<span class="{{ tagClass }} {{ finalSize }}" style="background-color: {{ finalColor }};">
|
|
13779
|
+
{{ ctx.text }}
|
|
13780
|
+
</span>
|
|
13781
|
+
<style>
|
|
13782
|
+
.smart-tag {
|
|
13783
|
+
display: inline-flex;
|
|
13784
|
+
align-items: center;
|
|
13785
|
+
padding: 4px 12px;
|
|
13786
|
+
border-radius: 4px;
|
|
13787
|
+
font-family: Arial, sans-serif;
|
|
13788
|
+
color: white;
|
|
13789
|
+
white-space: nowrap;
|
|
13790
|
+
transition: all 0.3s ease;
|
|
13791
|
+
}
|
|
13792
|
+
/* 尺寸控制 */
|
|
13793
|
+
.smart-tag.small {
|
|
13794
|
+
font-size: 12px;
|
|
13795
|
+
padding: 2px 8px;
|
|
13796
|
+
}
|
|
13797
|
+
.smart-tag.medium {
|
|
13798
|
+
font-size: 14px;
|
|
13799
|
+
padding: 4px 12px;
|
|
13800
|
+
}
|
|
13801
|
+
.smart-tag.large {
|
|
13802
|
+
font-size: 16px;
|
|
13803
|
+
padding: 6px 16px;
|
|
13804
|
+
}
|
|
13805
|
+
/* 颜色扩展支持 */
|
|
13806
|
+
.smart-tag.blue { background-color: #2196F3 !important; }
|
|
13807
|
+
.smart-tag.red { background-color: #f44336 !important; }
|
|
13808
|
+
.smart-tag.green { background-color: #4CAF50 !important; }
|
|
13809
|
+
</style>
|
|
13810
|
+
{% endmacro %}
|
|
13811
|
+
<!-- /Tag.njk -->
|
|
13812
|
+
<!-- Title.njk -->
|
|
13813
|
+
{% macro use_table_wrapper(macro) %}
|
|
13814
|
+
<table style="width: 100%;table-layout: auto">
|
|
13815
|
+
<th>
|
|
13816
|
+
<td>{{ macro }}</td>
|
|
13817
|
+
</th>
|
|
13818
|
+
</table>
|
|
13819
|
+
{% endmacro %}
|
|
13820
|
+
{% macro title_default(ctx) %}
|
|
13821
|
+
<h1 class="title-base">{{ ctx.text }}</h1>
|
|
13822
|
+
{% endmacro %}
|
|
13823
|
+
{% macro title_h1(ctx) %}
|
|
13824
|
+
<h1 class="title-base njk-title-h1" id="{{ ctx.text }}" style="{{ ctx.style }}">
|
|
13825
|
+
{{ ctx.text }}
|
|
13826
|
+
</h1>
|
|
13827
|
+
{% endmacro %}
|
|
13828
|
+
{% macro title_h2(ctx) %}
|
|
13829
|
+
<h2 class="title-base njk-title-h2" id="{{ ctx.text }}" class="" style="{{ ctx.style }}">
|
|
13830
|
+
{{ ctx.text }}
|
|
13831
|
+
</h2>
|
|
13832
|
+
{% endmacro %}
|
|
13833
|
+
{% macro title_h3(ctx) %}
|
|
13834
|
+
<h3 class="title-base njk-title-h3" id="{{ ctx.text }}" class="" style="{{ ctx.style }}">
|
|
13835
|
+
{{ ctx.text }}
|
|
13836
|
+
</h3>
|
|
13837
|
+
{% endmacro %}
|
|
13838
|
+
{% macro title_table_default(ctx) %}
|
|
13839
|
+
{{ use_comp_start() }}
|
|
13840
|
+
<h3 class="title-base njk-title-h3" id="{{ ctx.text }}">
|
|
13841
|
+
{{ ctx.text }}
|
|
13842
|
+
</h3>
|
|
13843
|
+
{{ use_comp_end() }}
|
|
13844
|
+
{% endmacro %}
|
|
13845
|
+
{% macro use_title(ctx) %}
|
|
13846
|
+
{% if ctx.type == "h1" %}
|
|
13847
|
+
{{ title_h1(ctx) }}
|
|
13848
|
+
{% elif ctx.type == "h2" %}
|
|
13849
|
+
{{ title_h2(ctx) }}
|
|
13850
|
+
{% elif ctx.type == "h3" %}
|
|
13851
|
+
{{ title_h3(ctx) }}
|
|
13852
|
+
{% else %}
|
|
13853
|
+
{{ title_default(ctx) }}
|
|
13854
|
+
{% endif %}
|
|
13855
|
+
{% endmacro %}
|
|
13856
|
+
<!-- /Title.njk -->
|
|
13857
|
+
<!-- Notice.njk -->
|
|
13858
|
+
{% macro use_notice(ctx) %}
|
|
13859
|
+
{% if ctx.type %}
|
|
13860
|
+
{% set type = ctx.type %}
|
|
13861
|
+
{% else %}
|
|
13862
|
+
{% set type = "info" %}
|
|
13863
|
+
{% endif %}
|
|
13864
|
+
<div class="notice notice-{{ type }}">
|
|
13865
|
+
<div class="notice-title">{{ type|capitalize }}:</div>
|
|
13866
|
+
<pre class="notice-content">{{ ctx.text }}</pre>
|
|
13867
|
+
</div>
|
|
13868
|
+
{% endmacro %}
|
|
13869
|
+
<!-- /Notice.njk -->
|
|
13870
|
+
<!-- Block.njk -->
|
|
13871
|
+
{% macro use_block(ctx) %}
|
|
13872
|
+
<div class="code-block">
|
|
13873
|
+
<pre><code>{{ ctx.text }}</code></pre>
|
|
13874
|
+
</div>
|
|
13875
|
+
{% endmacro %}
|
|
13876
|
+
<!-- /Block.njk -->
|
|
13877
|
+
<!-- Date.njk -->
|
|
13878
|
+
{% macro use_date(ctx) %}
|
|
13879
|
+
<div class="center-info-box" style="text-align: center;"><span style="font-weight:bolder;">Date:</span>{{ ctx.text}}</div>
|
|
13880
|
+
{% endmacro %}
|
|
13881
|
+
{% macro use_checker(ctx) %}
|
|
13882
|
+
<div class="center-info-box" style="text-align: center;"><span style="font-weight:bolder;">Checker:</span>{{ ctx.text}}</div>
|
|
13883
|
+
{% endmacro %}
|
|
13884
|
+
<!-- /Date.njk -->
|
|
13885
|
+
<!-- Table.njk -->
|
|
13886
|
+
{% macro td_default(ctx) %}
|
|
13887
|
+
{% if ctx.text %}
|
|
13888
|
+
{% set text = ctx.text %}
|
|
13889
|
+
{% else %}
|
|
13890
|
+
{% set text = ctx %}
|
|
13891
|
+
{% endif %}
|
|
13892
|
+
<td class="default-cell">{{ text | replace("false", "❌")| replace("False", "❌")| replace("True", "✔️") | replace("true", "✔️") | replace("Pass", "✔️") | replace("pass", "✔️") }}</td>
|
|
13893
|
+
{% endmacro %}
|
|
13894
|
+
{% macro table_default(ctx) %}
|
|
13895
|
+
{% if ctx.columns %}
|
|
13896
|
+
{% set columns = ctx.columns %}
|
|
13897
|
+
{% elif ctx.th %}
|
|
13898
|
+
{% set columns = ctx.th %}
|
|
13899
|
+
{% else %}
|
|
13900
|
+
{% set columns = [] %}
|
|
13901
|
+
{% endif %}
|
|
13902
|
+
{% if ctx.data %}
|
|
13903
|
+
{% set data = ctx.data %}
|
|
13904
|
+
{% elif ctx.tbody %}
|
|
13905
|
+
{% set data = ctx.tbody %}
|
|
13906
|
+
{% endif %}
|
|
13907
|
+
{% if ctx.title %}
|
|
13908
|
+
{% set title = {text:ctx.title} %}
|
|
13909
|
+
{{ use_comp_start() }}
|
|
13910
|
+
{{ title_h2(title) }}
|
|
13911
|
+
{{ use_comp_end() }}
|
|
13912
|
+
{% endif %}
|
|
13913
|
+
<table class="my-daframe-default">
|
|
13914
|
+
<thead class="thead-light">
|
|
13915
|
+
<tr>
|
|
13916
|
+
{% for column in columns %}
|
|
13917
|
+
<th>{{ column }}</th>
|
|
13918
|
+
{% endfor %}
|
|
13919
|
+
</tr>
|
|
13920
|
+
</thead>
|
|
13921
|
+
<tbody>
|
|
13922
|
+
{% for row in data %}
|
|
13923
|
+
<tr class="default-row">
|
|
13924
|
+
{% if ctx.data %}
|
|
13925
|
+
{% for column in columns %}
|
|
13926
|
+
{{ td_default(row[column]) }}
|
|
13927
|
+
{% endfor %}
|
|
13928
|
+
{% else %}
|
|
13929
|
+
{% for value in row %}
|
|
13930
|
+
{{ td_default(value) }}
|
|
13931
|
+
{% endfor %}
|
|
13932
|
+
{% endif %}
|
|
13933
|
+
</tr>
|
|
13934
|
+
{% endfor %}
|
|
13935
|
+
</tbody>
|
|
13936
|
+
</table>
|
|
13937
|
+
{% endmacro %}
|
|
13938
|
+
{% macro use_table(ctx) %}
|
|
13939
|
+
{% if ctx.title %}
|
|
13940
|
+
{{ table_default(ctx) }}
|
|
13941
|
+
{% else %}
|
|
13942
|
+
{{ table_default(ctx) }}
|
|
13943
|
+
{% endif %}
|
|
13944
|
+
{% endmacro %}
|
|
13945
|
+
<!-- /Table.njk -->
|
|
13946
|
+
<!-- Tab.njk -->
|
|
13947
|
+
{% macro useTab(tabs) %}
|
|
13948
|
+
<style>
|
|
13949
|
+
/* 显示选中的 Tab 内容 */
|
|
13950
|
+
{% for tab in tabs %}
|
|
13951
|
+
#{{tab.id}}:checked~#{{tab.content_id}} {
|
|
13952
|
+
display: block;
|
|
13953
|
+
}
|
|
13954
|
+
{% endfor %}
|
|
13955
|
+
</style>
|
|
13956
|
+
<div class="tab-container">
|
|
13957
|
+
{% for tab in tabs %}
|
|
13958
|
+
<!-- Radio 按钮(隐藏) -->
|
|
13959
|
+
<input {% if loop.first %} checked {% endif %} type="radio" name="tabs" id="{{ tab.id }}" class="tab-radio">
|
|
13960
|
+
{% endfor %}
|
|
13961
|
+
<!-- Tab 按钮(用 label 包裹) -->
|
|
13962
|
+
<div class="tab-labels">
|
|
13963
|
+
{% for tab in tabs %}
|
|
13964
|
+
<label for="{{ tab.id }}" class="tab-label">{{ tab.title }}
|
|
13965
|
+
</label>
|
|
13966
|
+
{% endfor %}
|
|
13967
|
+
</div>
|
|
13968
|
+
<!-- Tab 内容 -->
|
|
13969
|
+
{% for tab in tabs %}
|
|
13970
|
+
<div id="{{ tab.content_id }}" class="tab-content">
|
|
13971
|
+
{{ tab.content }}
|
|
13972
|
+
</div>
|
|
13973
|
+
{% endfor %}
|
|
13974
|
+
</div>
|
|
13975
|
+
{% endmacro %}
|
|
13976
|
+
<!-- /Tab.njk -->
|
|
13977
|
+
<!-- ContentTitle.njk -->
|
|
13978
|
+
{% macro h3_handler(ctx) %}
|
|
13979
|
+
<div class="title-tag-titile-container">
|
|
13980
|
+
{% if ctx.h3 %}
|
|
13981
|
+
<h3 style="margin: 0;" class="content-title">{{ ctx.title }}</h3>
|
|
13982
|
+
{% else %}
|
|
13983
|
+
<h2 style="margin: 0;" class="content-title">{{ ctx.title }}</h3>
|
|
13984
|
+
{% endif %}
|
|
13985
|
+
<span class="title-tag-small">注释</span>
|
|
13986
|
+
</div>
|
|
13987
|
+
{% endmacro %}
|
|
13988
|
+
{% macro content_title_click(ctx) %}
|
|
13989
|
+
<div class="collapsible-container">
|
|
13990
|
+
<input type="checkbox" id="{{ ctx.title }}" class="collapsible-input" hidden>
|
|
13991
|
+
<label for="{{ ctx.title }}" class="collapsible-label">
|
|
13992
|
+
{{ h3_handler(ctx) }}
|
|
13993
|
+
</label>
|
|
13994
|
+
<div class="collapsible-content">
|
|
13995
|
+
{{ use_block(ctx) }}
|
|
13996
|
+
</div>
|
|
13997
|
+
</div>
|
|
13998
|
+
{% endmacro %}
|
|
13999
|
+
{% macro content_title_hover(ctx) %}
|
|
14000
|
+
<div class="collapsible-container">
|
|
14001
|
+
<div class="collapsible-label">
|
|
14002
|
+
{{ h3_handler(ctx) }}
|
|
14003
|
+
</div>
|
|
14004
|
+
<div class="collapsible-hover-content">
|
|
14005
|
+
{{ use_block(ctx) }}
|
|
14006
|
+
</div>
|
|
14007
|
+
</div>
|
|
14008
|
+
{% endmacro %}
|
|
14009
|
+
{% macro content_title_remain(ctx) %}
|
|
14010
|
+
<div class="collapsible-container">
|
|
14011
|
+
{{ h3_handler(ctx) }}
|
|
14012
|
+
<div>
|
|
14013
|
+
{{ use_block(ctx) }}
|
|
14014
|
+
</div>
|
|
14015
|
+
</div>
|
|
14016
|
+
{% endmacro %}
|
|
14017
|
+
{% macro pick_content_title(ctx) %}
|
|
14018
|
+
{% if ctx.hover %}
|
|
14019
|
+
{{ content_title_hover(ctx) }}
|
|
14020
|
+
{% elif ctx.remain %}
|
|
14021
|
+
{{ content_title_remain(ctx) }}
|
|
14022
|
+
{% else %}
|
|
14023
|
+
{{ content_title_click(ctx) }}
|
|
14024
|
+
{% endif %}
|
|
14025
|
+
{% endmacro %}
|
|
14026
|
+
{% macro use_content_title(ctx) %}
|
|
14027
|
+
{% if ctx.type == "h3" or ctx.type == "hover_h3" or ctx.type == "remain_h3" %}
|
|
14028
|
+
{% set h3 = true %}
|
|
14029
|
+
{% endif %}
|
|
14030
|
+
{% if ctx.type == "hover_h3" or ctx.type == "hover" %}
|
|
14031
|
+
{% set hover = true %}
|
|
14032
|
+
{% endif %}
|
|
14033
|
+
{% if ctx.type == "remain_h3" or ctx.type == "remain" %}
|
|
14034
|
+
{% set remain = true %}
|
|
14035
|
+
{% endif %}
|
|
14036
|
+
{% set param = {title:ctx.title, text:ctx.text, h3:h3, hover:hover, remain:remain} %}
|
|
14037
|
+
{{ pick_content_title(param) }}
|
|
14038
|
+
{% endmacro %}
|
|
14039
|
+
<!-- /ContentTitle.njk -->
|
|
14040
|
+
<!-- Component.njk -->
|
|
14041
|
+
{% macro pick_component(ctx) %}
|
|
14042
|
+
{% if ctx.tag == "head" %}
|
|
14043
|
+
{{ use_head(ctx) }}
|
|
14044
|
+
{% elif ctx.tag == "text" %}
|
|
14045
|
+
{{ use_text(ctx) }}
|
|
14046
|
+
{% elif ctx.tag == "title" %}
|
|
14047
|
+
{{ use_title(ctx) }}
|
|
14048
|
+
{% elif ctx.tag == "table" %}
|
|
14049
|
+
{{ use_table(ctx) }}
|
|
14050
|
+
{% elif ctx.tag == "toc" %}
|
|
14051
|
+
{{ use_toc(ctx) }}
|
|
14052
|
+
{% elif ctx.tag == "notice" %}
|
|
14053
|
+
{{ use_notice(ctx) }}
|
|
14054
|
+
{% elif ctx.tag == "block" %}
|
|
14055
|
+
{{ use_block(ctx) }}
|
|
14056
|
+
{% elif ctx.tag == "date" %}
|
|
14057
|
+
{{ use_date(ctx) }}
|
|
14058
|
+
{% elif ctx.tag == "checker" %}
|
|
14059
|
+
{{ use_checker(ctx) }}
|
|
14060
|
+
{% elif ctx.tag == "divider" %}
|
|
14061
|
+
{{ use_divider(ctx) }}
|
|
14062
|
+
{% elif ctx.tag == "tag" %}
|
|
14063
|
+
{{ use_tag(ctx) }}
|
|
14064
|
+
{% elif ctx.tag == "title_content" %}
|
|
14065
|
+
{{ use_content_title(ctx) }}
|
|
14066
|
+
{% elif ctx.tag == "html" %}
|
|
14067
|
+
{{ use_html(ctx) }}
|
|
14068
|
+
{% else %}
|
|
14069
|
+
{{ title_default(ctx) }}
|
|
14070
|
+
{% endif %}
|
|
14071
|
+
{% endmacro %}
|
|
14072
|
+
{% macro use_component(ctx) %}
|
|
14073
|
+
{% if ctx.tag %}
|
|
14074
|
+
{{ use_comp_start() }}
|
|
14075
|
+
{{ pick_component(ctx) }}
|
|
14076
|
+
{{ use_comp_end() }}
|
|
14077
|
+
{% else %}
|
|
14078
|
+
{% for i in ctx %}
|
|
14079
|
+
{% if i.tag != 'table' %}
|
|
14080
|
+
{{ use_comp_start() }}
|
|
14081
|
+
{{ pick_component(i) }}
|
|
14082
|
+
{{ use_comp_end() }}
|
|
14083
|
+
{% else %}
|
|
14084
|
+
{{ pick_component(i) }}
|
|
14085
|
+
{% endif %}
|
|
14086
|
+
{% endfor %}
|
|
14087
|
+
{% endif %}
|
|
14088
|
+
{% endmacro %}
|
|
14089
|
+
{{ use_component(ctx) }}</tr>
|
|
14090
|
+
<!-- /Component.njk -->
|
|
14091
|
+
<!-- Text.njk -->
|
|
14092
|
+
{% macro text_default(ctx) %}
|
|
14093
|
+
{{ ctx.text | replace("false", "❌") | replace("true", "✔️") }}
|
|
14094
|
+
{% endmacro %}
|
|
14095
|
+
{% macro bool_text(ctx) %}
|
|
14096
|
+
{{ ctx.text | replace("false", "❌") | replace("true", "✔️") }}
|
|
14097
|
+
{% endmacro %}
|
|
14098
|
+
{% macro use_text(ctx) %}
|
|
14099
|
+
{% if ctx.type == "h1" %}
|
|
14100
|
+
{{ title_h1(ctx) }}
|
|
14101
|
+
{% else %}
|
|
14102
|
+
{{ text_default(ctx) }}
|
|
14103
|
+
{% endif %}
|
|
14104
|
+
{% endmacro %}
|
|
14105
|
+
<!-- /Text.njk -->
|
|
14088
14106
|
`;
|
|
14089
14107
|
|
|
14090
14108
|
const externalTemplatesDir = node_url.fileURLToPath(new URL("../bundle/src", `${(typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('app.min.cjs', document.baseURI).href))}`));
|