njk-tool 0.0.24 → 0.0.25
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/README.md +9 -0
- package/dist/bundle/app.min.cjs +76 -74
- package/dist/bundle/app.min.cjs.map +1 -1
- package/dist/bundle/app.min.js +76 -74
- package/dist/bundle/app.min.js.map +1 -1
- package/package.json +3 -1
- package/dist/bundle/package.json/package.json +0 -57
- package/dist/bundle/src/base.style +0 -347
- package/dist/bundle/src/index.html +0 -262
package/README.md
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
zhzddzfhypwzfbji
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
```javascript
|
|
5
|
+
function macro() {
|
|
6
|
+
for (var _len = arguments.length, macroArgs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
7
|
+
macroArgs[_key] = arguments[_key]; } var argCount = numArgs(macroArgs); var args; var kwargs = getKeywordArgs(macroArgs); if (argCount > argNames.length) { args = macroArgs.slice(0, argNames.length); // Positional arguments that should be passed in as // keyword arguments (essentially default values)
|
|
8
|
+
macroArgs.slice(args.length, argCount).forEach(function (val, i) { if (i < kwargNames.length) { kwargs[kwargNames[i]] = val; } }); args.push(kwargs); } else if (argCount < argNames.length) { args = macroArgs.slice(0, argCount); for (var i = argCount; i < argNames.length; i++) { var arg = argNames[i]; // Keyword arguments that should be passed as // positional arguments, i.e. the caller explicitly // used the name of a positional arg args.push(kwargs[arg]); delete kwargs[arg]; } args.push(kwargs); } else { args = macroArgs; } return func.apply(this, args); }
|
|
9
|
+
```
|
package/dist/bundle/app.min.cjs
CHANGED
|
@@ -13467,51 +13467,19 @@ font-size: 0.9rem;
|
|
|
13467
13467
|
/* END-Text.css */
|
|
13468
13468
|
/* Title.css */
|
|
13469
13469
|
.title-base {
|
|
13470
|
-
|
|
13471
|
-
|
|
13472
|
-
--font-weight: 800;
|
|
13473
|
-
--font-size: 18px;
|
|
13474
|
-
color: var(--text-color);
|
|
13475
|
-
text-align: var(--align);
|
|
13476
|
-
font-weight: var(--font-weight);
|
|
13477
|
-
font-size: var(--font-size);
|
|
13478
|
-
padding: 8px 30px;
|
|
13470
|
+
text-align: center;
|
|
13471
|
+
font-weight: bolder;
|
|
13479
13472
|
}
|
|
13480
13473
|
.njk-title-h1 {
|
|
13481
|
-
font-size: 26px;
|
|
13482
|
-
font-weight: bolder;
|
|
13483
|
-
--align: left;
|
|
13484
|
-
--text-color: #606266;
|
|
13485
|
-
--margin: 20px 0 10px;
|
|
13486
13474
|
position: relative;
|
|
13487
13475
|
padding: 0 0 4.8px;
|
|
13488
|
-
margin: var(--margin);
|
|
13489
|
-
color: var(--text-color);
|
|
13490
|
-
text-align: var(--align);
|
|
13491
13476
|
}
|
|
13492
13477
|
.njk-title-h2 {
|
|
13493
|
-
font-size: 24px;
|
|
13494
|
-
font-weight: bolder;
|
|
13495
|
-
--align: left;
|
|
13496
|
-
--text-color: #606266;
|
|
13497
|
-
--margin: 20px 0 10px;
|
|
13498
13478
|
position: relative;
|
|
13499
|
-
padding: 0 0 4.8px;
|
|
13500
|
-
margin: var(--margin);
|
|
13501
|
-
color: var(--text-color);
|
|
13502
|
-
text-align: var(--align);
|
|
13503
13479
|
}
|
|
13504
|
-
.njk-title-h3{
|
|
13505
|
-
font-size: 20px;
|
|
13506
|
-
--align: left;
|
|
13507
|
-
--text-color: #606266;
|
|
13508
|
-
font-weight: bolder;
|
|
13509
|
-
--margin: 20px 0 10px;
|
|
13480
|
+
.njk-title-h3 {
|
|
13510
13481
|
position: relative;
|
|
13511
|
-
|
|
13512
|
-
margin: var(--margin);
|
|
13513
|
-
color: var(--text-color);
|
|
13514
|
-
text-align: var(--align);
|
|
13482
|
+
margin-bottom: 10px;
|
|
13515
13483
|
}
|
|
13516
13484
|
/* .njk-title-h2::before,
|
|
13517
13485
|
.njk-title-h1::before {
|
|
@@ -13530,21 +13498,6 @@ left: -18px;
|
|
|
13530
13498
|
.njk-title-h2:hover::before {
|
|
13531
13499
|
display: inline-block;
|
|
13532
13500
|
} */
|
|
13533
|
-
.title-main {
|
|
13534
|
-
--align: left;
|
|
13535
|
-
--text-color: black;
|
|
13536
|
-
--font-weight: 800;
|
|
13537
|
-
--font-size: 28px;
|
|
13538
|
-
color: var(--text-color);
|
|
13539
|
-
text-align: var(--align);
|
|
13540
|
-
font-weight: var(--font-weight);
|
|
13541
|
-
font-size: var(--font-size);
|
|
13542
|
-
padding: 8px 30px;
|
|
13543
|
-
margin-bottom: 20px;
|
|
13544
|
-
}
|
|
13545
|
-
.title-center {
|
|
13546
|
-
text-align: center;
|
|
13547
|
-
}
|
|
13548
13501
|
/* END-Title.css */
|
|
13549
13502
|
/* Notice.css */
|
|
13550
13503
|
/* Notice */
|
|
@@ -13580,25 +13533,41 @@ border-left: 4px solid #f5222d;
|
|
|
13580
13533
|
/* END-Notice.css */
|
|
13581
13534
|
/* Table.css */
|
|
13582
13535
|
.my-daframe-default {
|
|
13583
|
-
margin: 0;
|
|
13584
|
-
width: 80%;
|
|
13536
|
+
margin: 0 auto 20px;
|
|
13585
13537
|
border-collapse: collapse;
|
|
13586
|
-
border
|
|
13538
|
+
border: 2px solid black;
|
|
13587
13539
|
/* 合并边框 */
|
|
13588
13540
|
font-family: Arial, Helvetica, sans-serif;
|
|
13589
13541
|
font-size: 14px;
|
|
13590
13542
|
color: #444444;
|
|
13591
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
|
+
}
|
|
13592
13550
|
.thead-light th {
|
|
13593
13551
|
white-space: nowrap;
|
|
13594
|
-
background-color: #
|
|
13552
|
+
background-color: #e0e3e8;
|
|
13553
|
+
/* background-color: #f5f7fa; */
|
|
13595
13554
|
color: #333333;
|
|
13596
13555
|
font-weight: 600;
|
|
13597
13556
|
padding: 12px 16px;
|
|
13598
13557
|
text-align: left;
|
|
13599
|
-
border: 1px solid
|
|
13558
|
+
border-right: 1px solid rgba(19, 18, 18, 0.6);
|
|
13559
|
+
border-bottom: 2px solid black;
|
|
13600
13560
|
font-size: 16px;
|
|
13601
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
|
+
}
|
|
13602
13571
|
.default-row {
|
|
13603
13572
|
border: 1px solid #eee;
|
|
13604
13573
|
background-color: #fff;
|
|
@@ -13609,7 +13578,7 @@ color: rebeccapurple;
|
|
|
13609
13578
|
}
|
|
13610
13579
|
.default-cell {
|
|
13611
13580
|
padding: 10px 16px;
|
|
13612
|
-
border: 1px solid #e1e4e8;
|
|
13581
|
+
/* border: 1px solid #e1e4e8; */
|
|
13613
13582
|
font-weight: 400;
|
|
13614
13583
|
font-size: 14px;
|
|
13615
13584
|
color: #444;
|
|
@@ -13640,6 +13609,12 @@ overflow-x: auto;
|
|
|
13640
13609
|
}
|
|
13641
13610
|
/* END-Block.css */
|
|
13642
13611
|
/* Date.css */
|
|
13612
|
+
.center-info-box {
|
|
13613
|
+
margin-top: -20px;
|
|
13614
|
+
margin-bottom: 20px;
|
|
13615
|
+
text-align: center;
|
|
13616
|
+
color: black;
|
|
13617
|
+
}
|
|
13643
13618
|
/* END-Date.css */
|
|
13644
13619
|
/* Tab.css */
|
|
13645
13620
|
/* Tab 容器 */
|
|
@@ -13700,10 +13675,11 @@ min-width: 1000px;
|
|
|
13700
13675
|
padding: 0 5rem;
|
|
13701
13676
|
}
|
|
13702
13677
|
:root {
|
|
13703
|
-
--njk-title-color:
|
|
13704
|
-
--njk-title-align:
|
|
13678
|
+
--njk-title-color: black;
|
|
13679
|
+
--njk-title-align: center;
|
|
13705
13680
|
--njk-title-position: relative;
|
|
13706
13681
|
--njk-title-margin: 36px 0 20px;
|
|
13682
|
+
--njk-table-margin: 0 auto 20px;
|
|
13707
13683
|
}
|
|
13708
13684
|
/* END-Base.css */
|
|
13709
13685
|
</style>`;
|
|
@@ -13726,6 +13702,16 @@ const templateText = `<!-- Head.njk -->
|
|
|
13726
13702
|
{% endfor %}
|
|
13727
13703
|
{% endif %}
|
|
13728
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 %}
|
|
13729
13715
|
<!-- /Head.njk -->
|
|
13730
13716
|
<!-- TOC.njk -->
|
|
13731
13717
|
{% macro use_toc(ctx) %}
|
|
@@ -13808,28 +13794,37 @@ padding: 6px 16px;
|
|
|
13808
13794
|
{% endmacro %}
|
|
13809
13795
|
<!-- /Tag.njk -->
|
|
13810
13796
|
<!-- Title.njk -->
|
|
13797
|
+
{% macro use_table_wrapper(macro) %}
|
|
13798
|
+
<table style="width: 100%;table-layout: auto">
|
|
13799
|
+
<th>
|
|
13800
|
+
<td>{{ macro }}</td>
|
|
13801
|
+
</th>
|
|
13802
|
+
</table>
|
|
13803
|
+
{% endmacro %}
|
|
13811
13804
|
{% macro title_default(ctx) %}
|
|
13812
|
-
<h1
|
|
13805
|
+
<h1 class="title-base">{{ ctx.text }}</h1>
|
|
13813
13806
|
{% endmacro %}
|
|
13814
13807
|
{% macro title_h1(ctx) %}
|
|
13815
|
-
<
|
|
13808
|
+
<h1 class="title-base njk-title-h1" id="{{ ctx.text }}" style="{{ ctx.style }}">
|
|
13816
13809
|
{{ ctx.text }}
|
|
13817
|
-
</
|
|
13810
|
+
</h1>
|
|
13818
13811
|
{% endmacro %}
|
|
13819
13812
|
{% macro title_h2(ctx) %}
|
|
13820
|
-
<
|
|
13813
|
+
<h2 class="title-base njk-title-h2" id="{{ ctx.text }}" class="" style="{{ ctx.style }}">
|
|
13821
13814
|
{{ ctx.text }}
|
|
13822
|
-
</
|
|
13815
|
+
</h2>
|
|
13823
13816
|
{% endmacro %}
|
|
13824
13817
|
{% macro title_h3(ctx) %}
|
|
13825
|
-
<
|
|
13818
|
+
<h3 class="title-base njk-title-h3" id="{{ ctx.text }}" class="" style="{{ ctx.style }}">
|
|
13826
13819
|
{{ ctx.text }}
|
|
13827
|
-
</
|
|
13820
|
+
</h3>
|
|
13828
13821
|
{% endmacro %}
|
|
13829
13822
|
{% macro title_table_default(ctx) %}
|
|
13830
|
-
|
|
13823
|
+
{{ use_comp_start() }}
|
|
13824
|
+
<h3 class="title-base njk-title-h3" id="{{ ctx.text }}">
|
|
13831
13825
|
{{ ctx.text }}
|
|
13832
|
-
</
|
|
13826
|
+
</h3>
|
|
13827
|
+
{{ use_comp_end() }}
|
|
13833
13828
|
{% endmacro %}
|
|
13834
13829
|
{% macro use_title(ctx) %}
|
|
13835
13830
|
{% if ctx.type == "h1" %}
|
|
@@ -13865,10 +13860,10 @@ padding: 6px 16px;
|
|
|
13865
13860
|
<!-- /Block.njk -->
|
|
13866
13861
|
<!-- Date.njk -->
|
|
13867
13862
|
{% macro use_date(ctx) %}
|
|
13868
|
-
<div class="center-info-box"><span style="font-weight:bolder;
|
|
13863
|
+
<div class="center-info-box" style="text-align: center;"><span style="font-weight:bolder;">Date:</span>{{ ctx.text}}</div>
|
|
13869
13864
|
{% endmacro %}
|
|
13870
13865
|
{% macro use_checker(ctx) %}
|
|
13871
|
-
<div class="center-info-box"><span style="font-weight:bolder;
|
|
13866
|
+
<div class="center-info-box" style="text-align: center;"><span style="font-weight:bolder;">Checker:</span>{{ ctx.text}}</div>
|
|
13872
13867
|
{% endmacro %}
|
|
13873
13868
|
<!-- /Date.njk -->
|
|
13874
13869
|
<!-- Table.njk -->
|
|
@@ -13895,7 +13890,9 @@ padding: 6px 16px;
|
|
|
13895
13890
|
{% endif %}
|
|
13896
13891
|
{% if ctx.title %}
|
|
13897
13892
|
{% set title = {text:ctx.title} %}
|
|
13893
|
+
{{ use_comp_start() }}
|
|
13898
13894
|
{{ title_h2(title) }}
|
|
13895
|
+
{{ use_comp_end() }}
|
|
13899
13896
|
{% endif %}
|
|
13900
13897
|
<table class="my-daframe-default">
|
|
13901
13898
|
<thead class="thead-light">
|
|
@@ -13924,7 +13921,6 @@ padding: 6px 16px;
|
|
|
13924
13921
|
{% endmacro %}
|
|
13925
13922
|
{% macro use_table(ctx) %}
|
|
13926
13923
|
{% if ctx.title %}
|
|
13927
|
-
{{ title_table_default(ctx.title) }}
|
|
13928
13924
|
{{ table_default(ctx) }}
|
|
13929
13925
|
{% else %}
|
|
13930
13926
|
{{ table_default(ctx) }}
|
|
@@ -14057,16 +14053,22 @@ display: block;
|
|
|
14057
14053
|
{% endmacro %}
|
|
14058
14054
|
{% macro use_component(ctx) %}
|
|
14059
14055
|
{% if ctx.tag %}
|
|
14056
|
+
{{ use_comp_start() }}
|
|
14060
14057
|
{{ pick_component(ctx) }}
|
|
14058
|
+
{{ use_comp_end() }}
|
|
14061
14059
|
{% else %}
|
|
14062
14060
|
{% for i in ctx %}
|
|
14061
|
+
{% if i.tag != 'table' %}
|
|
14062
|
+
{{ use_comp_start() }}
|
|
14063
|
+
{{ pick_component(i) }}
|
|
14064
|
+
{{ use_comp_end() }}
|
|
14065
|
+
{% else %}
|
|
14063
14066
|
{{ pick_component(i) }}
|
|
14067
|
+
{% endif %}
|
|
14064
14068
|
{% endfor %}
|
|
14065
14069
|
{% endif %}
|
|
14066
14070
|
{% endmacro %}
|
|
14067
|
-
|
|
14068
|
-
{{ use_component(ctx) }}
|
|
14069
|
-
</div>
|
|
14071
|
+
{{ use_component(ctx) }}</tr>
|
|
14070
14072
|
<!-- /Component.njk -->
|
|
14071
14073
|
<!-- Text.njk -->
|
|
14072
14074
|
{% macro text_default(ctx) %}
|