调整了目录结构
This commit is contained in:
1 parent
f1ba28550a
commit
6ec5e1404f
17 files changed
+60
-46
No files matched your search
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,52 +1,53 @@
|
||||
<style>
|
||||
@font-face {
|
||||
/* @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-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-face {
|
||||
font-family: "ZCOOLKuaiLe";
|
||||
src: url("http://127.0.0.1:8963/fonts/ZCOOLKuaiLe-Regular.ttf")
|
||||
format("truetype");
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
} */
|
||||
/* @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-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");
|
||||
src: url("http://127.0.0.1:8963/fonts/方正仿宋简体.ttf")
|
||||
format("woff2");
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
.zcool-qingke-huangyou-regular {
|
||||
/* .zcool-qingke-huangyou-regular {
|
||||
font-family: "ZCOOL QingKe HuangYou", sans-serif;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
@@ -91,5 +92,5 @@
|
||||
font-family: "FangZhengFangSong", regular;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
} */
|
||||
</style>
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,52 +1,53 @@
|
||||
<style>
|
||||
@font-face {
|
||||
/* @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-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-face {
|
||||
font-family: "ZCOOLKuaiLe";
|
||||
src: url("http://127.0.0.1:8963/fonts/ZCOOLKuaiLe-Regular.ttf")
|
||||
format("truetype");
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
} */
|
||||
/* @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-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");
|
||||
src: url("http://127.0.0.1:8963/fonts/方正仿宋简体.ttf")
|
||||
format("woff2");
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
.zcool-qingke-huangyou-regular {
|
||||
/* .zcool-qingke-huangyou-regular {
|
||||
font-family: "ZCOOL QingKe HuangYou", sans-serif;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
@@ -91,5 +92,5 @@
|
||||
font-family: "FangZhengFangSong", regular;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
} */
|
||||
</style>
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,52 +1,53 @@
|
||||
<style>
|
||||
@font-face {
|
||||
/* @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-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-face {
|
||||
font-family: "ZCOOLKuaiLe";
|
||||
src: url("http://127.0.0.1:8963/fonts/ZCOOLKuaiLe-Regular.ttf")
|
||||
format("truetype");
|
||||
font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
} */
|
||||
/* @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-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");
|
||||
src: url("http://127.0.0.1:8963/fonts/方正仿宋简体.ttf")
|
||||
format("woff2");
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
.zcool-qingke-huangyou-regular {
|
||||
/* .zcool-qingke-huangyou-regular {
|
||||
font-family: "ZCOOL QingKe HuangYou", sans-serif;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
@@ -91,5 +92,5 @@
|
||||
font-family: "FangZhengFangSong", regular;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
}
|
||||
} */
|
||||
</style>
|
||||
File renamed without changes.
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user