mirror of
https://github.com/celogeek/go-comic-converter.git
synced 2025-05-24 15:52:38 +02:00
readjust cover
This commit is contained in:
parent
fd80342a19
commit
30f4d20c6a
@ -301,18 +301,13 @@ func (e *EPub) Write() error {
|
|||||||
{"META-INF/container.xml", gohtml.Format(TEMPLATE_CONTAINER)},
|
{"META-INF/container.xml", gohtml.Format(TEMPLATE_CONTAINER)},
|
||||||
{"OEBPS/content.opf", e.Render(TEMPLATE_CONTENT, map[string]any{"Info": e, "Images": part.Images})},
|
{"OEBPS/content.opf", e.Render(TEMPLATE_CONTENT, map[string]any{"Info": e, "Images": part.Images})},
|
||||||
{"OEBPS/toc.ncx", e.Render(TEMPLATE_TOC, map[string]any{"Info": e, "Images": part.Images})},
|
{"OEBPS/toc.ncx", e.Render(TEMPLATE_TOC, map[string]any{"Info": e, "Images": part.Images})},
|
||||||
{"OEBPS/nav.xhtml", e.Render(TEMPLATE_NAV, map[string]any{"Info": e, "Images": part.Images})},
|
{"OEBPS/nav.xhtml", e.Render(TEMPLATE_NAV, map[string]any{"Info": e, "Image": part.Images[0]})},
|
||||||
{"OEBPS/Text/style.css", TEMPLATE_STYLE},
|
{"OEBPS/Text/style.css", TEMPLATE_STYLE},
|
||||||
{"OEBPS/Text/part.xhtml", e.Render(TEMPLATE_PART, map[string]any{
|
{"OEBPS/Text/part.xhtml", e.Render(TEMPLATE_PART, map[string]any{
|
||||||
"Info": e,
|
"Info": e,
|
||||||
"Part": i + 1,
|
"Part": i + 1,
|
||||||
"Total": totalParts,
|
"Total": totalParts,
|
||||||
})},
|
})},
|
||||||
{"OEBPS/Text/cover.xhtml", e.Render(TEMPLATE_TEXT, map[string]any{
|
|
||||||
"Id": "cover",
|
|
||||||
"Width": part.Cover.Width,
|
|
||||||
"Height": part.Cover.Height,
|
|
||||||
})},
|
|
||||||
{"OEBPS/Images/cover.jpg", part.Cover.Data},
|
{"OEBPS/Images/cover.jpg", part.Cover.Data},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,8 +22,7 @@
|
|||||||
<manifest>
|
<manifest>
|
||||||
<item id="ncx" href="toc.ncx" media-type="application/x-dtbncx+xml"/>
|
<item id="ncx" href="toc.ncx" media-type="application/x-dtbncx+xml"/>
|
||||||
<item id="nav" href="nav.xhtml" properties="nav" media-type="application/xhtml+xml"/>
|
<item id="nav" href="nav.xhtml" properties="nav" media-type="application/xhtml+xml"/>
|
||||||
<item id="page_cover" href="Text/cover.xhtml" media-type="application/xhtml+xml"/>
|
<item id="cover" href="Images/cover.jpg" media-type="image/jpeg" properties="cover-image"/>
|
||||||
<item id="img_cover" href="Images/cover.jpg" media-type="image/jpeg" properties="cover-image"/>
|
|
||||||
<item id="page_part" href="Text/part.xhtml" media-type="application/xhtml+xml"/>
|
<item id="page_part" href="Text/part.xhtml" media-type="application/xhtml+xml"/>
|
||||||
{{ range .Images }}
|
{{ range .Images }}
|
||||||
<item id="page_{{ .Id }}" href="Text/{{ .Id }}.xhtml" media-type="application/xhtml+xml"/>
|
<item id="page_{{ .Id }}" href="Text/{{ .Id }}.xhtml" media-type="application/xhtml+xml"/>
|
||||||
@ -31,7 +30,6 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
</manifest>
|
</manifest>
|
||||||
<spine page-progression-direction="ltr" toc="ncx">
|
<spine page-progression-direction="ltr" toc="ncx">
|
||||||
<itemref idref="page_cover" linear="yes" properties="page-spread-left"/>
|
|
||||||
<itemref idref="page_part" linear="yes" properties="page-spread-right"/>
|
<itemref idref="page_part" linear="yes" properties="page-spread-right"/>
|
||||||
{{ range $idx, $ := .Images }}
|
{{ range $idx, $ := .Images }}
|
||||||
{{ if mod $idx 2 }}
|
{{ if mod $idx 2 }}
|
||||||
|
@ -8,12 +8,12 @@
|
|||||||
<body>
|
<body>
|
||||||
<nav xmlns:epub="http://www.idpf.org/2007/ops" epub:type="toc" id="toc">
|
<nav xmlns:epub="http://www.idpf.org/2007/ops" epub:type="toc" id="toc">
|
||||||
<ol>
|
<ol>
|
||||||
<li><a href="Text/cover.xhtml">{{ .Info.Title }}</a></li>
|
<li><a href="Text/{{ .Image.Id }}.xhtml">{{ .Info.Title }}</a></li>
|
||||||
</ol>
|
</ol>
|
||||||
</nav>
|
</nav>
|
||||||
<nav epub:type="page-list">
|
<nav epub:type="page-list">
|
||||||
<ol>
|
<ol>
|
||||||
<li><a href="Text/cover.xhtml">{{ .Info.Title }}</a></li>
|
<li><a href="Text/{{ .Image.Id }}.xhtml">{{ .Info.Title }}</a></li>
|
||||||
</ol>
|
</ol>
|
||||||
</nav>
|
</nav>
|
||||||
</body>
|
</body>
|
||||||
|
@ -7,7 +7,8 @@
|
|||||||
<meta name="viewport" content="width={{ .Info.ViewWidth }}, height={{ .Info.ViewHeight }}"/>
|
<meta name="viewport" content="width={{ .Info.ViewWidth }}, height={{ .Info.ViewHeight }}"/>
|
||||||
</head>
|
</head>
|
||||||
<body style="">
|
<body style="">
|
||||||
<h1 style="text-align:center;top:0%;padding-top:50%;font-size:4em">
|
<div style="text-align:center;top:0.0%;">
|
||||||
|
<h1>
|
||||||
<p>
|
<p>
|
||||||
{{ .Info.Title }}
|
{{ .Info.Title }}
|
||||||
</p>
|
</p>
|
||||||
@ -15,5 +16,6 @@
|
|||||||
Part {{ .Part }} / {{ .Total }}
|
Part {{ .Part }} / {{ .Total }}
|
||||||
</p>
|
</p>
|
||||||
</h1>
|
</h1>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Loading…
x
Reference in New Issue
Block a user