diff options
author | Arun Isaac | 2022-07-19 17:00:27 +0530 |
---|---|---|
committer | Arun Isaac | 2022-07-19 17:37:07 +0530 |
commit | a2a150066f5b2e1b0eef6b3f8c42bb1091136d2e (patch) | |
tree | aa1e34c01afb5bf809e53eb421410a58bba7bf5a /tissue/issue.scm | |
parent | 9ba28fa5c972061c94a033240469252166fdd964 (diff) | |
download | tissue-a2a150066f5b2e1b0eef6b3f8c42bb1091136d2e.tar.gz tissue-a2a150066f5b2e1b0eef6b3f8c42bb1091136d2e.tar.lz tissue-a2a150066f5b2e1b0eef6b3f8c42bb1091136d2e.zip |
issue: Render tags as an unordered list.
* tissue/issue.scm (document->sxml): Render tags as an unordered list.
* tissue/web/server.scm (%css): Style list items with tag classes, not
anchor tags.
Diffstat (limited to 'tissue/issue.scm')
-rw-r--r-- | tissue/issue.scm | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/tissue/issue.scm b/tissue/issue.scm index 9e2ca9c..5868120 100644 --- a/tissue/issue.scm +++ b/tissue/issue.scm @@ -178,17 +178,11 @@ object representing a list of search results." (a (@ (href ,(document-web-uri issue)) (class "search-result-title")) ,(document-title issue)) - ,@(map (lambda (tag) - (let ((words (string-split tag (char-set #\- #\space)))) - `(a (@ (href ,(string-append - "/search?query=" - (uri-encode - ;; Quote tag if it has spaces. - (string-append "tag:" - (if (string-any #\space tag) - (string-append "\"" tag "\"") - tag))))) - (class ,(string-append "tag" + (ul (@ (class "tags")) + ,@(map (lambda (tag) + (let ((words (string-split tag (char-set #\- #\space)))) + `(li (@ (class + ,(string-append "tag" (string-append " tag-" (sanitize-string tag)) (if (not (null? (lset-intersection string=? words @@ -210,8 +204,16 @@ object representing a list of search results." (list "enhancement" "feature")))) " tag-feature" "")))) - ,tag))) - (issue-keywords issue)) + (a (@ (href ,(string-append + "/search?query=" + (uri-encode + ;; Quote tag if it has spaces. + (string-append "tag:" + (if (string-any #\space tag) + (string-append "\"" tag "\"") + tag)))))) + ,tag)))) + (issue-keywords issue))) (div (@ (class "search-result-metadata")) ,(string-append (format #f "opened ~a by ~a" |