From dda780c694c3a7459d9d475096b7cb5bfd75e7b0 Mon Sep 17 00:00:00 2001 From: Umar Getagazov Date: Sun, 10 Jul 2022 08:36:35 +0700 Subject: [PATCH] UI fixups for f449fe8 Mostly returning the look to the previous state, code formatting, and adjusting the look of the search results label. --- static/main.css | 16 ++++++++++++++++ templates/form.html | 2 +- templates/search.html | 32 ++++++++++++++++---------------- 3 files changed, 33 insertions(+), 17 deletions(-) diff --git a/static/main.css b/static/main.css index 89def26..e3f9d25 100644 --- a/static/main.css +++ b/static/main.css @@ -100,6 +100,16 @@ button:hover { margin: 1rem auto 0; } +.search p[role="note"] { + color: gray; + font-size: 0.875rem; + margin-bottom: 0.5rem; +} + +.search ol { + margin-top: 0; +} + .about main { max-width: 800px; width: 800px; @@ -193,6 +203,12 @@ ol { } .result .title { + margin: 0; + font-size: 1rem; + font-weight: normal; +} + +.result .title a { display: block; } diff --git a/templates/form.html b/templates/form.html index 780a3fe..ec1615d 100644 --- a/templates/form.html +++ b/templates/form.html @@ -15,7 +15,7 @@ name="q" placeholder="Search terms..." autofocus - required + required value="{{.Query}}" /> diff --git a/templates/search.html b/templates/search.html index 5ae0949..c8e379a 100644 --- a/templates/search.html +++ b/templates/search.html @@ -3,21 +3,21 @@ {{template "form.html" .}}
-{{if .Results}} -

{{len .Results}} search results found

-
    - {{range .Results}} -
  1. -

    {{.Page.Title}}

    - {{.Page.Url}} - {{if .Page.Excerpt}} -

    {{.Page.Excerpt}}

    - {{end}} -
  2. - {{end}} -
-{{else}} -

No search results found

-{{end}} + {{if .Results}} +

{{len .Results}} search results found

+
    + {{range .Results}} +
  1. +

    {{.Page.Title}}

    + {{.Page.Url}} + {{if .Page.Excerpt}} +

    {{.Page.Excerpt}}

    + {{end}} +
  2. + {{end}} +
+ {{else}} +

No search results found

+ {{end}}
{{template "footer.html" .}}