mermaid/cypress/platform/ghsa2.html

30 lines
884 B
HTML
Raw Permalink Normal View History

<html>
2022-09-04 21:30:47 +02:00
<script>
// %%{ init: { "logLevel":0, "themeVariables" : { "primaryColor": "#fff000","textColor": "green","apa":"} #target { background-color: crimson }" } } }%%
2022-09-04 21:30:47 +02:00
</script>
<body>
<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>
</div>
2022-09-04 21:30:47 +02:00
<svg id="diagram"></svg>
2023-02-19 09:33:11 +01:00
<script type="module">
import mermaid from './mermaid.esm.mjs';
2022-09-04 21:30:47 +02:00
mermaid.initialize({ startOnLoad: false, logLevel: 0 });
2022-09-04 21:30:47 +02:00
const graph = `
%%{ init: { "fontFamily" : "&125; * { background: red }" } }%%
graph TD
A[Goose]
`;
2022-09-04 21:30:47 +02:00
const diagram = document.getElementById('diagram');
2023-02-19 09:33:11 +01:00
const { svg } = await mermaid.render('diagram-svg', graph);
2022-09-04 21:30:47 +02:00
diagram.innerHTML = svg;
2023-01-16 08:48:16 +01:00
if (window.Cypress) {
window.rendered = true;
}
</script>
2022-09-04 21:30:47 +02:00
</body>
</html>