This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-22
Channels
- # adventofcode (26)
- # aleph (34)
- # announcements (10)
- # babashka (71)
- # beginners (80)
- # biff (7)
- # calva (1)
- # cider (4)
- # cljdoc (12)
- # clojure (8)
- # clojure-belgium (1)
- # clojure-europe (11)
- # clojure-nl (3)
- # clojure-norway (18)
- # clojure-sg (3)
- # clojure-sweden (2)
- # clojurescript (18)
- # clojutre (4)
- # conjure (1)
- # core-logic (4)
- # datahike (1)
- # datascript (3)
- # emacs (27)
- # exercism (1)
- # gratitude (12)
- # introduce-yourself (4)
- # joyride (1)
- # lsp (46)
- # malli (3)
- # membrane (2)
- # nbb (1)
- # off-topic (3)
- # other-languages (7)
- # pedestal (4)
- # portal (3)
- # practicalli (1)
- # rdf (33)
- # re-frame (11)
- # releases (1)
- # ring (1)
- # scittle (34)
- # shadow-cljs (10)
- # squint (12)
- # tools-deps (89)
- # tree-sitter (2)
- # xtdb (14)
Might be nice to write hyperscript in sexps
Not sold on hyperscript yet. Reconsidering jQuery believe it or not.
nothing wrong with that 🙂
I don't use that much hyperscript myself, just a line or two here and there. Just did grep -R ':_'
on Yakread out of curiosity and got this:
com/yakread/ui.clj: :_ "on click toggle .hidden on .top-nav"})
com/yakread/ui.clj: :_ "on click toggle .hidden on .top-nav"})]
com/yakread/ui.clj: :_ "on error remove me"
com/yakread/ui.clj: :_ "on error remove me"
com/yakread/subscribe.clj: :_ "on error remove me"
com/yakread/subscribe.clj: :_ "on load set my value to window.location.href"}]
com/yakread/subscribe.clj: :_ "on load set my value to document.referrer"}]
com/yakread/feat/home.clj: :_ "on load set my value to window.location.href"}]
com/yakread/feat/home.clj: :_ "on load set my value to document.referrer"}]
com/yakread/feat/app/social.clj: [:button.btn.mastodon-form-toggle {:_ "on click toggle .hidden on .mastodon-form-toggle"}
com/yakread/feat/app/books.clj: :_ "on load call me.focus()"})]
com/yakread/feat/app/books.clj: :_ "on change call uploadFile(me, '/connections/epub/upload')"
com/yakread/feat/app/share.clj: :_ "on click put 'Copied!' into me"}
com/yakread/feat/app/share.clj: :_ "on error remove me"
com/yakread/feat/app/subscriptions.clj: {:_ "on click toggle .hidden on .email-form"}
com/yakread/feat/app/subscriptions.clj: :_ "on click if #subscriptions match .hidden toggle .hidden on .expand-collapse end"}
com/yakread/feat/app/subscriptions.clj: [:button.link#expand-collapse {:_ "on click toggle .hidden on .expand-collapse"}
com/yakread/feat/app/subscriptions.clj: :_ "on htmx:afterRequest remove <div.rss-sub-item/>"}
com/yakread/feat/app/read_later.clj: :_ "on change call uploadFile(me, '/upload/pdf')"
for anything more complicated than that I just add a plain JS file or use htmx(`uploadFile` is an example; I define the function in js and just use hyperscript to call it)
Interesting
Implemented my first line of hyperscript last night, and must admit I also just used it to toggle a .hidden
. I’ve a bit of a wild hair to try and implement Borkdude’s Squint/Cherry to see if I can write CLJS and have it output little baby JS, rather than bring in all of the CLJS compiler, but I haven’t had a use case that demanded it yet…
edit: https://github.com/squint-cljs/squint
I was thinking the same, bring in squint somehow.