Added basic theming to the epub reader

This commit is contained in:
Bharat KNV
2021-12-15 21:35:10 +05:30
parent f78d2245aa
commit 0693cb1ddb
4 changed files with 77 additions and 0 deletions
+4
View File
@@ -13,6 +13,10 @@ var reader;
bookmarks: calibre.bookmark ? [calibre.bookmark] : []
});
reader.rendition.themes.register("lightTheme", "/static/css/epub_themes.css");
reader.rendition.themes.register("darkTheme", "/static/css/epub_themes.css");
reader.rendition.themes.register("sepiaTheme", "/static/css/epub_themes.css");
if (calibre.useBookmarks) {
reader.on("reader:bookmarked", updateBookmark.bind(reader, "add"));
reader.on("reader:unbookmarked", updateBookmark.bind(reader, "remove"));