From edaf758b80fed1f5f14cd4b192e661c8863e84bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 23 Aug 2020 23:22:10 +0200 Subject: Move html modules under calp. --- module/html/view/search.scm | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 module/html/view/search.scm (limited to 'module/html/view/search.scm') diff --git a/module/html/view/search.scm b/module/html/view/search.scm deleted file mode 100644 index 12d8399f..00000000 --- a/module/html/view/search.scm +++ /dev/null @@ -1,38 +0,0 @@ -(define-module (html view search) - :use-module (util) - :use-module (vcomponent) - :use-module (vcomponent search) - :use-module ((ice-9 pretty-print) :select (pretty-print)) - :use-module ((html components) - :select (xhtml-doc include-css)) - :use-module ((html vcomponent) - :select (compact-event-list)) - ) - -(define-public (search-result-page - has-query? search-term search-result page paginator q=) - (xhtml-doc - (@ (lang sv)) - (head (title "Search results") - ,(include-css "/static/style.css")) - (body - (h2 "Search term") - (form - (pre (textarea (@ (name "q") (rows 5) (spellcheck false) - (style "width:100%")) - ,(when has-query? - (with-output-to-string - (lambda () (pretty-print search-term)))))) - (input (@ (type submit)))) - (h2 "Result (page " ,page ")") - (ul - ,@(compact-event-list search-result)) - (div (@ (class "paginator")) - ,@(paginator->list - paginator - (lambda (p) (if (= p page) - `(span ,p) - `(a (@ (href "?" ,q= "&p=" ,p)) ,p))) - (lambda (p) `(a (@ (href "?" ,q= "&p=" ,p)) "ยป")))) - ))) - -- cgit v1.2.3