From 209327a39dd8d40feb5086a5d86c4cb7f35d2bd4 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Wed, 29 Jun 2022 11:55:20 +0530 Subject: web: server: Use div instead of span for snippets and metadata. A div is already a block element. There is no need to use a span and then make it a block element. * tissue/document.scm (document->sxml): Use div instead of span for snippets and metadata. * tissue/issue.scm (document->sxml): Use div instead of span for snippets and metadata. * tissue/web/server.scm (%css)[.search-result-metadata]: Remove "display: block" property. --- tissue/document.scm | 4 ++-- tissue/issue.scm | 36 ++++++++++++++++++------------------ tissue/web/server.scm | 1 - 3 files changed, 20 insertions(+), 21 deletions(-) diff --git a/tissue/document.scm b/tissue/document.scm index cc49010..a89dbb8 100644 --- a/tissue/document.scm +++ b/tissue/document.scm @@ -244,8 +244,8 @@ a list of search results." ,(document-title document)) ,@(let ((snippet (document-sxml-snippet document mset))) (if snippet - (list `(span (@ (class "search-result-snippet")) - ,@snippet)) + (list `(div (@ (class "search-result-snippet")) + ,@snippet)) (list))))) (define (read-gemtext-document file) diff --git a/tissue/issue.scm b/tissue/issue.scm index 0003506..54daf28 100644 --- a/tissue/issue.scm +++ b/tissue/issue.scm @@ -214,26 +214,26 @@ object representing a list of search results." "")))) ,tag))) (issue-keywords issue)) - (span (@ (class "search-result-metadata")) - ,(string-append - (format #f " opened ~a by ~a" - (human-date-string (issue-created-date issue)) - (issue-creator issue)) - (if (> (length (issue-posts issue)) - 1) - (format #f ", last updated ~a by ~a" - (human-date-string (issue-last-updated-date issue)) - (issue-last-updater issue)) - "") - (if (zero? (issue-tasks issue)) - "" - (format #f "; ~a of ~a tasks done" - (issue-completed-tasks issue) - (issue-tasks issue))))) + (div (@ (class "search-result-metadata")) + ,(string-append + (format #f " opened ~a by ~a" + (human-date-string (issue-created-date issue)) + (issue-creator issue)) + (if (> (length (issue-posts issue)) + 1) + (format #f ", last updated ~a by ~a" + (human-date-string (issue-last-updated-date issue)) + (issue-last-updater issue)) + "") + (if (zero? (issue-tasks issue)) + "" + (format #f "; ~a of ~a tasks done" + (issue-completed-tasks issue) + (issue-tasks issue))))) ,@(let ((snippet (document-sxml-snippet issue mset))) (if snippet - (list `(span (@ (class "search-result-snippet")) - ,@snippet)) + (list `(div (@ (class "search-result-snippet")) + ,@snippet)) (list))))) (define (hashtable-append! hashtable key new-values) diff --git a/tissue/web/server.scm b/tissue/web/server.scm index 1a91810..64397a6 100644 --- a/tissue/web/server.scm +++ b/tissue/web/server.scm @@ -57,7 +57,6 @@ form { .search-result-metadata { color: dimgray; - display: block; font-size: smaller; } -- cgit v1.2.3