From 9809de878a0daf81298c07ec356e1463d0a89098 Mon Sep 17 00:00:00 2001 From: celogeek <65178+celogeek@users.noreply.github.com> Date: Wed, 12 Apr 2023 21:51:34 +0200 Subject: [PATCH] wip --- internal/epub/core.go | 6 +++- internal/epub/templates/blank.xhtml.tmpl | 4 ++- internal/epub/templates/content.opf.tmpl | 7 ++--- internal/epub/templates/part.xhtml.tmpl | 6 ++-- internal/epub/templates/style.css.tmpl | 29 ++++++++++++++++--- internal/epub/templates/text.xhtml.tmpl | 4 +-- .../epub/templates/textnopanel.xhtml.tmpl | 4 +-- 7 files changed, 44 insertions(+), 16 deletions(-) diff --git a/internal/epub/core.go b/internal/epub/core.go index da0ff2c..bef59dd 100644 --- a/internal/epub/core.go +++ b/internal/epub/core.go @@ -291,7 +291,9 @@ func (e *ePub) Write() error { "Title": title, "TOC": string(toc), })}, - {"OEBPS/Text/style.css", styleTmpl}, + {"OEBPS/Text/style.css", e.render(styleTmpl, map[string]any{ + "Info": e, + })}, {"OEBPS/Text/part.xhtml", e.render(partTmpl, map[string]any{ "Info": e, "Part": i + 1, @@ -321,11 +323,13 @@ func (e *ePub) Write() error { var content string if e.AddPanelView { content = e.render(textTmpl, map[string]any{ + "Info": e, "Image": img, "Manga": e.Manga, }) } else { content = e.render(textNoPanelTmpl, map[string]any{ + "Info": e, "Image": img, }) } diff --git a/internal/epub/templates/blank.xhtml.tmpl b/internal/epub/templates/blank.xhtml.tmpl index 0252f8b..8e4f241 100644 --- a/internal/epub/templates/blank.xhtml.tmpl +++ b/internal/epub/templates/blank.xhtml.tmpl @@ -7,6 +7,8 @@
-