From 9964f9b00c54cd431d4408ba6d92796f85006c5b Mon Sep 17 00:00:00 2001
From: celogeek <65178+celogeek@users.noreply.github.com>
Date: Sun, 5 Mar 2023 18:51:29 +0100
Subject: [PATCH] improve style and cleanup
---
internal/epub/templates/blank.xhtml.tmpl | 18 ++---
internal/epub/templates/nav.xhtml.tmpl | 32 ++++----
internal/epub/templates/panelview.css.tmpl | 30 ++++++++
internal/epub/templates/part.xhtml.tmpl | 22 +++---
internal/epub/templates/style.css.tmpl | 76 ++++++++++++++++++-
internal/epub/templates/text.xhtml.tmpl | 74 +++++++++---------
.../epub/templates/textnopanel.xhtml.tmpl | 20 ++---
7 files changed, 184 insertions(+), 88 deletions(-)
diff --git a/internal/epub/templates/blank.xhtml.tmpl b/internal/epub/templates/blank.xhtml.tmpl
index c6bfadb..0252f8b 100644
--- a/internal/epub/templates/blank.xhtml.tmpl
+++ b/internal/epub/templates/blank.xhtml.tmpl
@@ -1,14 +1,12 @@
-
-Page {{ .Image.Id }} Space
-
-
-
-
-
-
{{ if .Info.Manga }}←{{ else }}→{{ end }}
-
-
+
+ Page {{ .Image.Id }} Space
+
+
+
+
+ {{ if .Info.Manga }}←{{ else }}→{{ end }}
+
\ No newline at end of file
diff --git a/internal/epub/templates/nav.xhtml.tmpl b/internal/epub/templates/nav.xhtml.tmpl
index ad46f3f..0492d4f 100644
--- a/internal/epub/templates/nav.xhtml.tmpl
+++ b/internal/epub/templates/nav.xhtml.tmpl
@@ -1,20 +1,20 @@
-
-{{ .Info.Title }}
-
-
-
-
-
-
+
+ {{ .Info.Title }}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/internal/epub/templates/panelview.css.tmpl b/internal/epub/templates/panelview.css.tmpl
index 7972d32..88d9feb 100644
--- a/internal/epub/templates/panelview.css.tmpl
+++ b/internal/epub/templates/panelview.css.tmpl
@@ -1,3 +1,9 @@
+a.app-amzn-magnify {
+ display: inline-block;
+ width: 100%;
+ height: 100%;
+}
+
#PV {
position: absolute;
width: 100%;
@@ -70,4 +76,28 @@
top: 0;
position: absolute;
display: none;
+}
+
+div#PV-TL-P img {
+ position: absolute;
+ left: 0;
+ top: 0;
+}
+
+div#PV-TR-P img {
+ position: absolute;
+ right: 0;
+ top: 0;
+}
+
+div#PV-BL-P img {
+ position: absolute;
+ left: 0;
+ bottom: 0;
+}
+
+div#PV-BR-P img {
+ position: absolute;
+ right: 0;
+ bottom: 0;
}
\ No newline at end of file
diff --git a/internal/epub/templates/part.xhtml.tmpl b/internal/epub/templates/part.xhtml.tmpl
index 16a33ce..15dfed0 100644
--- a/internal/epub/templates/part.xhtml.tmpl
+++ b/internal/epub/templates/part.xhtml.tmpl
@@ -1,15 +1,15 @@
-
-Part {{ .Part }}
-
-
-
-
-
-
{{ .Info.Title }}
-Part {{ .Part }} / {{ .Total }}
-
-
+
+ Part {{ .Part }}
+
+
+
+
+ {{ .Info.Title }}
+{{ if gt .Total 1 }}
+ Part {{ .Part }} / {{ .Total }}
+{{ end }}
+
\ No newline at end of file
diff --git a/internal/epub/templates/style.css.tmpl b/internal/epub/templates/style.css.tmpl
index ff0d852..2bbe2ef 100644
--- a/internal/epub/templates/style.css.tmpl
+++ b/internal/epub/templates/style.css.tmpl
@@ -1,9 +1,77 @@
-@page {
- margin: 0;
+@charset "UTF-8";
+
+html {
+ color: #000;
+ background: #FFF;
}
body {
- display: block;
+ font-size: 16px;
+ text-align: center;
+ width: 100%;
+ height: 100%;
+}
+
+body,
+div,
+dl,
+dt,
+dd,
+ul,
+ol,
+li,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+th,
+td {
margin: 0;
- padding: 0;
+ padding: 0
+}
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+fieldset,
+img {
+ border: 0;
+}
+
+caption,
+th,
+var {
+ font-style: normal;
+ font-weight: normal;
+}
+
+li {
+ list-style: none;
+}
+
+caption,
+th {
+ text-align: left;
+}
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+ font-size: 150%;
+ font-weight: normal;
+}
+
+sup {
+ vertical-align: text-top;
+}
+
+sub {
+ vertical-align: text-bottom;
}
\ No newline at end of file
diff --git a/internal/epub/templates/text.xhtml.tmpl b/internal/epub/templates/text.xhtml.tmpl
index f0cf3bd..d92b6f6 100644
--- a/internal/epub/templates/text.xhtml.tmpl
+++ b/internal/epub/templates/text.xhtml.tmpl
@@ -1,41 +1,41 @@
-
-Page {{ .Image.Id }}_p{{ .Image.Part}}
-
-
-
-
-
-
-

-
-
-
-

-
-
-

-
-
-

-
-
-

-
-
+
+ Page {{ .Image.Id }}_p{{ .Image.Part}}
+
+
+
+
+
+
+

+
+
+
+

+
+
+

+
+
+

+
+
+

+
+
\ No newline at end of file
diff --git a/internal/epub/templates/textnopanel.xhtml.tmpl b/internal/epub/templates/textnopanel.xhtml.tmpl
index dc49560..0350f5a 100644
--- a/internal/epub/templates/textnopanel.xhtml.tmpl
+++ b/internal/epub/templates/textnopanel.xhtml.tmpl
@@ -1,14 +1,14 @@
-
-Page {{ .Image.Id }}_p{{ .Image.Part}}
-
-
-
-
-
-

-
-
+
+ Page {{ .Image.Id }}_p{{ .Image.Part}}
+
+
+
+
+
+

+
+
\ No newline at end of file