From 67ad38d0a7cd319623e9f41c0c381ed5c5f6f973 Mon Sep 17 00:00:00 2001 From: "Thomas F. K. Jorna" Date: Mon, 19 Jul 2021 18:32:55 +0200 Subject: added theme fetching --- org-roam-ui.el | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'org-roam-ui.el') 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) -- cgit v1.2.3