fix: kavita 无法正确加载字体

This commit is contained in:
2025-07-17 14:03:10 +08:00
parent ca3fdf8980
commit 75745b9431
13 changed files with 70 additions and 193 deletions

View File

@@ -0,0 +1,37 @@
package template
templ CoverXHTML(coverPath string) {
@templ.Raw(`
<?xml version='1.0' encoding='utf-8'?>`)
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="zh-CN">
<head>
<title>Cover</title>
</head>
<style type="text/css">
@page {
padding: 0pt;
margin: 0pt
}
body {
text-align: center;
padding: 0pt;
margin: 0pt;
}
</style>
<body>
<div>
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="1.1"
width="100%"
height="100%"
viewBox="0 0 400 581"
preserveAspectRatio="none"
>
<image width="400" height="581" xlink:href={ coverPath }></image>
</svg>
</div>
</body>
</html>
}