From 55e787ac574a646e30c1768ec45e22aba4ec080d Mon Sep 17 00:00:00 2001 From: tiye Date: Sat, 9 Jul 2022 04:44:56 +0800 Subject: [PATCH] style inline code; highlight glsl; tag 0.0.13 --- calcit.cirru | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++- compact.cirru | 15 ++++++++++---- docs/guide.md | 2 ++ package.json | 2 +- 4 files changed, 68 insertions(+), 6 deletions(-) diff --git a/calcit.cirru b/calcit.cirru index 2beb95d..1b7dd0f 100644 --- a/calcit.cirru +++ b/calcit.cirru @@ -1,6 +1,6 @@ {} - :configs $ {} (:init-fn |docs-workflow.main/main!) (:port 6001) (:reload-fn |docs-workflow.main/reload!) (:storage-key |calcit.cirru) (:version |0.0.12) + :configs $ {} (:init-fn |docs-workflow.main/main!) (:port 6001) (:reload-fn |docs-workflow.main/reload!) (:storage-key |calcit.cirru) (:version |0.0.13) :modules $ [] |respo.calcit/ |lilac/ |memof/ |respo-ui.calcit/ |respo-markdown.calcit/ |reel.calcit/ |respo-router.calcit/ |alerts.calcit/ :entries $ {} :ir $ {} (:package |docs-workflow) @@ -864,6 +864,10 @@ |b $ {} (:at 1648582267400) (:by |rJG4IHzWf) (:type :expr) :data $ {} |T $ {} (:at 1648582267400) (:by |rJG4IHzWf) (:text |{}) (:type :leaf) + |X $ {} (:at 1657312913866) (:by |rJG4IHzWf) (:type :expr) + :data $ {} + |T $ {} (:at 1657312918513) (:by |rJG4IHzWf) (:text |:class-name) (:type :leaf) + |b $ {} (:at 1657312921293) (:by |rJG4IHzWf) (:text |css-markdown) (:type :leaf) |b $ {} (:at 1648582267400) (:by |rJG4IHzWf) (:type :expr) :data $ {} |T $ {} (:at 1648582267400) (:by |rJG4IHzWf) (:text |:innerHTML) (:type :leaf) @@ -1859,6 +1863,44 @@ |b $ {} (:at 1656032777629) (:by |rJG4IHzWf) (:text |0) (:type :leaf) |h $ {} (:at 1656032777629) (:by |rJG4IHzWf) (:text |0) (:type :leaf) |l $ {} (:at 1656032777629) (:by |rJG4IHzWf) (:text |60) (:type :leaf) + |css-markdown $ {} (:at 1657312922600) (:by |rJG4IHzWf) (:type :expr) + :data $ {} + |T $ {} (:at 1657312924281) (:by |rJG4IHzWf) (:text |defstyle) (:type :leaf) + |b $ {} (:at 1657312922600) (:by |rJG4IHzWf) (:text |css-markdown) (:type :leaf) + |h $ {} (:at 1657312922600) (:by |rJG4IHzWf) (:type :expr) + :data $ {} + |T $ {} (:at 1657312926030) (:by |rJG4IHzWf) (:text |{}) (:type :leaf) + |b $ {} (:at 1657312926428) (:by |rJG4IHzWf) (:type :expr) + :data $ {} + |T $ {} (:at 1657312932649) (:by |rJG4IHzWf) (:text "|\"$0 p code") (:type :leaf) + |b $ {} (:at 1657312933637) (:by |rJG4IHzWf) (:type :expr) + :data $ {} + |T $ {} (:at 1657312933968) (:by |rJG4IHzWf) (:text |{}) (:type :leaf) + |b $ {} (:at 1657312934238) (:by |rJG4IHzWf) (:type :expr) + :data $ {} + |T $ {} (:at 1657312937629) (:by |rJG4IHzWf) (:text |:border) (:type :leaf) + |b $ {} (:at 1657312937979) (:by |rJG4IHzWf) (:type :expr) + :data $ {} + |T $ {} (:at 1657312938460) (:by |rJG4IHzWf) (:text |str) (:type :leaf) + |b $ {} (:at 1657312940888) (:by |rJG4IHzWf) (:text "|\"1px solid ") (:type :leaf) + |h $ {} (:at 1657312942046) (:by |rJG4IHzWf) (:type :expr) + :data $ {} + |T $ {} (:at 1657312943298) (:by |rJG4IHzWf) (:text |hsl) (:type :leaf) + |b $ {} (:at 1657312943614) (:by |rJG4IHzWf) (:text |0) (:type :leaf) + |h $ {} (:at 1657312943859) (:by |rJG4IHzWf) (:text |0) (:type :leaf) + |l $ {} (:at 1657312947545) (:by |rJG4IHzWf) (:text |90) (:type :leaf) + |h $ {} (:at 1657312953795) (:by |rJG4IHzWf) (:type :expr) + :data $ {} + |T $ {} (:at 1657312956601) (:by |rJG4IHzWf) (:text |:border-radius) (:type :leaf) + |b $ {} (:at 1657312959512) (:by |rJG4IHzWf) (:text "|\"4px") (:type :leaf) + |l $ {} (:at 1657312962151) (:by |rJG4IHzWf) (:type :expr) + :data $ {} + |T $ {} (:at 1657312964141) (:by |rJG4IHzWf) (:text |:padding) (:type :leaf) + |b $ {} (:at 1657313003374) (:by |rJG4IHzWf) (:text "|\"2px 2px") (:type :leaf) + |o $ {} (:at 1657312983956) (:by |rJG4IHzWf) (:type :expr) + :data $ {} + |T $ {} (:at 1657312985716) (:by |rJG4IHzWf) (:text |:margin) (:type :leaf) + |b $ {} (:at 1657313000582) (:by |rJG4IHzWf) (:text "|\"-2px 2px") (:type :leaf) |css-speech-button $ {} (:at 1651261772886) (:by |rJG4IHzWf) (:type :expr) :data $ {} |T $ {} (:at 1651261774634) (:by |rJG4IHzWf) (:text |defstyle) (:type :leaf) @@ -2372,6 +2414,12 @@ |b $ {} (:at 1648924631151) (:by |rJG4IHzWf) (:text |hljs) (:type :leaf) |h $ {} (:at 1648924631151) (:by |rJG4IHzWf) (:text "|\"rust") (:type :leaf) |l $ {} (:at 1648924631151) (:by |rJG4IHzWf) (:text |rust-lang) (:type :leaf) + |o $ {} (:at 1648924631151) (:by |rJG4IHzWf) (:type :expr) + :data $ {} + |T $ {} (:at 1648924631151) (:by |rJG4IHzWf) (:text |.!registerLanguage) (:type :leaf) + |b $ {} (:at 1648924631151) (:by |rJG4IHzWf) (:text |hljs) (:type :leaf) + |h $ {} (:at 1657312790390) (:by |rJG4IHzWf) (:text "|\"glsl") (:type :leaf) + |l $ {} (:at 1657312792699) (:by |rJG4IHzWf) (:text |glsl-lang) (:type :leaf) |site $ {} (:at 1545933382603) (:by |root) (:type :expr) :data $ {} |T $ {} (:at 1518157345496) (:by |root) (:text |def) (:type :leaf) @@ -2405,6 +2453,11 @@ |T $ {} (:at 1648924668719) (:by |rJG4IHzWf) (:text "|\"highlight.js/lib/languages/bash") (:type :leaf) |b $ {} (:at 1648924668719) (:by |rJG4IHzWf) (:text |:default) (:type :leaf) |h $ {} (:at 1648924668719) (:by |rJG4IHzWf) (:text |bash-lang) (:type :leaf) + |m $ {} (:at 1648924668719) (:by |rJG4IHzWf) (:type :expr) + :data $ {} + |T $ {} (:at 1657312799114) (:by |rJG4IHzWf) (:text "|\"highlight.js/lib/languages/glsl") (:type :leaf) + |b $ {} (:at 1648924668719) (:by |rJG4IHzWf) (:text |:default) (:type :leaf) + |h $ {} (:at 1657312801013) (:by |rJG4IHzWf) (:text |glsl-lang) (:type :leaf) |o $ {} (:at 1648924672501) (:by |rJG4IHzWf) (:type :expr) :data $ {} |T $ {} (:at 1648924672501) (:by |rJG4IHzWf) (:text "|\"highlight.js") (:type :leaf) diff --git a/compact.cirru b/compact.cirru index 2c76e34..2f480b6 100644 --- a/compact.cirru +++ b/compact.cirru @@ -1,6 +1,6 @@ {} (:package |docs-workflow) - :configs $ {} (:init-fn |docs-workflow.main/main!) (:reload-fn |docs-workflow.main/reload!) (:version |0.0.12) + :configs $ {} (:init-fn |docs-workflow.main/main!) (:reload-fn |docs-workflow.main/reload!) (:version |0.0.13) :modules $ [] |respo.calcit/ |lilac/ |memof/ |respo-ui.calcit/ |respo-markdown.calcit/ |reel.calcit/ |respo-router.calcit/ |alerts.calcit/ :entries $ {} :files $ {} @@ -118,7 +118,7 @@ if (some? target) div {} $ :class-name css-doc-page - div $ {} + div $ {} (:class-name css-markdown) :innerHTML $ .!render md (:content target) a $ {} (:inner-text "\"Speech") :class-name $ str-spaced css/link css-speech-button @@ -258,6 +258,13 @@ defstyle css-history-entry $ {} "\"$0" $ {} (:cursor :pointer) (:padding "\"0 8px") (:font-size 12) :color $ hsl 0 0 60 + |css-markdown $ quote + defstyle css-markdown $ {} + "\"$0 p code" $ {} + :border $ str "\"1px solid " (hsl 0 0 90) + :border-radius "\"4px" + :padding "\"2px 2px" + :margin "\"-2px 2px" |css-speech-button $ quote defstyle css-speech-button $ {} "\"$0" $ {} (:position :absolute) (:top 32) (:right 8) (:font-family css/font-fancy) @@ -325,11 +332,11 @@ |dev? $ quote def dev? $ = "\"dev" (get-env "\"mode" "\"release") |register-languages! $ quote - defn register-languages! () (.!registerLanguage hljs "\"clojure" clojure-lang) (.!registerLanguage hljs "\"bash" bash-lang) (.!registerLanguage hljs "\"rust" rust-lang) + defn register-languages! () (.!registerLanguage hljs "\"clojure" clojure-lang) (.!registerLanguage hljs "\"bash" bash-lang) (.!registerLanguage hljs "\"rust" rust-lang) (.!registerLanguage hljs "\"glsl" glsl-lang) |site $ quote def site $ {} (:storage-key "\"workflow") :ns $ quote - ns docs-workflow.config $ :require ("\"highlight.js/lib/languages/rust" :default rust-lang) ("\"highlight.js/lib/languages/clojure" :default clojure-lang) ("\"highlight.js/lib/languages/bash" :default bash-lang) ("\"highlight.js" :default hljs) + ns docs-workflow.config $ :require ("\"highlight.js/lib/languages/rust" :default rust-lang) ("\"highlight.js/lib/languages/clojure" :default clojure-lang) ("\"highlight.js/lib/languages/bash" :default bash-lang) ("\"highlight.js/lib/languages/glsl" :default glsl-lang) ("\"highlight.js" :default hljs) |docs-workflow.main $ {} :defs $ {} |*reel $ quote diff --git a/docs/guide.md b/docs/guide.md index 5d9ce92..3687cb8 100644 --- a/docs/guide.md +++ b/docs/guide.md @@ -11,6 +11,8 @@ defn f1 () + 1 2 4 ``` +you also try Clojure `(eval "(+ 1 2)")`: + ```clojure (+ 1 2) ``` diff --git a/package.json b/package.json index c99e6f8..31f93b6 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "0.0.12", + "version": "0.0.13", "name": "@calcit/docs-workflow", "dependencies": { "@calcit/procs": "^0.5.47",