Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
cebf30c
Add a test, because yes, I'm doing TDD!
panglesd Dec 3, 2025
3d92fd9
CLI: allow -o to use directories
panglesd Dec 6, 2025
95d2ed4
Thinking out loud
panglesd Dec 7, 2025
28897dc
removing some autofocus: need to check it still works
panglesd Dec 9, 2025
30473ac
Make Make previewer more resiliant to multiple occurrence
panglesd Dec 9, 2025
6f49192
Allow to pass slipshow js src
panglesd Dec 9, 2025
3dc4c81
Anatomy of a slipshow
panglesd Dec 11, 2025
a87f78b
Doc improvements
panglesd Dec 11, 2025
27613c4
Docs: improve installation and tutorial
panglesd Dec 11, 2025
a83483c
Doc: Switch section order in installation
panglesd Dec 11, 2025
da78a1a
Committing things before my laptop break!
panglesd Dec 28, 2025
092ba59
snapshot
panglesd Dec 28, 2025
199973d
Take on the toc
panglesd Dec 28, 2025
4150a39
Docs: creating files for new hierarchy
panglesd Dec 29, 2025
41273aa
Improving the markup doc
panglesd Dec 29, 2025
fffd62d
Make a todo
panglesd Dec 29, 2025
280ea74
Other todos
panglesd Dec 29, 2025
59779ed
Progress
panglesd Dec 29, 2025
5922bcc
Docs: Progress
panglesd Dec 30, 2025
b655d30
Doc progress
panglesd Dec 30, 2025
e64fa15
More doc progress
panglesd Dec 30, 2025
c618bbb
Docs: do a slide-based presentation how to
panglesd Dec 30, 2025
523116e
Doc: record tutorial and key formatting
panglesd Dec 30, 2025
06078e6
Docs: better name
panglesd Dec 30, 2025
ca14991
Visual structure tutorial
panglesd Jan 2, 2026
504d20c
Typos and improvements
panglesd Jan 2, 2026
e355fe8
more gnomes
panglesd Jan 3, 2026
c09e180
doc: improve wording
panglesd Jan 3, 2026
161c34f
doc: add libffi for mac
panglesd Jan 3, 2026
bb922d5
Doc: action JS API
panglesd Jan 3, 2026
02597bf
doc: add link
panglesd Jan 3, 2026
86cb922
Test including ocaml in rtd ci
panglesd Jan 3, 2026
d54ee4b
f
panglesd Jan 3, 2026
d75c7ba
Add dep to rtd CI
panglesd Jan 3, 2026
c278697
Squashed 'vendor/github.com/panglesd/jsoo-code-mirror/' content from …
panglesd Jan 4, 2026
c3e57e5
Add "code-mirror" from "[email protected]:panglesd/jsoo-code-mirror.git@…
panglesd Jan 4, 2026
f0ae58f
Integrate main.js building
panglesd Jan 4, 2026
e6f1260
fix CI setup
panglesd Jan 4, 2026
5f50e88
missed docs/
panglesd Jan 4, 2026
4b61fa9
Repromote main.js
panglesd Jan 4, 2026
841ea85
Fixed missing docs/ prefix
panglesd Jan 4, 2026
9d9026f
Missing tracked directory...
panglesd Jan 4, 2026
899b5ca
Doc: tackling some todos
panglesd Jan 5, 2026
c437ae2
WIP to merge with other commit examples
panglesd Jan 5, 2026
768a92c
Fix repo link
panglesd Jan 5, 2026
07020eb
Push the joke to the donation button
panglesd Jan 5, 2026
5c89efd
doc: Fill "split in multiple files"
panglesd Jan 5, 2026
0c998ce
Doc: speaker view How to
panglesd Jan 5, 2026
519c602
Fix Makefile
panglesd Jan 7, 2026
45dc042
Make the html structure for the doc tutorial preview static
panglesd Jan 7, 2026
2f45ee0
Removing speaker view on codemirror plugin
panglesd Jan 7, 2026
de08373
Add fullscreen support for editor in tutorial
panglesd Jan 7, 2026
c33ba97
fix kbd -> key typo in doc
panglesd Jan 7, 2026
6bf8dd3
Docs: fix typo
panglesd Jan 7, 2026
da6074f
Trying
panglesd Jan 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ build:
# nodejs: "20"
# rust: "1.70"
# golang: "1.20"
apt_packages:
- opam
- build-essential
- m4
- libev-dev
jobs:
pre_build:
# Sandboxing must be disabled in Docker
- opam --version
- opam init --disable-sandboxing -y
- opam install --deps-only -y .
- opam exec dune -- build --profile release docs/doc-repl/main.js
- mkdir -p _static
- cp docs/doc-repl/main.js docs/_static/main.js

# Build documentation in the "docs/" directory with Sphinx
sphinx:
Expand Down
14 changes: 13 additions & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,19 @@ BUILDDIR = _build
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile
.PHONY: help Makefile _static/main.js _static/cdl.html

html: _static/main.js _static/cdl.html
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

_static/main.js:
@opam exec -- dune build --profile release doc-repl/main.js
@cp doc-repl/main.js _static/main.js

_static/cdl.html:
@opam exec -- dune build --profile release @../example/cdl/examples
@mkdir -p extra_html
@cp ../example/cdl/cdl.html extra_html/cdl.html

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
Expand Down
60 changes: 60 additions & 0 deletions docs/_ext/slipshowexample.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
from docutils import nodes
from docutils.parsers.rst import Directive, directives

class slipshow_example_node(nodes.Element):
pass


class SlipshowExampleDirective(Directive):
has_content = True
option_spec = {
"visible": directives.unchanged,
"dimension": directives.unchanged,
}
def run(self):
raw_text = "\n".join(self.content)
node = slipshow_example_node()
node['raw_text'] = raw_text
node['visible'] = self.options.get("visible", "both")
node['dimension'] = self.options.get("dimension", "")
return [node]

def visit_slipshow_example_node_html(self, node):
match node['visible']:
case "both":
mode = "show-both"
case "editor":
mode = "show-editor"
case "presentation":
mode = "show-presentation"
case _:
mode = "show-both"
self.body.append(f"""
<div dimension="{node['dimension']}" class="running-example {node['visible']}">
<div class="entry {mode}">
<div class="tabs">
<div class="editor-button">Editor</div>
<div class="pres-button">Presentation</div>
<div class="both-button">Both</div>
<div class="fullscreen-button">⛶</div>
</div>
<div class="editor-preview-container">
<div class="editor"></div>
<div class="preview"></div>
</div>
<div class="source" style="display:none">""")
# Write raw, *escaped* text so it appears exactly as typed
self.body.append(self.encode(node['raw_text']))
self.body.append('</div></div></div>')

def depart_slipshow_example_node_html(self, node):
pass

def setup(app):
app.add_node(
slipshow_example_node,
html=(visit_slipshow_example_node_html,
depart_slipshow_example_node_html),
)
app.add_directive("slipshow-example", SlipshowExampleDirective)
return {"version": "0.1"}
4 changes: 4 additions & 0 deletions docs/_static/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
(rule
(mode promote)
(action
(copy ../doc-repl/main.bc.js main.js)))
100 changes: 100 additions & 0 deletions docs/_static/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
.right-panel1.active_panel, .right-panel2.active_panel {
z-index: 1;
}
.right-panel1, .right-panel2 {
z-index: 0;
width:100%;
position:absolute;
top:0;
bottom:0;
left:0;
right:0;
border:0;
}

.preview {
position: relative;
}
.entry {
display: flex;
flex-direction: column;
}
/* .entry > * { */
/* width: 50%; */
/* } */
/* The iframes need to be absolutely positioned so their height and width need
to be manually set */
.entry .preview, .entry .preview > * {
height:500px;
}
.running-example {
margin-top: 24px;
margin-bottom: 24px;
padding: 0px;
border: 6px solid #2980b9;
border-radius: 12px;
}
.editor {
border-bottom: 3px solid #2980b9;
}
.cm-content {
font-size: 13px;
}
.tabs {
display: flex;
justify-content: space-around;
}
.tabs > * {
flex-grow: 1;
text-align: center;
border: 1px solid purple;
background: lightgray;
cursor: pointer;
}

.entry .editor, .entry .preview {
position: absolute;
opacity: 0;
width: 100%;
pointer-events: none;
}
.entry.show-presentation .preview,
.entry.show-editor .editor,
.entry.show-both .preview,
.entry.show-both .editor {
opacity: 1;
position: relative;
pointer-events: all;
}

.show-editor > .tabs > .editor-button,
.show-presentation > .tabs > .pres-button,
.show-both > .tabs > .both-button {
background: aliceblue;
}
.running-example.fullscreen {
position: fixed;
inset: 0;
z-index: 1000;
margin: 0;
}
.running-example.fullscreen .editor-preview-container {
display:flex;
height: 100%;
}
.running-example.fullscreen .editor {
background: #282c34;
height: 100%;
overflow: auto;
}
.running-example.fullscreen .entry {
height: 100%;
}
.fullscreen .entry .preview, .fullscreen .entry .preview > * {
height: 100%;
}
.running-example .fullscreen-button {
flex-grow: 0;
padding-left: 20px;
padding-right: 20px;
}
187 changes: 187 additions & 0 deletions docs/actions-api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
=======
Actions
=======

An action consists of a name, a set of possible arguments, and an effect. In this page, we describe all possible actions.

Inserting an action in the presentation is done by adding an attribute with the name of the action.

.. code-block::

Some content.

{center}

Some other content.

The effect might be different when the attribute is attached to an element.

.. code-block::

Some content.

{center}
Some other content.

Arguments can be added to an action. In this case, the attribute is a key-value attribute, the key being the name of the action, and the value containing the arguments.

.. code-block::

{#one}
Some content.

{center=one}

Some other content.

An action can have two kind of arguments: named arguments, and positional ones. Named argument are of the form ``~argument-name:value`` and positional are given as-is. The list of arguments is space-separated.

.. code-block::

{#one}
Some content.

{center="~duration:2 ~margin:10 one"}

Some other content.

It is possible to have multiple actions in a single attribute. They will be executed at the same step.

.. code-block::

{#one}
Some content.

{center="~duration:2 ~margin:10 one" reveal="two three"}

{#two .unrevealed}
Some other content.

{#three .unrevealed}
Some more content.

.. contents:: Actions table of content
:local:

Pause attributes
----------------

``pause``

The pause attribute tells the slipshow engine to pause the text rendering
here. This element and every element after (but inside the "pause block") that
in the document will be hidden.

When a ``pause`` action is executed, the initially hidden text is displayed.

``pause-block``
The ``pause-block`` attribute tells the slipshow engine that pauses inside it should not hide content outside of it.

Example:

.. code-block:: markdown

A

{pause-block}
> B
>
> {pause}
>
> C
>
> {pause}
>
> D

E

will initially display A, B and E, then going a step further will additionally display C, and another step will display D.

``step``
Introduces a no-op step in the slip it's in. Useful to exit entered slips.

Moving the window
-----------------

``down``
Moves the screen vertically until the element is at the bottom of the screen.

Accepts ``~duration:FLOAT`` and ``margin:INT``.

``up``
Moves the screen vertically until the element is at the top of the screen.

Accepts ``~duration:FLOAT`` and ``margin:INT``.

``center``
Moves the screen vertically until the element is centered.

Accepts ``~duration:FLOAT`` and ``margin:INT``.

``scroll``
Moves the screen vertically until the element is entirely visible on screen, if possible.

Accepts ``~duration:FLOAT`` and ``margin:INT``.

``focus``
Focus on the element by zooming on it. Possible to specify multiple ids.

Accepts ``~duration:FLOAT`` and ``margin:INT``.

``unfocus``
Unfocus by going back to the last position before a focus.

Changing visibility
-------------------

``static``
Make the element ``static``. By "static" we mean the css styling ``position:static; visibility:visible`` will be applied. Possible to specify multiple ids.

``unstatic``
Make the element ``unstatic``. By "unstatic" we mean the css styling ``position:absolute; visibility:hidden`` will be applied. Possible to specify multiple ids.

``reveal``
Reveal the element. By "revealing" we mean the css styling ``opacity:1`` will be applied. Possible to specify multiple ids.

``unreveal``
Hide the element. By "unrevealing" we mean the css styling ``opacity:0`` will be applied. Possible to specify multiple ids.

Drawing actions
---------------

``draw``
Replay the drawing. Possible to specify multiple ids. See :ref:`Record and replay drawings`.

``clear``
Clear the drawing. Possible to specify multiple ids.

Carousels
---------

``change-page``
Changes the current page of a carousel or pdf. Takes as input the id of the carousel/pdf.

Also takes a ``~n:"<pages>"`` argument, which allows to specify the list of pages changes to do, by absolute number (e.g. ``4``), relative number (e.g. ``+1``, ``-2``), range (``3-10`` or ``5-3``), or ``all`` which displays one by one the page until completion. Default for ``~n`` is ``+1``.

For instance, ``{change-page='~n:"2-4 6-4 7 -1 +2 all"'}`` will change pages to ``2``, ``3``, ``4``, ``6``, ``5``, ``4``, ``7``, ``6``, ``8`` and then all further pages that the pdf/carousel contains. It will always initially start with page 1.

Speaker notes
-------------

``speaker-note``
Hides the targeted element (either with given ID, or self). When the action is executed, send the targeted element to the "Notes" section of the speaker notes (that you can open with ``s``).

Medias
------

``play-media``
Play the media (audio or video). The associated element/target id(s) need to be a video element: a ``![](path)`` where path is recognized as a video or audio. Possible to specify multiple ids.

Pay attention that browsers will prevent the playing if they consider that the user has not "interacted" with the page yet, in an effort to forbid spam "autoplay" of medias. Interact with the page (e.g. by clicking anywhere on it) to make sure it'll work.

Custom script
-------------

``exec``
Execute the slipscript. Possible to specify multiple ids.
Loading
Loading