diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2020-03-31 23:53:07 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2020-03-31 23:53:07 +0200 |
commit | f335e3b97130161171f9164c9d00469ff5088b77 (patch) | |
tree | 2622735148a16f6d149d953066f5eeb6f14b09cc | |
parent | 115234b866b81bd150a97d975267baa4b07989fa (diff) |
view/html: Add search-widget.
-rw-r--r-- | mumi/web/view/html.scm | 60 |
1 files changed, 32 insertions, 28 deletions
diff --git a/mumi/web/view/html.scm b/mumi/web/view/html.scm index 281b684..8693fdc 100644 --- a/mumi/web/view/html.scm +++ b/mumi/web/view/html.scm @@ -125,6 +125,37 @@ (d "M6.5 12a5.5 5.5 0 100-11 5.5 5.5 0 000 11zM13 6.5a6.5 6.5 0 11-13 0 6.5 6.5 0 0113 0z") (clip-rule "evenodd")) ""))))))) + +(define* (search-widget #:key (text "")) + `(div + (@ (class "card mb-3")) + (div (@ (class "card-body bg-light")) + ,(search-form #:standalone? #t #:text text) + (details + (summary (strong "Hint")) + (p + "Refine your search with filters like " + (span (@ (class "filter")) + "is:open") + ", " + (span (@ (class "filter")) + "author:me") + ", " + (span (@ (class "filter")) + "submitter:me") + ", " + (span (@ (class "filter")) + "date:2d..now") + ", " + (span (@ (class "filter")) + "date:2018-04-01..2018-04-02") + ", " + (span (@ (class "filter")) + "date:1m..today") + ", and " + (a (@ (href "help#search")) + "many more!")))))) + (define* (header #:key (search-bar? #t)) `(nav (@ (class "navbar navbar-expand navbar-light bg-light")) @@ -151,34 +182,7 @@ (a (@ (href ,(string-append "mailto:" (%config 'submission-bug-email-address)))) ,(%config 'submission-bug-email-address)) " to submit a bug report.") - (div - (@ (class "card")) - (div (@ (class "card-body bg-light")) - ,(search-form #:standalone? #t) - (details - (summary (strong "Hint")) - (p - "Refine your search with filters like " - (span (@ (class "filter")) - "is:open") - ", " - (span (@ (class "filter")) - "author:me") - ", " - (span (@ (class "filter")) - "submitter:me") - ", " - (span (@ (class "filter")) - "date:2d..now") - ", " - (span (@ (class "filter")) - "date:2018-04-01..2018-04-02") - ", " - (span (@ (class "filter")) - "date:1m..today") - ", and " - (a (@ (href "help#search")) - "many more!"))))) + ,(search-widget) (table (@ (class "table table-borderless table-hover")) |