forked from mermaid-js/mermaid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
276 lines (270 loc) · 12.1 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Home</title>
<meta name="description" content="">
<meta name="author" content="ink, cookbook, recipes">
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="icon" type="image/x-icon" href="https://assets-cdn.github.com/favicon.ico">
<lnk rel="shortcut icon" href="http://cdn.ink.sapo.pt/3.1.1/img/favicon.ico">
<link rel="apple-touch-icon" href="http://cdn.ink.sapo.pt/3.1.1/img/touch-icon-iphone.png">
<link rel="apple-touch-icon" sizes="76x76" href="http://cdn.ink.sapo.pt/3.1.1/img/touch-icon-ipad.png">
<link rel="apple-touch-icon" sizes="120x120"
href="http://cdn.ink.sapo.pt/3.1.1/img/touch-icon-iphone-retina.png">
<link rel="apple-touch-icon" sizes="152x152" href="http://cdn.ink.sapo.pt/3.1.1/img/touch-icon-ipad-retina.png">
<link rel="apple-touch-startup-image" href="http://cdn.ink.sapo.pt/3.1.1/img/splash.320x460.png"
media="screen and (min-device-width: 200px) and (max-device-width: 320px) and (orientation:portrait)">
<link rel="apple-touch-startup-image" href="http://cdn.ink.sapo.pt/3.1.1/img/splash.768x1004.png"
media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait)">
<link rel="apple-touch-startup-image" href="http://cdn.ink.sapo.pt/3.1.1/img/splash.1024x748.png"
media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:landscape)">
<!-- load Ink's css from the cdn -->
<lnk rel="stylesheet" type="text/css" title="mermaid-svg-internal-css" href="css/ink-flex.min.css">
<link rel="stylesheet" type="text/css" href="http://cdn.ink.sapo.pt/3.1.1/css/ink-flex.min.css">
<link rel="stylesheet" type="text/css" title="mermaid-svg-internal-css" href="3.1.1/css/font-awesome.min.css">
<!-- load Ink's css for IE8 -->
<!--[if lt IE 9 ]>
<link rel="stylesheet" title="mermaid-svg-internal-css" href="css/ink-ie.min.css" type="text/css" media="screen"
title="no title" charset="utf-8">
<![endif]-->
<link rel="stylesheet" href="css/monokai_sublime.css">
<script src="js/highlight.pack.js"></script>
<link rel="stylesheet" href="css/seq.css" type="text/css" media="screen" title="no title" charset="utf-8">
<!-- test browser flexbox support and load legacy grid if unsupported -->
<script type="text/javascript" src="http://cdn.ink.sapo.pt/3.1.1/js/modernizr.js"></script>
<script type="text/javascript">
Modernizr.load({
test: Modernizr.flexbox,
nope: 'http://cdn.ink.sapo.pt/3.1.1/css/ink-legacy.min.css'
});
</script>
<!-- load Ink's javascript files from the cdn -->
<script type="text/javascript" src="http://cdn.ink.sapo.pt/3.1.1/js/holder.js"></script>
<script type="text/javascript" src="http://cdn.ink.sapo.pt/3.1.1/js/ink-all.min.js"></script>
<script type="text/javascript" src="http://cdn.ink.sapo.pt/3.1.1/js/autoload.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/knsv/mermaid/0.3.3/dist/mermaid.full.js"></script>
<scrpt type="text/javascript" src="/dist/mermaid.full.js"></scrpt>
<style type="text/css">
body {
background: #ffffff;
font-family: sans-serif;
font-size: 90%;
}
header h1 small:before {
content: "|";
margin: 0 0.5em;
font-size: 1.5em;
}
h1 {
color: #104e8b
}
article header {
padding: 0;
overflow: hidden;
}
article footer {
background: none;
}
article {
padding-bottom: 2em;
border-bottom: 1px solid #ccc;
}
table, th, td {
border: 1px solid #8b8989;
}
.date {
float: right;
}
summary {
font-weight: 700;
line-height: 1.5;
}
.push, footer {
height: 120px;
margin-top: 0;
margin-bottom: 10;
}
footer {
background: #a9a9a9;
}
.cluster {
fill: #fcac93;
rx:4px;
stroke: grey;
}
svg {
padding-left:2px;
}
</style>
<script>
var g = function (hljs) {
var r = "[a-z'][a-zA-Z0-9_']*", c = "(" + r + ":" + r + "|" + r + ")";
var keyw = {
keyword: 'graph sequenceDiagram participant loop end',
typename: 'Note',
literal: "false true left right"
};
return {
case_insensitive: false,
aliases: ["mermaid"],
k: keyw,
i: 'for',
c: [{
cN: "function",
b: "^" + r + "\\s*\\(",
e: "->",
rB: !0,
i: "\\(|#|//|/\\*|\\\\|:|;",
starts: {
e: ";|\\.", k: keyw, c: [
{cN: "comment", b: "%", e: "$"}
]
}
},
{cN: "comment", b: "%", e: "$"}
]
};
};
hljs.registerLanguage('mm', g);
hljs.initHighlightingOnLoad();
Ink.requireModules(['Ink.Dom.Loaded_1'], function (DomLoaded) {
DomLoaded.run(function () {
var elements = document.querySelectorAll('article h1,h2');
var i;
var sections = document.getElementById('sections');
for (i = 0; i < elements.length; i++) {
var e = elements[i];
sections.innerHTML = sections.innerHTML + '<li><a href="#' + e.id + '">' + e.innerHTML + '</a></li>';
//$("#sections").append('<li><a href="http://www.idg.se">'+$e.text()+'</a></li>');
}
Ink.requireModules(['Ink.UI.Sticky_1'], function (Sticky) {
new Sticky('#sidenav')
});
console.log('Registering new lang');
});
});
</script>
</head>
<body>
<nav class="ink-navigation xlarge-push-right large-push-right half-top-space">
<ul class="menu horizontal blue">
<li class="active"><a href="index.html">Home</a></li>
<li><a href="usage.html">Usage</a></li>
<li><a href="flowchart.html">Flowchart</a></li>
<li><a href="sequenceDiagram.html">Sequence Diagram</a></li>
<li><a href="mermaidCLI.html">mermaid CLI</a></li>
<li><a href="demos.html">Demos</a></li>
<li><a href="development.html">Development</a></li>
</ul>
</nav>
<div class="ink-grid">
<!--[if lte IE 9 ]>
<div class="ink-alert basic" role="alert">
<button class="ink-dismiss">×</button>
<p>
<strong>You are using an outdated Internet Explorer version.</strong>
Please <a href="http://browsehappy.com/">upgrade to a modern browser</a> to improve your web experience.
</p>
</div>
-->
<!-- Add your site or application content here -->
<header class="clearfix vertical-padding">
<h1 class="logo xlarge-push-left large-push-left">
<a href="https://github.com/knsv/mermaid" >mermaid</a>
<small>Diagrams and flowcharts from textsimilar to markdown</small>
</h1>
</header>
<section class="column-group gutters article">
<div class="xlarge-80 large-80 medium-70 small-100 tiny-100">
<article id="main">
<h1 id="mermaid">mermaid</h1>
<p>Generation of diagrams and flowcharts from text in a similar manner as markdown.</p>
<p>Ever wanted to simplify documentation and avoid heavy tools like Visio when explaining your code?</p>
<p>This is why mermaid was born, a simple markdown-like script language for generating charts from text via javascript.</p>
<p>The code below would render the following image</p>
<table>
<tr><th>Code</th><th>Rendered diagram</th></tr>
<tr><td>
<pre>
<code>
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
<code>
</pre>
</td>
<td>
<img src='http://www.sveido.com/mermaid/img/ex1.png' alt='Example 1'>
</td>
</tr>
<tr>
<td>
<pre>
<code>
sequenceDiagram
participant Alice
participant Bob
Alice->John: Hello John, how are you?
loop Healthcheck
John->John: Fight against hypochondria
end
Note right of John: Rational thoughts <br/>prevail...
John-->Alice: Great!
John->Bob: How about you?
Bob-->John: Jolly good!
</code>
</pre>
</td>
<td>
<img src='http://www.sveido.com/mermaid/img/seq1.png' alt='Example 2'>
</td>
</tr>
</table>
<p>Play with mermaid using this <a href="http://danielmschmidt.github.io/mermaid-demo/">editor</a>. You can also look at mermaid in action using <a href="http://jsbin.com/faxunexeku/1/edit?html,output">jsbin</a>.</p>
<h2 id="further-reading">Further reading</h2>
<ul>
<li><a href="http://knsv.github.io/mermaid/usage.html">Usage</a></li>
<li><a href="http://knsv.github.io/mermaid/flowchart.html">Flowchart syntax</a></li>
<li><a href="http://knsv.github.io/mermaid/sequenceDiagram.html">Sequence diagram syntax</a></li>
<li><a href="http://knsv.github.io/mermaid/mermaidCLI.html">Mermaid client</a></li>
</ul>
<h1 id="credits">Credits</h1>
<p>Many thanks to the <a href="http://d3js.org/">d3</a> and <a href="https://github.com/cpettitt/dagre-d3">dagre-d3</a> projects for providing
the graphical layout and drawing libraries! Thanks also to the
<a href="http://bramp.github.io/js-sequence-diagrams">js-sequence-diagram</a> project for usage of the grammar for the
sequence diagrams.</p>
<p><em>Mermaid was created by Knut Sveidqvist for easier documentation.</em></p>
<p>Knut has not done all work by himself, here is the full list of the projects <a href="https://github.com/knsv/mermaid/graphs/contributors">contributors</a>.</p>
</article>
</div>
<section class="xlarge-20 large-20 medium-30 small-100 tiny-100">
<a href="https://github.com/knsv/mermaid" class="github-button">Star</a>
<a href="https://github.com/knsv/mermaid" class="github-button">Fork</a>
<a href="https://github.com/knsv/mermaid/archive/master.zip" class="github-button">Download</a>
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
<a href="https://travis-ci.org/knsv/mermaid"><img src="https://travis-ci.org/knsv/mermaid.svg?branch=master" alt="Build Status"></a>
<a href="https://codeclimate.com/github/knsv/mermaid"><img src="https://codeclimate.com/github/knsv/mermaid/badges/gpa.svg" alt="Code Climate"></a>
<nav id="sidenav" class="ink-navigation ink-sticky bottom-space"
data-bottom-element="#sticky-stop">
<ul class="menu vertical grey" id="sections">
<li class="heading active"><a href="#">Index:</a></li>
</ul>
</nav>
</section>
</section>
<div id="sticky-stop"> </div>
</div>
<footer class="clearfix">
<div class="ink-grid">
<p class="note"><br/>These pages are generated from markdown source files. <a href="https://raw.githubusercontent.com/knsv/mermaid/gh-pages/docs/flowchart.md">flowchart.md</a> is an example of a markdown file which includes mermaid source.</p>
</div>
</footer>
</body>
</html>