From c9eaf2db2d17fe9efc94d99689761954528e4168 Mon Sep 17 00:00:00 2001 From: Michael Vinci Date: Fri, 25 Jul 2025 16:47:34 -0500 Subject: [PATCH] Add 'sepia' theme to EpubReader --- client/components/readers/EpubReader.vue | 28 ++++++++++++++++-------- client/components/readers/Reader.vue | 8 +++++-- client/strings/en-us.json | 1 + 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/client/components/readers/EpubReader.vue b/client/components/readers/EpubReader.vue index ac8e3397..a4c51539 100644 --- a/client/components/readers/EpubReader.vue +++ b/client/components/readers/EpubReader.vue @@ -99,22 +99,32 @@ export default { return `/api/items/${this.libraryItemId}/ebook` }, themeRules() { - const isDark = this.ereaderSettings.theme === 'dark' - const fontColor = isDark ? '#fff' : '#000' - const backgroundColor = isDark ? 'rgb(35 35 35)' : 'rgb(255, 255, 255)' + const theme = this.ereaderSettings.theme + const isDark = theme === 'dark' + const isSepia = theme === 'sepia' + + const fontColor = isDark + ? '#fff' + : isSepia + ? '#5b4636' + : '#000' + + const backgroundColor = isDark + ? 'rgb(35 35 35)' + : isSepia + ? 'rgb(244, 236, 216)' + : 'rgb(255, 255, 255)' const lineSpacing = this.ereaderSettings.lineSpacing / 100 - - const fontScale = this.ereaderSettings.fontScale / 100 - - const textStroke = this.ereaderSettings.textStroke / 100 + const fontScale = this.ereaderSettings.fontScale / 100 + const textStroke = this.ereaderSettings.textStroke / 100 return { '*': { color: `${fontColor}!important`, 'background-color': `${backgroundColor}!important`, - 'line-height': lineSpacing * fontScale + 'rem!important', - '-webkit-text-stroke': textStroke + 'px ' + fontColor + '!important' + 'line-height': `${lineSpacing * fontScale}rem!important`, + '-webkit-text-stroke': `${textStroke}px ${fontColor}!important` }, a: { color: `${fontColor}!important` diff --git a/client/components/readers/Reader.vue b/client/components/readers/Reader.vue index a7a5ac3d..7ceddf3f 100644 --- a/client/components/readers/Reader.vue +++ b/client/components/readers/Reader.vue @@ -1,5 +1,5 @@