-
-
{{_('Settings')}}
-
- Choose a theme below:
+ +
++ +
+
-
-
-
-
+
+
+
-
-
-
-
+ // Add tick mark to the button corresponding to the currently selected theme
+ document.getElementById(id).querySelector("span").textContent = "✓";
+
+ // Apply theme to epubjs iframe
+ reader.rendition.themes.select(id);
+
+ // Apply theme to rest of the page. TODO - Do this smarter
+ if (id == "darkTheme") {
+ document.getElementById("main").style.backgroundColor = "#202124";
+ } else if (id == "lightTheme") {
+ document.getElementById("main").style.backgroundColor = "white";
+ } else if (id == "sepiaTheme") {
+ document.getElementById("main").style.backgroundColor = "#ece1ca";
+ } else if (id == "blackTheme") {
+ document.getElementById("main").style.backgroundColor = "black";
+ }
+
+ }
+
+ // font size settings logic
+ let fontSizeFader = document.getElementById('fontSizeFader');
+ fontSizeFader.addEventListener("change", function () {
+ reader.rendition.themes.fontSize(`${this.value}%`)
+ });
+
+
+
+
+
+
+
- {{ _('Settings') }}
+
+ Choose a theme below:
- - - - - -
- - - - - - -
-
- - {{_('Reflow text when sidebars are open.')}} -
-
-
-
-
-