diff options
author | Andrew Dolgov <[email protected]> | 2019-03-14 11:52:09 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2019-03-14 11:52:09 +0300 |
commit | 98471b1c162699503651d7116d577e9f28f43a3d (patch) | |
tree | 7c47fa7560737d48213d00079feeea91d20a682f | |
parent | 2a00d6d2f7c76c43eb8becf244a4e1665cc92435 (diff) |
remove footer and unused css styles
-rwxr-xr-x | reader.css | 43 | ||||
-rwxr-xr-x | reader.html | 8 | ||||
-rwxr-xr-x | reader.js | 52 |
3 files changed, 23 insertions, 80 deletions
@@ -24,49 +24,6 @@ justify-content : center; } -.footer { - bottom : 0; - left : 0; - width : 100%; -} - -.footer { - position : absolute; - display : flex; - padding : 8px; - z-index : 2; - color : #999; -} - -.footer .chapter { - padding-right : 8px; -} - -.footer .spacer { - flex-grow : 2; -} - -.footer .location { - cursor : pointer; - text-align : right; -} - -.toolbar { - text-align : right; - display : flex; - flex-direction : row; -} - -.toolbar > * { - cursor : pointer; - margin : 0 4px; - padding : 0 4px; -} - -.toolbar > *:last-child { - margin-right : 0; -} - #reader { position : absolute; top : 0; diff --git a/reader.html b/reader.html index 0a8eea3..8312190 100755 --- a/reader.html +++ b/reader.html @@ -87,14 +87,6 @@ <img class="left-page" data-bind="attr: { src: getLeftPage }"> <img style="display : none" data-bind="attr: { src: getRightPage }" class="right-page hidden-xs hidden-sm hidden-md hidden-portrait"> </div> - - <div class="footer"> - <div class="spacer"></div> - <div class="location"> - <span data-bind="html: currentPageDisp"></span> / <span data-bind="html: totalPages"></span> - (<span data-bind="html: progressPct"></span>%) - </div> - </div> </div> </body> @@ -136,7 +136,8 @@ function Model() { self.documentTitle = ko.computed(function () { if (self.fileName()) - return "Pow! Comics Reader: " + self.fileName(); + return "Pow! Comics Reader: " + self.fileName() + + " [" + self.currentPageDisp() + " / " + self.totalPages() + ", " + self.progressPct() + "%]"; else return "Pow! Comics Reader"; }); @@ -342,7 +343,27 @@ $(document).ready(function () { }); ipcRenderer.on("open-location", (event, args) => { - $(".location").click(); + const total = model.totalPages(); + + if (total == 0) + return; + + const prompt = require('electron-prompt'); + + prompt({ + title: "Go to", + label: '<small>Jump to location [1-' + total + ']:</small>', + value: model.currentPageDisp(), + useHtmlLabel: true, + height: 160, + inputAttrs: { + type: 'numeric' + } + }).then((res) => { + if (res != null && res <= model.totalPages()) { + model.currentPage(res - 1); + } + }); }); ipcRenderer.on("close-file", (event, args) => { @@ -412,30 +433,6 @@ $(document).ready(function () { }); - $(".location").click(function() { - const total = model.totalPages(); - - if (total == 0) - return; - - const prompt = require('electron-prompt'); - - prompt({ - title: "Go to", - label: '<small>Jump to location [1-' + total + ']:</small>', - value: model.currentPageDisp(), - useHtmlLabel: true, - height: 160, - inputAttrs: { - type: 'numeric' - } - }).then((res) => { - if (res != null && res <= model.totalPages()) { - model.currentPage(res - 1); - } - }); - }); - $(".sync-account").on("change", function() { const acct = $(this).val(); @@ -496,9 +493,6 @@ $(document).ready(function () { return; switch (e.which) { - case 27: - $(".header,.footer").fadeIn(); - break; case 37: $("#left").click(); break; |