-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrations overview #41
Integrations overview #41
Conversation
03e75db
to
7524ea1
Compare
templates/shortcodes/mermaid.html
Outdated
|
||
<!-- when this javascript is loaded and initialized it will look for divs with the class mermaid. | ||
it will replace the content of those divs with the generated svg --> | ||
<script>mermaid.initialize({startOnLoad:true});</script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't it make more sense to put it under header.html
or base.html
?
With that the script will be included only once when the shortcode is used and not every time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I considered that, but then it's also included on every page without a diagram, right? I'm assuming that most pages won't have diagrams, and that pages that do have diagrams will generally only have one (or at least a small number).
Not sure what the best approach is for the size - it's constrained to the width between where normal pages have a sidebar (on the left) and a table of contents (on the right). At the moment it's possible to zoom the page to see more clearly, but it would be nice if there's a way to zoom just the diagram.
I was hoping to have the diagram generated with mermaid's dark theme when the page is in dark mode. At the moment the docs has light/dark mode which works fine, but the diagram is always just mermaid's default "neutral" theme, which is a bit unpleasant with the dark mode of the docs (even with the lines changed to work with both themes). The lines are the biggest issue though, and I could also change the other default colours to better work with both docs themes if it's not simple to use mermaid's theme options, I'd just prefer not to need to, especially since mermaid already has themes. Thoughts? |
7524ea1
to
ed98a94
Compare
I reworked it and managed to get the themes working, and made it zoomed in and scrollable so you don't need to zoom your browser page to be able to read the text 😄 I ended up removing the CDN call though, because Chrome didn't want to do dynamic I did an update to the latest mermaid engine, which provides some nice new features. Unfortunately GitHub's mermaid rendering doesn't support them yet, which makes reviewing a bit less convenient. latest state: Screen.Recording.2022-11-12.at.11.56.00.am.mov |
ed98a94
to
09416c7
Compare
09416c7
to
7dae26a
Compare
Realised I hadn't rebased over the last couple of submodule updates in |
<!-- when this javascript is loaded and initialized it will look for divs with the class mermaid. | ||
it will replace the content of those divs with the generated svg --> | ||
<script type="module"> | ||
// sourced from https://unpkg.com/mermaid@9/dist/mermaid.esm.min.mjs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be in the commit body since the code can be replaced and new versions could be used.
Mermaid engine version 9.2.2 Sourced from https://unpkg.com/mermaid@9/dist/mermaid.esm.min.mjs
Uses "mermaid" diagram generator syntax.
7dae26a
to
3036209
Compare
This PR:
Future PR(s):