dda-build/dev/portal.clj

25 lines
846 B
Clojure
Raw Permalink Normal View History

2024-07-26 15:46:37 +00:00
(ns portal
(:require
;; Data inspector
[portal.api :as inspect]))
;; ---------------------------------------------------------
;; Start Portal and capture all evaluation results
;; Open Portal window in browser with dark theme
;; https://cljdoc.org/d/djblue/portal/0.37.1/doc/ui-concepts/themes
;; Portal options:
;; - light theme {:portal.colors/theme :portal.colors/solarized-light}
;; - dark theme {:portal.colors/theme :portal.colors/gruvbox}
(def instance
"Open portal window if no portal sessions have been created.
A portal session is created when opening a portal window"
(or (seq (inspect/sessions))
(inspect/open {:portal.colors/theme :portal.colors/gruvbox})))
;; Add portal as tapsource (add to clojure.core/tapset)
(add-tap #'portal.api/submit)
;; ---------------------------------------------------------