Skip to content

Commit

Permalink
feat(c4model): adapt the elements' font size
Browse files Browse the repository at this point in the history
  • Loading branch information
tmorin committed Dec 2, 2020
1 parent a66c85b commit 9959ba7
Show file tree
Hide file tree
Showing 21 changed files with 34 additions and 38 deletions.
Binary file modified dist/c4model/Boundary/ContainerBoundary.element.local.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 dist/c4model/Boundary/DeploymentNodeBoundary.element.local.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 dist/c4model/Boundary/EnterpriseBoundary.element.local.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 dist/c4model/Boundary/SystemBoundary.element.local.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 dist/c4model/Element/Component.element.local.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 dist/c4model/Element/Container.element.local.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 dist/c4model/Element/Database.element.local.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 dist/c4model/Element/ExternalPerson.element.local.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 dist/c4model/Element/ExternalSystem.element.local.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 dist/c4model/Element/Person.element.local.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 dist/c4model/Element/System.element.local.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 16 additions & 18 deletions dist/c4model/bootstrap.puml
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,36 @@

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

!procedure C4Element($shape, $stereotype, $type, $id, $name, $desc="", $tech="")
$shape $id <<$stereotype>> [
<b><size:$FONT_SIZE_MD>$name</size></b>
!if ($type)
!if ($tech)
<size:$FONT_SIZE_SM>[$type: $tech]</size>
!else
<size:$FONT_SIZE_SM>[$type]</size>
!endif
!endif
!if ($desc)

$desc
!local $V="<b>" + $name + "</b>"
!if ($type)
!if ($tech)
!$V=$V + "\n" + "<size:" + $FONT_SIZE_XS + ">[" + $type + ": " + $tech + "]</size>"
!else
!$V=$V + "\n" + "<size:" + $FONT_SIZE_XS + ">[" + $type + "]</size>"
!endif
]
!endif
!if ($desc)
!$V=$V + "\n\n" + $desc
!endif
$shape $id <<$stereotype>> as "$V"
!endprocedure

' Relationship

!procedure C4Relationship($desc="", $tech="")
!if ($desc) && ($tech)
<b><size:$FONT_SIZE_SM>$desc</size></b>\n<size:$FONT_SIZE_SM>[$tech]</size>
<b>$desc</b>\n<size:$FONT_SIZE_XS>[$tech]</size>
!elseif ($desc)
<b><size:$FONT_SIZE_SM>$desc</size></b>
<b>$desc</b>
!else
<size:$FONT_SIZE_SM>[$tech]</size>
<size:$FONT_SIZE_XS>[$tech]</size>
!endif
!endprocedure

Expand Down
Binary file modified dist/c4model/examples/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 dist/c4model/examples/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.
Binary file modified dist/c4model/examples/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 dist/c4model/examples/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.
2 changes: 1 addition & 1 deletion dist/c4model/examples/Level_2_Container.puml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ api -left-> db : C4Relationship("Reads from and writes to", "JDBC")
api -right-> mbs : C4Relationship("Makes API calls to", "XML/HTTPS")
api -up-> ems : C4Relationship("Sends e-mail using", "SMTP")
ems -left-> pbc : C4Relationship("Sends e-mail to")
ma -right[hidden]-> ems
ma -[hidden]right-> ems

@enduml
Binary file modified dist/c4model/examples/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 dist/c4model/examples/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.
2 changes: 1 addition & 1 deletion lib/c4model/template/Level_2_Container.puml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ api -left-> db : C4Relationship("Reads from and writes to", "JDBC")
api -right-> mbs : C4Relationship("Makes API calls to", "XML/HTTPS")
api -up-> ems : C4Relationship("Sends e-mail using", "SMTP")
ems -left-> pbc : C4Relationship("Sends e-mail to")
ma -right[hidden]-> ems
ma -[hidden]right-> ems

@enduml
34 changes: 16 additions & 18 deletions lib/c4model/template/bootstrap.puml
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,36 @@

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

!procedure C4Element($shape, $stereotype, $type, $id, $name, $desc="", $tech="")
$shape $id <<$stereotype>> [
<b><size:$FONT_SIZE_MD>$name</size></b>
!if ($type)
!if ($tech)
<size:$FONT_SIZE_SM>[$type: $tech]</size>
!else
<size:$FONT_SIZE_SM>[$type]</size>
!endif
!endif
!if ($desc)

$desc
!local $V="<b>" + $name + "</b>"
!if ($type)
!if ($tech)
!$V=$V + "\n" + "<size:" + $FONT_SIZE_XS + ">[" + $type + ": " + $tech + "]</size>"
!else
!$V=$V + "\n" + "<size:" + $FONT_SIZE_XS + ">[" + $type + "]</size>"
!endif
]
!endif
!if ($desc)
!$V=$V + "\n\n" + $desc
!endif
$shape $id <<$stereotype>> as "$V"
!endprocedure

' Relationship

!procedure C4Relationship($desc="", $tech="")
!if ($desc) && ($tech)
<b><size:$FONT_SIZE_SM>$desc</size></b>\n<size:$FONT_SIZE_SM>[$tech]</size>
<b>$desc</b>\n<size:$FONT_SIZE_XS>[$tech]</size>
!elseif ($desc)
<b><size:$FONT_SIZE_SM>$desc</size></b>
<b>$desc</b>
!else
<size:$FONT_SIZE_SM>[$tech]</size>
<size:$FONT_SIZE_XS>[$tech]</size>
!endif
!endprocedure

Expand Down

0 comments on commit 9959ba7

Please sign in to comment.