-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.puml
339 lines (308 loc) · 7.82 KB
/
style.puml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
@startuml style
!$defaultColor ?= '#white'
skinparam defaultTextAlignment left
skinparam fileBackgroundColor #white
skinparam LineThickness 3
skinparam ArrowLollipopColor #blue
skinparam NoteBorderThickness 1.5
'skinparam WrapWidth 200
skinparam Nodesep 40
skinparam Ranksep 50
!procedure $set_direction()
!$diagram ?= 'none'
!if ($diagram != 'sequence')
left to right direction
!endif
!endprocedure
!function $notouch ($type = "any") return "#lightgray"
!function $notouch_link ($type = "any") return "#gray"
!function $exiting ($type = "any") return $existing($type)
!function $existing ($type = "any") return "#lightgreen"
!function $existing_link($type = "any") return "#green"
!function $new ($type = "any") return "#powderBlue"
!function $new_link ($type = "any") return "#blue"
!function $change ($type = "any") return %lighten(Yellow,70)
!function $change_link ($type = "any") return "#burlywood"
!function $remove ($type = "any") return "#pink"
!function $remove_link ($type = "any") return "#red"
!function $alt ($type = "any") return "#plum"
!function $alt_link ($type = "any") return "#purple"
!function $ready ($type = "any") return "#green"
!function $done ($type = "any") return "#green"
!function $temporary ($type = "any") return "#powderBlue|pink"
!function $remove_future($type = "any") return "#lightgreen|pink"
!function $change_future($type = "any") return "#lightgreen|yellow"
!global $style__out_of_scope__LineThickness ?= 5
!global $style__out_of_scope__LineStyle ?= 50
!global $style__out_of_scope__DiagonalCorner ?= 20
' SET STYLE START {
!global $current_artifact_state ?= ''
!procedure style_set($back='transparent',$line='black', $LineThickness = 1, $LineStyle = 0, $FontSize = 11)
<style>
group {
!if ($back!='')
Backgroundcolor $back
!endif
!if ($line!='')
LineColor $line
!endif
!if ($LineThickness != '')
LineThickness $LineThickness
!endif
!if ($LineStyle != '')
LineStyle $LineStyle
!endif
!if ($FontSize != -100)
FontSize $FontSize
!endif
' FontStyle plain
}
</style>
!endprocedure
!procedure style_reset()
!$current_artifact_state = ''
style_set()
!endprocedure
!procedure style_set_new()
!$current_artifact_state = 'new'
style_set($new())
!endprocedure
!procedure style_set_notouch()
!$current_artifact_state = 'notouch'
style_set($notouch())
!endprocedure
!procedure style_set_change()
!$current_artifact_state = 'change'
style_set($change())
!endprocedure
!procedure style_set_existing()
!$current_artifact_state = 'existing'
style_set($existing())
!endprocedure
!procedure style_set_ready()
!$current_artifact_state = 'ready'
style_set('transparent',$ready(),4,10)
!endprocedure
!procedure style_set_done()
!$current_artifact_state = 'done'
style_set('transparent',$done(),4,10)
!endprocedure
!procedure style_set_new()
!$current_artifact_state = 'new'
style_set('transparent',$new(),4,10)
!endprocedure
!procedure style_set_alt()
!$current_artifact_state = 'alt'
style_set($alt())
!endprocedure
!procedure style_set_remove()
!$current_artifact_state = 'remove'
style_set($remove())
!endprocedure
!procedure style_set_temporary()
!$current_artifact_state = 'temporary'
style_set($temporary(),'','','')
!endprocedure
!procedure style_set_remove_future()
!$current_artifact_state = 'remove_future'
style_set($remove_future(),'','','')
!endprocedure
!function $state()
!if ($current_artifact_state != '')
!$color = %call_user_func('$' + $current_artifact_state)
!$result = '<back:' + $color + '>' + $current_artifact_state + '</back>'
!endif
!return $result
!endfunction
!function $prototype()
!return '<<' + $current_artifact_state + '>>'
!endfunction
'} END STYLE
<style>
Component { BackgroundColor #white }
Boundary { BackgroundColor #white }
Interface { BackgroundColor #white }
Control { BackgroundColor #white }
Entity { BackgroundColor #white }
database { BackgroundColor #white }
Queue { BackgroundColor #white }
legend {
BackgroundColor #white
LineColor #black
FontColor #black
}
.environment {
RoundCorner 150
Shadowing 3
}
.service {
RoundCorner 50
Shadowing 3
:depth(3) {
LineThickness 10
}
}
.transaction {
LineColor #orange
'LineStyle 7
'#line.dashed
}
.done {
LineColor $existing_link()
LineThickness 6
'LineStyle 6
}
.ready {
LineColor $existing_link()
LineThickness 3
LineStyle 3
}
.wip {
LineColor $change_link()
LineThickness 3
LineStyle 3
BackGroundColor $change_link()
}
.temporary {
LineColor $remove()
LineThickness 3
'LineStyle 6
}
.review {
LineColor $change_link()
LineThickness 3
LineStyle 5
BackGroundColor white-%lighten($alt(),20)
}
.new {
BackGroundColor $new()
}
.change {
BackGroundColor $change()
}
.existing {
BackGroundColor $existing()
}
.live {
BackGroundColor $existing()
}
.remove {
BackGroundColor $remove()
}
.alt {
BackGroundColor $alt()
}
.alternative {
BackGroundColor $alt()
}
.notouch {
BackGroundColor $notouch()
}
.out-of-scope {
LineColor $alt()
LineThickness $style__out_of_scope__LineThickness
BackGroundColor $notouch()|#white
LineStyle $style__out_of_scope__LineStyle
DiagonalCorner $style__out_of_scope__DiagonalCorner
}
.next-phase{
LineThickness 3
BorderThickness 10
BackGroundColor #white|$new()
LineStyle 70
DiagonalCorner 20
}
.hide {
LineThickness 0
LineColor #transparent
FontColor #transparent
}
arrow {
LineColor #gray
.out-of-scope {
LineColor $alt()
LineThickness 1
BackGroundColor $notouch()|$new()
LineStyle 20
DiagonalCorner 20
}
.wip {
LineColor $change_link()
LineThickness 3
LineStyle 3
}
.done {
LineColor $existing_link()
LineThickness 3
LineStyle 20
}
.new {
LineColor $new_link()
}
.change {
LineColor $change_link()
}
.existing {
LineColor $existing_link()
}
.live {
LineColor $existing_link()
}
.remove {
LineColor $remove_link()
}
.alt {
LineColor $alt_link()
}
.notouch {
LineColor $notouch_link()
}
.transaction {
LineColor #orange
LineStyle 1
LineThickness 3
}
.link {
' LineColor $change_link()
LineThickness 6
}
.link_inbound {
LineColor #green
LineThickness 6
}
.link_outbound {
LineColor #orange
LineThickness 6
}
.temporary {
LineColor #HotPink
LineStyle 10
}
.eventually {
LineStyle 15
}
.thick {
LineThickness 5
}
.hide {
LineThickness 0
LineColor #transparent
FontColor #transparent
}
}
usecase {
FontSize 30
BackgroundColor AliceBlue
'MaximumWidth 150
'HorizontalAlignment center
}
component {
MaximumWidth 50
HorizontalAlignment center
}
boundary {
MaximumWidth 50
HorizontalAlignment left
}
</style>
@enduml