lukeorth / poison

Professional Hugo theme for dev bloggers. Based on Mdo's classic Hyde theme.
https://poison.lukeorth.com
GNU General Public License v3.0
172 stars 94 forks source link

Adding mermaid theme for dark backgrounds. #145

Closed lukeorth closed 9 months ago

lukeorth commented 9 months ago

This PR adjusts the colors in Mermaid diagrams for better visibility in dark vs. light mode.

Unfortunately, I was unsuccessful in finding a way to do this with an "onClick" event to update the diagram without a page refresh. With the current updates, Mermaid diagrams will be only rendered with whatever colors provide the best visibility at the time of page load.

This can probably be improved to provide the "onClick" functionality described above, but it seems difficult with how Mermaid works. If anyone wants to tackle this in the future, please do!