From 42ea87d6374466b5e01306aa0116d82a50d4047f Mon Sep 17 00:00:00 2001 From: Viktor Lofgren Date: Sun, 19 Nov 2023 16:03:44 +0100 Subject: [PATCH] (search) Update conversion results, error page, and dictionary results with new CSS. --- .../main/resources/static/search/serp.scss | 25 +++------- .../templates/search/browse-result.hdb | 2 +- .../templates/search/browse-results.hdb | 32 ++++-------- .../templates/search/conversion-results.hdb | 24 ++------- .../templates/search/dictionary-results.hdb | 50 ++++++++----------- .../templates/search/error-page-search.hdb | 13 ++--- .../resources/templates/search/error-page.hdb | 6 +-- .../templates/search/index/index-updates.hdb | 20 ++++---- .../templates/search/search-results.hdb | 1 - 9 files changed, 61 insertions(+), 112 deletions(-) diff --git a/code/services-application/search-service/src/main/resources/static/search/serp.scss b/code/services-application/search-service/src/main/resources/static/search/serp.scss index fb5667e6..a668a03b 100644 --- a/code/services-application/search-service/src/main/resources/static/search/serp.scss +++ b/code/services-application/search-service/src/main/resources/static/search/serp.scss @@ -48,12 +48,6 @@ body { display: inline-block; color: #000; } - - .link-unavailable { - display: inline-block; - text-decoration: line-through; - color: #888; - } } li.current { @@ -154,6 +148,10 @@ header { } .infobox { + h2 { + @extend .heading; + } + background-color: #fff; padding: 1ch; margin: 1ch; @@ -177,17 +175,7 @@ section.cards { box-shadow: #0008 0 0 5px; h2 { - color: #fff; - background-color: $highlight-light; - border-bottom: 1px solid $border-color; - font-weight: normal; - font-size: 12pt; - padding: .5ch .5ch .5ch .5ch; - margin: 0 0 0 0; - word-break: break-word; - font-family: $heading-fonts; - - text-decoration: none; + @extend .heading; } h2 a { @@ -289,12 +277,15 @@ footer { margin: 0; padding: 0.5ch; background-color: $highlight-dark; + border-bottom: 1px solid $border-color; font-family: $heading-fonts; font-weight: normal; color: $fg-light; font-size: 12pt; + word-break: break-word; } + .sidebar-narrow { display: grid; grid-template-columns: auto max-content; diff --git a/code/services-application/search-service/src/main/resources/templates/search/browse-result.hdb b/code/services-application/search-service/src/main/resources/templates/search/browse-result.hdb index d2be3661..e20a9e91 100644 --- a/code/services-application/search-service/src/main/resources/templates/search/browse-result.hdb +++ b/code/services-application/search-service/src/main/resources/templates/search/browse-result.hdb @@ -1,4 +1,4 @@ -
+

{{url.domain}}

diff --git a/code/services-application/search-service/src/main/resources/templates/search/browse-results.hdb b/code/services-application/search-service/src/main/resources/templates/search/browse-results.hdb index c8d38481..d4a4a21b 100644 --- a/code/services-application/search-service/src/main/resources/templates/search/browse-results.hdb +++ b/code/services-application/search-service/src/main/resources/templates/search/browse-results.hdb @@ -13,38 +13,24 @@ {{>search/parts/search-header}} - -
- {{>search/parts/search-form}} +{{>search/parts/search-form}}
+ {{#each results}}{{>search/browse-result}}{{/each}} -{{#unless focusDomain}} -
-

Random Domains

- -

- This list of domains is random. Refresh to get - new domains, or click Similar Domains to - take the helm. -

-
-{{/unless}} -
-
{{>search/parts/search-footer}} diff --git a/code/services-application/search-service/src/main/resources/templates/search/conversion-results.hdb b/code/services-application/search-service/src/main/resources/templates/search/conversion-results.hdb index 85ff5750..40ff3ab0 100644 --- a/code/services-application/search-service/src/main/resources/templates/search/conversion-results.hdb +++ b/code/services-application/search-service/src/main/resources/templates/search/conversion-results.hdb @@ -4,7 +4,7 @@ Marginalia Search - {{query}} - + @@ -12,26 +12,12 @@ {{>search/parts/search-header}} +{{>search/parts/search-form}} -
- {{>search/parts/search-form}} +
+ {{query}} = {{result}} +
-
-
-

{{query}}

-

{{result}}

-
-
-

Warning

-

- These results use floating point calculations, and may not be accurate - for very large or very small numbers. Do not use for orbital calculations, - thesis projects, or other sensitive work. -

-
-
- -
{{>search/parts/search-footer}} \ No newline at end of file diff --git a/code/services-application/search-service/src/main/resources/templates/search/dictionary-results.hdb b/code/services-application/search-service/src/main/resources/templates/search/dictionary-results.hdb index ed43e2a7..9fb3095d 100644 --- a/code/services-application/search-service/src/main/resources/templates/search/dictionary-results.hdb +++ b/code/services-application/search-service/src/main/resources/templates/search/dictionary-results.hdb @@ -4,7 +4,7 @@ Marginalia Search - {{query}} - + @@ -12,37 +12,29 @@ {{>search/parts/search-header}} +{{>search/parts/search-form}} -
- {{>search/parts/search-form}} +
+{{#unless entries}} +No definitions were found for that word +{{/unless}} -
- {{#unless entries}} -
-

No Results

-
No definitions were found for that word
-
- {{/unless}} +{{#if entries}} +
    +{{#each entries}} +
  • {{word}}, {{type}}: {{definition}}
  • +{{/each}} +
+{{/if}} +
- {{#each entries}} -
-

{{type}} - {{word}}

-
{{definition}}
-
- {{/each}} - - {{#if entries}} -
-

Legal

-

- This data is derived from wiktionary, - available under GFDL and CC BY-SA 3.0. More Information. -

-
- {{/if}} -
- - +{{#if entries}} +
+

Legal

+This data is derived from wiktionary, +available under GFDL and CC BY-SA 3.0. More Information. +
+{{/if}} {{>search/parts/search-footer}} diff --git a/code/services-application/search-service/src/main/resources/templates/search/error-page-search.hdb b/code/services-application/search-service/src/main/resources/templates/search/error-page-search.hdb index 08bdf1e1..bd60a825 100644 --- a/code/services-application/search-service/src/main/resources/templates/search/error-page-search.hdb +++ b/code/services-application/search-service/src/main/resources/templates/search/error-page-search.hdb @@ -4,7 +4,7 @@ Marginalia Search - {{title}} - + @@ -13,17 +13,12 @@ {{>search/parts/search-header}} - -
{{>search/parts/search-form}} -
-
-

{{ title }}

-
{{{message}}}
-
+
+

{{ title }}

+
{{{message}}}
-
{{>search/parts/search-footer}} diff --git a/code/services-application/search-service/src/main/resources/templates/search/error-page.hdb b/code/services-application/search-service/src/main/resources/templates/search/error-page.hdb index f56edf19..53141afb 100644 --- a/code/services-application/search-service/src/main/resources/templates/search/error-page.hdb +++ b/code/services-application/search-service/src/main/resources/templates/search/error-page.hdb @@ -1,11 +1,11 @@ Error - + -
+

Error

Oops! It appears the index server is {{indexState}}.

The server was probably restarted to bring online some changes. Restarting the index typically takes @@ -15,6 +15,6 @@ on Twitter may have details, otherwise you can always send me an email at kontakt@marginalia.nu.

This page will attempt to refresh automatically every few seconds.

-
+ \ No newline at end of file diff --git a/code/services-application/search-service/src/main/resources/templates/search/index/index-updates.hdb b/code/services-application/search-service/src/main/resources/templates/search/index/index-updates.hdb index 40afcfc7..40dbf00e 100644 --- a/code/services-application/search-service/src/main/resources/templates/search/index/index-updates.hdb +++ b/code/services-application/search-service/src/main/resources/templates/search/index/index-updates.hdb @@ -1,10 +1,10 @@ -
-

Updates

-
-

☛ It is possible to search by website generator.

-

☛ New filters for forums and wikis are added.

-
- -
\ No newline at end of file +
+

Updates

+
+

☛ It is possible to search by website generator.

+

☛ New filters for forums and wikis are added.

+
+ +
\ No newline at end of file diff --git a/code/services-application/search-service/src/main/resources/templates/search/search-results.hdb b/code/services-application/search-service/src/main/resources/templates/search/search-results.hdb index 70eab6ce..5c51cd69 100644 --- a/code/services-application/search-service/src/main/resources/templates/search/search-results.hdb +++ b/code/services-application/search-service/src/main/resources/templates/search/search-results.hdb @@ -15,7 +15,6 @@ {{>search/parts/search-header}} - {{>search/parts/search-form}}