summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2022-06-29 16:05:32 +0530
committerArun Isaac2022-06-29 16:05:32 +0530
commiteabd3efb68a568bc26ded4f65f4c59b7e406cb5b (patch)
tree7d500ce41611640e41b2de43851d89e4fa666a49
parentec552aec7a911810e1cb84ccc82ec08108c80f65 (diff)
downloadtissue-eabd3efb68a568bc26ded4f65f4c59b7e406cb5b.tar.gz
tissue-eabd3efb68a568bc26ded4f65f4c59b7e406cb5b.tar.lz
tissue-eabd3efb68a568bc26ded4f65f4c59b7e406cb5b.zip
web: server: Self-document search filters.
* tissue/web/server.scm (make-search-page): Self-document search filters. (%css)[.search-hint, .search-filter]: New rules.
-rw-r--r--tissue/web/server.scm35
1 files changed, 35 insertions, 0 deletions
diff --git a/tissue/web/server.scm b/tissue/web/server.scm
index 55e57e1..22b0eb0 100644
--- a/tissue/web/server.scm
+++ b/tissue/web/server.scm
@@ -45,6 +45,17 @@ form {
text-align: center;
}
+.search-hint {
+ line-height: 2em;
+}
+
+.search-filter {
+ background-color: gray;
+ color: white;
+ border-radius: 0.2em;
+ padding: 0 0.2em;
+}
+
.search-result {
list-style-type: none;
padding: 0.5em;
@@ -136,6 +147,30 @@ a URI to a stylesheet."
(value ,query)
(placeholder "Enter search query")))
(input (@ (type "submit") (value "Search"))))
+ (details (@ (class "search-hint"))
+ (summary "Hint")
+ (p "Refine your search with filters "
+ ,@(append-map (lambda (filter)
+ (list `(span (@ (class "search-filter"))
+ ,filter)
+ ", "))
+ (list "type:issue"
+ "type:document"
+ "is:open"
+ "is:closed"
+ "title:git"
+ "creator:mani"
+ "lastupdater:vel"
+ "assigned:muthu"
+ "tag:feature-request"))
+ "etc. Optionally, combine search terms with boolean
+operators "
+ (span (@ (class "search-filter"))
+ "AND")
+ " and "
+ (span (@ (class "search-filter"))
+ "OR")
+ "."))
(ul ,@results))))
(define (query-parameters query)