2014-11-13 19:53:31 +01:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
2014-11-27 09:00:25 +01:00
|
|
|
<meta charset="UTF-8">
|
2014-11-13 19:53:31 +01:00
|
|
|
|
2014-12-03 17:42:39 +01:00
|
|
|
<script src="../dist/mermaid.full.js"></script>
|
2015-01-04 17:56:58 +01:00
|
|
|
<scrpt src="https://cdn.rawgit.com/knsv/mermaid/0.3.0/dist/mermaid.full.min.js"></scrpt>
|
2014-11-25 22:58:57 +01:00
|
|
|
<script>
|
2014-11-21 08:03:43 +01:00
|
|
|
var mermaid_config = {
|
2014-11-22 10:02:38 +01:00
|
|
|
startOnLoad:true
|
2014-11-21 08:03:43 +01:00
|
|
|
}
|
2015-01-06 19:33:00 +01:00
|
|
|
mermaid.startOnLoad=true;
|
2014-11-25 22:58:57 +01:00
|
|
|
</script>
|
2014-11-24 22:03:32 +01:00
|
|
|
<script>
|
|
|
|
function apa(){
|
|
|
|
console.log('CLICKED');
|
|
|
|
}
|
|
|
|
</script>
|
2014-11-13 19:53:31 +01:00
|
|
|
</head>
|
|
|
|
<body>
|
2014-11-27 09:00:25 +01:00
|
|
|
<h1>Shapes</h1>
|
2014-12-04 17:58:05 +01:00
|
|
|
Shape examples:
|
|
|
|
<pre>
|
2014-11-27 09:00:25 +01:00
|
|
|
graph TD;
|
2014-11-27 18:21:15 +01:00
|
|
|
sq[Square shape]-->ci((Circle shape));
|
2014-12-04 17:58:05 +01:00
|
|
|
od>Odd shape]---|Two line <br>edge comment|ro;
|
|
|
|
od2>Really long text in an Odd shape]-->od3>Really long text with linebreak <br>in an Odd shape];
|
|
|
|
di{Diamond is <br> broken}-->ro(Rounded <br>square <br>shape);
|
2014-12-11 19:23:36 +01:00
|
|
|
|
|
|
|
%% Comments after double percent signs
|
2014-11-27 18:21:15 +01:00
|
|
|
di-->ro2(Rounded square shape);
|
2014-12-03 18:34:18 +01:00
|
|
|
e((Inner circle))-->f(,.?!+-*ز);
|
2014-12-21 20:59:11 +01:00
|
|
|
A[Object]-->B(Thing);
|
2014-11-27 09:00:25 +01:00
|
|
|
style e red;
|
2014-12-04 17:58:05 +01:00
|
|
|
</pre>
|
2015-01-04 17:56:58 +01:00
|
|
|
<div class="mermaid">
|
|
|
|
graph TD;
|
|
|
|
A-->B;
|
|
|
|
A-->C;
|
|
|
|
A-->D;
|
|
|
|
B-->D;
|
|
|
|
A-->|Link text|B
|
|
|
|
</div>
|
2014-12-04 17:58:05 +01:00
|
|
|
<div class="mermaid">
|
|
|
|
graph TD;
|
|
|
|
sq[Square shape]-->ci((Circle shape));
|
|
|
|
od>Odd shape]---|Two line<br>edge comment|ro;
|
|
|
|
od2>Really long text in an Odd shape]-->od3>Really long text with linebreak<br>in an Odd shape];
|
|
|
|
di{Diamond is <br/> broken}-->ro(Rounded<br>square<br>shape);
|
|
|
|
di-->ro2(Rounded square shape);
|
2014-12-11 19:23:36 +01:00
|
|
|
%% Comments after double percent signs
|
2014-12-14 19:13:04 +01:00
|
|
|
e((Inner / circle))-->f(,.?!+-*ز);
|
2014-12-04 17:58:05 +01:00
|
|
|
cyr[Cyrillic]-->cyr2((Circle shape Начало));
|
2014-12-21 20:59:11 +01:00
|
|
|
A[Object foo,bar]-->B(Thing);
|
2014-12-04 17:58:05 +01:00
|
|
|
style e red;
|
2014-11-27 09:00:25 +01:00
|
|
|
</div>
|
2015-01-04 17:56:58 +01:00
|
|
|
<div class="mermaid2">
|
2014-12-21 20:59:11 +01:00
|
|
|
graph LR;
|
|
|
|
A(Central Message Router);
|
|
|
|
B(R TD);
|
|
|
|
C(XYZ);
|
|
|
|
D(S Writer);
|
|
|
|
A-->|R TD Router|B;
|
|
|
|
B-->C;
|
|
|
|
C-->|XYZ Router|D;
|
|
|
|
</div>
|
2014-11-22 10:02:38 +01:00
|
|
|
|
2014-12-04 17:58:05 +01:00
|
|
|
<h1>Sequence diagrams (experimental)</h1>
|
|
|
|
<pre>
|
|
|
|
sequenceDiagram
|
2014-12-21 20:59:11 +01:00
|
|
|
participant John the Long
|
2014-12-04 17:58:05 +01:00
|
|
|
Alice->Bob: Hello Bob, how are you?
|
2014-12-21 20:59:11 +01:00
|
|
|
Note left of Bob: Bob thinks
|
2014-12-04 17:58:05 +01:00
|
|
|
Bob-->Alice: I am good thanks!
|
|
|
|
Bob-->John the Long: How about you John?
|
2014-12-21 20:59:11 +01:00
|
|
|
Note left of John the Long: Bob thinks
|
2014-12-04 17:58:05 +01:00
|
|
|
Bob-->Alice: Checking with John...
|
2014-12-21 20:59:11 +01:00
|
|
|
|
|
|
|
loop Multiple status checks
|
|
|
|
loog Naging
|
2014-12-04 17:58:05 +01:00
|
|
|
Alice->John the Long: Yes... John, how are you?
|
2014-12-21 20:59:11 +01:00
|
|
|
end
|
2014-12-04 17:58:05 +01:00
|
|
|
John the Long-->Alice: Better then you!
|
2014-12-21 20:59:11 +01:00
|
|
|
end
|
2014-12-04 17:58:05 +01:00
|
|
|
</pre>
|
2015-01-04 17:56:58 +01:00
|
|
|
<div class="mermaid2">
|
2014-12-04 17:58:05 +01:00
|
|
|
sequenceDiagram
|
2014-12-21 20:59:11 +01:00
|
|
|
participant Alice
|
|
|
|
Note left of Alice: Bob thinks about <br/> things <br/> to think about
|
|
|
|
</div>
|
|
|
|
<div class="mermaid">
|
|
|
|
sequenceDiagram
|
|
|
|
participant Alice
|
|
|
|
participant Bob
|
2015-01-04 17:56:58 +01:00
|
|
|
participant John
|
|
|
|
Alice->>Bob: Hello Bob, how are you?
|
2014-12-21 20:59:11 +01:00
|
|
|
Note left of Alice: Bob thinks about <br/> things <br/> to think about
|
2015-01-04 17:56:58 +01:00
|
|
|
Bob-->>Alice: I am good thanks!
|
2014-12-21 20:59:11 +01:00
|
|
|
loop Multiple status checks
|
2015-01-04 17:56:58 +01:00
|
|
|
Bob--xJohn: How about you John?
|
|
|
|
Note right of John: Bob thinks
|
2014-12-21 20:59:11 +01:00
|
|
|
end
|
2014-12-16 20:51:48 +01:00
|
|
|
|
2015-01-04 17:56:58 +01:00
|
|
|
Bob--xAlice: Checking with John...
|
2014-12-04 17:58:05 +01:00
|
|
|
Alice->John the Long: Yes... John, how are you?
|
2015-01-04 17:56:58 +01:00
|
|
|
John the Long-->Alice: Better then you!!
|
|
|
|
|
2014-12-04 17:58:05 +01:00
|
|
|
</div>
|
|
|
|
|
2014-12-05 10:19:07 +01:00
|
|
|
<div class="mermaid">
|
|
|
|
graph LR;
|
2014-12-16 20:51:48 +01:00
|
|
|
A[Start]-->B{a = '1,2'}
|
|
|
|
B-->|True|C[test = 1]
|
|
|
|
B-->|False|Z[Store]
|
2014-12-05 10:19:07 +01:00
|
|
|
C-->D{condition};
|
|
|
|
D-->|True|E[test = 2];
|
|
|
|
D-->|False|F[test = 3];
|
|
|
|
E-->G{condition2 = ''};
|
|
|
|
F-->G;
|
|
|
|
G-->|True|H[test = 4];
|
|
|
|
G-->|False|I[test = 5];
|
|
|
|
H-->J{condition3};
|
|
|
|
I-->J;
|
|
|
|
J-->|True|K[test = 6];
|
|
|
|
J-->|False|L;
|
|
|
|
K-->L[Print];
|
|
|
|
L-->M[Any Action];
|
|
|
|
M-->N[Any Other Action];
|
|
|
|
N-->Z;
|
|
|
|
|
|
|
|
</div>
|
2014-12-04 17:58:05 +01:00
|
|
|
<h1>Dot syntax (experimental)</h1>
|
|
|
|
<pre>
|
|
|
|
digraph
|
|
|
|
{
|
|
|
|
a -> b -> c -- d -> e;
|
|
|
|
a -- e;
|
|
|
|
}
|
|
|
|
</pre>
|
2015-01-04 17:56:58 +01:00
|
|
|
<div class="mermaid2">
|
2014-12-04 17:58:05 +01:00
|
|
|
digraph
|
|
|
|
{
|
|
|
|
a -> b -> c -- d -> e;
|
|
|
|
a -- e;
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
2014-11-13 19:53:31 +01:00
|
|
|
</body>
|
2014-12-02 18:36:16 +01:00
|
|
|
</html>
|