mfontanini / presenterm

A markdown terminal slideshow tool
https://mfontanini.github.io/presenterm/
BSD 2-Clause "Simplified" License
1.19k stars 29 forks source link

feat: add mermaid docs and sensible defaults #314

Closed calebdw closed 1 month ago

calebdw commented 1 month ago

Hello!

Changes:

I noticed that the mermaid theme parameters didn't make it into the documentation so I decided to add it.

I also tried to add sensible mermaid theme defaults to better match the supported themes instead of always having to override the theme. For instance, on the dark theme the original mermaid defaults (bg: white, theme: default) are quite jarring:

image

But updating to (bg: transparent, theme: dark) looks much nicer:

image

Thanks!

calebdw commented 1 month ago

@mfontanini, I used neutral on the lighter "dark" themes because they seemed to not cause as much contrast:

Here is neutral:

image

And here is dark image

But I can update all of them

mfontanini commented 1 month ago

Hmm can you try a sequenceDiagram? The text in between the participants was showing up too light for me

calebdw commented 1 month ago

Sure!

Here's the neutral:

image

and here's the dark:

image

Thanks for mentioning, dark does seem to better choice here :+1:

mfontanini commented 1 month ago

Hmm now that I remember... When I was testing this I was trying it with pie charts. It's possible those look like crap in dark mode, I'm not sure. I'm away from computer now so I can't test those.

calebdw commented 1 month ago

So here's neutral:

image

and here's dark:

image

I think dark is the best sensible default here, note that it's always possible to customize individual charts if desired/necessary:

```mermaid +render
%%{init: {'theme':'forest'}}%%
  graph TD
    a --> b
```
mfontanini commented 1 month ago

So weird, I wonder what exact combo I tried. Maybe I missed dark and only tried neutral. Anyhow, this looks great. Thanks!

calebdw commented 1 month ago

Thank you sir!