Skip to content

Commit ab26ea0

Browse files
committed
Update documentation to clarify slide layout rules for code and images
- Simplify centered vs two-column slide descriptions in example.md - Update README to specify any heading level works with code/images for two-column layout - Add image example alongside code in two-column slide section - Condense click-through states explanation and move Magic Move reference inline
1 parent e57c21f commit ab26ea0

2 files changed

Lines changed: 8 additions & 40 deletions

File tree

README.md

Lines changed: 6 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,17 @@ slicode example.md build
5656

5757
## Markdown Format
5858

59-
### Centered slides — `#`
59+
### Centered slides — heading without code/image
6060

6161
```md
6262
# Welcome
6363

6464
This text is centered on the slide.
6565
```
6666

67-
### Two-column slides — `##`
67+
### Two-column slides — any heading + code or image
6868

69-
Heading and text on the left, code on the right:
69+
Heading and text on the left, code or image on the right:
7070

7171
```md
7272
## Getting Started
@@ -76,45 +76,13 @@ Here's a simple example.
7676
​```python
7777
print("hello")
7878
​```
79-
```
80-
81-
### Click-through states
82-
83-
Consecutive `##` sections with code blocks become animated click states on a single slide. Code transitions use [Magic Move](https://sli.dev/features/magic-move), text crossfades smoothly:
84-
85-
```md
86-
## Step 1
87-
88-
Define a function.
89-
90-
​```python
91-
def greet():
92-
pass
93-
​```
9479

95-
Add the body.
80+
## Architecture
9681

97-
​```python
98-
def greet():
99-
print("hello")
100-
​```
101-
102-
## Step 2
103-
104-
Call it.
105-
106-
​```python
107-
def greet():
108-
print("hello")
109-
110-
greet()
111-
​```
82+
![diagram](https://example.com/diagram.png)
11283
```
11384

114-
This produces **one** two-column slide with **3 click states**:
115-
- Click 0: "Step 1" heading, first text, first code
116-
- Click 1: same heading (no animation), second text, code morphs
117-
- Click 2: heading changes to "Step 2" (animated), third text, code morphs again
85+
Consecutive sections with code merge into one slide with animated click-through states using [Magic Move](https://sli.dev/features/magic-move).
11886

11987
## Themes
12088

example.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Turn Markdown into animated presentations
66

77
Write a regular Markdown file with headings and code blocks
88

9-
- `#` headings create **centered** title slides
10-
- `##` headings with code create **two-column** slides
9+
- Headings without code/image create **centered** slides
10+
- Headings with code or image create **two-column** slides
1111
- Consecutive code blocks become click-through states
1212

1313
```yaml

0 commit comments

Comments
 (0)