mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +00:00
Upgrade mermaid-js/mermaid @ 0918b97 (v8.8.0) (#443)
* Upgrade mermaid-js/mermaid @ 0918b97 * Update exampleSite with new mermaid graph (stateDiagram-v2) example * Update content of mermaid.js with officially distributed v8.8.0 minified version
This commit is contained in:
parent
48a0e36c8a
commit
699c9fdf9f
3 changed files with 329 additions and 342 deletions
|
@ -25,19 +25,17 @@ graph LR;
|
|||
B --> C{Decision}
|
||||
C -->|One| D[Result one]
|
||||
C -->|Two| E[Result two]
|
||||
{{< /mermaid >}}
|
||||
{{</mermaid>}}
|
||||
|
||||
or you can use this alternative syntax:
|
||||
|
||||
<pre>
|
||||
```mermaid
|
||||
graph LR;
|
||||
```mermaid
|
||||
graph LR;
|
||||
A[Hard edge] -->|Link text| B(Round edge)
|
||||
B --> C{Decision}
|
||||
C -->|One| D[Result one]
|
||||
C -->|Two| E[Result two]
|
||||
```
|
||||
</pre>
|
||||
```
|
||||
|
||||
renders as
|
||||
|
||||
|
@ -79,45 +77,11 @@ sequenceDiagram
|
|||
John-->Alice: Great!
|
||||
John->Bob: How about you?
|
||||
Bob-->John: Jolly good!
|
||||
{{< /mermaid >}}
|
||||
|
||||
or you can use this alternative syntax:
|
||||
|
||||
<pre>
|
||||
```mermaid
|
||||
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!
|
||||
```
|
||||
</pre>
|
||||
|
||||
renders as
|
||||
|
||||
```mermaid
|
||||
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!
|
||||
```
|
||||
{{</mermaid>}}
|
||||
|
||||
## GANTT Example
|
||||
|
||||
{{</*mermaid*/>}}
|
||||
{{</* mermaid */>}}
|
||||
gantt
|
||||
dateFormat YYYY-MM-DD
|
||||
title Adding GANTT diagram functionality to mermaid
|
||||
|
@ -156,53 +120,11 @@ gantt
|
|||
Add to mermaid :1d
|
||||
{{</mermaid>}}
|
||||
|
||||
or you can use this alternative syntax:
|
||||
|
||||
<pre>
|
||||
```mermaid
|
||||
gantt
|
||||
dateFormat YYYY-MM-DD
|
||||
title Adding GANTT diagram functionality 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
|
||||
```
|
||||
</pre>
|
||||
|
||||
renders as
|
||||
|
||||
```mermaid
|
||||
gantt
|
||||
dateFormat YYYY-MM-DD
|
||||
title Adding GANTT diagram functionality 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
|
||||
```
|
||||
|
||||
### Class example
|
||||
|
||||
<pre>
|
||||
```mermaid
|
||||
classDiagram
|
||||
{{</* mermaid */>}}
|
||||
classDiagram
|
||||
Class01 <|-- AveryLongClass : Cool
|
||||
Class03 *-- Class04
|
||||
Class05 o-- Class06
|
||||
|
@ -216,12 +138,12 @@ classDiagram
|
|||
Class01 : int chimp
|
||||
Class01 : int gorilla
|
||||
Class08 <--> C2: Cool label
|
||||
```
|
||||
</pre>
|
||||
{{</* /mermaid */>}}
|
||||
|
||||
renders as
|
||||
|
||||
```mermaid
|
||||
|
||||
{{<mermaid>}}
|
||||
classDiagram
|
||||
Class01 <|-- AveryLongClass : Cool
|
||||
Class03 *-- Class04
|
||||
|
@ -236,19 +158,19 @@ classDiagram
|
|||
Class01 : int chimp
|
||||
Class01 : int gorilla
|
||||
Class08 <--> C2: Cool label
|
||||
```
|
||||
{{</mermaid>}}
|
||||
|
||||
|
||||
### Git example
|
||||
|
||||
<pre>
|
||||
```mermaid
|
||||
gitGraph:
|
||||
options
|
||||
{
|
||||
```mermaid
|
||||
gitGraph:
|
||||
options
|
||||
{
|
||||
"nodeSpacing": 150,
|
||||
"nodeRadius": 10
|
||||
}
|
||||
end
|
||||
}
|
||||
end
|
||||
commit
|
||||
branch newbranch
|
||||
checkout newbranch
|
||||
|
@ -258,8 +180,7 @@ end
|
|||
commit
|
||||
commit
|
||||
merge newbranch
|
||||
```
|
||||
</pre>
|
||||
```
|
||||
|
||||
renders as
|
||||
|
||||
|
@ -281,3 +202,29 @@ end
|
|||
commit
|
||||
merge newbranch
|
||||
```
|
||||
|
||||
### State Diagrams
|
||||
|
||||
{{</* mermaid */>}}
|
||||
stateDiagram-v2
|
||||
open: Open Door
|
||||
closed: Closed Door
|
||||
locked: Locked Door
|
||||
open --> closed: Close
|
||||
closed --> locked: Lock
|
||||
locked --> closed: Unlock
|
||||
closed --> open: Open
|
||||
{{</* /mermaid */>}}
|
||||
|
||||
renders as
|
||||
|
||||
{{<mermaid>}}
|
||||
stateDiagram-v2
|
||||
open: Open Door
|
||||
closed: Closed Door
|
||||
locked: Locked Door
|
||||
open --> closed: Close
|
||||
closed --> locked: Lock
|
||||
locked --> closed: Unlock
|
||||
closed --> open: Open
|
||||
{{</mermaid>}}
|
||||
|
|
|
@ -28,15 +28,13 @@ graph LR;
|
|||
|
||||
or you can use this alternative syntax:
|
||||
|
||||
<pre>
|
||||
```mermaid
|
||||
graph LR;
|
||||
```mermaid
|
||||
graph LR;
|
||||
A[Bords droits] -->|Lien texte| B(Bords arondis)
|
||||
B --> C{Décision}
|
||||
C -->|Un| D[Résultat un]
|
||||
C -->|Deux| E[Résultat deux]
|
||||
```
|
||||
</pre>
|
||||
```
|
||||
|
||||
renders as
|
||||
|
||||
|
@ -82,9 +80,8 @@ sequenceDiagram
|
|||
|
||||
or you can use this alternative syntax:
|
||||
|
||||
<pre>
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant Alice
|
||||
participant Bob
|
||||
Alice->>John: Salut John, comment vas-tu?
|
||||
|
@ -95,8 +92,7 @@ sequenceDiagram
|
|||
John-->Alice: Super!
|
||||
John->Bob: Et toi?
|
||||
Bob-->John: Au top!
|
||||
```
|
||||
</pre>
|
||||
```
|
||||
|
||||
renders as
|
||||
|
||||
|
@ -158,9 +154,8 @@ gantt
|
|||
|
||||
or you can use this alternative syntax:
|
||||
|
||||
<pre>
|
||||
```mermaid
|
||||
gantt
|
||||
```mermaid
|
||||
gantt
|
||||
dateFormat YYYY-MM-DD
|
||||
title Ajout de la fonctionnalité de GANTT à Mermaid
|
||||
section Une section
|
||||
|
@ -175,8 +170,7 @@ gantt
|
|||
Future tâche dans le chemin critique :crit, 5d
|
||||
Créer des tests pour le renderer :2d
|
||||
Ajout à Mermaid :1d
|
||||
```
|
||||
</pre>
|
||||
```
|
||||
|
||||
renders as
|
||||
|
||||
|
@ -200,9 +194,8 @@ gantt
|
|||
|
||||
### Class example
|
||||
|
||||
<pre>
|
||||
```mermaid
|
||||
classDiagram
|
||||
```mermaid
|
||||
classDiagram
|
||||
Class01 <|-- AveryLongClass : Cool
|
||||
Class03 *-- Class04
|
||||
Class05 o-- Class06
|
||||
|
@ -216,8 +209,7 @@ classDiagram
|
|||
Class01 : int chimp
|
||||
Class01 : int gorilla
|
||||
Class08 <--> C2: Cool label
|
||||
```
|
||||
</pre>
|
||||
```
|
||||
|
||||
renders as
|
||||
|
||||
|
@ -240,15 +232,14 @@ classDiagram
|
|||
|
||||
### Git example
|
||||
|
||||
<pre>
|
||||
```mermaid
|
||||
gitGraph:
|
||||
options
|
||||
{
|
||||
```mermaid
|
||||
gitGraph:
|
||||
options
|
||||
{
|
||||
"nodeSpacing": 150,
|
||||
"nodeRadius": 10
|
||||
}
|
||||
end
|
||||
}
|
||||
end
|
||||
commit
|
||||
branch newbranch
|
||||
checkout newbranch
|
||||
|
@ -258,8 +249,7 @@ end
|
|||
commit
|
||||
commit
|
||||
merge newbranch
|
||||
```
|
||||
</pre>
|
||||
```
|
||||
|
||||
renders as
|
||||
|
||||
|
@ -281,3 +271,29 @@ end
|
|||
commit
|
||||
merge newbranch
|
||||
```
|
||||
|
||||
### State Diagrams
|
||||
|
||||
{{</* mermaid */>}}
|
||||
stateDiagram-v2
|
||||
ouvert: Ouvert
|
||||
clos: Clos
|
||||
fermé: Fermé
|
||||
ouvert --> clos
|
||||
clos --> fermé: Lock
|
||||
fermé --> clos: Unlock
|
||||
clos --> ouvert: Open
|
||||
{{</* /mermaid */>}}
|
||||
|
||||
renders as
|
||||
|
||||
{{<mermaid>}}
|
||||
stateDiagram-v2
|
||||
ouvert: Ouvert
|
||||
clos: Clos
|
||||
fermé: Fermé
|
||||
ouvert --> clos
|
||||
clos --> fermé: Lock
|
||||
fermé --> clos: Unlock
|
||||
clos --> ouvert: Open
|
||||
{{</mermaid>}}
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue