Skip to content

Commit

Permalink
feat: add the Node stereotype
Browse files Browse the repository at this point in the history
  • Loading branch information
tmorin committed Mar 18, 2023
1 parent 4421ff8 commit 424cf1c
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 9 deletions.
18 changes: 15 additions & 3 deletions distribution/c4nord/bootstrap.puml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,17 @@
!global $C4_COMPONENT_COLOR_BORDER=$C4_ELEMENT_COLOR_TEXT_LIGHT
!global $C4_COMPONENT_COLOR_TEXT=$C4_ELEMENT_COLOR_TEXT_LIGHT

!global $C4_NODE_COLOR_BG="#FFFFFF"
!global $C4_NODE_COLOR_BORDER=$C4_BOUNDARY_COLOR_BORDER
!global $C4_NODE_COLOR_TEXT=$C4_ELEMENT_COLOR_TEXT_DARK

' procedures

!procedure C4Boundary($type, $id, $name, $tech="")
!procedure C4Boundary($type, $stereotype, $id, $name, $tech="")
!if ($tech)
rectangle $id <<Boundary>> as "<b>$name</b>\n<size:$FONT_SIZE_XS>[$type: $tech]</size>"
rectangle $id <<$stereotype>> as "<b>$name</b>\n<size:$FONT_SIZE_XS>[$type: $tech]</size>"
!else
rectangle $id <<Boundary>> as "<b>$name</b>\n<size:$FONT_SIZE_XS>[$type]</size>"
rectangle $id <<$stereotype>> as "<b>$name</b>\n<size:$FONT_SIZE_XS>[$type]</size>"
!endif
!endprocedure

Expand Down Expand Up @@ -171,4 +175,12 @@ skinparam rectangle<<Component>> {
BackgroundColor $C4_COMPONENT_COLOR_BG
}

skinparam rectangle<<Node>> {
StereotypeFontColor $C4_NODE_COLOR_BG
FontColor $C4_NODE_COLOR_TEXT
BorderColor $C4_NODE_COLOR_BORDER
BackgroundColor $C4_NODE_COLOR_BG
roundCorner 20
}


Binary file modified distribution/c4nord/deployment_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified distribution/c4nord/dynamic_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 15 additions & 3 deletions distribution/c4nord/full.puml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,17 @@
!global $C4_COMPONENT_COLOR_BORDER=$C4_ELEMENT_COLOR_TEXT_LIGHT
!global $C4_COMPONENT_COLOR_TEXT=$C4_ELEMENT_COLOR_TEXT_LIGHT

!global $C4_NODE_COLOR_BG="#FFFFFF"
!global $C4_NODE_COLOR_BORDER=$C4_BOUNDARY_COLOR_BORDER
!global $C4_NODE_COLOR_TEXT=$C4_ELEMENT_COLOR_TEXT_DARK

' procedures

!procedure C4Boundary($type, $id, $name, $tech="")
!procedure C4Boundary($type, $stereotype, $id, $name, $tech="")
!if ($tech)
rectangle $id <<Boundary>> as "<b>$name</b>\n<size:$FONT_SIZE_XS>[$type: $tech]</size>"
rectangle $id <<$stereotype>> as "<b>$name</b>\n<size:$FONT_SIZE_XS>[$type: $tech]</size>"
!else
rectangle $id <<Boundary>> as "<b>$name</b>\n<size:$FONT_SIZE_XS>[$type]</size>"
rectangle $id <<$stereotype>> as "<b>$name</b>\n<size:$FONT_SIZE_XS>[$type]</size>"
!endif
!endprocedure

Expand Down Expand Up @@ -173,6 +177,14 @@ skinparam rectangle<<Component>> {
BackgroundColor $C4_COMPONENT_COLOR_BG
}

skinparam rectangle<<Node>> {
StereotypeFontColor $C4_NODE_COLOR_BG
FontColor $C4_NODE_COLOR_TEXT
BorderColor $C4_NODE_COLOR_BORDER
BackgroundColor $C4_NODE_COLOR_BG
roundCorner 20
}




Binary file modified distribution/c4nord/level_1_system_context.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified distribution/c4nord/level_2_container.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified distribution/c4nord/level_3_component.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified distribution/c4nord/main_artifacts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 15 additions & 3 deletions distribution/c4nord/single.puml
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,17 @@ skinparam DefaultFontColor $FONT_COLOR
!global $C4_COMPONENT_COLOR_BORDER=$C4_ELEMENT_COLOR_TEXT_LIGHT
!global $C4_COMPONENT_COLOR_TEXT=$C4_ELEMENT_COLOR_TEXT_LIGHT

!global $C4_NODE_COLOR_BG="#FFFFFF"
!global $C4_NODE_COLOR_BORDER=$C4_BOUNDARY_COLOR_BORDER
!global $C4_NODE_COLOR_TEXT=$C4_ELEMENT_COLOR_TEXT_DARK

' procedures

!procedure C4Boundary($type, $id, $name, $tech="")
!procedure C4Boundary($type, $stereotype, $id, $name, $tech="")
!if ($tech)
rectangle $id <<Boundary>> as "<b>$name</b>\n<size:$FONT_SIZE_XS>[$type: $tech]</size>"
rectangle $id <<$stereotype>> as "<b>$name</b>\n<size:$FONT_SIZE_XS>[$type: $tech]</size>"
!else
rectangle $id <<Boundary>> as "<b>$name</b>\n<size:$FONT_SIZE_XS>[$type]</size>"
rectangle $id <<$stereotype>> as "<b>$name</b>\n<size:$FONT_SIZE_XS>[$type]</size>"
!endif
!endprocedure

Expand Down Expand Up @@ -349,6 +353,14 @@ skinparam rectangle<<Component>> {
BackgroundColor $C4_COMPONENT_COLOR_BG
}

skinparam rectangle<<Node>> {
StereotypeFontColor $C4_NODE_COLOR_BG
FontColor $C4_NODE_COLOR_TEXT
BorderColor $C4_NODE_COLOR_BORDER
BackgroundColor $C4_NODE_COLOR_BG
roundCorner 20
}




Binary file modified distribution/c4nord/system_landscape_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions source/templates/c4nord/base_constants.tera
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@
!global $C4_COMPONENT_COLOR_BG="#93ABC8"
!global $C4_COMPONENT_COLOR_BORDER=$C4_ELEMENT_COLOR_TEXT_LIGHT
!global $C4_COMPONENT_COLOR_TEXT=$C4_ELEMENT_COLOR_TEXT_LIGHT

!global $C4_NODE_COLOR_BG="#FFFFFF"
!global $C4_NODE_COLOR_BORDER=$C4_BOUNDARY_COLOR_BORDER
!global $C4_NODE_COLOR_TEXT=$C4_ELEMENT_COLOR_TEXT_DARK

0 comments on commit 424cf1c

Please sign in to comment.