Skip to content

Conversation

viralbhadeshiya
Copy link

@viralbhadeshiya viralbhadeshiya commented Nov 13, 2024

  • Copy button for code blocks
  • Dynamic variables for slides
  • Hidden slides feature for solution slides

Notes: When merge need to change build-slides.yml to pass variable engine to use custom engine in HTML generation.

Demo for adding a hidden slides

## Slides with hidden content (All the content outside of "toggle-content" class will be shown)
 <button class="toggle-button"></button>

 <div class="toggle-content">
      <!-- Hidden content here -->
      <p>This content will be visible when button pressed</p>
 </div>

Copy link
Contributor

@powerjg powerjg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to put this code (especially the copy button code) in the marp engine instead of the wrapper?

@viralbhadeshiya
Copy link
Author

Is it possible to put this code (especially the copy button code) in the marp engine instead of the wrapper?

According to my understanding, Copy functionality is part of JS not HTML (at least I don't know any way to implement this with HTML only), and Marp engine is only able to customize stuff while converting md to HTML, I am not sure if we can use copy with Marp engine.

@powerjg
Copy link
Contributor

powerjg commented Nov 14, 2024

Marp engine is only able to customize stuff while converting md to HTML

I think this is too strong. There's definitely javascript in the Marp slides (i.e., how else would they be slides?)

See something like http://localhost:8000/slides/02-Using-gem5/04-cache-hierarchies.html where you can see the slides in the iframe without the iframe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants