Skip to content

Commit 63c2268

Browse files
Add slideshow demo
1 parent ab3a500 commit 63c2268

File tree

2 files changed

+75
-9
lines changed

2 files changed

+75
-9
lines changed

deps.edn

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{:paths ["dev" "notebooks" "resources"]
22
:deps {io.github.nextjournal/clerk {:mvn/version "0.8.442"}
3+
io.github.nextjournal/clerk-slideshow {:git/sha "82b3b83ca456995250bdb99deceb5a24fdd75439"}
34

45
;; input various external data formats
5-
com.github.seancorfield/next.jdbc {:mvn/version "1.2.659"}
6-
meta-csv/meta-csv {:mvn/version "0.1.0"}
7-
org.xerial/sqlite-jdbc {:mvn/version "3.34.0"}
8-
dk.ative/docjure {:mvn/version "1.16.0"}
9-
clojusc/wordnet {:mvn/version "1.2.0"}
10-
clj-jgit/clj-jgit {:mvn/version "1.0.2"}
6+
com.github.seancorfield/next.jdbc {:mvn/version "1.2.659"}
7+
meta-csv/meta-csv {:mvn/version "0.1.0"}
8+
org.xerial/sqlite-jdbc {:mvn/version "3.34.0"}
9+
dk.ative/docjure {:mvn/version "1.16.0"}
10+
clojusc/wordnet {:mvn/version "1.2.0"}
11+
clj-jgit/clj-jgit {:mvn/version "1.0.2"}
1112

1213
;; some statistical routines
1314
kixi/stats {:mvn/version "0.5.4"}
@@ -16,9 +17,9 @@
1617
sicmutils/sicmutils {:mvn/version "0.22.0"}
1718

1819
;; semantic web goodies and box/arrow graphs
19-
jackrusher/mundaneum {:git/url "https://github.com/jackrusher/mundaneum/"
20-
:git/sha "d2c934a12388d88ddb3e53fef92ec2eef97d6140"}
21-
arrowic/arrowic {:mvn/version "0.1.1"}
20+
jackrusher/mundaneum {:git/url "https://github.com/jackrusher/mundaneum/"
21+
:git/sha "d2c934a12388d88ddb3e53fef92ec2eef97d6140"}
22+
arrowic/arrowic {:mvn/version "0.1.1"}
2223

2324
;; 2D drawing routines
2425
clojure2d/clojure2d {:mvn/version "1.4.4"}
@@ -33,6 +34,7 @@
3334
;; notebooks to be built, accepts globs patterns
3435
:exec-args {:bundle? false
3536
:paths ["index.md"
37+
"notebooks/slideshow.md"
3638
"notebooks/introduction.clj"
3739
"notebooks/data_science.clj"
3840
"notebooks/images.clj"

notebooks/slideshow.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Hello there 👋
2+
3+
`clerk-slideshow` enables you to create beautiful interactive slide decks
4+
using Clerk notebooks.
5+
6+
---
7+
8+
## How does it work?
9+
10+
Simply require `clerk-slideshow`
11+
12+
```clojure
13+
(ns simple-slideshow
14+
(:require [nextjournal.clerk :as clerk]
15+
[nextjournal.clerk-slideshow :as slideshow]))
16+
```
17+
18+
…and add it to Clerk’s existing viewers:
19+
20+
```clojure
21+
^{::clerk/viewer clerk/hide-result}
22+
(clerk/add-viewers! [slideshow/viewer])
23+
```
24+
25+
---
26+
27+
## What now?
28+
29+
With that in place, you can use Markdown comments to write your slides’ content.
30+
Use Markdown rulers (`---`) to separate your slides. You can use everything that
31+
you’ll normally use in your Clerk notebooks:
32+
Markdown, plots, code blocks, you name it.
33+
34+
Press `` and `` to navigate between slides or `Escape` to get an overview.
35+
36+
Now some demos 👉
37+
38+
---
39+
40+
## 📊 A Plotly graph
41+
42+
```clojure
43+
^{::clerk/visibility :hide}
44+
(clerk/plotly {:data [{:z [[1 2 3] [3 2 1]] :type "surface"}]})
45+
```
46+
47+
---
48+
49+
## 📈 A Vega Lite graph
50+
51+
```clojure
52+
^{::clerk/visibility :hide}
53+
(clerk/vl {:width 650 :height 400 :data {:url "https://vega.github.io/vega-datasets/data/us-10m.json"
54+
:format {:type "topojson" :feature "counties"}}
55+
:transform [{:lookup "id" :from {:data {:url "https://vega.github.io/vega-datasets/data/unemployment.tsv"}
56+
:key "id" :fields ["rate"]}}]
57+
:projection {:type "albersUsa"} :mark "geoshape" :encoding {:color {:field "rate" :type "quantitative"}}})
58+
```
59+
60+
---
61+
62+
## And that’s it for now! 👋
63+
64+
More demos will follow soon!

0 commit comments

Comments
 (0)