quarto-dev / quarto-dev/quarto-cli
Easily use custom fragment for incremental list
Open
@cderv is already working on this.
Since Oct 11, 2024.
enhancement
revealjs
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
I'm not sure if this is a good idea, but what about adding a variable in the metadata, such as custom-fragments=True, so that all <li class="fragment"> fragments generated by bullet lists become class="fragment custom"?
Currently, I'm using the following JavaScript code when compiling the document:
document.addEventListener("DOMContentLoaded", function () {
document.querySelectorAll('.fragment').forEach(function (element) {
element.classList.add('custom');
// Avoid turning elements inside `agenda` https://github.com/andrie/reveal-auto-agenda into `.fragment .custom`.
if (element.closest('.agenda')) {
element.className = "agenda list";
}
});
});
Originally posted by @ChoCho66 in https://github.com/quarto-dev/quarto-cli/discussions/9643#discussioncomment-10910840
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.