njk-tool 0.0.25 → 0.0.26
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/dist/bundle/app.min.cjs +786 -786
- package/dist/bundle/app.min.cjs.map +1 -1
- package/dist/bundle/app.min.js +786 -786
- package/dist/bundle/app.min.js.map +1 -1
- package/package.json +1 -1
- /package/{README.md → readme.md} +0 -0
package/dist/bundle/app.min.cjs
CHANGED
|
@@ -13297,794 +13297,794 @@ var TagType;
|
|
|
13297
13297
|
TagType["Table"] = "table";
|
|
13298
13298
|
})(TagType || (TagType = {}));
|
|
13299
13299
|
|
|
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 */
|
|
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 */
|
|
13685
13685
|
</style>`;
|
|
13686
13686
|
|
|
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
|
-
<!-- TOC.njk -->
|
|
13717
|
-
{% macro use_toc(ctx) %}
|
|
13718
|
-
<div class="article-toc">
|
|
13719
|
-
<input type="checkbox" id="toc-toggle" class="toc-toggle-checkbox">
|
|
13720
|
-
<label for="toc-toggle" class="toc-toggle-label">
|
|
13721
|
-
<span class="toc-icon">≡</span>
|
|
13722
|
-
<span class="toc-text">目录</span>
|
|
13723
|
-
</label>
|
|
13724
|
-
<nav class="toc-nav">
|
|
13725
|
-
{% for section in ctx.data %}
|
|
13726
|
-
<section class="toc-section">
|
|
13727
|
-
{% if section.link %}
|
|
13728
|
-
<h3 class="toc-heading">
|
|
13729
|
-
<a href="{{ section.link }}" class="toc-link">{{ section.text }}</a>
|
|
13730
|
-
</h3>
|
|
13731
|
-
{% else%}
|
|
13732
|
-
<h3 class="toc-heading">{{ section.text }}</h3>
|
|
13733
|
-
{% endif %}
|
|
13734
|
-
<ul class="toc-list">
|
|
13735
|
-
{% for item in section.items %}
|
|
13736
|
-
<li class="toc-item">
|
|
13737
|
-
<a href="{{ item.link }}" class="toc-link" data-level="{{ loop.depth }}">
|
|
13738
|
-
{% if loop.depth > 1 %}•{% endif %}
|
|
13739
|
-
{{ item.text }}
|
|
13740
|
-
</a>
|
|
13741
|
-
</li>
|
|
13742
|
-
{% endfor %}
|
|
13743
|
-
</ul>
|
|
13744
|
-
</section>
|
|
13745
|
-
{% endfor %}
|
|
13746
|
-
</nav>
|
|
13747
|
-
</div>
|
|
13748
|
-
{% endmacro %}
|
|
13749
|
-
<!-- /TOC.njk -->
|
|
13750
|
-
<!-- Divider.njk -->
|
|
13751
|
-
{% macro use_divider(ctx) %}
|
|
13752
|
-
<hr class="divider-base">
|
|
13753
|
-
{% endmacro %}
|
|
13754
|
-
<!-- /Divider.njk -->
|
|
13755
|
-
<!-- Tag.njk -->
|
|
13756
|
-
{% macro use_tag(ctx) %}
|
|
13757
|
-
{% set tagClass = "smart-tag" %}
|
|
13758
|
-
{% set defaultColor = "#4CAF50" %}
|
|
13759
|
-
{% set defaultSize = "medium" %}
|
|
13760
|
-
{% set finalColor = defaultColor %}
|
|
13761
|
-
{% set finalSize = defaultSize %}
|
|
13762
|
-
<span class="{{ tagClass }} {{ finalSize }}" style="background-color: {{ finalColor }};">
|
|
13763
|
-
{{ ctx.text }}
|
|
13764
|
-
</span>
|
|
13765
|
-
<style>
|
|
13766
|
-
.smart-tag {
|
|
13767
|
-
display: inline-flex;
|
|
13768
|
-
align-items: center;
|
|
13769
|
-
padding: 4px 12px;
|
|
13770
|
-
border-radius: 4px;
|
|
13771
|
-
font-family: Arial, sans-serif;
|
|
13772
|
-
color: white;
|
|
13773
|
-
white-space: nowrap;
|
|
13774
|
-
transition: all 0.3s ease;
|
|
13775
|
-
}
|
|
13776
|
-
/* 尺寸控制 */
|
|
13777
|
-
.smart-tag.small {
|
|
13778
|
-
font-size: 12px;
|
|
13779
|
-
padding: 2px 8px;
|
|
13780
|
-
}
|
|
13781
|
-
.smart-tag.medium {
|
|
13782
|
-
font-size: 14px;
|
|
13783
|
-
padding: 4px 12px;
|
|
13784
|
-
}
|
|
13785
|
-
.smart-tag.large {
|
|
13786
|
-
font-size: 16px;
|
|
13787
|
-
padding: 6px 16px;
|
|
13788
|
-
}
|
|
13789
|
-
/* 颜色扩展支持 */
|
|
13790
|
-
.smart-tag.blue { background-color: #2196F3 !important; }
|
|
13791
|
-
.smart-tag.red { background-color: #f44336 !important; }
|
|
13792
|
-
.smart-tag.green { background-color: #4CAF50 !important; }
|
|
13793
|
-
</style>
|
|
13794
|
-
{% endmacro %}
|
|
13795
|
-
<!-- /Tag.njk -->
|
|
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 %}
|
|
13804
|
-
{% macro title_default(ctx) %}
|
|
13805
|
-
<h1 class="title-base">{{ ctx.text }}</h1>
|
|
13806
|
-
{% endmacro %}
|
|
13807
|
-
{% macro title_h1(ctx) %}
|
|
13808
|
-
<h1 class="title-base njk-title-h1" id="{{ ctx.text }}" style="{{ ctx.style }}">
|
|
13809
|
-
{{ ctx.text }}
|
|
13810
|
-
</h1>
|
|
13811
|
-
{% endmacro %}
|
|
13812
|
-
{% macro title_h2(ctx) %}
|
|
13813
|
-
<h2 class="title-base njk-title-h2" id="{{ ctx.text }}" class="" style="{{ ctx.style }}">
|
|
13814
|
-
{{ ctx.text }}
|
|
13815
|
-
</h2>
|
|
13816
|
-
{% endmacro %}
|
|
13817
|
-
{% macro title_h3(ctx) %}
|
|
13818
|
-
<h3 class="title-base njk-title-h3" id="{{ ctx.text }}" class="" style="{{ ctx.style }}">
|
|
13819
|
-
{{ ctx.text }}
|
|
13820
|
-
</h3>
|
|
13821
|
-
{% endmacro %}
|
|
13822
|
-
{% macro title_table_default(ctx) %}
|
|
13823
|
-
{{ use_comp_start() }}
|
|
13824
|
-
<h3 class="title-base njk-title-h3" id="{{ ctx.text }}">
|
|
13825
|
-
{{ ctx.text }}
|
|
13826
|
-
</h3>
|
|
13827
|
-
{{ use_comp_end() }}
|
|
13828
|
-
{% endmacro %}
|
|
13829
|
-
{% macro use_title(ctx) %}
|
|
13830
|
-
{% if ctx.type == "h1" %}
|
|
13831
|
-
{{ title_h1(ctx) }}
|
|
13832
|
-
{% elif ctx.type == "h2" %}
|
|
13833
|
-
{{ title_h2(ctx) }}
|
|
13834
|
-
{% elif ctx.type == "h3" %}
|
|
13835
|
-
{{ title_h3(ctx) }}
|
|
13836
|
-
{% else %}
|
|
13837
|
-
{{ title_default(ctx) }}
|
|
13838
|
-
{% endif %}
|
|
13839
|
-
{% endmacro %}
|
|
13840
|
-
<!-- /Title.njk -->
|
|
13841
|
-
<!-- Notice.njk -->
|
|
13842
|
-
{% macro use_notice(ctx) %}
|
|
13843
|
-
{% if ctx.type %}
|
|
13844
|
-
{% set type = ctx.type %}
|
|
13845
|
-
{% else %}
|
|
13846
|
-
{% set type = "info" %}
|
|
13847
|
-
{% endif %}
|
|
13848
|
-
<div class="notice notice-{{ type }}">
|
|
13849
|
-
<div class="notice-title">{{ type|capitalize }}:</div>
|
|
13850
|
-
<pre class="notice-content">{{ ctx.text }}</pre>
|
|
13851
|
-
</div>
|
|
13852
|
-
{% endmacro %}
|
|
13853
|
-
<!-- /Notice.njk -->
|
|
13854
|
-
<!-- Block.njk -->
|
|
13855
|
-
{% macro use_block(ctx) %}
|
|
13856
|
-
<div class="code-block">
|
|
13857
|
-
<pre><code>{{ ctx.text }}</code></pre>
|
|
13858
|
-
</div>
|
|
13859
|
-
{% endmacro %}
|
|
13860
|
-
<!-- /Block.njk -->
|
|
13861
|
-
<!-- Date.njk -->
|
|
13862
|
-
{% macro use_date(ctx) %}
|
|
13863
|
-
<div class="center-info-box" style="text-align: center;"><span style="font-weight:bolder;">Date:</span>{{ ctx.text}}</div>
|
|
13864
|
-
{% endmacro %}
|
|
13865
|
-
{% macro use_checker(ctx) %}
|
|
13866
|
-
<div class="center-info-box" style="text-align: center;"><span style="font-weight:bolder;">Checker:</span>{{ ctx.text}}</div>
|
|
13867
|
-
{% endmacro %}
|
|
13868
|
-
<!-- /Date.njk -->
|
|
13869
|
-
<!-- Table.njk -->
|
|
13870
|
-
{% macro td_default(ctx) %}
|
|
13871
|
-
{% if ctx.text %}
|
|
13872
|
-
{% set text = ctx.text %}
|
|
13873
|
-
{% else %}
|
|
13874
|
-
{% set text = ctx %}
|
|
13875
|
-
{% endif %}
|
|
13876
|
-
<td class="default-cell">{{ text | replace("false", "❌")| replace("False", "❌")| replace("True", "✔️") | replace("true", "✔️") }}</td>
|
|
13877
|
-
{% endmacro %}
|
|
13878
|
-
{% macro table_default(ctx) %}
|
|
13879
|
-
{% if ctx.columns %}
|
|
13880
|
-
{% set columns = ctx.columns %}
|
|
13881
|
-
{% elif ctx.th %}
|
|
13882
|
-
{% set columns = ctx.th %}
|
|
13883
|
-
{% else %}
|
|
13884
|
-
{% set columns = [] %}
|
|
13885
|
-
{% endif %}
|
|
13886
|
-
{% if ctx.data %}
|
|
13887
|
-
{% set data = ctx.data %}
|
|
13888
|
-
{% elif ctx.tbody %}
|
|
13889
|
-
{% set data = ctx.tbody %}
|
|
13890
|
-
{% endif %}
|
|
13891
|
-
{% if ctx.title %}
|
|
13892
|
-
{% set title = {text:ctx.title} %}
|
|
13893
|
-
{{ use_comp_start() }}
|
|
13894
|
-
{{ title_h2(title) }}
|
|
13895
|
-
{{ use_comp_end() }}
|
|
13896
|
-
{% endif %}
|
|
13897
|
-
<table class="my-daframe-default">
|
|
13898
|
-
<thead class="thead-light">
|
|
13899
|
-
<tr>
|
|
13900
|
-
{% for column in columns %}
|
|
13901
|
-
<th>{{ column }}</th>
|
|
13902
|
-
{% endfor %}
|
|
13903
|
-
</tr>
|
|
13904
|
-
</thead>
|
|
13905
|
-
<tbody>
|
|
13906
|
-
{% for row in data %}
|
|
13907
|
-
<tr class="default-row">
|
|
13908
|
-
{% if ctx.data %}
|
|
13909
|
-
{% for column in columns %}
|
|
13910
|
-
{{ td_default(row[column]) }}
|
|
13911
|
-
{% endfor %}
|
|
13912
|
-
{% else %}
|
|
13913
|
-
{% for value in row %}
|
|
13914
|
-
{{ td_default(value) }}
|
|
13915
|
-
{% endfor %}
|
|
13916
|
-
{% endif %}
|
|
13917
|
-
</tr>
|
|
13918
|
-
{% endfor %}
|
|
13919
|
-
</tbody>
|
|
13920
|
-
</table>
|
|
13921
|
-
{% endmacro %}
|
|
13922
|
-
{% macro use_table(ctx) %}
|
|
13923
|
-
{% if ctx.title %}
|
|
13924
|
-
{{ table_default(ctx) }}
|
|
13925
|
-
{% else %}
|
|
13926
|
-
{{ table_default(ctx) }}
|
|
13927
|
-
{% endif %}
|
|
13928
|
-
{% endmacro %}
|
|
13929
|
-
<!-- /Table.njk -->
|
|
13930
|
-
<!-- Tab.njk -->
|
|
13931
|
-
{% macro useTab(tabs) %}
|
|
13932
|
-
<style>
|
|
13933
|
-
/* 显示选中的 Tab 内容 */
|
|
13934
|
-
{% for tab in tabs %}
|
|
13935
|
-
#{{tab.id}}:checked~#{{tab.content_id}} {
|
|
13936
|
-
display: block;
|
|
13937
|
-
}
|
|
13938
|
-
{% endfor %}
|
|
13939
|
-
</style>
|
|
13940
|
-
<div class="tab-container">
|
|
13941
|
-
{% for tab in tabs %}
|
|
13942
|
-
<!-- Radio 按钮(隐藏) -->
|
|
13943
|
-
<input {% if loop.first %} checked {% endif %} type="radio" name="tabs" id="{{ tab.id }}" class="tab-radio">
|
|
13944
|
-
{% endfor %}
|
|
13945
|
-
<!-- Tab 按钮(用 label 包裹) -->
|
|
13946
|
-
<div class="tab-labels">
|
|
13947
|
-
{% for tab in tabs %}
|
|
13948
|
-
<label for="{{ tab.id }}" class="tab-label">{{ tab.title }}
|
|
13949
|
-
</label>
|
|
13950
|
-
{% endfor %}
|
|
13951
|
-
</div>
|
|
13952
|
-
<!-- Tab 内容 -->
|
|
13953
|
-
{% for tab in tabs %}
|
|
13954
|
-
<div id="{{ tab.content_id }}" class="tab-content">
|
|
13955
|
-
{{ tab.content }}
|
|
13956
|
-
</div>
|
|
13957
|
-
{% endfor %}
|
|
13958
|
-
</div>
|
|
13959
|
-
{% endmacro %}
|
|
13960
|
-
<!-- /Tab.njk -->
|
|
13961
|
-
<!-- ContentTitle.njk -->
|
|
13962
|
-
{% macro h3_handler(ctx) %}
|
|
13963
|
-
<div class="title-tag-titile-container">
|
|
13964
|
-
{% if ctx.h3 %}
|
|
13965
|
-
<h3 style="margin: 0;" class="content-title">{{ ctx.title }}</h3>
|
|
13966
|
-
{% else %}
|
|
13967
|
-
<h2 style="margin: 0;" class="content-title">{{ ctx.title }}</h3>
|
|
13968
|
-
{% endif %}
|
|
13969
|
-
<span class="title-tag-small">注释</span>
|
|
13970
|
-
</div>
|
|
13971
|
-
{% endmacro %}
|
|
13972
|
-
{% macro content_title_click(ctx) %}
|
|
13973
|
-
<div class="collapsible-container">
|
|
13974
|
-
<input type="checkbox" id="{{ ctx.title }}" class="collapsible-input" hidden>
|
|
13975
|
-
<label for="{{ ctx.title }}" class="collapsible-label">
|
|
13976
|
-
{{ h3_handler(ctx) }}
|
|
13977
|
-
</label>
|
|
13978
|
-
<div class="collapsible-content">
|
|
13979
|
-
{{ use_block(ctx) }}
|
|
13980
|
-
</div>
|
|
13981
|
-
</div>
|
|
13982
|
-
{% endmacro %}
|
|
13983
|
-
{% macro content_title_hover(ctx) %}
|
|
13984
|
-
<div class="collapsible-container">
|
|
13985
|
-
<div class="collapsible-label">
|
|
13986
|
-
{{ h3_handler(ctx) }}
|
|
13987
|
-
</div>
|
|
13988
|
-
<div class="collapsible-hover-content">
|
|
13989
|
-
{{ use_block(ctx) }}
|
|
13990
|
-
</div>
|
|
13991
|
-
</div>
|
|
13992
|
-
{% endmacro %}
|
|
13993
|
-
{% macro content_title_remain(ctx) %}
|
|
13994
|
-
<div class="collapsible-container">
|
|
13995
|
-
{{ h3_handler(ctx) }}
|
|
13996
|
-
<div>
|
|
13997
|
-
{{ use_block(ctx) }}
|
|
13998
|
-
</div>
|
|
13999
|
-
</div>
|
|
14000
|
-
{% endmacro %}
|
|
14001
|
-
{% macro pick_content_title(ctx) %}
|
|
14002
|
-
{% if ctx.hover %}
|
|
14003
|
-
{{ content_title_hover(ctx) }}
|
|
14004
|
-
{% elif ctx.remain %}
|
|
14005
|
-
{{ content_title_remain(ctx) }}
|
|
14006
|
-
{% else %}
|
|
14007
|
-
{{ content_title_click(ctx) }}
|
|
14008
|
-
{% endif %}
|
|
14009
|
-
{% endmacro %}
|
|
14010
|
-
{% macro use_content_title(ctx) %}
|
|
14011
|
-
{% if ctx.type == "h3" or ctx.type == "hover_h3" or ctx.type == "remain_h3" %}
|
|
14012
|
-
{% set h3 = true %}
|
|
14013
|
-
{% endif %}
|
|
14014
|
-
{% if ctx.type == "hover_h3" or ctx.type == "hover" %}
|
|
14015
|
-
{% set hover = true %}
|
|
14016
|
-
{% endif %}
|
|
14017
|
-
{% if ctx.type == "remain_h3" or ctx.type == "remain" %}
|
|
14018
|
-
{% set remain = true %}
|
|
14019
|
-
{% endif %}
|
|
14020
|
-
{% set param = {title:ctx.title, text:ctx.text, h3:h3, hover:hover, remain:remain} %}
|
|
14021
|
-
{{ pick_content_title(param) }}
|
|
14022
|
-
{% endmacro %}
|
|
14023
|
-
<!-- /ContentTitle.njk -->
|
|
14024
|
-
<!-- Component.njk -->
|
|
14025
|
-
{% macro pick_component(ctx) %}
|
|
14026
|
-
{% if ctx.tag == "head" %}
|
|
14027
|
-
{{ use_head(ctx) }}
|
|
14028
|
-
{% elif ctx.tag == "text" %}
|
|
14029
|
-
{{ use_text(ctx) }}
|
|
14030
|
-
{% elif ctx.tag == "title" %}
|
|
14031
|
-
{{ use_title(ctx) }}
|
|
14032
|
-
{% elif ctx.tag == "table" %}
|
|
14033
|
-
{{ use_table(ctx) }}
|
|
14034
|
-
{% elif ctx.tag == "toc" %}
|
|
14035
|
-
{{ use_toc(ctx) }}
|
|
14036
|
-
{% elif ctx.tag == "notice" %}
|
|
14037
|
-
{{ use_notice(ctx) }}
|
|
14038
|
-
{% elif ctx.tag == "block" %}
|
|
14039
|
-
{{ use_block(ctx) }}
|
|
14040
|
-
{% elif ctx.tag == "date" %}
|
|
14041
|
-
{{ use_date(ctx) }}
|
|
14042
|
-
{% elif ctx.tag == "checker" %}
|
|
14043
|
-
{{ use_checker(ctx) }}
|
|
14044
|
-
{% elif ctx.tag == "divider" %}
|
|
14045
|
-
{{ use_divider(ctx) }}
|
|
14046
|
-
{% elif ctx.tag == "tag" %}
|
|
14047
|
-
{{ use_tag(ctx) }}
|
|
14048
|
-
{% elif ctx.tag == "title_content" %}
|
|
14049
|
-
{{ use_content_title(ctx) }}
|
|
14050
|
-
{% else %}
|
|
14051
|
-
{{ title_default(ctx) }}
|
|
14052
|
-
{% endif %}
|
|
14053
|
-
{% endmacro %}
|
|
14054
|
-
{% macro use_component(ctx) %}
|
|
14055
|
-
{% if ctx.tag %}
|
|
14056
|
-
{{ use_comp_start() }}
|
|
14057
|
-
{{ pick_component(ctx) }}
|
|
14058
|
-
{{ use_comp_end() }}
|
|
14059
|
-
{% else %}
|
|
14060
|
-
{% for i in ctx %}
|
|
14061
|
-
{% if i.tag != 'table' %}
|
|
14062
|
-
{{ use_comp_start() }}
|
|
14063
|
-
{{ pick_component(i) }}
|
|
14064
|
-
{{ use_comp_end() }}
|
|
14065
|
-
{% else %}
|
|
14066
|
-
{{ pick_component(i) }}
|
|
14067
|
-
{% endif %}
|
|
14068
|
-
{% endfor %}
|
|
14069
|
-
{% endif %}
|
|
14070
|
-
{% endmacro %}
|
|
14071
|
-
{{ use_component(ctx) }}</tr>
|
|
14072
|
-
<!-- /Component.njk -->
|
|
14073
|
-
<!-- Text.njk -->
|
|
14074
|
-
{% macro text_default(ctx) %}
|
|
14075
|
-
{{ ctx.text | replace("false", "❌") | replace("true", "✔️") }}
|
|
14076
|
-
{% endmacro %}
|
|
14077
|
-
{% macro bool_text(ctx) %}
|
|
14078
|
-
{{ ctx.text | replace("false", "❌") | replace("true", "✔️") }}
|
|
14079
|
-
{% endmacro %}
|
|
14080
|
-
{% macro use_text(ctx) %}
|
|
14081
|
-
{% if ctx.type == "h1" %}
|
|
14082
|
-
{{ title_h1(ctx) }}
|
|
14083
|
-
{% else %}
|
|
14084
|
-
{{ text_default(ctx) }}
|
|
14085
|
-
{% endif %}
|
|
14086
|
-
{% endmacro %}
|
|
14087
|
-
<!-- /Text.njk -->
|
|
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
|
+
<!-- TOC.njk -->
|
|
13717
|
+
{% macro use_toc(ctx) %}
|
|
13718
|
+
<div class="article-toc">
|
|
13719
|
+
<input type="checkbox" id="toc-toggle" class="toc-toggle-checkbox">
|
|
13720
|
+
<label for="toc-toggle" class="toc-toggle-label">
|
|
13721
|
+
<span class="toc-icon">≡</span>
|
|
13722
|
+
<span class="toc-text">目录</span>
|
|
13723
|
+
</label>
|
|
13724
|
+
<nav class="toc-nav">
|
|
13725
|
+
{% for section in ctx.data %}
|
|
13726
|
+
<section class="toc-section">
|
|
13727
|
+
{% if section.link %}
|
|
13728
|
+
<h3 class="toc-heading">
|
|
13729
|
+
<a href="{{ section.link }}" class="toc-link">{{ section.text }}</a>
|
|
13730
|
+
</h3>
|
|
13731
|
+
{% else%}
|
|
13732
|
+
<h3 class="toc-heading">{{ section.text }}</h3>
|
|
13733
|
+
{% endif %}
|
|
13734
|
+
<ul class="toc-list">
|
|
13735
|
+
{% for item in section.items %}
|
|
13736
|
+
<li class="toc-item">
|
|
13737
|
+
<a href="{{ item.link }}" class="toc-link" data-level="{{ loop.depth }}">
|
|
13738
|
+
{% if loop.depth > 1 %}•{% endif %}
|
|
13739
|
+
{{ item.text }}
|
|
13740
|
+
</a>
|
|
13741
|
+
</li>
|
|
13742
|
+
{% endfor %}
|
|
13743
|
+
</ul>
|
|
13744
|
+
</section>
|
|
13745
|
+
{% endfor %}
|
|
13746
|
+
</nav>
|
|
13747
|
+
</div>
|
|
13748
|
+
{% endmacro %}
|
|
13749
|
+
<!-- /TOC.njk -->
|
|
13750
|
+
<!-- Divider.njk -->
|
|
13751
|
+
{% macro use_divider(ctx) %}
|
|
13752
|
+
<hr class="divider-base">
|
|
13753
|
+
{% endmacro %}
|
|
13754
|
+
<!-- /Divider.njk -->
|
|
13755
|
+
<!-- Tag.njk -->
|
|
13756
|
+
{% macro use_tag(ctx) %}
|
|
13757
|
+
{% set tagClass = "smart-tag" %}
|
|
13758
|
+
{% set defaultColor = "#4CAF50" %}
|
|
13759
|
+
{% set defaultSize = "medium" %}
|
|
13760
|
+
{% set finalColor = defaultColor %}
|
|
13761
|
+
{% set finalSize = defaultSize %}
|
|
13762
|
+
<span class="{{ tagClass }} {{ finalSize }}" style="background-color: {{ finalColor }};">
|
|
13763
|
+
{{ ctx.text }}
|
|
13764
|
+
</span>
|
|
13765
|
+
<style>
|
|
13766
|
+
.smart-tag {
|
|
13767
|
+
display: inline-flex;
|
|
13768
|
+
align-items: center;
|
|
13769
|
+
padding: 4px 12px;
|
|
13770
|
+
border-radius: 4px;
|
|
13771
|
+
font-family: Arial, sans-serif;
|
|
13772
|
+
color: white;
|
|
13773
|
+
white-space: nowrap;
|
|
13774
|
+
transition: all 0.3s ease;
|
|
13775
|
+
}
|
|
13776
|
+
/* 尺寸控制 */
|
|
13777
|
+
.smart-tag.small {
|
|
13778
|
+
font-size: 12px;
|
|
13779
|
+
padding: 2px 8px;
|
|
13780
|
+
}
|
|
13781
|
+
.smart-tag.medium {
|
|
13782
|
+
font-size: 14px;
|
|
13783
|
+
padding: 4px 12px;
|
|
13784
|
+
}
|
|
13785
|
+
.smart-tag.large {
|
|
13786
|
+
font-size: 16px;
|
|
13787
|
+
padding: 6px 16px;
|
|
13788
|
+
}
|
|
13789
|
+
/* 颜色扩展支持 */
|
|
13790
|
+
.smart-tag.blue { background-color: #2196F3 !important; }
|
|
13791
|
+
.smart-tag.red { background-color: #f44336 !important; }
|
|
13792
|
+
.smart-tag.green { background-color: #4CAF50 !important; }
|
|
13793
|
+
</style>
|
|
13794
|
+
{% endmacro %}
|
|
13795
|
+
<!-- /Tag.njk -->
|
|
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 %}
|
|
13804
|
+
{% macro title_default(ctx) %}
|
|
13805
|
+
<h1 class="title-base">{{ ctx.text }}</h1>
|
|
13806
|
+
{% endmacro %}
|
|
13807
|
+
{% macro title_h1(ctx) %}
|
|
13808
|
+
<h1 class="title-base njk-title-h1" id="{{ ctx.text }}" style="{{ ctx.style }}">
|
|
13809
|
+
{{ ctx.text }}
|
|
13810
|
+
</h1>
|
|
13811
|
+
{% endmacro %}
|
|
13812
|
+
{% macro title_h2(ctx) %}
|
|
13813
|
+
<h2 class="title-base njk-title-h2" id="{{ ctx.text }}" class="" style="{{ ctx.style }}">
|
|
13814
|
+
{{ ctx.text }}
|
|
13815
|
+
</h2>
|
|
13816
|
+
{% endmacro %}
|
|
13817
|
+
{% macro title_h3(ctx) %}
|
|
13818
|
+
<h3 class="title-base njk-title-h3" id="{{ ctx.text }}" class="" style="{{ ctx.style }}">
|
|
13819
|
+
{{ ctx.text }}
|
|
13820
|
+
</h3>
|
|
13821
|
+
{% endmacro %}
|
|
13822
|
+
{% macro title_table_default(ctx) %}
|
|
13823
|
+
{{ use_comp_start() }}
|
|
13824
|
+
<h3 class="title-base njk-title-h3" id="{{ ctx.text }}">
|
|
13825
|
+
{{ ctx.text }}
|
|
13826
|
+
</h3>
|
|
13827
|
+
{{ use_comp_end() }}
|
|
13828
|
+
{% endmacro %}
|
|
13829
|
+
{% macro use_title(ctx) %}
|
|
13830
|
+
{% if ctx.type == "h1" %}
|
|
13831
|
+
{{ title_h1(ctx) }}
|
|
13832
|
+
{% elif ctx.type == "h2" %}
|
|
13833
|
+
{{ title_h2(ctx) }}
|
|
13834
|
+
{% elif ctx.type == "h3" %}
|
|
13835
|
+
{{ title_h3(ctx) }}
|
|
13836
|
+
{% else %}
|
|
13837
|
+
{{ title_default(ctx) }}
|
|
13838
|
+
{% endif %}
|
|
13839
|
+
{% endmacro %}
|
|
13840
|
+
<!-- /Title.njk -->
|
|
13841
|
+
<!-- Notice.njk -->
|
|
13842
|
+
{% macro use_notice(ctx) %}
|
|
13843
|
+
{% if ctx.type %}
|
|
13844
|
+
{% set type = ctx.type %}
|
|
13845
|
+
{% else %}
|
|
13846
|
+
{% set type = "info" %}
|
|
13847
|
+
{% endif %}
|
|
13848
|
+
<div class="notice notice-{{ type }}">
|
|
13849
|
+
<div class="notice-title">{{ type|capitalize }}:</div>
|
|
13850
|
+
<pre class="notice-content">{{ ctx.text }}</pre>
|
|
13851
|
+
</div>
|
|
13852
|
+
{% endmacro %}
|
|
13853
|
+
<!-- /Notice.njk -->
|
|
13854
|
+
<!-- Block.njk -->
|
|
13855
|
+
{% macro use_block(ctx) %}
|
|
13856
|
+
<div class="code-block">
|
|
13857
|
+
<pre><code>{{ ctx.text }}</code></pre>
|
|
13858
|
+
</div>
|
|
13859
|
+
{% endmacro %}
|
|
13860
|
+
<!-- /Block.njk -->
|
|
13861
|
+
<!-- Date.njk -->
|
|
13862
|
+
{% macro use_date(ctx) %}
|
|
13863
|
+
<div class="center-info-box" style="text-align: center;"><span style="font-weight:bolder;">Date:</span>{{ ctx.text}}</div>
|
|
13864
|
+
{% endmacro %}
|
|
13865
|
+
{% macro use_checker(ctx) %}
|
|
13866
|
+
<div class="center-info-box" style="text-align: center;"><span style="font-weight:bolder;">Checker:</span>{{ ctx.text}}</div>
|
|
13867
|
+
{% endmacro %}
|
|
13868
|
+
<!-- /Date.njk -->
|
|
13869
|
+
<!-- Table.njk -->
|
|
13870
|
+
{% macro td_default(ctx) %}
|
|
13871
|
+
{% if ctx.text %}
|
|
13872
|
+
{% set text = ctx.text %}
|
|
13873
|
+
{% else %}
|
|
13874
|
+
{% set text = ctx %}
|
|
13875
|
+
{% endif %}
|
|
13876
|
+
<td class="default-cell">{{ text | replace("false", "❌")| replace("False", "❌")| replace("True", "✔️") | replace("true", "✔️") }}</td>
|
|
13877
|
+
{% endmacro %}
|
|
13878
|
+
{% macro table_default(ctx) %}
|
|
13879
|
+
{% if ctx.columns %}
|
|
13880
|
+
{% set columns = ctx.columns %}
|
|
13881
|
+
{% elif ctx.th %}
|
|
13882
|
+
{% set columns = ctx.th %}
|
|
13883
|
+
{% else %}
|
|
13884
|
+
{% set columns = [] %}
|
|
13885
|
+
{% endif %}
|
|
13886
|
+
{% if ctx.data %}
|
|
13887
|
+
{% set data = ctx.data %}
|
|
13888
|
+
{% elif ctx.tbody %}
|
|
13889
|
+
{% set data = ctx.tbody %}
|
|
13890
|
+
{% endif %}
|
|
13891
|
+
{% if ctx.title %}
|
|
13892
|
+
{% set title = {text:ctx.title} %}
|
|
13893
|
+
{{ use_comp_start() }}
|
|
13894
|
+
{{ title_h2(title) }}
|
|
13895
|
+
{{ use_comp_end() }}
|
|
13896
|
+
{% endif %}
|
|
13897
|
+
<table class="my-daframe-default">
|
|
13898
|
+
<thead class="thead-light">
|
|
13899
|
+
<tr>
|
|
13900
|
+
{% for column in columns %}
|
|
13901
|
+
<th>{{ column }}</th>
|
|
13902
|
+
{% endfor %}
|
|
13903
|
+
</tr>
|
|
13904
|
+
</thead>
|
|
13905
|
+
<tbody>
|
|
13906
|
+
{% for row in data %}
|
|
13907
|
+
<tr class="default-row">
|
|
13908
|
+
{% if ctx.data %}
|
|
13909
|
+
{% for column in columns %}
|
|
13910
|
+
{{ td_default(row[column]) }}
|
|
13911
|
+
{% endfor %}
|
|
13912
|
+
{% else %}
|
|
13913
|
+
{% for value in row %}
|
|
13914
|
+
{{ td_default(value) }}
|
|
13915
|
+
{% endfor %}
|
|
13916
|
+
{% endif %}
|
|
13917
|
+
</tr>
|
|
13918
|
+
{% endfor %}
|
|
13919
|
+
</tbody>
|
|
13920
|
+
</table>
|
|
13921
|
+
{% endmacro %}
|
|
13922
|
+
{% macro use_table(ctx) %}
|
|
13923
|
+
{% if ctx.title %}
|
|
13924
|
+
{{ table_default(ctx) }}
|
|
13925
|
+
{% else %}
|
|
13926
|
+
{{ table_default(ctx) }}
|
|
13927
|
+
{% endif %}
|
|
13928
|
+
{% endmacro %}
|
|
13929
|
+
<!-- /Table.njk -->
|
|
13930
|
+
<!-- Tab.njk -->
|
|
13931
|
+
{% macro useTab(tabs) %}
|
|
13932
|
+
<style>
|
|
13933
|
+
/* 显示选中的 Tab 内容 */
|
|
13934
|
+
{% for tab in tabs %}
|
|
13935
|
+
#{{tab.id}}:checked~#{{tab.content_id}} {
|
|
13936
|
+
display: block;
|
|
13937
|
+
}
|
|
13938
|
+
{% endfor %}
|
|
13939
|
+
</style>
|
|
13940
|
+
<div class="tab-container">
|
|
13941
|
+
{% for tab in tabs %}
|
|
13942
|
+
<!-- Radio 按钮(隐藏) -->
|
|
13943
|
+
<input {% if loop.first %} checked {% endif %} type="radio" name="tabs" id="{{ tab.id }}" class="tab-radio">
|
|
13944
|
+
{% endfor %}
|
|
13945
|
+
<!-- Tab 按钮(用 label 包裹) -->
|
|
13946
|
+
<div class="tab-labels">
|
|
13947
|
+
{% for tab in tabs %}
|
|
13948
|
+
<label for="{{ tab.id }}" class="tab-label">{{ tab.title }}
|
|
13949
|
+
</label>
|
|
13950
|
+
{% endfor %}
|
|
13951
|
+
</div>
|
|
13952
|
+
<!-- Tab 内容 -->
|
|
13953
|
+
{% for tab in tabs %}
|
|
13954
|
+
<div id="{{ tab.content_id }}" class="tab-content">
|
|
13955
|
+
{{ tab.content }}
|
|
13956
|
+
</div>
|
|
13957
|
+
{% endfor %}
|
|
13958
|
+
</div>
|
|
13959
|
+
{% endmacro %}
|
|
13960
|
+
<!-- /Tab.njk -->
|
|
13961
|
+
<!-- ContentTitle.njk -->
|
|
13962
|
+
{% macro h3_handler(ctx) %}
|
|
13963
|
+
<div class="title-tag-titile-container">
|
|
13964
|
+
{% if ctx.h3 %}
|
|
13965
|
+
<h3 style="margin: 0;" class="content-title">{{ ctx.title }}</h3>
|
|
13966
|
+
{% else %}
|
|
13967
|
+
<h2 style="margin: 0;" class="content-title">{{ ctx.title }}</h3>
|
|
13968
|
+
{% endif %}
|
|
13969
|
+
<span class="title-tag-small">注释</span>
|
|
13970
|
+
</div>
|
|
13971
|
+
{% endmacro %}
|
|
13972
|
+
{% macro content_title_click(ctx) %}
|
|
13973
|
+
<div class="collapsible-container">
|
|
13974
|
+
<input type="checkbox" id="{{ ctx.title }}" class="collapsible-input" hidden>
|
|
13975
|
+
<label for="{{ ctx.title }}" class="collapsible-label">
|
|
13976
|
+
{{ h3_handler(ctx) }}
|
|
13977
|
+
</label>
|
|
13978
|
+
<div class="collapsible-content">
|
|
13979
|
+
{{ use_block(ctx) }}
|
|
13980
|
+
</div>
|
|
13981
|
+
</div>
|
|
13982
|
+
{% endmacro %}
|
|
13983
|
+
{% macro content_title_hover(ctx) %}
|
|
13984
|
+
<div class="collapsible-container">
|
|
13985
|
+
<div class="collapsible-label">
|
|
13986
|
+
{{ h3_handler(ctx) }}
|
|
13987
|
+
</div>
|
|
13988
|
+
<div class="collapsible-hover-content">
|
|
13989
|
+
{{ use_block(ctx) }}
|
|
13990
|
+
</div>
|
|
13991
|
+
</div>
|
|
13992
|
+
{% endmacro %}
|
|
13993
|
+
{% macro content_title_remain(ctx) %}
|
|
13994
|
+
<div class="collapsible-container">
|
|
13995
|
+
{{ h3_handler(ctx) }}
|
|
13996
|
+
<div>
|
|
13997
|
+
{{ use_block(ctx) }}
|
|
13998
|
+
</div>
|
|
13999
|
+
</div>
|
|
14000
|
+
{% endmacro %}
|
|
14001
|
+
{% macro pick_content_title(ctx) %}
|
|
14002
|
+
{% if ctx.hover %}
|
|
14003
|
+
{{ content_title_hover(ctx) }}
|
|
14004
|
+
{% elif ctx.remain %}
|
|
14005
|
+
{{ content_title_remain(ctx) }}
|
|
14006
|
+
{% else %}
|
|
14007
|
+
{{ content_title_click(ctx) }}
|
|
14008
|
+
{% endif %}
|
|
14009
|
+
{% endmacro %}
|
|
14010
|
+
{% macro use_content_title(ctx) %}
|
|
14011
|
+
{% if ctx.type == "h3" or ctx.type == "hover_h3" or ctx.type == "remain_h3" %}
|
|
14012
|
+
{% set h3 = true %}
|
|
14013
|
+
{% endif %}
|
|
14014
|
+
{% if ctx.type == "hover_h3" or ctx.type == "hover" %}
|
|
14015
|
+
{% set hover = true %}
|
|
14016
|
+
{% endif %}
|
|
14017
|
+
{% if ctx.type == "remain_h3" or ctx.type == "remain" %}
|
|
14018
|
+
{% set remain = true %}
|
|
14019
|
+
{% endif %}
|
|
14020
|
+
{% set param = {title:ctx.title, text:ctx.text, h3:h3, hover:hover, remain:remain} %}
|
|
14021
|
+
{{ pick_content_title(param) }}
|
|
14022
|
+
{% endmacro %}
|
|
14023
|
+
<!-- /ContentTitle.njk -->
|
|
14024
|
+
<!-- Component.njk -->
|
|
14025
|
+
{% macro pick_component(ctx) %}
|
|
14026
|
+
{% if ctx.tag == "head" %}
|
|
14027
|
+
{{ use_head(ctx) }}
|
|
14028
|
+
{% elif ctx.tag == "text" %}
|
|
14029
|
+
{{ use_text(ctx) }}
|
|
14030
|
+
{% elif ctx.tag == "title" %}
|
|
14031
|
+
{{ use_title(ctx) }}
|
|
14032
|
+
{% elif ctx.tag == "table" %}
|
|
14033
|
+
{{ use_table(ctx) }}
|
|
14034
|
+
{% elif ctx.tag == "toc" %}
|
|
14035
|
+
{{ use_toc(ctx) }}
|
|
14036
|
+
{% elif ctx.tag == "notice" %}
|
|
14037
|
+
{{ use_notice(ctx) }}
|
|
14038
|
+
{% elif ctx.tag == "block" %}
|
|
14039
|
+
{{ use_block(ctx) }}
|
|
14040
|
+
{% elif ctx.tag == "date" %}
|
|
14041
|
+
{{ use_date(ctx) }}
|
|
14042
|
+
{% elif ctx.tag == "checker" %}
|
|
14043
|
+
{{ use_checker(ctx) }}
|
|
14044
|
+
{% elif ctx.tag == "divider" %}
|
|
14045
|
+
{{ use_divider(ctx) }}
|
|
14046
|
+
{% elif ctx.tag == "tag" %}
|
|
14047
|
+
{{ use_tag(ctx) }}
|
|
14048
|
+
{% elif ctx.tag == "title_content" %}
|
|
14049
|
+
{{ use_content_title(ctx) }}
|
|
14050
|
+
{% else %}
|
|
14051
|
+
{{ title_default(ctx) }}
|
|
14052
|
+
{% endif %}
|
|
14053
|
+
{% endmacro %}
|
|
14054
|
+
{% macro use_component(ctx) %}
|
|
14055
|
+
{% if ctx.tag %}
|
|
14056
|
+
{{ use_comp_start() }}
|
|
14057
|
+
{{ pick_component(ctx) }}
|
|
14058
|
+
{{ use_comp_end() }}
|
|
14059
|
+
{% else %}
|
|
14060
|
+
{% for i in ctx %}
|
|
14061
|
+
{% if i.tag != 'table' %}
|
|
14062
|
+
{{ use_comp_start() }}
|
|
14063
|
+
{{ pick_component(i) }}
|
|
14064
|
+
{{ use_comp_end() }}
|
|
14065
|
+
{% else %}
|
|
14066
|
+
{{ pick_component(i) }}
|
|
14067
|
+
{% endif %}
|
|
14068
|
+
{% endfor %}
|
|
14069
|
+
{% endif %}
|
|
14070
|
+
{% endmacro %}
|
|
14071
|
+
{{ use_component(ctx) }}</tr>
|
|
14072
|
+
<!-- /Component.njk -->
|
|
14073
|
+
<!-- Text.njk -->
|
|
14074
|
+
{% macro text_default(ctx) %}
|
|
14075
|
+
{{ ctx.text | replace("false", "❌") | replace("true", "✔️") }}
|
|
14076
|
+
{% endmacro %}
|
|
14077
|
+
{% macro bool_text(ctx) %}
|
|
14078
|
+
{{ ctx.text | replace("false", "❌") | replace("true", "✔️") }}
|
|
14079
|
+
{% endmacro %}
|
|
14080
|
+
{% macro use_text(ctx) %}
|
|
14081
|
+
{% if ctx.type == "h1" %}
|
|
14082
|
+
{{ title_h1(ctx) }}
|
|
14083
|
+
{% else %}
|
|
14084
|
+
{{ text_default(ctx) }}
|
|
14085
|
+
{% endif %}
|
|
14086
|
+
{% endmacro %}
|
|
14087
|
+
<!-- /Text.njk -->
|
|
14088
14088
|
`;
|
|
14089
14089
|
|
|
14090
14090
|
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))}`));
|