mermaid/dist/index.html

129 lines
3.1 KiB
HTML
Raw Normal View History

2017-04-11 16:24:55 +02:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Mermaid Quick Test Page</title>
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo=">
</head>
<body>
<div class="mermaid">
graph TD
A[Christmas] -->|Get money| B(Go shopping)
B --> C{Let me think}
C -->|One| D[Laptop]
C -->|Two| E[iPhone]
C -->|Three| F[Car]
click A "index.html#link-clicked" "link test"
click B testClick "click test"
2018-03-14 14:36:10 +01:00
classDef someclass fill:#f96;
class A someclass;
2017-04-11 16:24:55 +02:00
</div>
2017-04-15 07:13:54 +02:00
2017-04-15 06:28:16 +02:00
<hr/>
2017-04-15 07:13:54 +02:00
<div class="mermaid">
2017-04-11 16:24:55 +02:00
sequenceDiagram
2018-03-13 03:54:39 +01:00
Alice ->> Bob: Hello Bob, how are you?
Bob-->>John: How about you John?
Bob--x Alice: I am good thanks!
Bob-x John: I am good thanks!
Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.
Bob-->Alice: Checking with John...
Alice->John: Yes... John, how are you?
2017-04-11 16:24:55 +02:00
</div>
2017-04-15 07:13:54 +02:00
<hr/>
<div class="mermaid">
2017-04-11 16:24:55 +02:00
gantt
dateFormat YYYY-MM-DD
axisFormat %d/%m
2017-04-11 16:24:55 +02:00
title Adding GANTT diagram to mermaid
section A section
Completed task :done, des1, 2014-01-06,2014-01-08
Active task :active, des2, 2014-01-09, 3d
Future task : des3, after des2, 5d
Future task2 : des4, after des3, 5d
section Critical tasks
Completed task in the critical line :crit, done, 2014-01-06,24h
Implement parser and jison :crit, done, after des1, 2d
Create tests for parser :crit, active, 3d
Future task in critical line :crit, 5d
Create tests for renderer :2d
Add to mermaid :1d
section Documentation
Describe gantt syntax :active, a1, after des1, 3d
Add gantt diagram to demo page :after a1 , 20h
Add another diagram to demo page :doc1, after a1 , 48h
section Last section
Describe gantt syntax :after doc1, 3d
Add gantt diagram to demo page : 20h
Add another diagram to demo page : 48h
</div>
2017-04-16 11:30:40 +02:00
<hr/>
<div class="mermaid">
2017-06-02 08:42:04 +02:00
gitGraph:
2017-04-16 11:30:40 +02:00
options
{
2017-06-02 08:42:04 +02:00
"nodeSpacing": 150,
2017-04-22 16:12:10 +02:00
"nodeRadius": 10
2017-04-16 11:30:40 +02:00
}
end
2017-06-02 08:42:04 +02:00
commit
branch newbranch
checkout newbranch
commit
commit
checkout master
commit
commit
merge newbranch
2017-04-16 11:30:40 +02:00
</div>
<hr/>
<div class="mermaid">
classDiagram
2017-06-02 08:42:04 +02:00
Class01 <|-- AveryLongClass : Cool
Class03 *-- Class04
Class05 o-- Class06
Class07 .. Class08
Class09 --> C2 : Where am i?
Class09 --* C3
Class09 --|> Class07
Class07 : equals()
Class07 : Object[] elementData
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
Class08 <--> C2: Cool label
2017-04-16 11:30:40 +02:00
</div>
2017-09-10 16:29:37 +02:00
<script src="./mermaid.js"></script>
2017-04-11 16:24:55 +02:00
<script>
2018-03-13 14:17:32 +01:00
mermaid.initialize({
theme: 'forest',
logLevel: 3,
gantt: { axisFormat: '%m/%d/%Y' },
sequence: { actorMargin: 50 },
});
2017-04-11 16:24:55 +02:00
</script>
<script>
function testClick(nodeId) {
2017-12-26 13:58:54 +01:00
console.log("clicked", nodeId)
var originalBgColor = document.querySelector('body').style.backgroundColor
document.querySelector('body').style.backgroundColor = 'yellow'
setTimeout(function() {
2017-12-26 13:58:54 +01:00
document.querySelector('body').style.backgroundColor = originalBgColor
}, 100)
}
</script>
2017-04-11 16:24:55 +02:00
</body>
</html>