From 52be2ad4a2705bfce03a09fd70fb46941449555c Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sun, 3 Oct 2021 09:32:29 +0200 Subject: [PATCH] Improved DJVU Reader --- cps/static/css/libs/Djvu_html5.css | 8 ++--- cps/static/js/reading/djvu_reader.js | 21 +++++++++++++ cps/templates/readdjvu.html | 46 +++++++++------------------- 3 files changed, 40 insertions(+), 35 deletions(-) create mode 100644 cps/static/js/reading/djvu_reader.js diff --git a/cps/static/css/libs/Djvu_html5.css b/cps/static/css/libs/Djvu_html5.css index 77e37c97..a7ed799e 100644 --- a/cps/static/css/libs/Djvu_html5.css +++ b/cps/static/css/libs/Djvu_html5.css @@ -35,7 +35,7 @@ body { float: left; width: 40px; height: 40px; - background-image: url("img/toolbar-buttons.png"); + background-image: url("../../js/libs/djvu_html5/img/toolbar-buttons.png"); background-repeat: no-repeat; background-size: 500% 300%; } @@ -185,10 +185,10 @@ _:-ms-lang(x), .textLayer { width: 128px; height: 128px; margin: -72px 0 0 -64px; - background-image: url("img/status.png"); + background-image: url("../../js/libs/djvu_html5/img/status.png"); background-repeat: no-repeat; } .blankImage { - background-image: url("img/blank.jpg"); -} \ No newline at end of file + background-image: url("../../js/libs/djvu_html5/img/blank.jpg"); +} diff --git a/cps/static/js/reading/djvu_reader.js b/cps/static/js/reading/djvu_reader.js new file mode 100644 index 00000000..c93d705a --- /dev/null +++ b/cps/static/js/reading/djvu_reader.js @@ -0,0 +1,21 @@ +/* This file is part of the Calibre-Web (https://github.com/janeczku/calibre-web) + * Copyright (C) 2021 Ozzieisaacs + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +var DJVU_CONTEXT = { + background: "#666", + uiHideDelay: 1500, +}; diff --git a/cps/templates/readdjvu.html b/cps/templates/readdjvu.html index 9771b7c9..3504e394 100644 --- a/cps/templates/readdjvu.html +++ b/cps/templates/readdjvu.html @@ -1,35 +1,19 @@ - - - - + + + {{_('DJVU Reader')}} | {{title}} + + + + + - - -{{_('DJVU Reader')}} | {{title}} - - - - - - - - - -
- - - + + + + + +
+