2022-10-14

Published: Nov 01, 2022Last modified: Apr 05, 2023
Word count: 1149

clojurists together for a year?!

this would be a dream! https://www.clojuriststogether.org/news/clojurists-together-long-term-funding-for-2022-2023/

I'd love to contribute for a year - the neil contribs i started in on this week have been energizing. I'd expect they want someone pushing something independent and useful tho, and my clawe and org-crud/blog stuff is super niche and still tied up in my own configs.

Tauri as a simple web view for any local frontend

dumping some code again

Couldn't make this work from the jvm side.

How to clerk /eval in jvm hiccup??

;; ### recently modified 2

(defn publish-button [note]
  [:div
   (when (not (:published note))
     [:button
      {:class ["bg-green-700" "hover:bg-green-600"
               "text-slate-300" "font-bold"
               "py-2" "px-4" "m-1"
               "rounded"]
       ;; TODO figure how jvm hiccup writes clerk-evals
       ;; :on-click (fn [_]
       ;;             (publish-note! (-> note :org/short-path)))
       ;; :on-click (fn [_]
       ;;             #_(v/clerk-eval `(org-blog.export/publish-note! ~(-> note :org/short-path))))
       }
      (str "publish: " (:org/name note))])])

^{::clerk/no-cache true}
(clerk/html
  [:div
   (->>
     (recent-notes)
     (sort-by :published)
     (map (fn [note]
            (-> note
                (assoc :published (notes/published-id? (:org/id note)))
                (assoc :all-tags (item/item->all-tags note))
                (assoc :last-modified (:file/last-modified note)))))
     (map (fn [note]
            [:div
             {:class ["flex" "flex-row" "space-x-4" "justify-between" "align-center"]}

             [:div (-> note :org/name)]
             [:div (-> note :file/last-modified)]
             [:div (->> note :all-tags (string/join ":"))]
             (publish-button note)]))
     (into [:div]))])