mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
172 lines
4.4 KiB
HTML
172 lines
4.4 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;
|
|
}
|
|
.mermaid svg {
|
|
font-size: 12px !important;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>info below</h1>
|
|
<div class="flex">
|
|
<div class="mermaid2" style="width: 50%; height: 400px;">
|
|
graph TD
|
|
A[Christmas] ==> D
|
|
A[Christmas] -->|Get money| B(Go shopping)
|
|
A[Christmas] ==> C
|
|
subgraph T ["Test"]
|
|
A
|
|
B
|
|
C
|
|
end
|
|
classDef Test fill:#F84E68,stroke:#333,color:white;
|
|
class A,T Test
|
|
classDef TestSub fill:green;
|
|
class T TestSub
|
|
linkStyle 0,1 color:orange, stroke: orange;
|
|
</div>
|
|
<div class="mermaid2" style="width: 50%; height: 400px;">
|
|
flowchart TD
|
|
A[Christmas] ==> D
|
|
A[Christmas] -->|Get money| B(Go shopping)
|
|
A[Christmas] ==> C
|
|
subgraph T ["Test"]
|
|
A
|
|
B
|
|
C
|
|
end
|
|
|
|
classDef Test fill:#F84E68,stroke:#333,color:white;
|
|
class A,T Test
|
|
classDef TestSub fill:green;
|
|
class T TestSub
|
|
linkStyle 0,1 color:orange, stroke: orange;
|
|
</div>
|
|
<div class="mermaid2" style="width: 50%; height: 20%;">
|
|
sequenceDiagram
|
|
Actor1 -) Actor2:Async
|
|
Actor1 --) Actor2:Async dotted
|
|
Actor1 ->> Actor2:Sync
|
|
Actor1 -->> Actor2:Sync dotted
|
|
</div>
|
|
<div class="mermaid2" style="width: 50%; height: 20%;">
|
|
flowchart TD
|
|
C -->|fa:fa-car Car| F[fa:fa-car Car]
|
|
</div>
|
|
<div class="mermaid2" style="width: 50%; height: 20%;">
|
|
%%{init: { 'logLevel': 0, 'theme': 'forest'} }%%
|
|
graph TD
|
|
A(Start) --> B[/Another/]
|
|
A[/Another/] --> C[End]
|
|
subgraph section
|
|
B
|
|
C
|
|
end
|
|
</div>
|
|
<div class="mermaid2" style="width: 50%; height: 20%;">
|
|
%%{init: {'theme': 'base' }}%%
|
|
%%{init2: { 'logLevel': 0, 'theme': 'forest'} }%%
|
|
flowchart TD
|
|
L1 --- L2
|
|
L2 --- C
|
|
M1 ---> C
|
|
R1 .-> R2
|
|
R2 <.-> C
|
|
C -->|Label 1| E1
|
|
C <-- Label 2 ---> E2
|
|
C ----> E3
|
|
C <-...-> E4
|
|
C ======> E5
|
|
</div>
|
|
<div class="mermaid" style="width: 50%; height: 20%;">
|
|
flowchart TB
|
|
A
|
|
B
|
|
subgraph foo[Foo SubGraph]
|
|
C
|
|
D
|
|
end
|
|
subgraph bar[Bar SubGraph]
|
|
E
|
|
F
|
|
end
|
|
G
|
|
|
|
A-->B
|
|
B-->C
|
|
C-->D
|
|
B-->D
|
|
D-->E
|
|
E-->A
|
|
E-->F
|
|
F-->D
|
|
F-->G
|
|
B-->G
|
|
G-->D
|
|
|
|
style foo fill:#F99,stroke-width:2px,stroke:#F0F,color:darkred
|
|
style bar fill:#999,stroke-width:10px,stroke:#0F0,color:blue
|
|
</div>
|
|
<div class="mermaid" style="width: 50%; height: 20%;">
|
|
flowchart TB
|
|
subgraph bar[Bar]
|
|
F
|
|
end
|
|
style bar fill:#999,stroke-width:10px,stroke:#0F0,color:blue
|
|
</div>
|
|
<div class="mermaid" style="width: 50%; height: 20%;">
|
|
%%{init:{"theme":"base", "themeVariables": {"primaryColor":"#411d4e", "titleColor":"white", "darkMode":true}}}%%
|
|
flowchart LR
|
|
subgraph A
|
|
a --> b
|
|
end
|
|
subgraph B
|
|
i -->f
|
|
end
|
|
A --> B
|
|
</div>
|
|
|
|
|
|
<script src="./mermaid.js"></script>
|
|
<script>
|
|
mermaid.parseError = function (err, hash) {
|
|
// console.error('Mermaid error: ', err);
|
|
};
|
|
mermaid.initialize({
|
|
// theme: 'forest',
|
|
// themeVariables:{primaryColor: '#ff0000'},
|
|
// arrowMarkerAbsolute: true,
|
|
// themeCSS: '.edgePath .path {stroke: red;} .arrowheadPath {fill: red;}',
|
|
logLevel: 0,
|
|
flowchart: { curve: 'cardinal', htmlLabels: true },
|
|
htmlLabels: true,
|
|
// gantt: { axisFormat: '%m/%d/%Y' },
|
|
sequence: { actorFontFamily: 'courier',actorMargin: 50, showSequenceNumbers: true },
|
|
// sequenceDiagram: { actorMargin: 300 } // deprecated
|
|
fontFamily: '"arial", sans-serif',
|
|
fontFamily: 'courier',
|
|
curve: 'cardinal',
|
|
securityLevel: 'loose',
|
|
sequence:{mirrorActors:false}
|
|
});
|
|
function callback(){alert('It worked');}
|
|
</script>
|
|
</body>
|
|
</html>
|