feat: add calendar docs with inline markdown rendering
Add src/ui/calendar.md with full documentation for both calendar namespaces (picker props, event grid, ticker, agenda, event data format, date utilities, CSS classes). Add a minimal markdown-to-hiccup renderer (ui.markdown) that handles headings, fenced code blocks, tables, lists, inline code, and bold. Styled with ui/markdown.css using theme tokens. Each dev target renders the docs inline on the Calendar page: - Hiccup: slurps the .md file at render time - Replicant: embeds via compile-time macro (ui.macros/inline-file) - Squint: fetches from /calendar.md served by Vite Also fixes calendar event grid day cells to be square (aspect-ratio: 1 with overflow: hidden instead of min-height).
This commit is contained in:
7
bb.edn
7
bb.edn
@@ -20,7 +20,12 @@
|
||||
(let [lr (slurp "dev/css-live-reload.js")]
|
||||
(spit "dev/replicant/public/css-live-reload.js" lr)
|
||||
(spit "dev/squint/public/css-live-reload.js" lr)
|
||||
(println "Copied css-live-reload.js to dev targets")))}
|
||||
(println "Copied css-live-reload.js to dev targets"))
|
||||
(doseq [md (.listFiles (io/file "src/ui")
|
||||
(reify java.io.FileFilter
|
||||
(accept [_ f] (.endsWith (.getName f) ".md"))))]
|
||||
(spit (str "dev/squint/public/" (.getName md)) (slurp md)))
|
||||
(println "Copied component docs to dev/squint"))}
|
||||
|
||||
watch-theme
|
||||
{:doc "Watch src/ui/*.css and tokens.edn, rebuild theme on changes"
|
||||
|
||||
Reference in New Issue
Block a user