diff --git a/public/images/info.svg b/public/images/info.svg
new file mode 100644
index 0000000..0007caf
--- /dev/null
+++ b/public/images/info.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/public/images/no_results.gif b/public/images/no_results.gif
new file mode 100644
index 0000000..1bace34
Binary files /dev/null and b/public/images/no_results.gif differ
diff --git a/public/images/warning.svg b/public/images/warning.svg
new file mode 100644
index 0000000..4139fb2
--- /dev/null
+++ b/public/images/warning.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/public/static/error_box.js b/public/static/error_box.js
new file mode 100644
index 0000000..bc22e5a
--- /dev/null
+++ b/public/static/error_box.js
@@ -0,0 +1,3 @@
+function toggleErrorBox() {
+
+}
diff --git a/public/static/themes/simple.css b/public/static/themes/simple.css
index 0144e34..cd5f20a 100644
--- a/public/static/themes/simple.css
+++ b/public/static/themes/simple.css
@@ -70,6 +70,27 @@ body {
filter: brightness(1.2);
}
+.result_not_found {
+ display: flex;
+ flex-direction: column;
+ font-size: 1.5rem;
+ color: var(--foreground-color);
+}
+
+.result_not_found p {
+ margin: 1rem 0;
+}
+
+.result_not_found ul {
+ margin: 1rem 0;
+}
+
+.result_not_found img {
+ width: 40rem;
+}
+
+
+
/* styles for the footer and header */
header {
diff --git a/public/templates/search.html b/public/templates/search.html
index 7aeabe9..2c3a0d9 100644
--- a/public/templates/search.html
+++ b/public/templates/search.html
@@ -1,8 +1,8 @@
{{>header this.style}}
- {{>search_bar}}
+ {{>search_bar this}}
- {{#each results}}
+ {{#if results}} {{#each results}}
{{{this.url}}}
@@ -13,13 +13,27 @@
{{/each}}
- {{/each}}
+ {{/each}} {{else}}
+
+
Your search - {{{this.pageQuery}}} - did not match any documents.
+
Suggestions:
+
+ - Make sure that all words are spelled correctly.
+ - Try different keywords.
+ - Try more general keywords.
+
+

+
+ {{/if}}
-
+
+
{{>footer}}
diff --git a/public/templates/search_bar.html b/public/templates/search_bar.html
index 32cc8ff..2eff7a1 100644
--- a/public/templates/search_bar.html
+++ b/public/templates/search_bar.html
@@ -6,4 +6,20 @@
placeholder="Type to search"
/>
+
+
+ {{#each engineErrorsInfo}}
+
+ {{{this.engine}}}
+ {{{this.error}}}
+ lsl
+
+ {{/each}}
+
diff --git a/src/results/aggregation_models.rs b/src/results/aggregation_models.rs
index 6766fae..b1905fa 100644
--- a/src/results/aggregation_models.rs
+++ b/src/results/aggregation_models.rs
@@ -116,10 +116,12 @@ impl RawSearchResult {
}
}
+///
#[derive(Serialize, Deserialize)]
pub struct EngineErrorInfo {
pub error: String,
pub engine: String,
+ pub severity_color: String,
}
impl EngineErrorInfo {
@@ -131,6 +133,11 @@ impl EngineErrorInfo {
EngineError::UnexpectedError => String::from("UnexpectedError"),
},
engine,
+ severity_color: match error {
+ EngineError::RequestError => String::from("green"),
+ EngineError::EmptyResultSet => String::from("blue"),
+ EngineError::UnexpectedError => String::from("red"),
+ },
}
}
}