From 950637abef603b1b96fd7bbf19626ced9201b81f Mon Sep 17 00:00:00 2001 From: renaud gaudin Date: Thu, 19 Feb 2015 14:57:50 +0000 Subject: [PATCH] Added Bookeen/Cybook CSS/JS hack for taskbar on ereader and increased taskbar size on hdpi screens --- static/server/include.html.part | 5 +++ static/server/taskbar.css | 57 +++++++++++++++++---------------- static/server/taskbar.html.part | 14 +++++--- 3 files changed, 44 insertions(+), 32 deletions(-) diff --git a/static/server/include.html.part b/static/server/include.html.part index 96543ddae..6010e333b 100644 --- a/static/server/include.html.part +++ b/static/server/include.html.part @@ -16,4 +16,9 @@ }); }); + + /* cybook hack */ + if (navigator.userAgent.indexOf("bookeen/cybook") != -1) { + jk("html").addClass("cybook"); + } diff --git a/static/server/taskbar.css b/static/server/taskbar.css index fbe7d8c56..2875d2e04 100644 --- a/static/server/taskbar.css +++ b/static/server/taskbar.css @@ -1,39 +1,19 @@ #kiwixtoolbar { position: fixed; - padding: 4px 15px 5px 15px; - margin-left: -10px; - margin-right: -10px; + padding: .5em; left:0; right:0; - top: 0px; + top: 0; z-index:100; } -#kiwixhome { - margin: 0px; - float: left; -} - -#kiwixlibrary { - margin: 0px; - float: left; -} - -#kiwixrandom { - margin: 0px; - float: left; -} - #kiwixsearchbox { - margin: 0px; - float: right; - width: 300px; + width: 20em; } -#kiwixsearch { - margin: 0px; - float: right; -} +.kiwixsearch { + float: right; +}s /* Try to fix buggy stuff in jquery-ui autocomplete */ #ui-id-1 { @@ -43,4 +23,27 @@ li.ui-state-focus { font-weight: bold; -} \ No newline at end of file +} + +/* Specific CSS for Bookeen Cybook device (800x600 B&W ereader) */ +.cybook #kiwixtoolbar button, .cybook #kiwixtoolbar input { + font-size: 1.5em; +} +.cybook #kiwixsearchbox { + width: 8em; +} +.cybook a { + text-decoration: underline; +} + +@media only screen and (min--moz-device-pixel-ratio: 1.5), +only screen and (-o-min-device-pixel-ratio: 1.5/1), +only screen and (-webkit-min-device-pixel-ratio: 1.5), +only screen and (min-device-pixel-ratio: 1.5) { + #kiwixtoolbar button, #kiwixtoolbar input { + font-size: 2em; + } + #kiwixsearchbox { + width: 7em; + } +} diff --git a/static/server/taskbar.html.part b/static/server/taskbar.html.part index 3c01a4564..1d46962ab 100644 --- a/static/server/taskbar.html.part +++ b/static/server/taskbar.html.part @@ -2,10 +2,14 @@ -
-
-
-
+ + + +
+ + + +
-
+