From 0c05af658d451f2032bb5452957874fcd30b4490 Mon Sep 17 00:00:00 2001 From: Veloman Yunkan Date: Sat, 28 Oct 2023 20:00:56 +0400 Subject: [PATCH] Deduplicated styling of UI language selector There was a slight difference (between index.css and taskbar.css) in the margin values of the UI language selector button, however the values taken from taskbar.css don't seem to have any visible impact on the welcome/library page (controlled by index.css). --- static/skin/index.css | 25 +------------------------ static/skin/kiwix.css | 24 ++++++++++++++++++++++++ static/skin/taskbar.css | 24 ------------------------ test/library_server.cpp | 4 ++-- test/server.cpp | 16 ++++++++-------- 5 files changed, 35 insertions(+), 58 deletions(-) diff --git a/static/skin/index.css b/static/skin/index.css index 0595360c..6e6e973b 100644 --- a/static/skin/index.css +++ b/static/skin/index.css @@ -140,29 +140,6 @@ font-weight: bolder; } -#uiLanguageSelector { - display: none; -} - -#uiLanguageSelector .modal { - height: 140px; -} - -#uiLanguageSelector .modal-heading { - height: 40%; -} - -#uiLanguageSelector .modal-content #ui_language { - font-size: 1.6rem; - width: 100%; -} - -#uiLanguageSelectorButton { - margin: 0 12px 0 0; - float: right; - cursor: pointer; -} - .book__list { position: relative; margin: 0 auto; @@ -395,7 +372,7 @@ width: auto; } -.feedLogo, #uiLanguageSelectorButton { +.feedLogo { height: 30px; float: right; } diff --git a/static/skin/kiwix.css b/static/skin/kiwix.css index d46cff84..32b2a8d6 100644 --- a/static/skin/kiwix.css +++ b/static/skin/kiwix.css @@ -72,6 +72,30 @@ body { padding: 20px; } +#uiLanguageSelector { + display: none; +} + +#uiLanguageSelector .modal { + height: 140px; +} + +#uiLanguageSelector .modal-heading { + height: 40%; +} + +#uiLanguageSelector .modal-content #ui_language { + font-size: 1.6rem; + width: 100%; +} + +#uiLanguageSelectorButton { + margin: 0px 12px 6px 12px; + float: right; + cursor: pointer; + height: 30px; +} + @font-face { font-family: "poppins"; src: url("../skin/fonts/Poppins.ttf?KIWIXCACHEID") format("truetype"); diff --git a/static/skin/taskbar.css b/static/skin/taskbar.css index fd4d1442..8159ea9f 100644 --- a/static/skin/taskbar.css +++ b/static/skin/taskbar.css @@ -131,30 +131,6 @@ a.suggest, a.suggest:visited, a.suggest:hover, a.suggest:active { column-count: 1 !important; } -#uiLanguageSelector { - display: none; -} - -#uiLanguageSelector .modal { - height: 140px; -} - -#uiLanguageSelector .modal-heading { - height: 40%; -} - -#uiLanguageSelector .modal-content #ui_language { - font-size: 1.6rem; - width: 100%; -} - -#uiLanguageSelectorButton { - margin: 0px 12px 6px 12px; - float: right; - cursor: pointer; - height: 30px; -} - @media(min-width:420px) { .kiwix_button_cont { display: inline-block !important; diff --git a/test/library_server.cpp b/test/library_server.cpp index 04465684..057e2590 100644 --- a/test/library_server.cpp +++ b/test/library_server.cpp @@ -1028,12 +1028,12 @@ TEST_F(LibraryServerTest, no_name_mapper_catalog_v2_individual_entry_access) " Welcome to Kiwix Server\n" \ " \n" \ " \n" \ " \n" \ diff --git a/test/server.cpp b/test/server.cpp index 914f60c9..38bdc48a 100644 --- a/test/server.cpp +++ b/test/server.cpp @@ -61,17 +61,19 @@ const ResourceCollection resources200Compressible{ { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/i18n.js" }, { STATIC_CONTENT, "/ROOT%23%3F/skin/i18n.js?cacheid=6a8c6fb2" }, { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/index.css" }, - { STATIC_CONTENT, "/ROOT%23%3F/skin/index.css?cacheid=081e1606" }, + { STATIC_CONTENT, "/ROOT%23%3F/skin/index.css?cacheid=4196ad7d" }, { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/index.js" }, { STATIC_CONTENT, "/ROOT%23%3F/skin/index.js?cacheid=ce19da2a" }, { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/iso6391To3.js" }, { STATIC_CONTENT, "/ROOT%23%3F/skin/iso6391To3.js?cacheid=ecde2bb3" }, { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/isotope.pkgd.min.js" }, { STATIC_CONTENT, "/ROOT%23%3F/skin/isotope.pkgd.min.js?cacheid=2e48d392" }, + { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/kiwix.css" }, + { STATIC_CONTENT, "/ROOT%23%3F/skin/kiwix.css?cacheid=9b1b089f" }, { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/mustache.min.js" }, { STATIC_CONTENT, "/ROOT%23%3F/skin/mustache.min.js?cacheid=bd23c4fb" }, { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/taskbar.css" }, - { STATIC_CONTENT, "/ROOT%23%3F/skin/taskbar.css?cacheid=04cb5531" }, + { STATIC_CONTENT, "/ROOT%23%3F/skin/taskbar.css?cacheid=8c05f7fc" }, { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/viewer.js" }, { STATIC_CONTENT, "/ROOT%23%3F/skin/viewer.js?cacheid=201653b8" }, { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/fonts/Poppins.ttf" }, @@ -140,8 +142,6 @@ const ResourceCollection resources200Uncompressible{ { STATIC_CONTENT, "/ROOT%23%3F/skin/favicon/site.webmanifest?cacheid=bc396efb" }, { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/hash.png" }, { STATIC_CONTENT, "/ROOT%23%3F/skin/hash.png?cacheid=f836e872" }, - { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/kiwix.css" }, - { STATIC_CONTENT, "/ROOT%23%3F/skin/kiwix.css?cacheid=bdae4d22" }, { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/magnet.png" }, { STATIC_CONTENT, "/ROOT%23%3F/skin/magnet.png?cacheid=73b6bddf" }, { DYNAMIC_CONTENT, "/ROOT%23%3F/skin/search-icon.svg" }, @@ -276,8 +276,8 @@ TEST_F(ServerTest, CacheIdsOfStaticResources) const std::vector testData{ { /* url */ "/ROOT%23%3F/", -R"EXPECTEDRESULT( href="/ROOT%23%3F/skin/kiwix.css?cacheid=bdae4d22" - href="/ROOT%23%3F/skin/index.css?cacheid=081e1606" +R"EXPECTEDRESULT( href="/ROOT%23%3F/skin/kiwix.css?cacheid=9b1b089f" + href="/ROOT%23%3F/skin/index.css?cacheid=4196ad7d" @@ -315,8 +315,8 @@ R"EXPECTEDRESULT( - +R"EXPECTEDRESULT( +