Not sure if this should be a feature request on the R Markdown GitHub repo, or if it is something that should come from another package with an html template, so apologies if I'm asking this in the wrong place.
At any rate, rmarkdown has this really nice tabset functionality that lets you toggle between tabs, displaying only the currently selected tab and hiding the others. It would be awesome if we could have similar functionality with the the table of contents. I am imagining something like the progressive learnr tutorial format but without runtime shiny, so no interactivity. I just want something that is fairly lightweight and self-contained, which I can kinda sorta approximate using xaringanExtra::use_panelset(), adding the .sideways class, and then keeping all the following sections at a lower header level like so:
---
output: html_document
---
```{r, include = FALSE}
xaringanExtra::use_panelset()
```
# This looks like document title {.panelset .sideways}
## Tab 1 and Section 1
```{r}
plot(cars}
```
### Subsection
More stuff
## Tab 2 and Section 2
```{r}
hist(cars$dist)
```
However, you can't get a fixed or sticky position for the tabs this way or the "title" (it's just an h1 not h1.title, which is excluded from the YAML). This feels like something where your average web developer could throw it together in a few minutes with some javascript that changes section display from none to block, but JS is utterly foreign to me.
Anyone know of an R package that has a template like this or if there is an easy alternative? Maybe a way to strip out the relevant bits from the learnr JS files associated with the default tutorial format to get the same?
Thanks!