hugo-theme-anubis2/exampleSiteMultilingual/content/posts/advanced-diagram.md

109 lines
2.3 KiB
Markdown
Raw Normal View History

2024-04-09 09:20:53 +02:00
+++
author = "Hugo Authors"
2024-04-09 14:14:49 +02:00
title = "Advanced Usage of Diagrams"
2024-04-09 09:20:53 +02:00
date = "2024-04-09"
description = "Guide to advanced usage of Anubis2"
tags = [
"emoji",
]
+++
2024-04-09 14:14:49 +02:00
## Mermaid Diagrams
2024-04-09 09:20:53 +02:00
2024-04-09 14:14:49 +02:00
```mermaid
gantt
title A Gantt Diagram
dateFormat YYYY-MM-DD
section Section
A task :a1, 2014-01-01, 30d
Another task :after a1, 20d
section Another
Task in Another :2014-01-12, 12d
another task :24d
2024-04-09 09:20:53 +02:00
```
Get more examples at [here](https://mermaid.js.org/intro/)
2024-04-09 14:14:49 +02:00
<!--more-->
2024-04-09 09:20:53 +02:00
```mermaid
gitGraph:
commit "Ashish"
branch newbranch
checkout newbranch
commit id:"1111"
commit tag:"test"
checkout main
commit type: HIGHLIGHT
commit
merge newbranch
commit
branch b2
commit
```
```mermaid
stateDiagram
[*] --> Still
Still --> [*]
Still --> Moving
Moving --> Still
Moving --> Crash
Crash --> [*]
```
```mermaid
sankey-beta
Pumped heat,"Heating and cooling, ""homes""",193.026
Pumped heat,"Heating and cooling, ""commercial""",70.672
```
```mermaid
sequenceDiagram
loop Daily query
Alice->>Bob: Hello Bob, how are you?
alt is sick
Bob->>Alice: Not so good :(
else is well
Bob->>Alice: Feeling fresh like a daisy
end
opt Extra response
Bob->>Alice: Thanks for asking
end
end
```
```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!
```
2024-04-09 14:14:49 +02:00
## GoAT
```goat
. . . .--- 1 .-- 1 / 1
/ \ | | .---+ .-+ +
/ \ .---+---. .--+--. | '--- 2 | '-- 2 / \ 2
+ + | | | | ---+ ---+ +
/ \ / \ .-+-. .-+-. .+. .+. | .--- 3 | .-- 3 \ / 3
/ \ / \ | | | | | | | | '---+ '-+ +
1 2 3 4 1 2 3 4 1 2 3 4 '--- 4 '-- 4 \ 4
```