From e4a4b2f9618e126fbc6240b5693afe993a4943d0 Mon Sep 17 00:00:00 2001 From: Veloman Yunkan Date: Sun, 30 Jan 2022 15:55:56 +0400 Subject: [PATCH] Extracted CSS out of no_search_results.html --- src/server/internalServer.cpp | 1 + static/resources_list.txt | 1 + static/skin/search_results.css | 86 ++++++++++++++++++++++++ static/templates/no_search_result.html | 90 +------------------------- 4 files changed, 89 insertions(+), 89 deletions(-) create mode 100644 static/skin/search_results.css diff --git a/src/server/internalServer.cpp b/src/server/internalServer.cpp index 1e0fe8a26..eb43286bd 100644 --- a/src/server/internalServer.cpp +++ b/src/server/internalServer.cpp @@ -517,6 +517,7 @@ std::unique_ptr InternalServer::handle_search(const RequestContext& re || (patternString.empty() && ! has_geo_query) ) { auto data = get_default_data(); data.set("pattern", encodeDiples(patternString)); + data.set("root", m_root); auto response = ContentResponse::build(*this, RESOURCE::templates::no_search_result_html, data, "text/html; charset=utf-8"); response->set_taskbar(bookName, archive ? getArchiveTitle(*archive) : ""); response->set_code(MHD_HTTP_NOT_FOUND); diff --git a/static/resources_list.txt b/static/resources_list.txt index b0b7a336a..5587111c0 100644 --- a/static/resources_list.txt +++ b/static/resources_list.txt @@ -32,6 +32,7 @@ skin/index.css skin/fonts/Poppins.ttf skin/fonts/Roboto.ttf skin/block_external.js +skin/search_results.css templates/search_result.html templates/no_search_result.html templates/404.html diff --git a/static/skin/search_results.css b/static/skin/search_results.css new file mode 100644 index 000000000..df3a54c04 --- /dev/null +++ b/static/skin/search_results.css @@ -0,0 +1,86 @@ +body{ +color: #000000; +font: small/normal Arial,Helvetica,Sans-Serif; +margin-top: 0.5em; +font-size: 90%; +} + +a{ +color: #04c; +} + +a:visited { +color: #639 +} + +a:hover { +text-decoration: underline +} + +.header { +font-size: 120%; +} + +ul { +margin:0; +padding:0 +} + +.results { +font-size: 110%; +} + +.results li { +list-style-type:none; +margin-top: 0.5em; +} + +.results a { +font-size: 110%; +text-decoration: underline +} + +cite { +font-style:normal; +word-wrap:break-word; +display: block; +font-size: 100%; +} + +.informations { +color: #388222; +font-size: 100%; +} + +.footer { +padding: 0; +margin-top: 1em; +width: 100%; +float: left +} + +.footer a, .footer span { +display: block; +padding: .3em .7em; +margin: 0 .38em 0 0; +text-align:center; +text-decoration: none; +} + +.footer a:hover { +background: #ededed; +} + +.footer ul, .footer li { +list-style:none; +margin: 0; +padding: 0; +} + +.footer li { +float: left; +} + +.selected { +background: #ededed; +} diff --git a/static/templates/no_search_result.html b/static/templates/no_search_result.html index 104708850..5105e200c 100644 --- a/static/templates/no_search_result.html +++ b/static/templates/no_search_result.html @@ -2,96 +2,8 @@ - Fulltext search unavailable +
Not found