summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2022-06-29 14:35:07 +0530
committerArun Isaac2022-06-29 14:35:07 +0530
commit60736746f2fff10ee858e4e2dad7dfde94f35546 (patch)
treee7dbba05e733c90eca6f3c6e1018669ef41ce27a
parent5d710f0757b3dcef8f34ead9bba1d545f3cb0bba (diff)
downloadtissue-60736746f2fff10ee858e4e2dad7dfde94f35546.tar.gz
tissue-60736746f2fff10ee858e4e2dad7dfde94f35546.tar.lz
tissue-60736746f2fff10ee858e4e2dad7dfde94f35546.zip
document: Add CSS classes identifying document type.
* tissue/document.scm (document->sxml): Add search-result-document class. * tissue/issue.scm (document->sxml): Add search-result-issue and search-result-open-issue/search-result-closed-issue classes.
-rw-r--r--tissue/document.scm2
-rw-r--r--tissue/issue.scm5
2 files changed, 5 insertions, 2 deletions
diff --git a/tissue/document.scm b/tissue/document.scm
index e9bdb65..e5ae11b 100644
--- a/tissue/document.scm
+++ b/tissue/document.scm
@@ -242,7 +242,7 @@ object representing a list of search results."
(define-method (document->sxml (document <file-document>) mset)
"Render DOCUMENT to SXML. MSET is the xapian MSet object representing
a list of search results."
- `(li (@ (class "search-result"))
+ `(li (@ (class "search-result search-result-document"))
(a (@ (href ,(document-web-uri document)))
,(document-title document))
,@(let ((snippet (document-sxml-snippet document mset)))
diff --git a/tissue/issue.scm b/tissue/issue.scm
index 65dd7a0..2b264df 100644
--- a/tissue/issue.scm
+++ b/tissue/issue.scm
@@ -196,7 +196,10 @@
(define-method (document->sxml (issue <issue>) mset)
"Render ISSUE, an <issue> object, to SXML. MSET is the xapian MSet
object representing a list of search results."
- `(li (@ (class "search-result"))
+ `(li (@ (class ,(string-append "search-result search-result-issue "
+ (if (issue-open? issue)
+ "search-result-open-issue"
+ "search-result-closed-issue"))))
(a (@ (href ,(document-web-uri issue)))
,(document-title issue))
,@(map (lambda (tag)