mermaid/cypress/platform/ghsa2.html

30 lines
884 B
HTML
Raw Normal View History

<html>
2022-09-05 01:00:47 +05:30
<script>
// %%{ init: { "logLevel":0, "themeVariables" : { "primaryColor": "#fff000","textColor": "green","apa":"} #target { background-color: crimson }" } } }%%
2022-09-05 01:00:47 +05:30
</script>
<body>
<div id="target">
2022-09-05 01:00:47 +05:30
<h1>This element does not belong to the SVG but we can style it</h1>
</div>
2022-09-05 01:00:47 +05:30
<svg id="diagram"></svg>
2023-02-19 14:03:11 +05:30
<script type="module">
import mermaid from './mermaid.esm.mjs';
2022-09-05 01:00:47 +05:30
mermaid.initialize({ startOnLoad: false, logLevel: 0 });
2022-09-05 01:00:47 +05:30
const graph = `
%%{ init: { "fontFamily" : "&125; * { background: red }" } }%%
graph TD
A[Goose]
`;
2022-09-05 01:00:47 +05:30
const diagram = document.getElementById('diagram');
2023-02-19 14:03:11 +05:30
const { svg } = await mermaid.render('diagram-svg', graph);
2022-09-05 01:00:47 +05:30
diagram.innerHTML = svg;
2023-01-16 13:18:16 +05:30
if (window.Cypress) {
window.rendered = true;
}
</script>
2022-09-05 01:00:47 +05:30
</body>
</html>