Skip to content

Commit 70ac521

Browse files
authored
Merge pull request #14 from calcit-lang/fix-variable
fix incorrect reference for docs variable
2 parents 6b019b6 + 7755f45 commit 70ac521

File tree

6 files changed

+200
-157
lines changed

6 files changed

+200
-157
lines changed

.github/workflows/upload.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
&& git clone https://github.com/Respo/respo-markdown.calcit.git
4646
&& git clone https://github.com/Respo/respo-ui.calcit.git
4747
&& git clone https://github.com/Respo/respo-router.calcit.git
48-
&& git clone https://github.com/Respo/alerts.calcit.git
48+
&& git clone https://github.com/Respo/alerts.calcit.git --branch 0.8.4
4949
5050
- name: "compiles to js"
5151
run: >

calcit.cirru

Lines changed: 40 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

compact.cirru

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{} (:package |docs-workflow)
33
:configs $ {} (:init-fn |docs-workflow.main/main!) (:reload-fn |docs-workflow.main/reload!)
44
:modules $ [] |respo.calcit/ |lilac/ |memof/ |respo-ui.calcit/ |respo-markdown.calcit/ |reel.calcit/ |respo-router.calcit/ |alerts.calcit/
5-
:version |0.0.1
5+
:version |0.0.4
66
:entries $ {}
77
:files $ {}
88
|docs-workflow.comp.container $ {}
@@ -14,7 +14,6 @@
1414
reel.comp.reel :refer $ comp-reel
1515
respo-md.comp.md :refer $ comp-md
1616
docs-workflow.config :refer $ dev?
17-
docs-workflow.schema :refer $ docs
1817
"\"remarkable" :refer $ Remarkable
1918
"\"highlight.js" :default hljs
2019
"\"cirru-color" :as color
@@ -63,6 +62,8 @@
6362
quick-modal $ use-modal (>> states :quick)
6463
{} (:title "|Quick jump")
6564
:style $ {} (:max-width "\"40vw") (:height "\"90vh") (:max-height "\"90vh") (:margin-right 0)
65+
:backdrop-style $ {}
66+
:background-color $ hsl 0 29 10 0.2
6667
:render $ fn (on-close)
6768
div
6869
{} $ :style
@@ -97,7 +98,7 @@
9798
{} $ :style
9899
{} $ :margin-top 20
99100
<> "\"Histories" $ {} (:font-family ui/font-fancy)
100-
comp-history-menu history $ fn (path d!)
101+
comp-history-menu history docs $ fn (path d!)
101102
d! cursor $ next-path state path
102103
let
103104
target $ find-target docs (:selected state)
@@ -113,6 +114,7 @@
113114
comp-page-entries nil (:selected state) children $ fn (xs d!)
114115
d! cursor $ next-path state xs
115116
comp-doc-page target
117+
=< nil 120
116118
.render quick-modal
117119
when dev? $ comp-reel (>> states :reel) reel ({})
118120
|find-target $ quote
@@ -152,7 +154,7 @@
152154
js-object (:html false) (:breaks true)
153155
:highlight $ fn (code lang)
154156
if (= lang "\"cirru") (color/generate code)
155-
.-value $ .!highlightAuto hljs code lang
157+
.-value $ .!highlightAuto hljs code (js-array lang)
156158
|comp-page-entries $ quote
157159
defcomp comp-page-entries (selected parent-path entries on-select)
158160
div
@@ -191,7 +193,7 @@
191193
{} (:font-family ui/font-fancy) (:font-style :italic)
192194
:color $ hsl 0 0 80
193195
|comp-history-menu $ quote
194-
defcomp comp-history-menu (history on-select)
196+
defcomp comp-history-menu (history docs on-select)
195197
list-> ({})
196198
-> history $ map-indexed
197199
fn (idx path)
@@ -209,7 +211,7 @@
209211
update :history $ fn (xs)
210212
if (.includes? xs path) xs $ prepend
211213
if
212-
> (count xs) 3
214+
> (count xs) 4
213215
butlast xs
214216
, xs
215217
, path
@@ -271,6 +273,7 @@
271273
"\"highlight.js" :default hljs
272274
"\"highlight.js/lib/languages/bash" :default bash-lang
273275
"\"highlight.js/lib/languages/clojure" :default clojure-lang
276+
"\"highlight.js/lib/languages/rust" :default rust-lang
274277
:defs $ {}
275278
|render-app! $ quote
276279
defn render-app! () $ render! mount-target (comp-container @*reel schema/docs) dispatch!
@@ -283,7 +286,7 @@
283286
|*reel $ quote
284287
defatom *reel $ -> reel-schema/reel (assoc :base schema/store) (assoc :store schema/store)
285288
|main! $ quote
286-
defn main! () (.!registerLanguage hljs "\"clojure" clojure-lang) (.!registerLanguage hljs "\"bash" bash-lang)
289+
defn main! () (.!registerLanguage hljs "\"clojure" clojure-lang) (.!registerLanguage hljs "\"bash" bash-lang) (.!registerLanguage hljs "\"rust" rust-lang)
287290
println "\"Running mode:" $ if config/dev? "\"dev" "\"release"
288291
if config/dev? $ load-console-formatter!
289292
render-app!

docs/guide.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,13 @@ println "|a demo of code"
1111
defn f1 ()
1212
+ 1 2 4
1313
```
14+
15+
```clojure
16+
(+ 1 2)
17+
```
18+
19+
```rust
20+
fn main() -> i64 {
21+
1
22+
}
23+
```

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2+
"version": "0.0.4",
23
"dependencies": {
34
"@calcit/procs": "^0.5.28"
45
},
56
"devDependencies": {
67
"bottom-tip": "^0.1.3",
7-
"cirru-color": "^0.2.1-a1",
8+
"cirru-color": "^0.2.3",
89
"github-markdown-css": "^5.1.0",
910
"highlight.js": "^11.5.0",
1011
"remarkable": "^2.0.1",
11-
"vite": "^2.8.6"
12-
},
13-
"version": "0.0.1"
12+
"vite": "^2.9.1"
13+
}
1414
}

0 commit comments

Comments
 (0)