mirror of
https://github.com/mermaid-js/mermaid.git
synced 2024-09-11 03:52:43 +02:00
126 lines
3.7 KiB
HTML
126 lines
3.7 KiB
HTML
<html>
|
|
<head>
|
|
<link
|
|
href="https://fonts.googleapis.com/css?family=Montserrat&display=swap"
|
|
rel="stylesheet"
|
|
/>
|
|
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet">
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
|
<link href="https://fonts.googleapis.com/css?family=Noto+Sans+SC&display=swap" rel="stylesheet">
|
|
<style>
|
|
body {
|
|
/* background: rgb(221, 208, 208); */
|
|
/* background:#333; */
|
|
font-family: 'Arial';
|
|
}
|
|
h1 { color: grey;}
|
|
.mermaid2 {
|
|
display: none;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>info below</h1>
|
|
<div class="flex">
|
|
<div class="mermaid2" style="width: 50%; height: 20%;">
|
|
flowchart BT
|
|
subgraph two
|
|
b1
|
|
end
|
|
subgraph three
|
|
c1-->c2
|
|
end
|
|
c1 --apa apa apa--> b1
|
|
two --> c2
|
|
</div>
|
|
<div class="mermaid2" style="width: 50%; height: 200px;">
|
|
sequenceDiagram
|
|
Alice->>Bob:Extremely utterly long line of longness which had preivously overflown the actor box as it is much longer than what it should be
|
|
Bob->>Alice: I'm short though
|
|
</div>
|
|
<div class="mermaid2" style="width: 50%; height: 200px;">
|
|
%%{init: {'securityLevel': 'loose'}}%%
|
|
graph TD
|
|
A[Christmas] -->|Get money| B(Go shopping)
|
|
B --> C{{Let me think...<br />Do I want something for work,<br />something to spend every free second with,<br />or something to get around?}}
|
|
C -->|One| D[Laptop]
|
|
C -->|Two| E[iPhone]
|
|
C -->|Three| F[Car]
|
|
click A "index.html#link-clicked" "link test"
|
|
click B callback "click test"
|
|
classDef someclass fill:#f96;
|
|
class A someclass;
|
|
class C someclass;
|
|
</div>
|
|
<div class="mermaid2" style="width: 50%; height: 200px;">
|
|
|
|
flowchart BT
|
|
subgraph a
|
|
b1 -- ok --> b2
|
|
end
|
|
a -- sert --> c
|
|
c --> d
|
|
b1 --> d
|
|
a --asd123 --> d
|
|
</div>
|
|
<div class="mermaid2" style="width: 50%; height: 20%;">
|
|
stateDiagram-v2
|
|
state A {
|
|
B1 --> B2: ok
|
|
}
|
|
A --> C: sert
|
|
C --> D
|
|
B1 --> D
|
|
A --> D: asd123
|
|
</div>
|
|
</div>
|
|
%%{init: {'theme': 'base', 'themeVariables':{ 'primaryColor': '#ff0000'}}}%%
|
|
<div class="mermaid" style="width: 50%; height: 20%;">
|
|
%%{init: {'theme': 'base'}}%%
|
|
|
|
flowchart TB
|
|
subgraph apa
|
|
a --> A %% comment
|
|
a --> a{apa} %% comment
|
|
end
|
|
</div>
|
|
<div class="mermaid2" style="width: 50%; height: 20%;">
|
|
graph TD
|
|
A(Start) --> B[/Another/]
|
|
A[/Another/] --> C[End]
|
|
subgraph section
|
|
B
|
|
C
|
|
end
|
|
</div>
|
|
<div class="mermaid2" style="width: 50%; height: 20%;">
|
|
sequenceDiagram
|
|
Alice->Bob: Hello Bob, how are you?
|
|
Note over Alice,Bob: Looks
|
|
Note over Bob,Alice: Looks back
|
|
</div>
|
|
|
|
<script src="./mermaid.js"></script>
|
|
<script>
|
|
mermaid.parseError = function (err, hash) {
|
|
// console.error('Mermaid error: ', err);
|
|
};
|
|
mermaid.initialize({
|
|
// theme: 'base',
|
|
// themeVariables:{primaryColor: '#0000ff'},
|
|
// arrowMarkerAbsolute: true,
|
|
// themeCSS: '.edgePath .path {stroke: red;} .arrowheadPath {fill: red;}',
|
|
logLevel: 0,
|
|
flowchart: { curve: 'cardinal', "htmlLabels": false },
|
|
// gantt: { axisFormat: '%m/%d/%Y' },
|
|
sequence: { actorMargin: 50, showSequenceNumbers: true },
|
|
// sequenceDiagram: { actorMargin: 300 } // deprecated
|
|
fontFamily: '"arial", sans-serif',
|
|
curve: 'cardinal',
|
|
securityLevel: 'strict'
|
|
});
|
|
function callback(){alert('It worked');}
|
|
</script>
|
|
</body>
|
|
</html>
|