From ae56d399b74187f7f24712135b05f5afbc66f918 Mon Sep 17 00:00:00 2001 From: Veloman Yunkan Date: Sun, 8 May 2022 13:40:47 +0400 Subject: [PATCH] Explained why search_result.html needs inline CSS In #727 inline CSS [was extracted](https://github.com/kiwix/libkiwix/pull/727/commits/e4a4b2f9618e126fbc6240b5693afe993a4943d0) from `static/templates/no_search_result.html` into a separate stylesheet resource. The purpose was to later 1. get rid of the custom `static/templates/no_search_result.html` error template and use a general purpose error template instead (this was accomplished by PR #744). 2. deduplicate the CSS code between `static/templates/no_search_result.html` and `static/templates/search_result.html` by making the latter to also refer to an internal CSS resource rather than containing inline stylesheet code. While preparing to implement the 2nd point, I figured out that `kiwix::SearchRenderer` is used as a component in `kiwix-desktop` too, which probably would be upset by a link to a libkiwix's internal CSS resource. This commit documents that finding. --- static/templates/search_result.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/static/templates/search_result.html b/static/templates/search_result.html index c0ec3b02e..c16325aa6 100644 --- a/static/templates/search_result.html +++ b/static/templates/search_result.html @@ -2,6 +2,12 @@ + + {{! + The inline CSS below can be extracted into a standalone CSS resource + ONLY IF all clients of kiwix::SearchRenderer are required to provide + access to resources compiled into libkiwix. + }}