diff options
Diffstat (limited to 'org-roam-ui.el')
-rw-r--r-- | org-roam-ui.el | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/org-roam-ui.el b/org-roam-ui.el index 0911df4..2d4eb98 100644 --- a/org-roam-ui.el +++ b/org-roam-ui.el @@ -38,7 +38,6 @@ (insert response) (httpd-send-header t "text/plain" 200 :Access-Control-Allow-Origin "*")))) - (defun nodes-row-to-cons (row) (list (cons 'id (elt row 0)) @@ -50,4 +49,16 @@ (cons 'source (elt row 1)) (cons 'target (elt row 2)))) +(defservlet* theme application/json () + (when 'doom-themes--colors + (let* + ((colors (butlast doom-themes--colors (- (length doom-themes--colors) 25))) + ui-theme (list nil)) + (progn + (dolist (color colors) + (push (cons (car color) (car (cdr color))) ui-theme)) + (insert (json-encode ui-theme)) + (httpd-send-header t "text/plain" 200 :Access-Control-Allow-Origin "*"))))) + + (provide 'org-roam-ui) |