From bad7f2ddf120b672a523f2effaa061a73ef00fbe Mon Sep 17 00:00:00 2001 From: Joe Reeve Date: Mon, 17 Jun 2019 14:21:00 +0100 Subject: [PATCH 01/12] Make server toolbar auto-hide and collapse buttons into dropdown on small screens --- static/server/taskbar.css | 36 ++++++++++++++++++++-- static/server/taskbar.html.part | 53 +++++++++++++++++++++++++++++---- 2 files changed, 82 insertions(+), 7 deletions(-) diff --git a/static/server/taskbar.css b/static/server/taskbar.css index f8a3aa7..96b38db 100644 --- a/static/server/taskbar.css +++ b/static/server/taskbar.css @@ -5,6 +5,8 @@ right:0; top: 0; z-index:100; + background-position-y: 0px; + transition: 0.3s; } #kiwixtoolbar > a { @@ -28,8 +30,26 @@ max-width: 720px; margin: 0 auto; } -.kiwix .kiwix_button_wrapper { - float: left; +#button_show_toggle { + display: none; +} + +#button_show_toggle:not(:checked) ~ label:after { + content:'►'; +} +#button_show_toggle:checked ~ label:after { + content:'▼'; +} +#button_show_toggle:checked ~ label ~ .kiwix_button_cont, +#button_show_toggle:checked ~ label ~ .kiwix_button_cont > a { + display: block; +} +#button_show_toggle:not(:checked) ~ label ~ .kiwix_button_cont { + display: none; +} +label[for="button_show_toggle"], +.kiwix_button_cont { + display: block; } .kiwix .kiwix_searchform { float: right; @@ -72,6 +92,18 @@ li.ui-state-focus { font-weight: bold; } +@media(min-width:415px) { + .kiwix_button_cont { + display: block !important; + } + .kiwix_button_cont > a { + display: inline-block !important; + } + label[for="button_show_toggle"] { + display: none; + } +} + @media (max-width: 520px) { .kiwixsearch { margin-top: 5px; diff --git a/static/server/taskbar.html.part b/static/server/taskbar.html.part index 3ea5226..8cd2471 100644 --- a/static/server/taskbar.html.part +++ b/static/server/taskbar.html.part @@ -1,11 +1,6 @@
-
@@ -13,7 +8,55 @@
+ + +
+ \ No newline at end of file From 66c35b7b3ea79a6ddf0e8951a4dd3f87a50d1271 Mon Sep 17 00:00:00 2001 From: Joe Reeve Date: Tue, 18 Jun 2019 10:01:42 +0100 Subject: [PATCH 02/12] Fix alignment, improve search box appearance --- static/server/taskbar.css | 44 +++++++++++++++++++++++++++------ static/server/taskbar.html.part | 13 +++++++--- 2 files changed, 46 insertions(+), 11 deletions(-) diff --git a/static/server/taskbar.css b/static/server/taskbar.css index 96b38db..fdaca98 100644 --- a/static/server/taskbar.css +++ b/static/server/taskbar.css @@ -7,6 +7,8 @@ z-index:100; background-position-y: 0px; transition: 0.3s; + width: 100%; + box-sizing: border-box; } #kiwixtoolbar > a { @@ -22,9 +24,27 @@ height: 3em; } -#kiwixsearchbox { +.kiwixsearch { + position: relative; + height: 26px; + width: 100%; + left: 0; + margin-bottom: 0; +} + +.kiwix_searchform { width: 20em; } +#kiwixsearchbox { + position: absolute; + left: 0; + width: 100%; +} +#kiwix_serve_taskbar_home_button button { + overflow: hidden; + text-overflow: ellipsis; + max-width: 160px; +} .kiwix .kiwix_centered { max-width: 720px; @@ -92,9 +112,10 @@ li.ui-state-focus { font-weight: bold; } + @media(min-width:415px) { .kiwix_button_cont { - display: block !important; + display: inline-block !important; } .kiwix_button_cont > a { display: inline-block !important; @@ -103,23 +124,30 @@ li.ui-state-focus { display: none; } } - @media (max-width: 520px) { .kiwixsearch { margin-top: 5px; } + .kiwix_button_cont { + margin-top: 5px; + } } @media (max-width: 645px) { + .kiwix_searchform.full_width { + width: 100%; + } .kiwixsearch { float: none; } - #kiwixsearchbox { - width: 65%; - } - #kiwixsearchform input[type="submit"] { - width: 28%; + .kiwix_searchform { + width: 36%; } .height_separator { height: 6em; } } +@media(max-width:415px) { + .kiwix_searchform { + width: 80%; + } +} diff --git a/static/server/taskbar.html.part b/static/server/taskbar.html.part index 8cd2471..2cc862c 100644 --- a/static/server/taskbar.html.part +++ b/static/server/taskbar.html.part @@ -4,8 +4,7 @@
- - +
@@ -56,7 +55,15 @@ lastScrollTop = st; } - } + + $('#kiwixsearchbox').on({ + focus: function(){ + $('.kiwix_searchform').addClass('full_width'); + }, + blur: function(){ + $('.kiwix_searchform').removeClass('full_width'); + } + }); })(jQuery); \ No newline at end of file From 0a7f375f3a674f0f7ab8fab08eb7c4fbb32dbff8 Mon Sep 17 00:00:00 2001 From: Joe Reeve Date: Tue, 18 Jun 2019 10:01:57 +0100 Subject: [PATCH 03/12] Format taskbar.css --- static/server/taskbar.css | 49 ++++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 14 deletions(-) diff --git a/static/server/taskbar.css b/static/server/taskbar.css index fdaca98..515ac04 100644 --- a/static/server/taskbar.css +++ b/static/server/taskbar.css @@ -1,17 +1,17 @@ #kiwixtoolbar { position: fixed; padding: .5em; - left:0; - right:0; + left: 0; + right: 0; top: 0; - z-index:100; + z-index: 100; background-position-y: 0px; transition: 0.3s; width: 100%; box-sizing: border-box; } -#kiwixtoolbar > a { +#kiwixtoolbar>a { float: left; } @@ -35,11 +35,13 @@ .kiwix_searchform { width: 20em; } + #kiwixsearchbox { position: absolute; left: 0; width: 100%; } + #kiwix_serve_taskbar_home_button button { overflow: hidden; text-overflow: ellipsis; @@ -50,30 +52,37 @@ max-width: 720px; margin: 0 auto; } + #button_show_toggle { display: none; } -#button_show_toggle:not(:checked) ~ label:after { - content:'►'; +#button_show_toggle:not(:checked)~label:after { + content: '►'; } -#button_show_toggle:checked ~ label:after { - content:'▼'; + +#button_show_toggle:checked~label:after { + content: '▼'; } -#button_show_toggle:checked ~ label ~ .kiwix_button_cont, -#button_show_toggle:checked ~ label ~ .kiwix_button_cont > a { + +#button_show_toggle:checked~label~.kiwix_button_cont, +#button_show_toggle:checked~label~.kiwix_button_cont>a { display: block; } -#button_show_toggle:not(:checked) ~ label ~ .kiwix_button_cont { + +#button_show_toggle:not(:checked)~label~.kiwix_button_cont { display: none; } + label[for="button_show_toggle"], .kiwix_button_cont { display: block; } + .kiwix .kiwix_searchform { float: right; } + .kiwix #kiwixtoolbar button, .kiwix #kiwixtoolbar input[type="submit"] { box-sizing: border-box !important; @@ -88,9 +97,11 @@ label[for="button_show_toggle"], cursor: pointer !important; font-size: 16px !important; } + .kiwix #kiwixtoolbar a { margin-bottom: 5px; } + .kiwix #kiwixtoolbar #kiwixsearchform input[type='text'] { box-sizing: border-box !important; height: 26px !important; @@ -103,7 +114,8 @@ label[for="button_show_toggle"], } /* Try to fix buggy stuff in jquery-ui autocomplete */ -#ui-id-1, .ui-autocomplete { +#ui-id-1, +.ui-autocomplete { background: white !important; border: solid 1px grey !important; } @@ -117,37 +129,46 @@ li.ui-state-focus { .kiwix_button_cont { display: inline-block !important; } - .kiwix_button_cont > a { + + .kiwix_button_cont>a { display: inline-block !important; } + label[for="button_show_toggle"] { display: none; } } + @media (max-width: 520px) { .kiwixsearch { margin-top: 5px; } + .kiwix_button_cont { margin-top: 5px; } } + @media (max-width: 645px) { .kiwix_searchform.full_width { width: 100%; } + .kiwixsearch { float: none; } + .kiwix_searchform { width: 36%; } + .height_separator { height: 6em; } } + @media(max-width:415px) { .kiwix_searchform { width: 80%; } -} +} \ No newline at end of file From ea93a8a19513ea3f0ccbc7a1d3c3d238afc520db Mon Sep 17 00:00:00 2001 From: Joe Reeve Date: Tue, 18 Jun 2019 15:28:33 +0100 Subject: [PATCH 04/12] Fix padding and search bug, update button toggle icon --- static/server/taskbar.css | 25 +++++++++++++++++++++---- static/server/taskbar.html.part | 4 +++- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/static/server/taskbar.css b/static/server/taskbar.css index 515ac04..373b44d 100644 --- a/static/server/taskbar.css +++ b/static/server/taskbar.css @@ -57,14 +57,17 @@ display: none; } + #button_show_toggle:not(:checked)~label:after { - content: '►'; + content: '⌃'; + transform: rotate(180deg); } #button_show_toggle:checked~label:after { - content: '▼'; + content: '⌃'; } + #button_show_toggle:checked~label~.kiwix_button_cont, #button_show_toggle:checked~label~.kiwix_button_cont>a { display: block; @@ -74,6 +77,20 @@ display: none; } +label[for="button_show_toggle"]:after { + transition: 0.1s; + display: inline-block; + line-height: 26px; + margin-top: 5px; +} + +#button_show_toggle~label~.kiwix_button_cont.searching { + display: none !important; +} +label[for="button_show_toggle"].searching { + display: none !important; +} + label[for="button_show_toggle"], .kiwix_button_cont { display: block; @@ -125,7 +142,7 @@ li.ui-state-focus { } -@media(min-width:415px) { +@media(min-width:420px) { .kiwix_button_cont { display: inline-block !important; } @@ -145,7 +162,7 @@ li.ui-state-focus { } .kiwix_button_cont { - margin-top: 5px; + margin-top: 4px; } } diff --git a/static/server/taskbar.html.part b/static/server/taskbar.html.part index 2cc862c..21a1ad3 100644 --- a/static/server/taskbar.html.part +++ b/static/server/taskbar.html.part @@ -4,7 +4,7 @@
- +
@@ -60,9 +60,11 @@ $('#kiwixsearchbox').on({ focus: function(){ $('.kiwix_searchform').addClass('full_width'); + $('label[for="button_show_toggle"], .kiwix_button_cont').addClass('searching'); }, blur: function(){ $('.kiwix_searchform').removeClass('full_width'); + $('label[for="button_show_toggle"], .kiwix_button_cont').removeClass('searching'); } }); })(jQuery); From a22ae3d467416a484b3bf018325e2b5df4f83fd6 Mon Sep 17 00:00:00 2001 From: Joe Reeve Date: Tue, 25 Jun 2019 13:42:13 +0100 Subject: [PATCH 05/12] :ok_hand: updates from pr review --- static/server/taskbar.css | 54 ++++++++++++++------------------- static/server/taskbar.html.part | 3 +- 2 files changed, 25 insertions(+), 32 deletions(-) diff --git a/static/server/taskbar.css b/static/server/taskbar.css index 373b44d..a6e2c9f 100644 --- a/static/server/taskbar.css +++ b/static/server/taskbar.css @@ -36,12 +36,6 @@ width: 20em; } -#kiwixsearchbox { - position: absolute; - left: 0; - width: 100%; -} - #kiwix_serve_taskbar_home_button button { overflow: hidden; text-overflow: ellipsis; @@ -80,15 +74,8 @@ label[for="button_show_toggle"]:after { transition: 0.1s; display: inline-block; - line-height: 26px; - margin-top: 5px; -} - -#button_show_toggle~label~.kiwix_button_cont.searching { - display: none !important; -} -label[for="button_show_toggle"].searching { - display: none !important; + line-height: 21px; + font-size: 30px; } label[for="button_show_toggle"], @@ -115,21 +102,28 @@ label[for="button_show_toggle"], font-size: 16px !important; } -.kiwix #kiwixtoolbar a { - margin-bottom: 5px; -} - .kiwix #kiwixtoolbar #kiwixsearchform input[type='text'] { + position: absolute; + left: 0; box-sizing: border-box !important; + width: 100%; height: 26px !important; line-height: 20px !important; border: 1px solid #999 !important; border-radius: 3px !important; background-color: #fff !important; - padding: 2px 2px 2px 3px !important; + padding: 2px 2px 2px 27px !important; font-size: 16px !important; } +label[for=kiwixsearchbox] { + z-index: 1; + position: absolute; + height: 100%; + left: 3px; + top: 3px; +} + /* Try to fix buggy stuff in jquery-ui autocomplete */ #ui-id-1, .ui-autocomplete { @@ -141,7 +135,6 @@ li.ui-state-focus { font-weight: bold; } - @media(min-width:420px) { .kiwix_button_cont { display: inline-block !important; @@ -156,17 +149,16 @@ li.ui-state-focus { } } -@media (max-width: 520px) { - .kiwixsearch { - margin-top: 5px; - } - - .kiwix_button_cont { - margin-top: 4px; - } -} - @media (max-width: 645px) { + + #button_show_toggle~label~.kiwix_button_cont.searching { + display: none !important; + } + + label[for="button_show_toggle"].searching { + display: none !important; + } + .kiwix_searchform.full_width { width: 100%; } diff --git a/static/server/taskbar.html.part b/static/server/taskbar.html.part index 21a1ad3..63a3717 100644 --- a/static/server/taskbar.html.part +++ b/static/server/taskbar.html.part @@ -4,7 +4,8 @@
- + +
From 9dede2671711de502e96e890765ee3b19e1eb220 Mon Sep 17 00:00:00 2001 From: Joe Reeve Date: Fri, 28 Jun 2019 12:07:40 +0100 Subject: [PATCH 06/12] Search icon positioning fix for Firefox --- static/server/taskbar.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/server/taskbar.css b/static/server/taskbar.css index a6e2c9f..b4110ec 100644 --- a/static/server/taskbar.css +++ b/static/server/taskbar.css @@ -121,7 +121,7 @@ label[for=kiwixsearchbox] { position: absolute; height: 100%; left: 3px; - top: 3px; + font-size: 90%; } /* Try to fix buggy stuff in jquery-ui autocomplete */ From df047588a94158d16bfb75ffa744462b8fa33756 Mon Sep 17 00:00:00 2001 From: Joe Reeve Date: Wed, 3 Jul 2019 16:19:34 +0100 Subject: [PATCH 07/12] fix kiwix-serve toolbar search icon on article pages --- static/server/taskbar.css | 1 + 1 file changed, 1 insertion(+) diff --git a/static/server/taskbar.css b/static/server/taskbar.css index b4110ec..f0dfcdf 100644 --- a/static/server/taskbar.css +++ b/static/server/taskbar.css @@ -122,6 +122,7 @@ label[for=kiwixsearchbox] { height: 100%; left: 3px; font-size: 90%; + line-height: 26px; } /* Try to fix buggy stuff in jquery-ui autocomplete */ From 5b612e67bdd8eaeb6bf9769bef183b01b525b197 Mon Sep 17 00:00:00 2001 From: Joe Reeve Date: Fri, 5 Jul 2019 16:12:26 +0100 Subject: [PATCH 08/12] Fix a few bugs found in code review --- static/server/global_taskbar.html.part | 6 +++--- static/server/taskbar.css | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/static/server/global_taskbar.html.part b/static/server/global_taskbar.html.part index b19f852..d2b81be 100644 --- a/static/server/global_taskbar.html.part +++ b/static/server/global_taskbar.html.part @@ -1,13 +1,13 @@
-
+
+ -
-
+
\ No newline at end of file diff --git a/static/server/taskbar.css b/static/server/taskbar.css index f0dfcdf..1efc6f3 100644 --- a/static/server/taskbar.css +++ b/static/server/taskbar.css @@ -39,6 +39,7 @@ #kiwix_serve_taskbar_home_button button { overflow: hidden; text-overflow: ellipsis; + white-space: nowrap; max-width: 160px; } @@ -51,7 +52,6 @@ display: none; } - #button_show_toggle:not(:checked)~label:after { content: '⌃'; transform: rotate(180deg); @@ -74,8 +74,9 @@ label[for="button_show_toggle"]:after { transition: 0.1s; display: inline-block; - line-height: 21px; font-size: 30px; + line-height: 21px; + vertical-align: middle; } label[for="button_show_toggle"], @@ -120,9 +121,10 @@ label[for=kiwixsearchbox] { z-index: 1; position: absolute; height: 100%; - left: 3px; + left: 5px; font-size: 90%; line-height: 26px; + vertical-align: middle; } /* Try to fix buggy stuff in jquery-ui autocomplete */ From 7db7d2a2abfacdb70b23e066bce6a3b1afe2c33f Mon Sep 17 00:00:00 2001 From: Joe Reeve Date: Mon, 8 Jul 2019 13:18:07 +0100 Subject: [PATCH 09/12] Switch caret to image and move JS to separate file --- static/server/caret.png | Bin 0 -> 1388 bytes static/server/home.html.tmpl | 1 + static/server/include.html.part | 1 + static/server/resources_list.txt | 2 ++ static/server/taskbar.css | 26 +++++++-------- static/server/taskbar.html.part | 54 ++----------------------------- static/server/taskbar.js | 49 ++++++++++++++++++++++++++++ 7 files changed, 66 insertions(+), 67 deletions(-) create mode 100644 static/server/caret.png create mode 100644 static/server/taskbar.js diff --git a/static/server/caret.png b/static/server/caret.png new file mode 100644 index 0000000000000000000000000000000000000000..96b67db35080e721f9ce735ba311fc05ace51b41 GIT binary patch literal 1388 zcmV-y1(W)TP)m6P-+qae8b;M9tiQ7vM+Sxa*b4EIKYGej8mI+-X`{6cDhD zrY}Jwy6^@x8g(^_^FA|Hhc+TrP^an~cz;Q!MT#mse@+Qih^8^d7-Nhv#u#IaF~%5U zj4{R-Q`ytg)4Omu{5SpY)7VciCL0?Y7@K!m0d&nGY$y;29G;(_|9W(E^b1`Mc|4v+ zjr|v+t*tF`d3hN)IXP*k%N;Z}|7fDn2K1hup6`CY|H=3_JUkrbneu;(*4EZ&_Sj5K zO?}6hSy_+ig|XsbF!+sT#&6l*kHunvk&%%|InR{rnUVedm6a8Y)i=8ScN&`qGwU)H z1TjLPP%52Hx4(8hqKuA??$UC>a*OgjGj^}8uDV~lo}#qVn51aAKg>kQ8w4@>`uY;5 zr>7lnEfH&8pE)# zu+XLJdd??7`fD2;931>gF#=i&@N#VQmm3@y7}z>KJ`QR& zD5WSEo0gWA-J6@6qGA~4=H`MvpKpuSJD5E-diDk>#utjwr`ZTm#>dCs+;7SbW7FK+ z9J{@}Eoc{>%k=bgAI+36wEjPhvH1~XVq)SG#pu@rh(sdzL6nRlDu!WpcDBE%sp%7a z`4=w#2=e~@`_D93U33RbJ;k+3#VDdAn=!zv<-T){L>U_!i^~uNF}Ak0;v!>IR#v_l13dXw;>7NY4q)!nA%z~Z=M3y- z#JIk`wshRi3dBezlX;K!<_!X+97U!WU@8cdVieh8faxGmN>OBt0hWS5DMXPq23QUP z_<`2e*5VHj55j&RIv;Z|KR^G`?kKqLo12>nI%+HI0aaC1wVy~N3VJ{l6a-X^B6|!d zI0&c|MTHnpR1i=h3hv|j`g-F2{$5xNzu&*Vx3^dH@4cdffXq=;iUGC+0U4vH76WVx z0y0Ix@v+9nMx|natwF$vD80SChl`7gIp3Oz7<5`Rb$55yp$Q@)2G|}1+>D}f3=k3o z+=!xj3=kFsoQ#66RgVEegMbrJ8X6i7FD@=L)nkD0Ab=?0a5(z-_$cgboJch_HOXi+ z+Uvw=0Y`!W-aJrSTN_g?%5x0I-i+Z`5Kt|O(=ou&AfQSVH)4R}K|uB>Zp8psf`F`1 z+>8OP1p(QjxE%vr4Fa-6ks$`S9t7NuB1;UAA_%w@MWz_w)g*xdNvG2RpU;=n98zCj zFI5bXW`-CrQ|M8gwwDc6N58`(sq;f`I5Kvc>=@gMg?gGRFXEgMi&p zWRC$-2LZdHs1O6B4+6zTQ6&Z_5d;d2qEZY{CJ0!KqFM})=7pgd7}&G3v!K`O-OINu zz35Xe1}HT{4EbgXVr*}3EBOgTN(O;kQB;nhJVdFku8td@lN$tFW*-v&&Eb0000 + diff --git a/static/server/include.html.part b/static/server/include.html.part index 7996fcb..635e6f9 100644 --- a/static/server/include.html.part +++ b/static/server/include.html.part @@ -25,3 +25,4 @@ jk("html").addClass("cybook"); } + \ No newline at end of file diff --git a/static/server/resources_list.txt b/static/server/resources_list.txt index 9df07e1..078bb6f 100644 --- a/static/server/resources_list.txt +++ b/static/server/resources_list.txt @@ -19,6 +19,8 @@ jquery-ui/jquery-ui.theme.min.css jquery-ui/jquery-ui.min.css home.html.tmpl include.html.part +caret.png +taskbar.js taskbar.css taskbar.html.part global_taskbar.html.part diff --git a/static/server/taskbar.css b/static/server/taskbar.css index 1efc6f3..37f8d36 100644 --- a/static/server/taskbar.css +++ b/static/server/taskbar.css @@ -52,16 +52,6 @@ display: none; } -#button_show_toggle:not(:checked)~label:after { - content: '⌃'; - transform: rotate(180deg); -} - -#button_show_toggle:checked~label:after { - content: '⌃'; -} - - #button_show_toggle:checked~label~.kiwix_button_cont, #button_show_toggle:checked~label~.kiwix_button_cont>a { display: block; @@ -71,12 +61,18 @@ display: none; } -label[for="button_show_toggle"]:after { - transition: 0.1s; +label[for="button_show_toggle"] { display: inline-block; - font-size: 30px; - line-height: 21px; - vertical-align: middle; + height: 26px; +} + +label[for="button_show_toggle"] img { + transition: 0.1s; + height: 26px; +} + +#button_show_toggle:checked~label img { + transform: rotate(-180deg); } label[for="button_show_toggle"], diff --git a/static/server/taskbar.html.part b/static/server/taskbar.html.part index 63a3717..c7f819d 100644 --- a/static/server/taskbar.html.part +++ b/static/server/taskbar.html.part @@ -9,7 +9,7 @@
- +
@@ -19,54 +19,4 @@
-
- \ No newline at end of file +
\ No newline at end of file diff --git a/static/server/taskbar.js b/static/server/taskbar.js new file mode 100644 index 0000000..bf35a1a --- /dev/null +++ b/static/server/taskbar.js @@ -0,0 +1,49 @@ + +(function ($) { + if ($(window).width() < 520) { + var didScroll; + var lastScrollTop = 0; + var delta = 5; + // on scroll, let the interval function know the user has scrolled + $(window).scroll(function (event) { + didScroll = true; + }); + // run hasScrolled() and reset didScroll status + setInterval(function () { + if (didScroll) { + hasScrolled(); + didScroll = false; + } + }, 250); + function hasScrolled() { + var st = $(this).scrollTop(); + + // Make sure they scroll more than delta + if (Math.abs(lastScrollTop - st) <= delta) + return; + + // If they scrolled down and are past the navbar, add class .nav-up. + // This is necessary so you never see what is "behind" the navbar. + if (st > lastScrollTop) { + // Scroll Down + $('#kiwixtoolbar').css({ top: '-100%' }); + } else { + // Scroll Up + $('#kiwixtoolbar').css({ top: '0' }); + } + + lastScrollTop = st; + } + } + + $('#kiwixsearchbox').on({ + focus: function () { + $('.kiwix_searchform').addClass('full_width'); + $('label[for="button_show_toggle"], .kiwix_button_cont').addClass('searching'); + }, + blur: function () { + $('.kiwix_searchform').removeClass('full_width'); + $('label[for="button_show_toggle"], .kiwix_button_cont').removeClass('searching'); + } + }); +})(jQuery); \ No newline at end of file From e897dd4e593c2b9a59d52c410c012874e949352e Mon Sep 17 00:00:00 2001 From: Joe Reeve Date: Tue, 9 Jul 2019 10:59:47 +0100 Subject: [PATCH 10/12] Update classes and ids to have Kiwix namespace --- static/server/taskbar.css | 22 +++++++++++----------- static/server/taskbar.html.part | 4 ++-- static/server/taskbar.js | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/static/server/taskbar.css b/static/server/taskbar.css index 37f8d36..7f3967d 100644 --- a/static/server/taskbar.css +++ b/static/server/taskbar.css @@ -48,34 +48,34 @@ margin: 0 auto; } -#button_show_toggle { +#kiwix_button_show_toggle { display: none; } -#button_show_toggle:checked~label~.kiwix_button_cont, -#button_show_toggle:checked~label~.kiwix_button_cont>a { +#kiwix_button_show_toggle:checked~label~.kiwix_button_cont, +#kiwix_button_show_toggle:checked~label~.kiwix_button_cont>a { display: block; } -#button_show_toggle:not(:checked)~label~.kiwix_button_cont { +#kiwix_button_show_toggle:not(:checked)~label~.kiwix_button_cont { display: none; } -label[for="button_show_toggle"] { +label[for="kiwix_button_show_toggle"] { display: inline-block; height: 26px; } -label[for="button_show_toggle"] img { +label[for="kiwix_button_show_toggle"] img { transition: 0.1s; height: 26px; } -#button_show_toggle:checked~label img { +#kiwix_button_show_toggle:checked~label img { transform: rotate(-180deg); } -label[for="button_show_toggle"], +label[for="kiwix_button_show_toggle"], .kiwix_button_cont { display: block; } @@ -143,18 +143,18 @@ li.ui-state-focus { display: inline-block !important; } - label[for="button_show_toggle"] { + label[for="kiwix_button_show_toggle"] { display: none; } } @media (max-width: 645px) { - #button_show_toggle~label~.kiwix_button_cont.searching { + #kiwix_button_show_toggle~label~.kiwix_button_cont.searching { display: none !important; } - label[for="button_show_toggle"].searching { + label[for="kiwix_button_show_toggle"].searching { display: none !important; } diff --git a/static/server/taskbar.html.part b/static/server/taskbar.html.part index c7f819d..c11a621 100644 --- a/static/server/taskbar.html.part +++ b/static/server/taskbar.html.part @@ -8,8 +8,8 @@ - - + +
diff --git a/static/server/taskbar.js b/static/server/taskbar.js index bf35a1a..e8b9a93 100644 --- a/static/server/taskbar.js +++ b/static/server/taskbar.js @@ -39,11 +39,11 @@ $('#kiwixsearchbox').on({ focus: function () { $('.kiwix_searchform').addClass('full_width'); - $('label[for="button_show_toggle"], .kiwix_button_cont').addClass('searching'); + $('label[for="kiwix_button_show_toggle"], .kiwix_button_cont').addClass('searching'); }, blur: function () { $('.kiwix_searchform').removeClass('full_width'); - $('label[for="button_show_toggle"], .kiwix_button_cont').removeClass('searching'); + $('label[for="kiwix_button_show_toggle"], .kiwix_button_cont').removeClass('searching'); } }); })(jQuery); \ No newline at end of file From e31c1cd9a3aa59fb9869a0de873095a6e3d7d414 Mon Sep 17 00:00:00 2001 From: Kelson Date: Tue, 9 Jul 2019 12:29:42 +0200 Subject: [PATCH 11/12] Update Changelog --- Changelog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Changelog b/Changelog index 4b598c8..ac79cc4 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,11 @@ +kiwix-tools 2.1.0 +================= + +kiwix-serve +----------- + +* Mobile friendly top bar + kiwix-tools 2.0.0 ================= From fc1eb3c282636b646b17f3af0f4167c74b10a123 Mon Sep 17 00:00:00 2001 From: Kelson Date: Tue, 9 Jul 2019 12:30:27 +0200 Subject: [PATCH 12/12] Bump-up kiwix-tools version to 2.1.0 --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index cbb8e7b..1e27f30 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('kiwix-tools', 'cpp', - version : '2.0.0', + version : '2.1.0', license : 'GPL', default_options: ['c_std=c11', 'cpp_std=c++11', 'werror=true'])