调整了目录结构
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>
|
<style>
|
||||||
@font-face {
|
/* @font-face {
|
||||||
font-family: "Liu Jian Mao Cao";
|
font-family: "Liu Jian Mao Cao";
|
||||||
src: url("http://127.0.0.1:8963/fonts/LiuJianMaoCao-Regular.ttf")
|
src: url("http://127.0.0.1:8963/fonts/LiuJianMaoCao-Regular.ttf")
|
||||||
format("truetype");
|
format("truetype");
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
} */
|
||||||
@font-face {
|
/* @font-face {
|
||||||
font-family: "YangRenDongZhuShiTi";
|
font-family: "YangRenDongZhuShiTi";
|
||||||
src: url("http://127.0.0.1:8963/fonts/YangRenDongZhuShiTi-Regular.ttf")
|
src: url("http://127.0.0.1:8963/fonts/YangRenDongZhuShiTi-Regular.ttf")
|
||||||
format("truetype");
|
format("truetype");
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
} */
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "ZCOOL QingKe HuangYou";
|
font-family: "ZCOOL QingKe HuangYou";
|
||||||
src: url("http://127.0.0.1:8963/fonts/ZCOOLQingKeHuangYou-Regular.ttf")
|
src: url("http://127.0.0.1:8963/fonts/ZCOOLQingKeHuangYou-Regular.ttf")
|
||||||
format("truetype");
|
format("truetype");
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
}
|
||||||
@font-face {
|
/* @font-face {
|
||||||
font-family: "ZCOOLKuaiLe";
|
font-family: "ZCOOLKuaiLe";
|
||||||
src: url("http://127.0.0.1:8963/fonts/ZCOOLKuaiLe-Regular.ttf")
|
src: url("http://127.0.0.1:8963/fonts/ZCOOLKuaiLe-Regular.ttf")
|
||||||
format("truetype");
|
format("truetype");
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
} */
|
||||||
@font-face {
|
/* @font-face {
|
||||||
font-family: "MaShanZheng";
|
font-family: "MaShanZheng";
|
||||||
src: url("http://127.0.0.1:8963/fonts/MaShanZheng-Regular.ttf")
|
src: url("http://127.0.0.1:8963/fonts/MaShanZheng-Regular.ttf")
|
||||||
format("truetype");
|
format("truetype");
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
} */
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "HongLei";
|
font-family: "HongLei";
|
||||||
src: url("http://127.0.0.1:8963/fonts/HongLei.otf") format("opentype");
|
src: url("http://127.0.0.1:8963/fonts/HongLei.otf") format("opentype");
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
/* @font-face {
|
||||||
font-family: "Kai";
|
font-family: "Kai";
|
||||||
src: url("http://127.0.0.1:8963/fonts/Kai.ttf") format("truetype");
|
src: url("http://127.0.0.1:8963/fonts/Kai.ttf") format("truetype");
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
} */
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "FangZhengFangSong";
|
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;
|
font-display: swap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.zcool-qingke-huangyou-regular {
|
/* .zcool-qingke-huangyou-regular {
|
||||||
font-family: "ZCOOL QingKe HuangYou", sans-serif;
|
font-family: "ZCOOL QingKe HuangYou", sans-serif;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
@@ -91,5 +92,5 @@
|
|||||||
font-family: "FangZhengFangSong", regular;
|
font-family: "FangZhengFangSong", regular;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
} */
|
||||||
</style>
|
</style>
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,52 +1,53 @@
|
|||||||
<style>
|
<style>
|
||||||
@font-face {
|
/* @font-face {
|
||||||
font-family: "Liu Jian Mao Cao";
|
font-family: "Liu Jian Mao Cao";
|
||||||
src: url("http://127.0.0.1:8963/fonts/LiuJianMaoCao-Regular.ttf")
|
src: url("http://127.0.0.1:8963/fonts/LiuJianMaoCao-Regular.ttf")
|
||||||
format("truetype");
|
format("truetype");
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
} */
|
||||||
@font-face {
|
/* @font-face {
|
||||||
font-family: "YangRenDongZhuShiTi";
|
font-family: "YangRenDongZhuShiTi";
|
||||||
src: url("http://127.0.0.1:8963/fonts/YangRenDongZhuShiTi-Regular.ttf")
|
src: url("http://127.0.0.1:8963/fonts/YangRenDongZhuShiTi-Regular.ttf")
|
||||||
format("truetype");
|
format("truetype");
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
} */
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "ZCOOL QingKe HuangYou";
|
font-family: "ZCOOL QingKe HuangYou";
|
||||||
src: url("http://127.0.0.1:8963/fonts/ZCOOLQingKeHuangYou-Regular.ttf")
|
src: url("http://127.0.0.1:8963/fonts/ZCOOLQingKeHuangYou-Regular.ttf")
|
||||||
format("truetype");
|
format("truetype");
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
}
|
||||||
@font-face {
|
/* @font-face {
|
||||||
font-family: "ZCOOLKuaiLe";
|
font-family: "ZCOOLKuaiLe";
|
||||||
src: url("http://127.0.0.1:8963/fonts/ZCOOLKuaiLe-Regular.ttf")
|
src: url("http://127.0.0.1:8963/fonts/ZCOOLKuaiLe-Regular.ttf")
|
||||||
format("truetype");
|
format("truetype");
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
} */
|
||||||
@font-face {
|
/* @font-face {
|
||||||
font-family: "MaShanZheng";
|
font-family: "MaShanZheng";
|
||||||
src: url("http://127.0.0.1:8963/fonts/MaShanZheng-Regular.ttf")
|
src: url("http://127.0.0.1:8963/fonts/MaShanZheng-Regular.ttf")
|
||||||
format("truetype");
|
format("truetype");
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
} */
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "HongLei";
|
font-family: "HongLei";
|
||||||
src: url("http://127.0.0.1:8963/fonts/HongLei.otf") format("opentype");
|
src: url("http://127.0.0.1:8963/fonts/HongLei.otf") format("opentype");
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
/* @font-face {
|
||||||
font-family: "Kai";
|
font-family: "Kai";
|
||||||
src: url("http://127.0.0.1:8963/fonts/Kai.ttf") format("truetype");
|
src: url("http://127.0.0.1:8963/fonts/Kai.ttf") format("truetype");
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
} */
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "FangZhengFangSong";
|
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;
|
font-display: swap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.zcool-qingke-huangyou-regular {
|
/* .zcool-qingke-huangyou-regular {
|
||||||
font-family: "ZCOOL QingKe HuangYou", sans-serif;
|
font-family: "ZCOOL QingKe HuangYou", sans-serif;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
@@ -91,5 +92,5 @@
|
|||||||
font-family: "FangZhengFangSong", regular;
|
font-family: "FangZhengFangSong", regular;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
} */
|
||||||
</style>
|
</style>
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,52 +1,53 @@
|
|||||||
<style>
|
<style>
|
||||||
@font-face {
|
/* @font-face {
|
||||||
font-family: "Liu Jian Mao Cao";
|
font-family: "Liu Jian Mao Cao";
|
||||||
src: url("http://127.0.0.1:8963/fonts/LiuJianMaoCao-Regular.ttf")
|
src: url("http://127.0.0.1:8963/fonts/LiuJianMaoCao-Regular.ttf")
|
||||||
format("truetype");
|
format("truetype");
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
} */
|
||||||
@font-face {
|
/* @font-face {
|
||||||
font-family: "YangRenDongZhuShiTi";
|
font-family: "YangRenDongZhuShiTi";
|
||||||
src: url("http://127.0.0.1:8963/fonts/YangRenDongZhuShiTi-Regular.ttf")
|
src: url("http://127.0.0.1:8963/fonts/YangRenDongZhuShiTi-Regular.ttf")
|
||||||
format("truetype");
|
format("truetype");
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
} */
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "ZCOOL QingKe HuangYou";
|
font-family: "ZCOOL QingKe HuangYou";
|
||||||
src: url("http://127.0.0.1:8963/fonts/ZCOOLQingKeHuangYou-Regular.ttf")
|
src: url("http://127.0.0.1:8963/fonts/ZCOOLQingKeHuangYou-Regular.ttf")
|
||||||
format("truetype");
|
format("truetype");
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
}
|
||||||
@font-face {
|
/* @font-face {
|
||||||
font-family: "ZCOOLKuaiLe";
|
font-family: "ZCOOLKuaiLe";
|
||||||
src: url("http://127.0.0.1:8963/fonts/ZCOOLKuaiLe-Regular.ttf")
|
src: url("http://127.0.0.1:8963/fonts/ZCOOLKuaiLe-Regular.ttf")
|
||||||
format("truetype");
|
format("truetype");
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
} */
|
||||||
@font-face {
|
/* @font-face {
|
||||||
font-family: "MaShanZheng";
|
font-family: "MaShanZheng";
|
||||||
src: url("http://127.0.0.1:8963/fonts/MaShanZheng-Regular.ttf")
|
src: url("http://127.0.0.1:8963/fonts/MaShanZheng-Regular.ttf")
|
||||||
format("truetype");
|
format("truetype");
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
} */
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "HongLei";
|
font-family: "HongLei";
|
||||||
src: url("http://127.0.0.1:8963/fonts/HongLei.otf") format("opentype");
|
src: url("http://127.0.0.1:8963/fonts/HongLei.otf") format("opentype");
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
/* @font-face {
|
||||||
font-family: "Kai";
|
font-family: "Kai";
|
||||||
src: url("http://127.0.0.1:8963/fonts/Kai.ttf") format("truetype");
|
src: url("http://127.0.0.1:8963/fonts/Kai.ttf") format("truetype");
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
}
|
} */
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "FangZhengFangSong";
|
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;
|
font-display: swap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.zcool-qingke-huangyou-regular {
|
/* .zcool-qingke-huangyou-regular {
|
||||||
font-family: "ZCOOL QingKe HuangYou", sans-serif;
|
font-family: "ZCOOL QingKe HuangYou", sans-serif;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
@@ -91,5 +92,5 @@
|
|||||||
font-family: "FangZhengFangSong", regular;
|
font-family: "FangZhengFangSong", regular;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
} */
|
||||||
</style>
|
</style>
|
||||||
File renamed without changes.
@@ -5,7 +5,7 @@
|
|||||||
"from_directory": "../../publications/25.5.0",
|
"from_directory": "../../publications/25.5.0",
|
||||||
"build_js_script": false,
|
"build_js_script": false,
|
||||||
"build_mode": "detached",
|
"build_mode": "detached",
|
||||||
"template_directory": "./mobile_template",
|
"template_directory": "../../templates/mobile_template",
|
||||||
"folder_mode": "flat"
|
"folder_mode": "flat"
|
||||||
},
|
},
|
||||||
"pdf": {
|
"pdf": {
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
"from_directory": "../../publications/25.5.0",
|
"from_directory": "../../publications/25.5.0",
|
||||||
"build_js_script": false,
|
"build_js_script": false,
|
||||||
"build_mode": "detached",
|
"build_mode": "detached",
|
||||||
"template_directory": "./computer_template",
|
"template_directory": "../../templates/computer_template",
|
||||||
"folder_mode": "flat"
|
"folder_mode": "flat"
|
||||||
},
|
},
|
||||||
"pdf": {
|
"pdf": {
|
||||||
@@ -79,9 +79,9 @@
|
|||||||
"journal": {
|
"journal": {
|
||||||
"from_directory": "../../publications/25.5.0",
|
"from_directory": "../../publications/25.5.0",
|
||||||
"build_mode": "detached",
|
"build_mode": "detached",
|
||||||
"template_directory": "./printable_template",
|
"template_directory": "../../templates/printable_template",
|
||||||
"folder_mode": "flat",
|
"folder_mode": "flat",
|
||||||
"build_js_script": "./printable_template/build.js"
|
"build_js_script": "../../templates/printable_template/build.js"
|
||||||
},
|
},
|
||||||
"pdf": {
|
"pdf": {
|
||||||
"generate_index": true,
|
"generate_index": true,
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ type IndexItemLayout = {
|
|||||||
top: number;
|
top: number;
|
||||||
width: number;
|
width: number;
|
||||||
height: number;
|
height: number;
|
||||||
|
fontSize: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
const PDF_PAGE_HEIGHT_PT = 842;
|
const PDF_PAGE_HEIGHT_PT = 842;
|
||||||
@@ -255,6 +256,12 @@ export class IndexBuilder {
|
|||||||
const titleEl = item.querySelector("page_title") as any;
|
const titleEl = item.querySelector("page_title") as any;
|
||||||
const itemRect = item.getBoundingClientRect();
|
const itemRect = item.getBoundingClientRect();
|
||||||
const titleRect = titleEl?.getBoundingClientRect() ?? itemRect;
|
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(
|
const pageIndex = Math.floor(
|
||||||
(itemRect.bottom - 1) / printableHeightPx,
|
(itemRect.bottom - 1) / printableHeightPx,
|
||||||
);
|
);
|
||||||
@@ -263,8 +270,9 @@ export class IndexBuilder {
|
|||||||
pageIndex,
|
pageIndex,
|
||||||
left: titleRect.left,
|
left: titleRect.left,
|
||||||
width: titleRect.width,
|
width: titleRect.width,
|
||||||
top: itemRect.top - pageTopPx,
|
top: titleRect.top - pageTopPx,
|
||||||
height: itemRect.height,
|
height: titleRect.height,
|
||||||
|
fontSize: fontSizePx,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -391,6 +399,7 @@ export class IndexBuilder {
|
|||||||
left: number;
|
left: number;
|
||||||
width: number;
|
width: number;
|
||||||
height: number;
|
height: number;
|
||||||
|
fontSize: number;
|
||||||
}>,
|
}>,
|
||||||
inserted_index_pages: number,
|
inserted_index_pages: number,
|
||||||
insert_index_after_page: number,
|
insert_index_after_page: number,
|
||||||
@@ -425,6 +434,7 @@ export class IndexBuilder {
|
|||||||
const layoutLeftPt = layout.left * CSS_PX_TO_PT;
|
const layoutLeftPt = layout.left * CSS_PX_TO_PT;
|
||||||
const layoutWidthPt = layout.width * CSS_PX_TO_PT;
|
const layoutWidthPt = layout.width * CSS_PX_TO_PT;
|
||||||
const layoutHeightPt = layout.height * 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 xLeft = Math.max(layoutLeftPt, 0);
|
||||||
const xRight = Math.min(layoutLeftPt + layoutWidthPt, pageWidth);
|
const xRight = Math.min(layoutLeftPt + layoutWidthPt, pageWidth);
|
||||||
const mappedPage = this.remap_page_after_index_insert(
|
const mappedPage = this.remap_page_after_index_insert(
|
||||||
@@ -448,7 +458,8 @@ export class IndexBuilder {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const localTopPt = layout.top * CSS_PX_TO_PT;
|
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;
|
const yBottom = yTop - totalHeight;
|
||||||
this.add_link_annotation(
|
this.add_link_annotation(
|
||||||
targetPage as any,
|
targetPage as any,
|
||||||
|
|||||||
Reference in new issue
Block a user