quarto-dev / quarto-dev/quarto-cli

Easily use custom fragment for incremental list

Open
#11,030 1 comment 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.