mirror of
https://github.com/celogeek/go-comic-converter.git
synced 2025-05-25 08:12:36 +02:00
WIP
This commit is contained in:
parent
5276f2ba6f
commit
544f19db22
@ -321,11 +321,13 @@ func (e *ePub) Write() error {
|
|||||||
var content string
|
var content string
|
||||||
if e.AddPanelView {
|
if e.AddPanelView {
|
||||||
content = e.render(textTmpl, map[string]any{
|
content = e.render(textTmpl, map[string]any{
|
||||||
|
"Info": e,
|
||||||
"Image": img,
|
"Image": img,
|
||||||
"Manga": e.Manga,
|
"Manga": e.Manga,
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
content = e.render(textNoPanelTmpl, map[string]any{
|
content = e.render(textNoPanelTmpl, map[string]any{
|
||||||
|
"Info": e,
|
||||||
"Image": img,
|
"Image": img,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<meta name="primary-writing-mode" content="horizontal-{{ if $info.Manga }}rl{{ else }}lr{{ end }}"/>
|
<meta name="primary-writing-mode" content="horizontal-{{ if $info.Manga }}rl{{ else }}lr{{ end }}"/>
|
||||||
<meta property="rendition:layout">pre-paginated</meta>
|
<meta property="rendition:layout">pre-paginated</meta>
|
||||||
<meta property="rendition:orientation">portrait</meta>
|
<meta property="rendition:orientation">portrait</meta>
|
||||||
<meta name="orientation-lock" content="portrait"/>
|
<meta name="rendition:spread" content="landscape"/>
|
||||||
{{ if eq $info.AddPanelView true }}
|
{{ if eq $info.AddPanelView true }}
|
||||||
<meta name="region-mag" content="true"/>
|
<meta name="region-mag" content="true"/>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@ -51,7 +51,7 @@
|
|||||||
{{ if eq .NeedSpace true }}
|
{{ if eq .NeedSpace true }}
|
||||||
<itemref idref="page_{{ .Id }}_sp" linear="yes" />
|
<itemref idref="page_{{ .Id }}_sp" linear="yes" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<itemref idref="page_{{ .Id }}_p{{ .Part }}" linear="yes"/>
|
<itemref idref="page_{{ .Id }}_p{{ .Part }}" linear="yes" {{ if eq .Part 1 }}properties="page-spread-left"{{ end }}{{ if eq .Part 2 }}properties="page-spread-right"{{ end }}/>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</spine>
|
</spine>
|
||||||
</package>
|
</package>
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
<title>Page {{ .Image.Id }}_p{{ .Image.Part}}</title>
|
<title>Page {{ .Image.Id }}_p{{ .Image.Part}}</title>
|
||||||
<link href="style.css" type="text/css" rel="stylesheet"/>
|
<link href="style.css" type="text/css" rel="stylesheet"/>
|
||||||
<link href="panelview.css" type="text/css" rel="stylesheet"/>
|
<link href="panelview.css" type="text/css" rel="stylesheet"/>
|
||||||
<meta name="viewport" content="width={{ .Image.Width }}, height={{ .Image.Height }}"/>
|
<meta name="viewport" content="width={{ .Info.ViewWidth }}, height={{ .Info.ViewHeight }}"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div>
|
<div style="width:{{ .Info.ViewWidth }}px; height:{{ .Info.ViewHeight }}px; display:flex; justify-content:center; align-items:center">
|
||||||
<img style="width:{{ .Image.Width }}px; height:{{ .Image.Height }}px" src="../Images/{{ .Image.Id }}_p{{ .Image.Part}}.jpg"/>
|
<img style="width:{{ .Image.Width }}px; height:{{ .Image.Height }}px" src="../Images/{{ .Image.Id }}_p{{ .Image.Part}}.jpg"/>
|
||||||
</div>
|
</div>
|
||||||
<div id="PV">
|
<div id="PV">
|
||||||
|
@ -4,10 +4,10 @@
|
|||||||
<head>
|
<head>
|
||||||
<title>Page {{ .Image.Id }}_p{{ .Image.Part}}</title>
|
<title>Page {{ .Image.Id }}_p{{ .Image.Part}}</title>
|
||||||
<link href="style.css" type="text/css" rel="stylesheet"/>
|
<link href="style.css" type="text/css" rel="stylesheet"/>
|
||||||
<meta name="viewport" content="width={{ .Image.Width }}, height={{ .Image.Height }}"/>
|
<meta name="viewport" content="width={{ .Info.ViewWidth }}, height={{ .Info.ViewHeight }}"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div>
|
<div style="width:{{ .Info.ViewWidth }}px; height:{{ .Info.ViewHeight }}px; display:flex; justify-content:center; align-items:center">
|
||||||
<img style="width:{{ .Image.Width }}px; height:{{ .Image.Height }}px" src="../Images/{{ .Image.Id }}_p{{ .Image.Part}}.jpg"/>
|
<img style="width:{{ .Image.Width }}px; height:{{ .Image.Height }}px" src="../Images/{{ .Image.Id }}_p{{ .Image.Part}}.jpg"/>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user