From 251174c9a2a390f04ea5211c2a25c9b31ccd22c5 Mon Sep 17 00:00:00 2001 From: Viktor Lofgren Date: Tue, 21 Nov 2023 13:02:18 +0100 Subject: [PATCH] (search) Update front page with new look --- .../main/resources/static/search/serp.scss | 56 ++++++++++++++++++- .../templates/search/index/index-about.hdb | 2 +- .../templates/search/index/index-news.hdb | 28 +++++----- .../templates/search/index/index-tips.hdb | 42 +++++++------- .../templates/search/index/index-updates.hdb | 10 ---- .../templates/search/index/index.hdb | 12 +--- 6 files changed, 92 insertions(+), 58 deletions(-) delete mode 100644 code/services-application/search-service/src/main/resources/templates/search/index/index-updates.hdb 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 a668a03b..c5207765 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 @@ -25,6 +25,54 @@ body { padding: 0; } +#frontpage { + display: grid; + grid-template-columns: 1fr auto; + grid-template-rows: auto 1fr; + grid-gap: 1ch; + align-items: start; + justify-content: start; + margin-top: 1ch; + margin-bottom: 1ch; + // named grid areas + grid-template-areas: + "frontpage-about frontpage-news" + "frontpage-tips frontpage-news"; + + @media (max-device-width: 624px) { + grid-template-columns: 1fr; + grid-template-rows: auto auto auto; + grid-gap: 1ch; + align-items: start; + justify-content: start; + margin-top: 1ch; + margin-bottom: 1ch; + // named grid areas + grid-template-areas: + "frontpage-about" + "frontpage-tips" + "frontpage-news"; + + * { max-width: unset !important; min-width: unset !important; } + } + + #frontpage-news { + grid-area: frontpage-news; + max-width: 40ch; + @extend .dialog; + } + #frontpage-about { + grid-area: frontpage-about; + min-width: 40ch; + @extend .dialog; + } + #frontpage-tips { + grid-area: frontpage-tips; + min-width: 40ch; + @extend .dialog; + } +} + #siteinfo-nav { display: block; width: 100%; @@ -319,14 +367,18 @@ footer { input[type="text"] { font-family: monospace; - font-size: 14pt; + font-size: 12pt; padding: 0.5ch; border: 1px solid $border-color; + background-color: $fg-light; + color: $fg-dark; } button[type="submit"] { - font-size: 14pt; + font-size: 12pt; border: 1px solid $border-color; + background-color: $fg-light; + color: $fg-dark; } } diff --git a/code/services-application/search-service/src/main/resources/templates/search/index/index-about.hdb b/code/services-application/search-service/src/main/resources/templates/search/index/index-about.hdb index 1316858e..7328d2ee 100644 --- a/code/services-application/search-service/src/main/resources/templates/search/index/index-about.hdb +++ b/code/services-application/search-service/src/main/resources/templates/search/index/index-about.hdb @@ -1,4 +1,4 @@ -
+

About

This is an independent DIY search engine that focuses on non-commercial content, and attempts to diff --git a/code/services-application/search-service/src/main/resources/templates/search/index/index-news.hdb b/code/services-application/search-service/src/main/resources/templates/search/index/index-news.hdb index 52d5abd4..286c4451 100644 --- a/code/services-application/search-service/src/main/resources/templates/search/index/index-news.hdb +++ b/code/services-application/search-service/src/main/resources/templates/search/index/index-news.hdb @@ -1,17 +1,17 @@ {{#if news}} -

-

Publicity, Discussion and Events

-
-
- {{#each news}} -
{{title}}
-
{{date}} {{source}}
- {{/each}} -
-
- -
+
+

Publicity, Discussion and Events

+
+
+ {{#each news}} +
{{title}}
+
{{date}} {{source}}
+ {{/each}} +
+
+ +
{{/if}} \ No newline at end of file diff --git a/code/services-application/search-service/src/main/resources/templates/search/index/index-tips.hdb b/code/services-application/search-service/src/main/resources/templates/search/index/index-tips.hdb index 6479cfd2..c50273d0 100644 --- a/code/services-application/search-service/src/main/resources/templates/search/index/index-tips.hdb +++ b/code/services-application/search-service/src/main/resources/templates/search/index/index-tips.hdb @@ -1,23 +1,21 @@ -
-

Tips

-
-

- This search engine isn't particularly well equipped to answering queries - posed like questions, instead try to imagine some text that might appear - in the website you are looking for, and search for that.

-

- Where this search engine really shines is finding small, old and obscure websites about some - given topic, perhaps - old video games, - a mystery, - theology, - the occult, - knitting, - computer science, - or art. -

+
+

Tips

+
+

+ This search engine isn't particularly well equipped to answering queries + posed like questions, instead try to imagine some text that might appear + in the website you are looking for, and search for that.

+

+ Where this search engine really shines is finding small, old and obscure websites about some + given topic, perhaps + old video games, + a mystery, + theology, + the occult, + knitting, + computer science, + or art. +

-
-
-
-
\ No newline at end of file +
+
\ 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 deleted file mode 100644 index 40dbf00e..00000000 --- a/code/services-application/search-service/src/main/resources/templates/search/index/index-updates.hdb +++ /dev/null @@ -1,10 +0,0 @@ -
-

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/index/index.hdb b/code/services-application/search-service/src/main/resources/templates/search/index/index.hdb index 9cc25472..8cb33913 100644 --- a/code/services-application/search-service/src/main/resources/templates/search/index/index.hdb +++ b/code/services-application/search-service/src/main/resources/templates/search/index/index.hdb @@ -4,7 +4,7 @@ Marginalia Search - + @@ -20,18 +20,12 @@ {{>search/parts/search-header}} - -
{{>search/parts/search-form}} - +
{{>search/index/index-news}} -
{{>search/index/index-about}} {{>search/index/index-tips}} -{{>search/index/index-updates}} -
- -
+
{{>search/parts/search-footer}}