Skip to content

Commit

Permalink
add mermaid example
Browse files Browse the repository at this point in the history
  • Loading branch information
bkleinen committed Jun 17, 2024
1 parent 6a264c3 commit b5fe170
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 8 deletions.
35 changes: 31 additions & 4 deletions content/ss24/bachelor/b0-template/techstack.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,42 @@
title = "Tech Stack"
weight = 30
draft = true
hasMermaid = true
+++

{{<section title="Tech Stack">}}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla facilisis neque id vulputate malesuada. Quisque dignissim finibus urna sed sagittis.


{{<section title="Tech Stack">}}
Hugo offers a couple of options to include diagrams right in the source code, see
[https://gohugo.io/content-management/diagrams/](https://gohugo.io/content-management/diagrams/)

Here's a mermaid example: (note the hasMermaid = true parameter in the front matter!)

```mermaid
classDiagram
Animal <|-- Duck
Animal <|-- Fish
Animal <|-- Zebra
Animal : +int age
Animal : +String gender
Animal: +isMammal()
Animal: +mate()
class Duck{
+String beakColor
+swim()
+quack()
}
class Fish{
-int sizeInFeet
-canEat()
}
class Zebra{
+bool is_wild
+run()
}
```
{{</section>}}


{{<section title="Future">}}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla facilisis neque id vulputate malesuada. Quisque dignissim finibus urna sed sagittis.
Expand Down
58 changes: 55 additions & 3 deletions content/ss24/master/m0-template/techstack.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,71 @@
title = "Tech Stack"
weight = 30
draft = true
hasMermaid = true
+++

{{<section title="Tech Stack">}}
Hugo offers a couple of options to include diagrams right in the source code, see
[https://gohugo.io/content-management/diagrams/](https://gohugo.io/content-management/diagrams/)

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla facilisis neque id vulputate malesuada. Quisque dignissim finibus urna sed sagittis.

Here's a mermaid example: (note the hasMermaid = true parameter in the front matter!)

```mermaid
classDiagram
Animal <|-- Duck
Animal <|-- Fish
Animal <|-- Zebra
Animal : +int age
Animal : +String gender
Animal: +isMammal()
Animal: +mate()
class Duck{
+String beakColor
+swim()
+quack()
}
class Fish{
-int sizeInFeet
-canEat()
}
class Zebra{
+bool is_wild
+run()
}
```
{{</section>}}

{{<section title="Future">}}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla facilisis neque id vulputate malesuada. Quisque dignissim finibus urna sed sagittis.


```goat
+-------------------+ ^ .---.
| A Box |__.--.__ __.--> | .-. | |
| | '--' v | * |<--- | |
+-------------------+ '-' | |
Round *---(-. |
.-----------------. .-------. .----------. .-------. | | |
| Mixed Rounded | | | / Diagonals \ | | | | | |
| & Square Corners | '--. .--' / \ |---+---| '-)-' .--------.
'--+------------+-' .--. | '-------+--------' | | | | / Search /
| | | | '---. | '-------' | '-+------'
|<---------->| | | | v Interior | ^
' <---' '----' .-----------. ---. .--- v |
.------------------. Diag line | .-------. +---. \ / . |
| if (a > b) +---. .--->| | | | | Curved line \ / / \ |
| obj->fcn() | \ / | '-------' |<--' + / \ |
'------------------' '--' '--+--------' .--. .--. | .-. +Done?+-'
.---+-----. | ^ |\ | | /| .--+ | | \ /
| | | Join \|/ | | Curved | \| |/ | | \ | \ /
| | +----> o --o-- '-' Vertical '--' '--' '-- '--' + .---.
<--+---+-----' | /|\ | | 3 |
v not:line 'quotes' .-' '---'
.-. .---+--------. / A || B *bold* | ^
| | | Not a dot | <---+---<-- A dash--is not a line v |
'-' '---------+--' / Nor/is this. ---
```
Goat Diagrams are also supported :)
{{</section>}}

0 comments on commit b5fe170

Please sign in to comment.