mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
Some fixes to docker and demos
This commit is contained in:
parent
fe3dd5a531
commit
c874d74faf
43
demos/sankey.html
Normal file
43
demos/sankey.html
Normal file
@ -0,0 +1,43 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns="http://www.w3.org/1999/html">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<title>States Mermaid Quick Test Page</title>
|
||||
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo=" />
|
||||
<style>
|
||||
div.mermaid {
|
||||
/* font-family: 'trebuchet ms', verdana, arial; */
|
||||
font-family: 'Courier New', Courier, monospace !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Sankey diagram demos</h1>
|
||||
<h2>Simple flow</h2>
|
||||
<pre class="mermaid">
|
||||
stateDiagram-v2
|
||||
direction LR
|
||||
State1: A state with a note
|
||||
note right of State1
|
||||
Important information!<br />You can write notes.<br />And\nthey\ncan\nbe\nmulti-\nline.
|
||||
end note
|
||||
State1 --> State2
|
||||
note left of State2 : Notes can be to the left of a state\n(like this one).
|
||||
note right of State2 : Notes can be to the right of a state\n(like this one).
|
||||
</pre>
|
||||
<script type="module">
|
||||
import mermaid from './mermaid.esm.mjs';
|
||||
mermaid.initialize({
|
||||
theme: 'default',
|
||||
// themeCSS: '.node rect { fill: red; }',
|
||||
logLevel: 3,
|
||||
securityLevel: 'loose',
|
||||
flowchart: { curve: 'basis' },
|
||||
gantt: { axisFormat: '%m/%d/%Y' },
|
||||
sequence: { actorMargin: 50 },
|
||||
// sequenceDiagram: { actorMargin: 300 } // deprecated
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -7,5 +7,10 @@ services:
|
||||
working_dir: /mermaid
|
||||
volumes:
|
||||
- ./:/mermaid
|
||||
- root_cache:/root/.cache
|
||||
- root_local:/root/.local
|
||||
ports:
|
||||
- 9000:9000
|
||||
volumes:
|
||||
root_cache:
|
||||
root_local:
|
4
run
4
run
@ -13,7 +13,7 @@ sh)
|
||||
$RUN mermaid sh $args
|
||||
;;
|
||||
|
||||
install)
|
||||
i | install)
|
||||
$RUN mermaid sh -c "npx pnpm install"
|
||||
;;
|
||||
|
||||
@ -40,7 +40,7 @@ cat <<EOF
|
||||
Run commonly used commands within docker containers
|
||||
|
||||
\033[1m$name install\033[0m # Equvalent of pnpm install
|
||||
\033[1m$name run\033[0m # Run dev server with examples, open http://localhost:9000
|
||||
\033[1m$name dev\033[0m # Run dev server with examples, open http://localhost:9000
|
||||
|
||||
$name lint # Equvalent of pnpm -w run lint:fix
|
||||
$name test # Run unit tests
|
||||
|
Loading…
x
Reference in New Issue
Block a user