调整了目录结构
This commit is contained in:
1 parent
f1ba28550a
commit
6ec5e1404f
17 files changed
+60
-46
No files matched your search
@@ -1,2 +0,0 @@
|
||||
//提供四个对象,可以来写dom逻辑
|
||||
//html,document,cfg,pages
|
||||
@@ -1,39 +0,0 @@
|
||||
<div
|
||||
style="min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: xx-large; position: relative; page-break-after: always"
|
||||
>
|
||||
<div
|
||||
style="flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%"
|
||||
>
|
||||
<img
|
||||
src="http://127.0.0.1:8963/pictures/rsf.png"
|
||||
style="scale: 0.875; position: relative; margin-top: 1%; z-index: -10"
|
||||
alt="Image"
|
||||
>
|
||||
<div
|
||||
style="position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1mm"
|
||||
>
|
||||
<p
|
||||
class="hong-lei-regular"
|
||||
style="scale: 4.5; z-index: 999"
|
||||
>
|
||||
工农解放报
|
||||
</p>
|
||||
|
||||
<p
|
||||
class="hong-lei-regular"
|
||||
style="margin-top: 1%; scale: 2; z-index: 999"
|
||||
>
|
||||
RSF续刊第一期
|
||||
</p>
|
||||
<p
|
||||
class="zcool-qingke-huangyou-regular"
|
||||
style="position: relative; margin-top: 1%; font-size: larger"
|
||||
>
|
||||
工农解放社-原革命社会主义阵地(RSF)- 2026.5.16发布
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@@ -1,24 +0,0 @@
|
||||
<div
|
||||
style="min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: space-between; font-size: xx-large; position: relative"
|
||||
>
|
||||
<div
|
||||
style="flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%"
|
||||
>
|
||||
<p
|
||||
class="zcool-qingke-huangyou-regular c-title"
|
||||
style="scale: 4; z-index: 999;color:red"
|
||||
>
|
||||
工农解放报
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p
|
||||
class="zcool-qingke-huangyou-regular"
|
||||
style="margin-bottom: 5%; font-size: medium"
|
||||
>
|
||||
工农解放报编辑部
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: "Liu Jian Mao Cao";
|
||||
src: url("http://127.0.0.1:8963/fonts/LiuJianMaoCao-Regular.ttf")
|
||||
format("truetype");
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "YangRenDongZhuShiTi";
|
||||
src: url("http://127.0.0.1:8963/fonts/YangRenDongZhuShiTi-Regular.ttf")
|
||||
format("truetype");
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "ZCOOL QingKe HuangYou";
|
||||
src: url("http://127.0.0.1:8963/fonts/ZCOOLQingKeHuangYou-Regular.ttf")
|
||||
format("truetype");
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "ZCOOLKuaiLe";
|
||||
src: url("http://127.0.0.1:8963/fonts/ZCOOLKuaiLe-Regular.ttf")
|
||||
format("truetype");
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "MaShanZheng";
|
||||
src: url("http://127.0.0.1:8963/fonts/MaShanZheng-Regular.ttf")
|
||||
format("truetype");
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "HongLei";
|
||||
src: url("http://127.0.0.1:8963/fonts/HongLei.otf") format("opentype");
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Kai";
|
||||
src: url("http://127.0.0.1:8963/fonts/Kai.ttf") format("truetype");
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "FangZhengFangSong";
|
||||
src: url("http://127.0.0.1:8963/fonts/方正仿宋简体.ttf") format("woff2");
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
.zcool-qingke-huangyou-regular {
|
||||
font-family: "ZCOOL QingKe HuangYou", sans-serif;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.liu-jian-mao-cao-regular {
|
||||
font-family: "Liu Jian Mao Cao", cursive;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.zcool-kuai-le-regular {
|
||||
font-family: "ZCOOLKuaiLe", cursive;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.ma-shan-zheng-regular {
|
||||
font-family: "MaShanZheng", cursive;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.hong-lei-regular {
|
||||
font-family: "HongLei", regular;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.yang-ren-dong-zhu-shi-ti-regular {
|
||||
font-family: "YangRenDongZhuShiTi", regular;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.kai-regular {
|
||||
font-family: "Kai", regular;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
.wang-song-jian-regular {
|
||||
font-family: "FangZhengFangSong", regular;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
</style>
|
||||
@@ -1,183 +0,0 @@
|
||||
<style>
|
||||
h1,
|
||||
h2,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
.c_title,
|
||||
index h1,
|
||||
.global img,
|
||||
blockquote {
|
||||
break-inside: avoid;
|
||||
break-after: avoid;
|
||||
orphans: 2;
|
||||
widows: 2;
|
||||
}
|
||||
|
||||
/* 优化段落分页 */
|
||||
.global p {
|
||||
orphans: 2;
|
||||
widows: 2;
|
||||
}
|
||||
|
||||
/*基础格式部分*/
|
||||
|
||||
.global {
|
||||
font-family: "FangZhengFangSong", sans-serif;
|
||||
font-size: var(--font-size);
|
||||
margin: 2rem 2rem 2rem 2rem;
|
||||
line-height: 1.5rem;
|
||||
/* letter-spacing: -0.15rem; */
|
||||
}
|
||||
|
||||
.global h1 {
|
||||
line-height: 4rem;
|
||||
font-family: "HongLei", sans-serif;
|
||||
}
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
--font-size: 1.25rem;
|
||||
}
|
||||
/*控件美化部分*/
|
||||
|
||||
.c_title {
|
||||
font-size: 3.5rem;
|
||||
color: white;
|
||||
background-color: red;
|
||||
border: 0.18rem solid red;
|
||||
display: inline-flex;
|
||||
width: fit-content;
|
||||
line-height: 1.5;
|
||||
padding: 0.08em 0.24em;
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
font-family: "ZCOOL QingKe HuangYou", sans-serif;
|
||||
margin: 1rem 1rem 0rem 2rem;
|
||||
border-radius: 0.5rem;
|
||||
overflow-wrap: break-word;
|
||||
max-width: 21cm;
|
||||
}
|
||||
.index-column page_title {
|
||||
font-size: calc(var(--font-size) + 0.5rem);
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
}
|
||||
blockquote {
|
||||
background-color: #f0f0f0;
|
||||
border-left: 0.5rem solid #ccc;
|
||||
padding: 0.5rem 1rem;
|
||||
margin: 1rem 0;
|
||||
color: #666;
|
||||
}
|
||||
.global img {
|
||||
height: 100%;
|
||||
object-fit: scale-down;
|
||||
max-width: 100%;
|
||||
max-height: 25cm;
|
||||
border-radius: 12px;
|
||||
border: 4px solid linear-gradient(45deg, #e799b1, #44b144, #2f90ba);
|
||||
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
|
||||
display: block;
|
||||
margin: 1rem auto;
|
||||
/* color: transparent; */
|
||||
/* overflow: hidden; */
|
||||
}
|
||||
|
||||
.global a[href] {
|
||||
color: rgb(0, 180, 120);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/*目录美化部分*/
|
||||
index h1 {
|
||||
font-size: 3.5rem;
|
||||
color: white;
|
||||
background-color: red;
|
||||
border: 0.18rem solid red;
|
||||
display: inline-flex;
|
||||
width: fit-content;
|
||||
line-height: 1.5;
|
||||
padding: 0.08em 0.24em;
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
font-family: "ZCOOL QingKe HuangYou", sans-serif;
|
||||
margin: 2rem 1rem 0rem 2rem;
|
||||
border-radius: 0.5rem;
|
||||
overflow-wrap: break-word;
|
||||
max-width: 21cm;
|
||||
font-family: "FangZhengFangSong", sans-serif;
|
||||
}
|
||||
|
||||
index a {
|
||||
text-decoration: none;
|
||||
font-family: "FangZhengFangSong", sans-serif;
|
||||
|
||||
font-size: var(--font-size);
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
index ul {
|
||||
margin: 1rem 2rem 3rem 2rem;
|
||||
/* padding: 0.5rem 1rem; */
|
||||
}
|
||||
index li {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
word-break: break-all;
|
||||
word-wrap: normal;
|
||||
line-height: 1;
|
||||
margin-top: 0.5rem;
|
||||
break-inside: avoid;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
index li page_title {
|
||||
color: black;
|
||||
font-size: var(--font-size);
|
||||
font-weight: thin;
|
||||
position: static;
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
white-space: normal;
|
||||
word-break: break-word;
|
||||
overflow-wrap: anywhere;
|
||||
line-height: 1.5;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
index li page_column {
|
||||
color: #b30000;
|
||||
font-size: calc(var(--font-size) - 0.15rem);
|
||||
font-weight: bold;
|
||||
position: static;
|
||||
flex: 0 0 auto;
|
||||
min-width: 8ch;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
index li page_num {
|
||||
color: black;
|
||||
font-size: var(--font-size);
|
||||
position: static;
|
||||
flex: 0 0 auto;
|
||||
min-width: 4ch;
|
||||
margin-left: 1rem;
|
||||
white-space: nowrap;
|
||||
text-align: right;
|
||||
font-variant-numeric: tabular-nums;
|
||||
font-feature-settings: "tnum" 1;
|
||||
}
|
||||
index li a {
|
||||
break-inside: avoid;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
</style>
|
||||
@@ -5,7 +5,7 @@
|
||||
"from_directory": "../../publications/25.5.0",
|
||||
"build_js_script": false,
|
||||
"build_mode": "detached",
|
||||
"template_directory": "./mobile_template",
|
||||
"template_directory": "../../templates/mobile_template",
|
||||
"folder_mode": "flat"
|
||||
},
|
||||
"pdf": {
|
||||
@@ -42,7 +42,7 @@
|
||||
"from_directory": "../../publications/25.5.0",
|
||||
"build_js_script": false,
|
||||
"build_mode": "detached",
|
||||
"template_directory": "./computer_template",
|
||||
"template_directory": "../../templates/computer_template",
|
||||
"folder_mode": "flat"
|
||||
},
|
||||
"pdf": {
|
||||
@@ -79,9 +79,9 @@
|
||||
"journal": {
|
||||
"from_directory": "../../publications/25.5.0",
|
||||
"build_mode": "detached",
|
||||
"template_directory": "./printable_template",
|
||||
"template_directory": "../../templates/printable_template",
|
||||
"folder_mode": "flat",
|
||||
"build_js_script": "./printable_template/build.js"
|
||||
"build_js_script": "../../templates/printable_template/build.js"
|
||||
},
|
||||
"pdf": {
|
||||
"generate_index": true,
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
//提供四个对象,可以来写dom逻辑
|
||||
//html,document,cfg,pages
|
||||
@@ -1,39 +0,0 @@
|
||||
<div
|
||||
style="min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: xx-large; position: relative; page-break-after: always"
|
||||
>
|
||||
<div
|
||||
style="flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%"
|
||||
>
|
||||
<img
|
||||
src="http://127.0.0.1:8963/pictures/rsf.png"
|
||||
style="scale: 0.875; position: relative; margin-top: 1%; z-index: -10"
|
||||
alt="Image"
|
||||
>
|
||||
<div
|
||||
style="position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1mm"
|
||||
>
|
||||
<p
|
||||
class="hong-lei-regular"
|
||||
style="scale: 4.5; z-index: 999"
|
||||
>
|
||||
工农解放报
|
||||
</p>
|
||||
|
||||
<p
|
||||
class="hong-lei-regular"
|
||||
style="margin-top: 1%; scale: 2; z-index: 999"
|
||||
>
|
||||
RSF续刊第一期
|
||||
</p>
|
||||
<p
|
||||
class="zcool-qingke-huangyou-regular"
|
||||
style="position: relative; margin-top: 1%; font-size: larger"
|
||||
>
|
||||
工农解放社-原革命社会主义阵地(RSF)- 2026.5.16发布
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@@ -1,24 +0,0 @@
|
||||
<div
|
||||
style="min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: space-between; font-size: xx-large; position: relative"
|
||||
>
|
||||
<div
|
||||
style="flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%"
|
||||
>
|
||||
<p
|
||||
class="zcool-qingke-huangyou-regular c-title"
|
||||
style="scale: 4; z-index: 999;color:red"
|
||||
>
|
||||
工农解放报
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
<p
|
||||
class="zcool-qingke-huangyou-regular"
|
||||
style="margin-bottom: 5%; font-size: medium"
|
||||
>
|
||||
工农解放报编辑部
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: "Liu Jian Mao Cao";
|
||||
src: url("http://127.0.0.1:8963/fonts/LiuJianMaoCao-Regular.ttf")
|
||||
format("truetype");
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "YangRenDongZhuShiTi";
|
||||
src: url("http://127.0.0.1:8963/fonts/YangRenDongZhuShiTi-Regular.ttf")
|
||||
format("truetype");
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "ZCOOL QingKe HuangYou";
|
||||
src: url("http://127.0.0.1:8963/fonts/ZCOOLQingKeHuangYou-Regular.ttf")
|
||||
format("truetype");
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "ZCOOLKuaiLe";
|
||||
src: url("http://127.0.0.1:8963/fonts/ZCOOLKuaiLe-Regular.ttf")
|
||||
format("truetype");
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "MaShanZheng";
|
||||
src: url("http://127.0.0.1:8963/fonts/MaShanZheng-Regular.ttf")
|
||||
format("truetype");
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "HongLei";
|
||||
src: url("http://127.0.0.1:8963/fonts/HongLei.otf") format("opentype");
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Kai";
|
||||
src: url("http://127.0.0.1:8963/fonts/Kai.ttf") format("truetype");
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "FangZhengFangSong";
|
||||
src: url("http://127.0.0.1:8963/fonts/方正仿宋简体.ttf") format("woff2");
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
.zcool-qingke-huangyou-regular {
|
||||
font-family: "ZCOOL QingKe HuangYou", sans-serif;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.liu-jian-mao-cao-regular {
|
||||
font-family: "Liu Jian Mao Cao", cursive;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.zcool-kuai-le-regular {
|
||||
font-family: "ZCOOLKuaiLe", cursive;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.ma-shan-zheng-regular {
|
||||
font-family: "MaShanZheng", cursive;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.hong-lei-regular {
|
||||
font-family: "HongLei", regular;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.yang-ren-dong-zhu-shi-ti-regular {
|
||||
font-family: "YangRenDongZhuShiTi", regular;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.kai-regular {
|
||||
font-family: "Kai", regular;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
.wang-song-jian-regular {
|
||||
font-family: "FangZhengFangSong", regular;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
</style>
|
||||
@@ -1,181 +0,0 @@
|
||||
<style>
|
||||
/*防止文档流被切断导致上下文割裂*/
|
||||
h1,
|
||||
h2,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
.c_title,
|
||||
index h1,
|
||||
.global img,
|
||||
blockquote {
|
||||
break-inside: avoid;
|
||||
break-after: avoid;
|
||||
orphans: 2;
|
||||
widows: 2;
|
||||
}
|
||||
|
||||
/* 优化段落分页 */
|
||||
.global p {
|
||||
orphans: 2;
|
||||
widows: 2;
|
||||
}
|
||||
/*基础格式部分*/
|
||||
|
||||
.global {
|
||||
font-family: "FangZhengFangSong", sans-serif;
|
||||
font-size: var(--font-size);
|
||||
margin: 2rem 2rem 2rem 2rem;
|
||||
line-height: 2.5rem;
|
||||
|
||||
/* letter-spacing: -0.15rem; */
|
||||
}
|
||||
|
||||
.global h1 {
|
||||
line-height: 4rem;
|
||||
font-family: "HongLei", sans-serif;
|
||||
}
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
--font-size: 2rem;
|
||||
}
|
||||
/*控件美化部分*/
|
||||
.index-column page_title {
|
||||
font-size: calc(var(--font-size) + 0.5rem);
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
}
|
||||
.c_title {
|
||||
font-size: 3.5rem;
|
||||
color: white;
|
||||
background-color: red;
|
||||
border: 0.18rem solid red;
|
||||
display: inline-flex;
|
||||
width: fit-content;
|
||||
line-height: 1.5;
|
||||
padding: 0.08em 0.24em;
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
font-family: "ZCOOL QingKe HuangYou", sans-serif;
|
||||
margin: 1rem 1rem 0rem 2rem;
|
||||
border-radius: 0.5rem;
|
||||
overflow-wrap: break-word;
|
||||
max-width: 21cm;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
background-color: #f0f0f0;
|
||||
border-left: 0.5rem solid #ccc;
|
||||
padding: 0.5rem 1rem;
|
||||
margin: 1rem 0;
|
||||
color: #666;
|
||||
}
|
||||
.global img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
border-radius: 12px;
|
||||
border: 4px solid linear-gradient(45deg, #e799b1, #44b144, #2f90ba);
|
||||
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
|
||||
display: block;
|
||||
margin: 1rem auto;
|
||||
/* color: transparent; */
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.global a[href] {
|
||||
color: rgb(0, 180, 120);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/*目录美化部分*/
|
||||
index h1 {
|
||||
font-size: 3.5rem;
|
||||
color: white;
|
||||
background-color: red;
|
||||
border: 0.18rem solid red;
|
||||
display: inline-flex;
|
||||
width: fit-content;
|
||||
line-height: 1.5;
|
||||
padding: 0.08em 0.24em;
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
font-family: "FangZhengFangSong", sans-serif;
|
||||
margin: 2rem 1rem 0rem 2rem;
|
||||
border-radius: 0.5rem;
|
||||
overflow-wrap: break-word;
|
||||
max-width: 21cm;
|
||||
}
|
||||
|
||||
index a {
|
||||
text-decoration: none;
|
||||
font-size: var(--font-size);
|
||||
display: flex;
|
||||
font-family: "FangZhengFangSong", sans-serif;
|
||||
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
index ul {
|
||||
margin: 1rem 2rem 3rem 2rem;
|
||||
/* padding: 0.5rem 1rem; */
|
||||
}
|
||||
index li {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
word-break: break-all;
|
||||
word-wrap: normal;
|
||||
line-height: 1;
|
||||
margin-top: 0.5rem;
|
||||
break-inside: avoid;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
index li page_title {
|
||||
color: black;
|
||||
font-size: var(--font-size);
|
||||
font-weight: thin;
|
||||
position: static;
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
white-space: normal;
|
||||
word-break: break-word;
|
||||
overflow-wrap: anywhere;
|
||||
line-height: 1.5;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
index li page_column {
|
||||
color: #b30000;
|
||||
font-size: calc(var(--font-size) - 0.4rem);
|
||||
font-weight: bold;
|
||||
position: static;
|
||||
flex: 0 0 auto;
|
||||
min-width: 8ch;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
index li page_num {
|
||||
color: black;
|
||||
font-size: var(--font-size);
|
||||
position: static;
|
||||
flex: 0 0 auto;
|
||||
min-width: 4ch;
|
||||
margin-left: 1rem;
|
||||
white-space: nowrap;
|
||||
text-align: right;
|
||||
font-variant-numeric: tabular-nums;
|
||||
font-feature-settings: "tnum" 1;
|
||||
}
|
||||
index li a {
|
||||
break-inside: avoid;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
</style>
|
||||
@@ -17,6 +17,7 @@ type IndexItemLayout = {
|
||||
top: number;
|
||||
width: number;
|
||||
height: number;
|
||||
fontSize: number;
|
||||
};
|
||||
|
||||
const PDF_PAGE_HEIGHT_PT = 842;
|
||||
@@ -255,6 +256,12 @@ export class IndexBuilder {
|
||||
const titleEl = item.querySelector("page_title") as any;
|
||||
const itemRect = item.getBoundingClientRect();
|
||||
const titleRect = titleEl?.getBoundingClientRect() ?? itemRect;
|
||||
const computedStyle = titleEl
|
||||
? globalThis.getComputedStyle(titleEl)
|
||||
: null;
|
||||
const fontSizePx = computedStyle
|
||||
? Number.parseFloat(computedStyle.fontSize || "0")
|
||||
: 0;
|
||||
const pageIndex = Math.floor(
|
||||
(itemRect.bottom - 1) / printableHeightPx,
|
||||
);
|
||||
@@ -263,8 +270,9 @@ export class IndexBuilder {
|
||||
pageIndex,
|
||||
left: titleRect.left,
|
||||
width: titleRect.width,
|
||||
top: itemRect.top - pageTopPx,
|
||||
height: itemRect.height,
|
||||
top: titleRect.top - pageTopPx,
|
||||
height: titleRect.height,
|
||||
fontSize: fontSizePx,
|
||||
};
|
||||
});
|
||||
},
|
||||
@@ -391,6 +399,7 @@ export class IndexBuilder {
|
||||
left: number;
|
||||
width: number;
|
||||
height: number;
|
||||
fontSize: number;
|
||||
}>,
|
||||
inserted_index_pages: number,
|
||||
insert_index_after_page: number,
|
||||
@@ -425,6 +434,7 @@ export class IndexBuilder {
|
||||
const layoutLeftPt = layout.left * CSS_PX_TO_PT;
|
||||
const layoutWidthPt = layout.width * CSS_PX_TO_PT;
|
||||
const layoutHeightPt = layout.height * CSS_PX_TO_PT;
|
||||
const fontSizePt = layout.fontSize * CSS_PX_TO_PT;
|
||||
const xLeft = Math.max(layoutLeftPt, 0);
|
||||
const xRight = Math.min(layoutLeftPt + layoutWidthPt, pageWidth);
|
||||
const mappedPage = this.remap_page_after_index_insert(
|
||||
@@ -448,7 +458,8 @@ export class IndexBuilder {
|
||||
return;
|
||||
}
|
||||
const localTopPt = layout.top * CSS_PX_TO_PT;
|
||||
const yTop = pageHeight - marginTop - localTopPt;
|
||||
const topOffsetPt = layout.pageIndex > 0 ? fontSizePt * 0.5 : 0;
|
||||
const yTop = pageHeight - marginTop - localTopPt - topOffsetPt;
|
||||
const yBottom = yTop - totalHeight;
|
||||
this.add_link_annotation(
|
||||
targetPage as any,
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
//提供四个对象,可以来写dom逻辑
|
||||
//html,documentument,cfg,pages
|
||||
|
||||
/**
|
||||
* 从提供的 `documentument` 中移除所有 style 中含有 `page-break-after: always` 的声明。
|
||||
* - 处理 inline `style` 属性
|
||||
* - 处理 `<style>` 元素中的 CSS 文本
|
||||
*
|
||||
* 用法:
|
||||
* import { removePageBreakAfterAlways } from './build.js';
|
||||
* removePageBreakAfterAlways(documentument);
|
||||
*/
|
||||
if (!document || typeof document.querySelectorAll !== 'function') return;
|
||||
|
||||
// 1) 处理 inline style 属性
|
||||
const inlineEls = Array.from(document.querySelectorAll('[style]'));
|
||||
inlineEls.forEach(el => {
|
||||
try {
|
||||
// 首先尝试通过 element.style API 移除(标准情况)
|
||||
const val = (el.style && el.style.getPropertyValue('page-break-after')) || '';
|
||||
if (val && val.trim().toLowerCase().startsWith('always')) {
|
||||
el.style.removeProperty('page-break-after');
|
||||
if (!el.getAttribute('style') || el.getAttribute('style').trim() === '') {
|
||||
el.removeAttribute('style');
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// 兜底:直接在 attribute 字符串上替换(处理非标准或复杂写法)
|
||||
const original = el.getAttribute('style') || '';
|
||||
const replaced = original.replace(/page-break-after\s*:\s*always(?:\s*!important)?\s*;?/ig, '');
|
||||
if (replaced !== original) {
|
||||
// 清理多余分号与空白
|
||||
const cleaned = replaced.replace(/;{2,}/g, ';').replace(/\s*;\s*$/,'').trim();
|
||||
if (!cleaned) el.removeAttribute('style');
|
||||
else el.setAttribute('style', cleaned);
|
||||
}
|
||||
} catch (e) {}
|
||||
});
|
||||
|
||||
// 2) 处理 <style> 元素中的文本
|
||||
const styleEls = Array.from(document.querySelectorAll('style'));
|
||||
styleEls.forEach(styleEl => {
|
||||
try {
|
||||
const original = styleEl.textContent || '';
|
||||
const replaced = original.replace(/page-break-after\s*:\s*always(?:\s*!important)?\s*;?/ig, '');
|
||||
// 移除空的规则块,例如 `selector { }`
|
||||
let cleaned = replaced.replace(/[^\{\}]+\{\s*\}/g, '');
|
||||
// 多余空白归一
|
||||
cleaned = cleaned.replace(/\n{2,}/g, '\n').trim();
|
||||
if (cleaned !== original) styleEl.textContent = cleaned;
|
||||
} catch (e) {}
|
||||
});
|
||||
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
<div
|
||||
style="min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: xx-large; position: relative; page-break-after: always"
|
||||
>
|
||||
<div
|
||||
style="flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%"
|
||||
>
|
||||
|
||||
<div
|
||||
style="position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1mm"
|
||||
>
|
||||
<p
|
||||
class=""
|
||||
style="scale: 4.5; z-index: 999"
|
||||
>
|
||||
工农解放报
|
||||
</p>
|
||||
|
||||
<p
|
||||
class="
|
||||
style="margin-top: 1%; scale: 2; z-index: 999"
|
||||
>
|
||||
RSF续刊第一期
|
||||
</p>
|
||||
<p
|
||||
class=""
|
||||
style="position: relative; margin-top: 1%; font-size: larger"
|
||||
>
|
||||
工农解放社-原革命社会主义阵地(RSF)- 2026.5.16发布
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
@@ -1 +0,0 @@
|
||||
<div></div>
|
||||
@@ -1,95 +0,0 @@
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: "Liu Jian Mao Cao";
|
||||
src: url("http://127.0.0.1:8963/fonts/LiuJianMaoCao-Regular.ttf")
|
||||
format("truetype");
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "YangRenDongZhuShiTi";
|
||||
src: url("http://127.0.0.1:8963/fonts/YangRenDongZhuShiTi-Regular.ttf")
|
||||
format("truetype");
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "ZCOOL QingKe HuangYou";
|
||||
src: url("http://127.0.0.1:8963/fonts/ZCOOLQingKeHuangYou-Regular.ttf")
|
||||
format("truetype");
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "ZCOOLKuaiLe";
|
||||
src: url("http://127.0.0.1:8963/fonts/ZCOOLKuaiLe-Regular.ttf")
|
||||
format("truetype");
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "MaShanZheng";
|
||||
src: url("http://127.0.0.1:8963/fonts/MaShanZheng-Regular.ttf")
|
||||
format("truetype");
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "HongLei";
|
||||
src: url("http://127.0.0.1:8963/fonts/HongLei.otf") format("opentype");
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "Kai";
|
||||
src: url("http://127.0.0.1:8963/fonts/Kai.ttf") format("truetype");
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "FangZhengFangSong";
|
||||
src: url("http://127.0.0.1:8963/fonts/方正仿宋简体.ttf") format("woff2");
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
.zcool-qingke-huangyou-regular {
|
||||
font-family: "ZCOOL QingKe HuangYou", sans-serif;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.liu-jian-mao-cao-regular {
|
||||
font-family: "Liu Jian Mao Cao", cursive;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.zcool-kuai-le-regular {
|
||||
font-family: "ZCOOLKuaiLe", cursive;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.ma-shan-zheng-regular {
|
||||
font-family: "MaShanZheng", cursive;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.hong-lei-regular {
|
||||
font-family: "HongLei", regular;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.yang-ren-dong-zhu-shi-ti-regular {
|
||||
font-family: "YangRenDongZhuShiTi", regular;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.kai-regular {
|
||||
font-family: "Kai", regular;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
.wang-song-jian-regular {
|
||||
font-family: "FangZhengFangSong", regular;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
</style>
|
||||
@@ -1,143 +0,0 @@
|
||||
<style>
|
||||
/*基础格式部分*/
|
||||
|
||||
.global {
|
||||
font-family: "R-PMingLiU", sans-serif;
|
||||
font-size: var(--font-size);
|
||||
margin: 1rem 4rem 2rem 4rem;
|
||||
line-height: 20px;
|
||||
/* letter-spacing: -0.15rem; */
|
||||
}
|
||||
|
||||
.global h1 {
|
||||
line-height: 2rem;
|
||||
font-family: "R-PMingLiU", sans-serif;
|
||||
}
|
||||
|
||||
.global p {
|
||||
margin: 15px 0;
|
||||
}
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
--font-size: 16px;
|
||||
}
|
||||
/*控件美化部分*/
|
||||
|
||||
.c_title {
|
||||
font-size: 2rem;
|
||||
color: red;
|
||||
display: inline-flex;
|
||||
width: fit-content;
|
||||
line-height: 1.5;
|
||||
padding: 0.08em 0.24em;
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
font-family: "R-PMingLiU", sans-serif;
|
||||
margin: 2rem 1rem 0rem 2rem;
|
||||
overflow-wrap: break-word;
|
||||
max-width: 21cm;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
border-left: 0.5rem solid #ccc;
|
||||
padding: 0.5rem 1rem;
|
||||
margin: 1rem 0;
|
||||
border-radius: 22px;
|
||||
border-color: #666;
|
||||
}
|
||||
.global img {
|
||||
height: 100%;
|
||||
|
||||
object-fit: scale-down;
|
||||
max-width: 45%;
|
||||
max-height: 10cm;
|
||||
border-radius: 12px;
|
||||
border: 4px solid linear-gradient(45deg, #e799b1, #44b144, #2f90ba);
|
||||
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
|
||||
display: block;
|
||||
margin: 1rem auto;
|
||||
/* color: transparent; */
|
||||
/* overflow: hidden; */
|
||||
}
|
||||
|
||||
.global a[href] {
|
||||
color: rgb(0, 180, 120);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/*目录美化部分*/
|
||||
index h1 {
|
||||
font-size: 1rem;
|
||||
color: black;
|
||||
border: 0.18rem solid red;
|
||||
display: inline-flex;
|
||||
width: fit-content;
|
||||
line-height: 1.5;
|
||||
padding: 0.08em 0.24em;
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
font-family: "R-PMingLiU", sans-serif;
|
||||
margin: 2rem 1rem 0rem 2rem;
|
||||
border-radius: 0.5rem;
|
||||
overflow-wrap: break-word;
|
||||
max-width: 21cm;
|
||||
}
|
||||
|
||||
index a {
|
||||
text-decoration: none;
|
||||
font-size: var(--font-size);
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
index ul {
|
||||
margin: 1rem 2rem 3rem 2rem;
|
||||
/* padding: 0.5rem 1rem; */
|
||||
}
|
||||
index li {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
word-break: break-all;
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
break-inside: avoid;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
index li page_title {
|
||||
color: black;
|
||||
font-size: var(--font-size);
|
||||
font-weight: thin;
|
||||
position: static;
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
white-space: normal;
|
||||
word-break: break-word;
|
||||
overflow-wrap: anywhere;
|
||||
line-height: 1.5;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
index li page_num {
|
||||
color: black;
|
||||
font-size: var(--font-size);
|
||||
position: static;
|
||||
flex: 0 0 auto;
|
||||
min-width: 4ch;
|
||||
margin-left: 1rem;
|
||||
white-space: nowrap;
|
||||
text-align: right;
|
||||
font-variant-numeric: tabular-nums;
|
||||
font-feature-settings: "tnum" 1;
|
||||
}
|
||||
index li a {
|
||||
break-inside: avoid;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user