Skip to content

Commit 8faa964

Browse files
committed
[TASK] don't assign ToC content center since it looks bad in mobile
1 parent c53c90b commit 8faa964

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pkg/epub/writer.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func (w *Writer) createToC() {
6666
<div>
6767
<h3>{{.title}}</h3>
6868
{{.altTitle}}
69-
<div class="center">
69+
<div class="left">
7070
<p><a href="{{.rawUrl}}">Original Webnovel</a> by {{.author}}</p>
7171
{{.toc}}
7272
</div>
@@ -191,7 +191,5 @@ func (w *Writer) importAndAddCover() {
191191
internalFilePath, err := w.Epub.AddImage(w.cfg.General.Cover, "cover"+filepath.Ext(w.cfg.General.Cover))
192192
raven.CheckError(err)
193193

194-
section := fmt.Sprintf(`<img src="%s" alt="Cover Image"/>`, internalFilePath)
195-
_, err = w.Epub.AddSection(section, "Cover", "cover.xhtml", w.cfg.Assets.CSS.InternalPath)
196-
raven.CheckError(err)
194+
w.Epub.SetCover(internalFilePath, w.cfg.Assets.CSS.InternalPath)
197195
}

0 commit comments

Comments
 (0)