-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clj-viewer update test (saying test)
- Loading branch information
awb99
committed
Oct 30, 2024
1 parent
605f1ca
commit 28a9c8b
Showing
6 changed files
with
61 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
(ns demo.service.saying | ||
(:require | ||
[dali.plot.hiccup :refer [hiccup]])) | ||
|
||
(defn saying [{:keys [id]}] | ||
(println "serving saying id: " id) | ||
(let [s (case id | ||
0 "Peace to the world" | ||
1 "The hottentotten are here" | ||
2 "The sky is always blue" | ||
3 "Biene Maya and Willy" | ||
4 "Quot erum demunstrandum" | ||
5 "The early bird catches the worm" | ||
6 "Six Six Six" | ||
7 "Seven Angles are here" | ||
8 "8 means infinity " | ||
9 "what is the secret of nine?" | ||
nil)] | ||
(hiccup [:div.bg-blue-300.w-100.h-100 | ||
[:h1 "Sayings Response"] | ||
[:p "You entered: " id] | ||
[:hr] | ||
(if s | ||
[:p.bg-green-500.p-5 s] | ||
[:p.bg-red-500.p-5 "This saying does not exist: " id])]))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters