From d73ed30d76a5abd7dbfc15202f432f83a79f99ac Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 8 Oct 2020 16:59:23 +0300 Subject: gulp stuff: themes --- css/app.less | 2 + css/reader_iframe.css | 44 ----------------- css/reader_iframe.less | 46 ++++++++++++++++++ css/themes.less | 126 +++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 174 insertions(+), 44 deletions(-) delete mode 100644 css/reader_iframe.css create mode 100644 css/reader_iframe.less create mode 100644 css/themes.less (limited to 'css') diff --git a/css/app.less b/css/app.less index f27291a..5e6cc4c 100644 --- a/css/app.less +++ b/css/app.less @@ -280,3 +280,5 @@ body.is-epube-app.epube-reader { display : none; } } + +@import "themes.less"; \ No newline at end of file diff --git a/css/reader_iframe.css b/css/reader_iframe.css deleted file mode 100644 index 1b222ea..0000000 --- a/css/reader_iframe.css +++ /dev/null @@ -1,44 +0,0 @@ -a { - color : #007d71; - text-decoration : none; -} - -a:visited { - text-decoration: underline; -} - -a:hover, -a:focus { - color: #00302c; - text-decoration: underline; -} - -blockquote { - font-style : italic; -} - -/* ugly hack: this assumes default prefix used for epube - /books/ - * since CSS is loaded inline, relative urls won't work properly so - * it's hardcoded for the time being (the alternative is pointing to - * website root) */ - -/* fonts below are freely available although license is likely proprietary - * so i'm not bundling the files */ - -@font-face { - font-family: Caecilia; - src: local('PMN Caecilia 55'), url('/books/lib/fonts/pmn-caecilia-55.ttf') format('truetype'); - font-weight : normal; -} - -@font-face { - font-family: Caecilia; - src: local('PMN Caecilia 75'), url('/books/lib/fonts/pmn-caecilia-75.ttf') format('truetype'); - font-weight : bold; -} - -@font-face { - font-family: Caecilia; - src: local('PMN Caecilia 56'), url('/books/lib/fonts/pmn-caecilia-56.ttf') format('truetype'); - font-style : italic; -} diff --git a/css/reader_iframe.less b/css/reader_iframe.less new file mode 100644 index 0000000..35b14bf --- /dev/null +++ b/css/reader_iframe.less @@ -0,0 +1,46 @@ +a { + color : #007d71; + text-decoration : none; +} + +a:visited { + text-decoration: underline; +} + +a:hover, +a:focus { + color: #00302c; + text-decoration: underline; +} + +blockquote { + font-style : italic; +} + +/* ugly hack: this assumes default prefix used for epube - /books/ + * since CSS is loaded inline, relative urls won't work properly so + * it's hardcoded for the time being (the alternative is pointing to + * website root) */ + +/* fonts below are freely available although license is likely proprietary + * so i'm not bundling the files */ + +@font-face { + font-family: Caecilia; + src: local('PMN Caecilia 55'), url('/books/lib/fonts/pmn-caecilia-55.ttf') format('truetype'); + font-weight : normal; +} + +@font-face { + font-family: Caecilia; + src: local('PMN Caecilia 75'), url('/books/lib/fonts/pmn-caecilia-75.ttf') format('truetype'); + font-weight : bold; +} + +@font-face { + font-family: Caecilia; + src: local('PMN Caecilia 56'), url('/books/lib/fonts/pmn-caecilia-56.ttf') format('truetype'); + font-style : italic; +} + +@import "themes.less"; \ No newline at end of file diff --git a/css/themes.less b/css/themes.less new file mode 100644 index 0000000..09f11a5 --- /dev/null +++ b/css/themes.less @@ -0,0 +1,126 @@ +body.theme-default { + @media (prefers-color-scheme: dark) { + &, .loading, html:-webkit-full-screen { + background : #222; + color : #ccc; + } + + .modal { + color : #333; + } + } +} + +body.theme-gray { + &, .loading, html:-webkit-full-screen { + background : #eeeeee; + color : #424242; + } + + .header, + .footer { + color : #B85C57; + } + + .footer .spacer .toc-bar-entry.current-position { + background : #B85C57; + } +} + +body.theme-light { + .no-op { color : white; } +} + +body.theme-mocca { + &, .loading, html:-webkit-full-screen { + background : #3B3228; + color : #D0C8C6; + } + + a { + color : #8AB3B5; + } + + a:hover { + color : #7BBDA4; + } + + .header, + .footer { + color : #F4BC87; + } + + .footer .location { + color : #BEB55B; + } + + .header button.btn { + background : #BB9584; + color : #534636; + text-shadow : #534636 0px 0px; + border-color : #534636; + } + + .footer .spacer .toc-bar-entry.current-position { + background : #F4BC87; + } +} + +body.theme-night { + &, .loading, html:-webkit-full-screen { + background : #222; + color : #ccc; + } + + a, a:hover { + color : #00bdaa; + } + + .modal { + color : #333; + } + + .footer .spacer .toc-bar-entry.current-position { + background : darkred; + } +} + +body.theme-plan9 { + &, .loading, html:-webkit-full-screen { + background : #FFFFE8; + color : #424242; + } + + a { + color : #22b9b2; + } + + a:hover { + color : #28d7cf; + } + + .header, + .footer { + color : #B85C57; + } + + .footer .spacer .toc-bar-entry.current-position { + background : #B85C57; + } +} + +body.theme-sepia { + &, .loading, html:-webkit-full-screen { + background : #FAEFDB; + color : #4a422b; + } + + .header, + .footer { + color : #B85C57; + } + + .footer .spacer .toc-bar-entry.current-position { + background : #B85C57; + } +} \ No newline at end of file -- cgit v1.2.3