From 688f694091f687d45f8ec1f399c44c2b915a411a Mon Sep 17 00:00:00 2001 From: SouthFox Date: Tue, 29 Oct 2024 23:15:07 +0800 Subject: [PATCH] feat: render ascii art --- game.scm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/game.scm b/game.scm index a45431c..02dbfd3 100644 --- a/game.scm +++ b/game.scm @@ -42,6 +42,10 @@ (set! *template* template-task) (render)))) "Task") + (button (@ (click ,(lambda (event) + (set! *template* template-ascii-art) + (render)))) + "Ascii art") (div (@ (id "application")) ,(template)))) (define (render) @@ -146,6 +150,22 @@ (render)))))) "Add task"))) + +;; render ascii art +(define (template-ascii-art) + (define ink-script '( + "(\\ " + "\\'\\ " + " \\'\\ __________ " + " / '| ()_________) " + " \\ '/ \\ ~~~~~~~~ \\ " + " \\ \\ ~~~~~~ \\ " + " ==). \\__________\\ " + " (__) ()__________) " + )) + `(pre ,(string-join ink-script "\n"))) + + ;; Main (set! *template* template-task)