From 1fad78c0af4f5ffa535eb37694d4368c5cf3df76 Mon Sep 17 00:00:00 2001 From: gnat Date: Sun, 20 Oct 2024 22:03:45 -0700 Subject: [PATCH] add alternative thought viewing frontend --- src/html/view-thought.lisp | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/html/view-thought.lisp diff --git a/src/html/view-thought.lisp b/src/html/view-thought.lisp new file mode 100644 index 0000000..e6227fb --- /dev/null +++ b/src/html/view-thought.lisp @@ -0,0 +1,7 @@ +(defun html () + (page "$[test \"$(echo '{' 'thought' '}' | sed 's/ //g')\" != '{thought}' && echo '{thought}' || echo thoughts index]" + `(section () + (h1 (:style "display: $[test \"$(echo '{' 'thought' '}' | sed 's/ //g')\" != '{thought}' && echo block || echo none]") "$[cat ./html/thoughts/$(basename '{thought}') | grep '//']") + "$[cat ./html/thoughts/$(basename '{thought}') | grep '//']" (br) + (div () "$[include ./html/thoughts/$(basename '{thought}')]") + "$[test \"$(echo '{' 'thought' '}' | sed 's/ //g')\" != '{thought}' || (echo '

thoughts:

'; ls ./html/thoughts | while read -r file; do echo \"

$(cat ./html/thoughts/$file | grep '//') $file

\"; done | sort --numeric --reverse)]")))