From f58d4a93e195810bfad263a7289bc37154f4a9e2 Mon Sep 17 00:00:00 2001 From: Veloman Yunkan Date: Wed, 15 Nov 2023 13:00:12 +0400 Subject: [PATCH 1/5] Viewer toolbar controls are now of the same height --- static/skin/taskbar.css | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/static/skin/taskbar.css b/static/skin/taskbar.css index 81e8f6160..65ff3135c 100644 --- a/static/skin/taskbar.css +++ b/static/skin/taskbar.css @@ -23,7 +23,7 @@ .kiwixsearch { font-size: 1.6rem; position: relative; - height: 26px; + height: 30px; width: 100%; left: 0; margin-bottom: 0; @@ -60,12 +60,12 @@ label[for="kiwix_button_show_toggle"] { display: inline-block; - height: 26px; + height: 30px; } label[for="kiwix_button_show_toggle"] img { transition: 0.1s; - height: 26px; + height: 30px; } #kiwix_button_show_toggle:checked~label img { @@ -84,7 +84,7 @@ label[for="kiwix_button_show_toggle"], .kiwix #kiwixtoolbar button, .kiwix #kiwixtoolbar input[type="submit"] { box-sizing: border-box !important; - height: 26px !important; + height: 30px !important; line-height: 20px !important; margin-right: 5px !important; padding: 2px 6px !important; @@ -100,7 +100,7 @@ label[for="kiwix_button_show_toggle"], left: 0; box-sizing: border-box !important; width: 100%; - height: 26px !important; + height: 30px !important; line-height: 20px !important; border: 1px solid #b5b2b2 !important; border-radius: 3px !important; @@ -115,7 +115,7 @@ label[for=kiwixsearchbox] { height: 100%; left: 5px; font-size: 90%; - line-height: 26px; + line-height: 30px; vertical-align: middle; } From 605c7f71e0bcfb4e7e318fdc277c421dbf9b3798 Mon Sep 17 00:00:00 2001 From: Veloman Yunkan Date: Wed, 15 Nov 2023 15:31:22 +0400 Subject: [PATCH 2/5] Right-aligned UI language selector button --- static/skin/kiwix.css | 2 +- static/skin/taskbar.css | 2 ++ static/viewer.html | 14 +++++++------- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/static/skin/kiwix.css b/static/skin/kiwix.css index 32b2a8d6e..2a702ff29 100644 --- a/static/skin/kiwix.css +++ b/static/skin/kiwix.css @@ -90,7 +90,7 @@ body { } #uiLanguageSelectorButton { - margin: 0px 12px 6px 12px; + margin: 0px 12px; float: right; cursor: pointer; height: 30px; diff --git a/static/skin/taskbar.css b/static/skin/taskbar.css index 65ff3135c..106b69b90 100644 --- a/static/skin/taskbar.css +++ b/static/skin/taskbar.css @@ -5,6 +5,7 @@ box-sizing: border-box; background: #f4f6f8; border-bottom: 1px solid #aaa; + display: flex; } #kiwixtoolbar>a { @@ -42,6 +43,7 @@ .kiwix .kiwix_centered { max-width: 720px; + width: 100%; margin: 0 auto; } diff --git a/static/viewer.html b/static/viewer.html index 99a16c22d..1b3e14043 100644 --- a/static/viewer.html +++ b/static/viewer.html @@ -35,13 +35,6 @@ From a74df86fcfcca4092c8725c89e5b5e435f0e8d3b Mon Sep 17 00:00:00 2001 From: Veloman Yunkan Date: Wed, 15 Nov 2023 15:45:28 +0400 Subject: [PATCH 3/5] Continuity in responsive layout of the toolbar Without this change, in the media width range [416, 420) the searchbox is narrow while the toolbars button space is empty which doesn't look nice. --- static/skin/taskbar.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/skin/taskbar.css b/static/skin/taskbar.css index 106b69b90..be2722de7 100644 --- a/static/skin/taskbar.css +++ b/static/skin/taskbar.css @@ -179,7 +179,7 @@ a.suggest, a.suggest:visited, a.suggest:hover, a.suggest:active { } } -@media(max-width:415px) { +@media(max-width:419px) { .kiwix_searchform { width: 80%; } From e1cf16ddea3e5a0f020b14f996b0d1979429f68b Mon Sep 17 00:00:00 2001 From: Veloman Yunkan Date: Wed, 15 Nov 2023 16:08:41 +0400 Subject: [PATCH 4/5] Better behavior on narrow screens On media (screens) narrower than 420 pixels, the toolbar buttons are hidden. Before this change, when made visible they were laid out in two rows. This change places them in a single row and provides some vertical spacing from the search-box. --- static/skin/taskbar.css | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/static/skin/taskbar.css b/static/skin/taskbar.css index be2722de7..48678044b 100644 --- a/static/skin/taskbar.css +++ b/static/skin/taskbar.css @@ -51,9 +51,8 @@ display: none; } -#kiwix_button_show_toggle:checked~label~.kiwix_button_cont, #kiwix_button_show_toggle:checked~label~.kiwix_button_cont>a { - display: block; + display: inline-block; } #kiwix_button_show_toggle:not(:checked)~label~.kiwix_button_cont { @@ -183,4 +182,8 @@ a.suggest, a.suggest:visited, a.suggest:hover, a.suggest:active { .kiwix_searchform { width: 80%; } + + .kiwix_button_cont { + padding-top: 5px; + } } From 183bdcf2c04b2705d2bc56aabeedd064c68f5740 Mon Sep 17 00:00:00 2001 From: Veloman Yunkan Date: Wed, 15 Nov 2023 16:35:06 +0400 Subject: [PATCH 5/5] Updated tests depending on kiwix-serve resources --- test/library_server.cpp | 2 +- test/server.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/library_server.cpp b/test/library_server.cpp index 0a52ef0b1..8b9a2b0c9 100644 --- a/test/library_server.cpp +++ b/test/library_server.cpp @@ -1028,7 +1028,7 @@ TEST_F(LibraryServerTest, no_name_mapper_catalog_v2_individual_entry_access) " Welcome to Kiwix Server\n" \ " \n" \ " testData{ { /* url */ "/ROOT%23%3F/", -R"EXPECTEDRESULT( href="/ROOT%23%3F/skin/kiwix.css?cacheid=9b1b089f" +R"EXPECTEDRESULT( href="/ROOT%23%3F/skin/kiwix.css?cacheid=2158fad9" href="/ROOT%23%3F/skin/index.css?cacheid=1e78e7cf" @@ -315,16 +315,16 @@ R"EXPECTEDRESULT( - +R"EXPECTEDRESULT( + const blankPageUrl = root + "/skin/blank.html?cacheid=6b1fa032"; - src="./skin/langSelector.svg?cacheid=00b59961"> + src="./skin/langSelector.svg?cacheid=00b59961"> src="./skin/blank.html?cacheid=6b1fa032" title="ZIM content" width="100%" )EXPECTEDRESULT" },