2022-06-21 21:17:53 +02:00
|
|
|
<html>
|
2022-09-04 21:30:47 +02:00
|
|
|
<script>
|
2022-06-21 21:17:53 +02:00
|
|
|
// %%{ init: { "logLevel":0, "themeVariables" : { "primaryColor": "#fff000","textColor": "green","apa":"} #target { background-color: crimson }" } } }%%
|
2022-09-04 21:30:47 +02:00
|
|
|
</script>
|
|
|
|
<body>
|
2022-06-21 21:17:53 +02:00
|
|
|
<div id="target">
|
2022-09-04 21:30:47 +02:00
|
|
|
<h1>This element does not belong to the SVG but we can style it</h1>
|
2022-06-21 21:17:53 +02:00
|
|
|
</div>
|
2022-09-04 21:30:47 +02:00
|
|
|
<svg id="diagram"></svg>
|
2022-06-21 21:17:53 +02:00
|
|
|
|
|
|
|
<script src="./mermaid.js"></script>
|
|
|
|
<script>
|
2022-09-04 21:30:47 +02:00
|
|
|
mermaid.initialize({ startOnLoad: false, logLevel: 0 });
|
2022-06-21 21:17:53 +02:00
|
|
|
|
2022-09-04 21:30:47 +02:00
|
|
|
const graph = `
|
2022-06-21 21:17:53 +02:00
|
|
|
%%{ init: { "themeVariables" : { "textColor": "green;} #target { background-color: crimson }", "mainBkg": "#fff000" } } }%%
|
|
|
|
graph TD
|
|
|
|
A[Goose]
|
|
|
|
`;
|
|
|
|
|
2022-09-04 21:30:47 +02:00
|
|
|
const diagram = document.getElementById('diagram');
|
|
|
|
const svg = mermaid.render('diagram-svg', graph);
|
|
|
|
diagram.innerHTML = svg;
|
2022-06-21 21:17:53 +02:00
|
|
|
</script>
|
2022-09-04 21:30:47 +02:00
|
|
|
</body>
|
2022-06-21 21:17:53 +02:00
|
|
|
</html>
|