-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.Rmd
More file actions
177 lines (121 loc) · 4.58 KB
/
README.Rmd
File metadata and controls
177 lines (121 loc) · 4.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
---
output: github_document
---
# deckroadmap<img src="man/figures/deckroadmap-logo-small.png" alt="deckroadmap package logo" align="right" width="150"/>
[](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[](https://github.com/CodingTigerTang/deckroadmap/actions/workflows/R-CMD-check.yaml)
[](https://codingtigertang.r-universe.dev/deckroadmap)
`deckroadmap` adds PowerPoint-style roadmap footers to Quarto and R Markdown Reveal.js slides.
It helps audiences see what has been covered, what section they are currently in, and what comes next. The package supports multiple built-in styles, including `pill`, `minimal`, and `progress`, along with options for colors, size, and positioning.

Read the background story and design notes in the [blog post](https://tigertang.org/deckroadmap/).
## Installation
```{r eval=FALSE}
# install.packages("pak")
pak::pak("CodingTigerTang/deckroadmap")
```
Or with remotes:
```{r eval=FALSE}
remotes::install_github("CodingTigerTang/deckroadmap")
```
## Why use deckroadmap?
Many business, teaching, and conference presentations use a roadmap bar to help orient the audience during the talk. `deckroadmap` brings that pattern to Reveal.js slides in a simple R-friendly way.
With one function call, you can add a persistent footer that marks:
- completed sections
- the current section
- upcoming sections
## Supported formats
`deckroadmap` currently supports:
- Quarto Revealjs presentations
- R Markdown Revealjs presentations
It is designed for Reveal.js-based HTML slides.
## Basic usage
Add `use_roadmap()` near the top of your document, then tag each slide with a section name using data-roadmap.
```{r eval=FALSE}
library(deckroadmap)
use_roadmap(
c("Intro", "Problem", "Analysis", "Recommendation", "Next Steps"),
style = "pill"
)
```
Then use matching section labels on your slides, for example:
``` markdown
## Welcome {data-roadmap="Intro"}
## The problem {data-roadmap="Problem"}
## Analysis overview {data-roadmap="Analysis"}
## Recommendation {data-roadmap="Recommendation"}
## Next steps {data-roadmap="Next Steps"}
```
## Full examples
Full working examples are included in the `examples/` folder:
- `examples/quarto-demo.qmd`
- `examples/rmarkdown-demo.Rmd`
These show complete Reveal.js slide documents for Quarto and R Markdown.
## Previewing styles
You can preview a roadmap style locally before rendering slides by using `preview_roadmap()`.
```{r eval=FALSE}
preview_roadmap(
sections = c("Intro", "Problem", "Analysis", "Recommendation", "Next Steps"),
current = "Analysis",
style = "progress"
)
```
Because this README renders to GitHub Markdown, the live HTML preview is not shown here. The screenshots below were generated locally from the preview function.
## Styles
`deckroadmap` currently includes three styles.
### `style = "pill"`
A rounded floating footer with a soft background.
```{r eval=FALSE}
use_roadmap(
c("Intro", "Problem", "Analysis", "Recommendation", "Next Steps"),
style = "pill"
)
```

### `style = "minimal"`
A lighter text-only roadmap with less visual weight.
```{r eval=FALSE}
use_roadmap(
c("Intro", "Problem", "Analysis", "Recommendation", "Next Steps"),
style = "minimal"
)
```

### `style = "progress"`
A connected progress-style roadmap with section blocks.
```{r eval=FALSE}
use_roadmap(
c("Intro", "Problem", "Analysis", "Recommendation", "Next Steps"),
style = "progress"
)
```

## Customization
You can control font size, bottom spacing, text colors, and, for `progress`, background colors.
### Text styling
```{r eval=FALSE}
use_roadmap(
c("Intro", "Problem", "Analysis", "Recommendation", "Next Steps"),
style = "pill",
font_size = "14px",
bottom = "12px",
active_color = "#2563eb",
done_color = "#374151",
todo_color = "#9ca3af"
)
```

### Progress style with background colors
```{r eval=FALSE}
use_roadmap(
c("Intro", "Problem", "Analysis", "Recommendation", "Next Steps"),
style = "progress",
active_color = "#ffffff",
done_color = "#ffffff",
todo_color = "#334155",
active_bg_color = "#2563eb",
done_bg_color = "#475569",
todo_bg_color = "#e2e8f0"
)
```
