Comments (3)
I have done it but with my custom animation syntax (e.g. with svg) so here are some random comments that might help for the implementation using v-clicks:
- mermaid generates SVG, that's convenient
- mermaid also conveniently put all nodes as children of a given parent, they have the node class and the parents the nodes class (same for edges, edgeLabels), so we can use e.g.
.node::nth-child(2)
to get the second node - the simplest (to avoid hacking the mermaid syntax(es)) might be to reuse the "class" from mermaid (as shown in the example above) and parse these classes (after mermaid is properly rendered) as v-clicks
- we put, in slidev, mermaid charts in a shadow root (which is a good thing to prevent CSS bleeding) so any selector-based query should be explicitly crossing the shadow barrier (I emulated ::shadow , but we might as well aim at modifying mermaid to provide ::part() if it makes sense (not sure)... thinking about part, as we put the svg in a shadowDOM, we should probably patch it to have parts https://github.com/slidevjs/slidev/blob/main/packages/client/builtin/Mermaid.vue)
from slidev.
This feature I really miss it and would be great addition to the already awesome slidev 🎊
from slidev.
Small video of my prototype
anim-code-and-mermaid.mp4
from slidev.
Related Issues (20)
- Project todos HOT 4
- Remote control doesn't work HOT 2
- layout image-left image-right images are not shown when deployed to github-pages HOT 2
- Static hosting for multiple slides broken since major upgrade to 0.48.X HOT 3
- Static hosting for multiple slides broken since major upgrade to 0.48.X HOT 2
- Static relative folder host no longer working HOT 4
- Universal Magic Move HOT 2
- Cannot export mermaid figures into pdf HOT 1
- `magic-move` Scrolling of code not possible when box small HOT 2
- Slides are not loaded properly in presenter mode HOT 2
- Animation on homepage of sli.dev errors HOT 2
- KaTeX fonts are not rendered by Vite (not in Vite `server.fs.allow[]`)
- Mustache Syntax is always interpreted HOT 2
- `.pdf` websites embedded with `layout: iframe` are unstable in Safari HOT 2
- White margin in exported pdf when in full view mode.
- Shiki Magic Move crashes after HMR with not LF files HOT 1
- Feat: Add some hooks of presentation slides lifetime
- Link Attributes,Please don't add `tartget="_blank"` always. HOT 1
- Keep slide show tab alive—Safari locks it in incognito mode
- Built results misses some unocss styles. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slidev.