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