swedbank-pay-design-guide-jekyll-theme 1.11.0 → 1.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -4
- data/assets/puml-theme-swedbankpay.puml +433 -0
- data/lib/gem_version.rb +1 -1
- data/lib/sidebar.rb +4 -3
- data/lib/sidebar_html_builder.rb +3 -2
- data/lib/sidebar_logger.rb +32 -0
- data/lib/sidebar_page.rb +7 -6
- data/lib/sidebar_parser.rb +3 -2
- data/lib/sidebar_renderer.rb +5 -4
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a429e2ccf36382e968c44364a71d52610a2f42fabf5b8cad7b0495b6895a773
|
4
|
+
data.tar.gz: 15228d84db373ff8806365334af8290a7b861eab7d44bb52fcb0c1bf5b45ae9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32fd558a5ce72bb1c80e589802ac0d96db5631989994a36c30f97ad5699ecc4a18ed75b606fd4fcaca12f2413587ac6e7e80d1b419b68d5a3553d8f0206b2bca
|
7
|
+
data.tar.gz: 7c6312c808c0b1e8e342b64ea37438decd64cecab72445501e1cbcddf75b9cc47d92f6440142c950d662f7e1961578ed6dc5072ebce2f181ee2b18ef845caa38
|
data/README.md
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
![Test status][test-badge]
|
6
6
|
![Deploy status][deploy-badge]
|
7
7
|
[![License][license-badge]][license]
|
8
|
-
[![
|
8
|
+
[![Codacy][codacy-badge]][codacy]
|
9
9
|
[![CLA assistant][cla-badge]][cla]
|
10
10
|
[![Contributor Covenant][coc-badge]][coc]
|
11
11
|
|
@@ -84,8 +84,8 @@ agreement][cla].
|
|
84
84
|
[clone]: <https://help.github.com/articles/cloning-a-repository/>
|
85
85
|
[coc-badge]: <https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg>
|
86
86
|
[coc]: <./CODE_OF_CONDUCT.md>
|
87
|
-
[
|
88
|
-
[
|
87
|
+
[codacy-badge]: <https://app.codacy.com/project/badge/Grade/30ebfb7d531a488484e87dd428034af7>
|
88
|
+
[codacy]: <https://www.codacy.com/gh/SwedbankPay/swedbank-pay-design-guide-jekyll-theme/dashboard?utm_source=github.com&utm_medium=referral&utm_content=SwedbankPay/swedbank-pay-design-guide-jekyll-theme&utm_campaign=Badge_Grade>
|
89
89
|
[deploy-badge]: <https://github.com/SwedbankPay/swedbank-pay-design-guide-jekyll-theme/workflows/Deploy/badge.svg>
|
90
90
|
[design-guide]: <https://design.swedbankpay.com/>
|
91
91
|
[developer-portal]: <https://developer.swedbankpay.com/>
|
@@ -96,7 +96,6 @@ agreement][cla].
|
|
96
96
|
[license]: <https://opensource.org/licenses/MIT>
|
97
97
|
[liquid]: <https://jekyllrb.com/docs/liquid/>
|
98
98
|
[opengraph-image]: <https://repository-images.githubusercontent.com/209270355/36818080-53ee-11ea-896c-082addb851a6>
|
99
|
-
[repo]: <https://github.com/SwedbankPay/swedbank-pay-design-guide-jekyll-theme/>
|
100
99
|
[ruby]: <https://www.ruby-lang.org/en/>
|
101
100
|
[swedbankpay]: <https://swedbankpay.github.io/swedbank-pay-design-guide-jekyll-theme/>
|
102
101
|
[test-badge]: <https://github.com/SwedbankPay/swedbank-pay-design-guide-jekyll-theme/workflows/Test/badge.svg>
|
@@ -0,0 +1,433 @@
|
|
1
|
+
''
|
2
|
+
'' swedbankpay theme based on https://design.swedbankpay.com
|
3
|
+
''
|
4
|
+
'' Author = "Asbjørn Ulsberg"
|
5
|
+
'' Copyright (c) 2021 Swedbank Pay
|
6
|
+
|
7
|
+
!$theme = "swedbankpay"
|
8
|
+
|
9
|
+
!$black = "#222222"
|
10
|
+
!$text_gray = "#767676"
|
11
|
+
!$list_gray = "#999999"
|
12
|
+
!$light_gray = "#f9f8f6"
|
13
|
+
!$white = "#ffffff"
|
14
|
+
!$solid_brown = "#2f2424"
|
15
|
+
!$dark_brown = "#493c3b"
|
16
|
+
!$medium_brown = "#72605e"
|
17
|
+
!$soft_brown = "#a38b80"
|
18
|
+
!$light_brown = "#d4c4bc"
|
19
|
+
!$orange = "#f35b1c"
|
20
|
+
!$light_orange = "#f5b895"
|
21
|
+
!$peach = "#fbf2ea"
|
22
|
+
!$cyan = "#257886"
|
23
|
+
!$light_cyan = "#ebf8f2"
|
24
|
+
|
25
|
+
!$brand_primary = "#fdc129"
|
26
|
+
!$brand_primary_light = "#ffcc00"
|
27
|
+
!$brand_primary_light_2 = "#ffdf88"
|
28
|
+
!$brand_primary_light_3 = "#fff3d5"
|
29
|
+
!$brand_secondary_dark_1 = $dark_brown
|
30
|
+
!$brand_secondary_dark_2 = $solid_brown
|
31
|
+
!$brand_secondary = "#512b2b"
|
32
|
+
!$brand_secondary_light_1 = $medium_brown
|
33
|
+
!$brand_secondary_light_2 = $soft_brown
|
34
|
+
!$brand_secondary_light_3 = $light_brown
|
35
|
+
!$brand_secondary_light_4 = "#d4b8a3"
|
36
|
+
!$brand_secondary_info_1 = "#8acdc3"
|
37
|
+
!$brand_secondary_info_2 = "#efb7b6"
|
38
|
+
!$brand_tertiary = "#ee7023"
|
39
|
+
!$brand_accent = "#31a3ae"
|
40
|
+
!$brand_accent_links = $cyan
|
41
|
+
!$brand_accent_disabled = "#98d0d6"
|
42
|
+
|
43
|
+
' Background Colors
|
44
|
+
!$brand_bg_1 = $peach
|
45
|
+
!$brand_bg_2 = $light_cyan
|
46
|
+
!$brand_bg_3 = "#fbedf4"
|
47
|
+
!$brand_bg_4 = "#e9f7fb"
|
48
|
+
!$brand_bg_gray = "#ebe7e2"
|
49
|
+
!$brand_bg_white = "#ffffff"
|
50
|
+
|
51
|
+
' State colors
|
52
|
+
!$brand_success = "#437e15"
|
53
|
+
!$brand_success_light = "#f2f7eb"
|
54
|
+
!$brand_success_light_2 = "#99cc66"
|
55
|
+
!$brand_warning = "#f9ce22"
|
56
|
+
!$brand_warning_light = "#fff3d5"
|
57
|
+
!$brand_warning_2 = $brand_tertiary
|
58
|
+
!$brand_error_border = "#f1bbb9"
|
59
|
+
!$brand_error = "#c5131c"
|
60
|
+
!$brand_error_light = "#f9ded3"
|
61
|
+
!$brand_info = "#3e6ab6"
|
62
|
+
!$brand_info_light = "#e8eff9"
|
63
|
+
|
64
|
+
!$primary_text = $solid_brown
|
65
|
+
!$secondary_text = $black
|
66
|
+
!$info_text = $black
|
67
|
+
!$success_text = $white
|
68
|
+
!$warning_text = $white
|
69
|
+
!$danger_text = $white
|
70
|
+
|
71
|
+
!procedure $code($msg)
|
72
|
+
<font:Consolas>$msg</font>
|
73
|
+
!endprocedure
|
74
|
+
|
75
|
+
!procedure $participant($sprite, $title)
|
76
|
+
participant "<$$sprite,color=$light_orange>\n\n$title"
|
77
|
+
!endprocedure
|
78
|
+
|
79
|
+
!procedure $primary_scheme()
|
80
|
+
FontColor $primary_text
|
81
|
+
BorderColor $light_orange
|
82
|
+
BackgroundColor $peach
|
83
|
+
!endprocedure
|
84
|
+
|
85
|
+
sprite $payer [75x79/4z] {
|
86
|
+
xT85bWCn30JHxjBzpxmCyeGC2gV2CF-PT9uC4NpT0Y82088WVmpu_Zc8tp-3cbXAAJyW5NT2lQWNzQ9U5FT0EGVO1d17BRM5-NsrJjPUV126GSfiO4zJj1Ha
|
87
|
+
TOW2-m2bCSeWaygNqrL2YoXm4MNGbj8S1LgcudTwErHCKSOg6XMeW299BUKbIakKazHUeq7AIbHkGraIM2Vgf0mw5UwYGCDKxAN07HIxdurRog0PoZBA0MY2
|
88
|
+
4eWTokh8UCVQfQIfONcNKb-xez-XB4qEIxYCaYOfGnMbGied_Wkg6fO7B4uDgtArAADycyE2ilFW6pscLdTmYvJW5YdZAafGHXbNKO92obMKu1OfuofAK40L
|
89
|
+
z0u
|
90
|
+
}
|
91
|
+
|
92
|
+
sprite $merchant [75x62/4z] {
|
93
|
+
xPG7TiCm3CM8h_kVEJkXPPggdjZT8c-PYE4j-nZG6eHI64u1aaAfS3MxRLk6SieHoVNLKrAx_feYxKegf9XoSEP4cY8J2YBEgQLQc2-auXuj4yobbCwdK_4A
|
94
|
+
MKYrOq5oYFaB98pZ3jycnLIAGqCzrRB_Es8k9GvJuaLkK9QgyqpXzVugPbLoLjWBJQjq74HG117dcEJZNj6fuzFjPZmCKgOKLJXVjcKwPMFbI8Xj6dnZh48A
|
95
|
+
M-KdfHXz5ueCKqWHxYdsBAIqbD8efPw_aVfF_QTQCSKLUu0LKcQ0EQmlCcQIXYcGD7LM7J657fHJ21uH6p6HyeAki9wIUzrPJ-6b1-KKUa8r9USRfEujU3k5
|
96
|
+
Y9DD2abrdcdgN3jd
|
97
|
+
}
|
98
|
+
|
99
|
+
sprite $server [75x98/4z] {
|
100
|
+
xPS5hkH050FjyltFl3JGcWo_UALF9GXNcgsMH0D9CXqiWHg0X5K16xLKud2IELoe4kOa5ohs4A-sSjZ7AXMqLNAkZYDLJcqcwNJjdcfQmVZgE53rUj2zSQLz
|
101
|
+
gelHxlm3ai3X40wd0AUhq_MwI18lrJ_PdF-oo5WDZ0HsmuGaEXoC3LJb8qOg7pHIrOzKCeMF6gdghgAF8pNZIFMfekluGIBrIlaIkOfKiccY37BmeqMgsf6g
|
102
|
+
F0Bo4FLpiAcY6AbOtWlTI2s5gkhuPvVwgaeLl5JE56zKP7VlgR45uA1IGPLhrLQOiSgR8r86gglyMyUHwbgPcOeGheu3LQq7QOmheztnx8k9Op85QwaAT5NT
|
103
|
+
LHJi3nQfBm6em1TI_QX-L3yg3lHCqAgTmGNJfBsuYH_j4uggUWLVTvLCgsPgkQmEhtb-0m
|
104
|
+
}
|
105
|
+
|
106
|
+
sprite $3rdparty [75x67/4z] {
|
107
|
+
xPO7biCW34JvtF_EszS3cIU7bqbFj7LawGSBKTg20RHpMF-pcCOlHgo8n8PCISEBajLf4j6WcC0aA1jZ-7xdHt7MKPslLYJDW86ZRj3_wLgsnWzO0686hCrQ
|
108
|
+
RfndkyhBv3rnVwYJQzuNBIV9LcOBPlj9T1yh-uhZAG8pb9mdT6Cld1nV8-xqj2xdwlL0pedkJg-9LU77LpZhSGsxd3cdD3fwMABeZ17IuakBwU_trmnJ5dyl
|
109
|
+
Ve3gXif7TVvQvJDu_hxAk_tyQ_3yEyFvzwlz3TETyc6V6vXDU61MZ79sBDgIwn8YhUPUaZuRXjeZ4w7Q6nMKFM-66YMDzQH9p_ORiFJmV5-oDJxyA8q9HHUI
|
110
|
+
PjdqhW9Cvm9-JEYlIJQV7WgfF_AxLBI4KXKiSfCSuZR9XDBdADZaZ690SNHKCueQjL0h5cjrnXayNr-ThzkbxLHSbih-1
|
111
|
+
}
|
112
|
+
|
113
|
+
''
|
114
|
+
'' Global Default Values
|
115
|
+
''
|
116
|
+
skinparam backgroundColor "transparent"
|
117
|
+
skinparam useBetaStyle false
|
118
|
+
skinparam creoleMonospacedFont "Consolas"
|
119
|
+
skinparam defaultMonospacedFontName "Consolas"
|
120
|
+
skinparam defaultFontName "Arial"
|
121
|
+
skinparam defaultFontSize 16
|
122
|
+
skinparam dpi 100
|
123
|
+
skinparam shadowing false
|
124
|
+
skinparam roundcorner 20
|
125
|
+
skinparam ParticipantPadding 40
|
126
|
+
skinparam BoxPadding 40
|
127
|
+
skinparam Padding 8
|
128
|
+
skinparam ArrowColor $orange
|
129
|
+
skinparam stereotype {
|
130
|
+
CBackgroundColor $brand_secondary_light_1
|
131
|
+
CBorderColor $orange
|
132
|
+
ABackgroundColor $brand_success_light
|
133
|
+
ABorderColor $brand_success
|
134
|
+
IBackgroundColor $brand_error_light
|
135
|
+
IBorderColor $brand_error
|
136
|
+
EBackgroundColor $brand_warning_light
|
137
|
+
EBorderColor $brand_warning
|
138
|
+
NBackgroundColor $brand_info_light
|
139
|
+
NBorderColor $brand_info
|
140
|
+
}
|
141
|
+
skinparam title {
|
142
|
+
FontColor $primary_text
|
143
|
+
BorderColor $orange
|
144
|
+
FontSize 20
|
145
|
+
BorderRoundCorner 8
|
146
|
+
BorderThickness 1
|
147
|
+
BackgroundColor $peach
|
148
|
+
}
|
149
|
+
|
150
|
+
skinparam legend {
|
151
|
+
BackgroundColor $brand_secondary
|
152
|
+
BorderColor $brand_secondary_dark_1
|
153
|
+
FontColor $primary_text
|
154
|
+
}
|
155
|
+
|
156
|
+
!startsub swimlane
|
157
|
+
skinparam swimlane {
|
158
|
+
BorderColor $brand_info
|
159
|
+
BorderThickness 2
|
160
|
+
TitleBackgroundColor $brand_secondary
|
161
|
+
TitleFontColor $primary_text
|
162
|
+
}
|
163
|
+
!endsub
|
164
|
+
|
165
|
+
!startsub activity
|
166
|
+
|
167
|
+
skinparam activity {
|
168
|
+
$primary_scheme()
|
169
|
+
BarColor $brand_success
|
170
|
+
StartColor $brand_info
|
171
|
+
EndColor $brand_info
|
172
|
+
''
|
173
|
+
DiamondBackgroundColor $brand_secondary_light_1
|
174
|
+
DiamondBorderColor $brand_secondary_dark_1
|
175
|
+
DiamondFontColor $primary_text
|
176
|
+
}
|
177
|
+
!endsub
|
178
|
+
|
179
|
+
!startsub participant
|
180
|
+
skinparam participant {
|
181
|
+
$primary_scheme()
|
182
|
+
BorderThickness 0
|
183
|
+
BackgroundColor $white
|
184
|
+
|
185
|
+
ParticipantBorderThickness 2
|
186
|
+
}
|
187
|
+
!endsub
|
188
|
+
|
189
|
+
!startsub actor
|
190
|
+
skinparam actor {
|
191
|
+
$primary_scheme()
|
192
|
+
BackgroundColor $peach
|
193
|
+
BorderColor $orange
|
194
|
+
}
|
195
|
+
!endsub
|
196
|
+
|
197
|
+
!startsub arrow
|
198
|
+
skinparam arrow {
|
199
|
+
Thickness 1
|
200
|
+
Color $orange
|
201
|
+
FontColor $primary_text
|
202
|
+
}
|
203
|
+
!endsub
|
204
|
+
|
205
|
+
!startsub sequence
|
206
|
+
skinparam sequence {
|
207
|
+
BorderColor $orange
|
208
|
+
' For some reason sequence title font color does not pick up from global
|
209
|
+
TitleFontColor $primary_text
|
210
|
+
BackgroundColor $peach
|
211
|
+
StartColor $orange
|
212
|
+
EndColor $orange
|
213
|
+
''
|
214
|
+
BoxBackgroundColor $brand_bg_1
|
215
|
+
BoxBorderColor $brand_secondary_dark_1
|
216
|
+
BoxFontColor $primary_text
|
217
|
+
''
|
218
|
+
DelayFontColor $primary_text
|
219
|
+
''
|
220
|
+
LifeLineBorderColor $orange
|
221
|
+
LifeLineBorderThickness 1
|
222
|
+
LifeLineBorderRoundCorner 20
|
223
|
+
LifeLineBackgroundColor $white
|
224
|
+
''
|
225
|
+
GroupBorderThickness 1
|
226
|
+
GroupBorderColor $orange
|
227
|
+
GroupFontColor $primary_text
|
228
|
+
GroupHeaderFontColor $primary_text
|
229
|
+
GroupHeaderFontWeight 1
|
230
|
+
GroupBackgroundColor $white
|
231
|
+
GroupBodyBackgroundColor $peach
|
232
|
+
GroupHeaderBackgroundColor $brand_primary_light_2
|
233
|
+
''
|
234
|
+
DividerBackgroundColor $brand_secondary_dark_1
|
235
|
+
DividerBorderColor $brand_secondary_dark_1
|
236
|
+
DividerBorderThickness 2
|
237
|
+
DividerFontColor $primary_text
|
238
|
+
''
|
239
|
+
ReferenceBackgroundColor $brand_primary_light_2
|
240
|
+
ReferenceBorderColor $brand_secondary_dark_1
|
241
|
+
ReferenceFontColor $primary_text
|
242
|
+
ReferenceHeaderFontColor $primary_text
|
243
|
+
ReferenceHeaderBackgroundColor $brand_secondary
|
244
|
+
''
|
245
|
+
StereotypeFontColor $primary_text
|
246
|
+
}
|
247
|
+
!endsub
|
248
|
+
|
249
|
+
!startsub partition
|
250
|
+
|
251
|
+
skinparam partition {
|
252
|
+
BorderColor $brand_primary
|
253
|
+
FontColor $primary_text
|
254
|
+
BackgroundColor $brand_primary_light_2
|
255
|
+
}
|
256
|
+
!endsub
|
257
|
+
|
258
|
+
!startsub collections
|
259
|
+
skinparam collections {
|
260
|
+
$primary_scheme()
|
261
|
+
}
|
262
|
+
!endsub
|
263
|
+
|
264
|
+
!startsub control
|
265
|
+
skinparam control {
|
266
|
+
$primary_scheme()
|
267
|
+
}
|
268
|
+
!endsub
|
269
|
+
|
270
|
+
!startsub entity
|
271
|
+
|
272
|
+
skinparam entity {
|
273
|
+
$primary_scheme()
|
274
|
+
}
|
275
|
+
!endsub
|
276
|
+
|
277
|
+
!startsub boundary
|
278
|
+
skinparam boundary {
|
279
|
+
$primary_scheme()
|
280
|
+
}
|
281
|
+
!endsub
|
282
|
+
|
283
|
+
!startsub agent
|
284
|
+
skinparam agent {
|
285
|
+
BackgroundColor $brand_warning
|
286
|
+
BorderColor $brand_warning_light
|
287
|
+
FontColor $primary_text
|
288
|
+
}
|
289
|
+
!endsub
|
290
|
+
|
291
|
+
!startsub note
|
292
|
+
skinparam note {
|
293
|
+
BorderThickness 1
|
294
|
+
BackgroundColor $brand_bg_2
|
295
|
+
BorderColor $cyan
|
296
|
+
}
|
297
|
+
!endsub
|
298
|
+
|
299
|
+
!startsub artifact
|
300
|
+
|
301
|
+
skinparam artifact {
|
302
|
+
BackgroundColor $brand_secondary_dark_1
|
303
|
+
BorderColor $brand_secondary_dark_2
|
304
|
+
FontColor $primary_text
|
305
|
+
}
|
306
|
+
!endsub
|
307
|
+
|
308
|
+
!startsub component
|
309
|
+
skinparam component {
|
310
|
+
$primary_scheme()
|
311
|
+
}
|
312
|
+
!endsub
|
313
|
+
|
314
|
+
!startsub interface
|
315
|
+
skinparam interface {
|
316
|
+
BackgroundColor $brand_error
|
317
|
+
BorderColor $brand_error
|
318
|
+
FontColor $primary_text
|
319
|
+
}
|
320
|
+
!endsub
|
321
|
+
|
322
|
+
!startsub storage
|
323
|
+
skinparam storage {
|
324
|
+
$primary_scheme()
|
325
|
+
}
|
326
|
+
!endsub
|
327
|
+
|
328
|
+
!startsub node
|
329
|
+
skinparam node {
|
330
|
+
$primary_scheme()
|
331
|
+
}
|
332
|
+
!endsub
|
333
|
+
|
334
|
+
!startsub cloud
|
335
|
+
skinparam cloud {
|
336
|
+
$primary_scheme()
|
337
|
+
}
|
338
|
+
!endsub
|
339
|
+
|
340
|
+
!startsub database
|
341
|
+
skinparam database {
|
342
|
+
$primary_scheme()
|
343
|
+
}
|
344
|
+
!endsub
|
345
|
+
|
346
|
+
!startsub class
|
347
|
+
skinparam class {
|
348
|
+
$primary_scheme()
|
349
|
+
HeaderBackgroundColor $brand_primary_light
|
350
|
+
StereotypeFontColor $primary_text
|
351
|
+
BorderThickness 1
|
352
|
+
AttributeFontColor $primary_text
|
353
|
+
AttributeFontSize 11
|
354
|
+
}
|
355
|
+
!endsub
|
356
|
+
|
357
|
+
!startsub object
|
358
|
+
skinparam object {
|
359
|
+
$primary_scheme()
|
360
|
+
StereotypeFontColor $primary_text
|
361
|
+
BorderThickness 1
|
362
|
+
AttributeFontColor $primary_text
|
363
|
+
AttributeFontSize 11
|
364
|
+
}
|
365
|
+
!endsub
|
366
|
+
|
367
|
+
!startsub usecase
|
368
|
+
skinparam usecase {
|
369
|
+
$primary_scheme()
|
370
|
+
BorderThickness 2
|
371
|
+
StereotypeFontColor $primary_text
|
372
|
+
}
|
373
|
+
!endsub
|
374
|
+
|
375
|
+
!startsub rectangle
|
376
|
+
skinparam rectangle {
|
377
|
+
$primary_scheme()
|
378
|
+
StereotypeFontColor $primary_text
|
379
|
+
}
|
380
|
+
!endsub
|
381
|
+
|
382
|
+
!startsub package
|
383
|
+
skinparam package {
|
384
|
+
$primary_scheme()
|
385
|
+
}
|
386
|
+
!endsub
|
387
|
+
|
388
|
+
!startsub folder
|
389
|
+
skinparam folder {
|
390
|
+
$primary_scheme()
|
391
|
+
}
|
392
|
+
!endsub
|
393
|
+
|
394
|
+
!startsub frame
|
395
|
+
skinparam frame {
|
396
|
+
$primary_scheme()
|
397
|
+
}
|
398
|
+
!endsub
|
399
|
+
|
400
|
+
!startsub state
|
401
|
+
skinparam state {
|
402
|
+
$primary_scheme()
|
403
|
+
StartColor $orange
|
404
|
+
EndColor $brand_secondary
|
405
|
+
AttributeFontColor $primary_text
|
406
|
+
AttributeFontSize 11
|
407
|
+
}
|
408
|
+
!endsub
|
409
|
+
|
410
|
+
!startsub queue
|
411
|
+
skinparam queue {
|
412
|
+
$primary_scheme()
|
413
|
+
}
|
414
|
+
!endsub
|
415
|
+
|
416
|
+
!startsub card
|
417
|
+
skinparam card {
|
418
|
+
$primary_scheme()
|
419
|
+
}
|
420
|
+
!endsub
|
421
|
+
|
422
|
+
!startsub file
|
423
|
+
skinparam file {
|
424
|
+
$primary_scheme()
|
425
|
+
}
|
426
|
+
!endsub
|
427
|
+
|
428
|
+
!startsub stack
|
429
|
+
|
430
|
+
skinparam stack {
|
431
|
+
$primary_scheme()
|
432
|
+
}
|
433
|
+
!endsub
|
data/lib/gem_version.rb
CHANGED
data/lib/sidebar.rb
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
require 'jekyll'
|
4
4
|
require 'nokogiri'
|
5
5
|
require 'json'
|
6
|
+
require_relative 'sidebar_logger'
|
6
7
|
require_relative 'sidebar_page'
|
7
8
|
require_relative 'sidebar_parser'
|
8
9
|
require_relative 'sidebar_renderer'
|
@@ -15,16 +16,16 @@ module SwedbankPay
|
|
15
16
|
attr_reader :pages
|
16
17
|
|
17
18
|
def pre_render(site)
|
18
|
-
|
19
|
+
SidebarLogger.debug('pre_render')
|
19
20
|
@parser = SidebarParser.new(site)
|
20
21
|
@pages = SidebarTreeBuilder.new(@parser.pages)
|
21
|
-
|
22
|
+
SidebarLogger.debug(@pages.inspect)
|
22
23
|
end
|
23
24
|
|
24
25
|
def post_write
|
25
26
|
@sidebar_renderer = SidebarRenderer.new(@pages)
|
26
27
|
@parser.parse(@pages)
|
27
|
-
|
28
|
+
SidebarLogger.debug('post_write')
|
28
29
|
@sidebar_renderer.render
|
29
30
|
end
|
30
31
|
end
|
data/lib/sidebar_html_builder.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: false
|
2
2
|
|
3
|
+
require_relative 'sidebar_logger'
|
3
4
|
require_relative 'sidebar_page'
|
4
5
|
|
5
6
|
module SwedbankPay
|
@@ -27,10 +28,10 @@ module SwedbankPay
|
|
27
28
|
current_page_name = current_page.respond_to?(:name) ? current_page.name : current_page.to_s
|
28
29
|
|
29
30
|
if page.hidden_for?(current_page)
|
30
|
-
|
31
|
+
SidebarLogger.debug("#{page.name} is hidden for #{current_page_name}")
|
31
32
|
next
|
32
33
|
elsif page.hidden?
|
33
|
-
|
34
|
+
SidebarLogger.debug("Hidden page #{page.name} is not hidden for #{current_page_name}")
|
34
35
|
end
|
35
36
|
|
36
37
|
sub_items_markup = sub_items_markup(page, current_page)
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'jekyll'
|
4
|
+
|
5
|
+
module SwedbankPay
|
6
|
+
# Logs stuff
|
7
|
+
module SidebarLogger
|
8
|
+
class << self
|
9
|
+
def debug(message)
|
10
|
+
Jekyll.logger.debug prefix(message)
|
11
|
+
end
|
12
|
+
|
13
|
+
def info(message)
|
14
|
+
Jekyll.logger.info prefix(message)
|
15
|
+
end
|
16
|
+
|
17
|
+
def warn(message)
|
18
|
+
Jekyll.logger.warn prefix(message)
|
19
|
+
end
|
20
|
+
|
21
|
+
def error(message)
|
22
|
+
Jekyll.logger.error prefix(message)
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
def prefix(message)
|
28
|
+
" Sidebar: #{message}"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/sidebar_page.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'jekyll'
|
4
4
|
require 'nokogiri'
|
5
|
+
require_relative 'sidebar_logger'
|
5
6
|
require_relative 'sidebar_path'
|
6
7
|
require_relative 'sidebar_page_title'
|
7
8
|
require_relative 'sidebar_page_collection'
|
@@ -68,7 +69,7 @@ module SwedbankPay
|
|
68
69
|
hidden = hidden?
|
69
70
|
|
70
71
|
if other_page.nil? || !other_page.is_a?(SidebarPage)
|
71
|
-
|
72
|
+
SidebarLogger.debug("Other page '#{other_page}' is nil or not a SidebarPage")
|
72
73
|
return hidden
|
73
74
|
end
|
74
75
|
|
@@ -107,11 +108,11 @@ module SwedbankPay
|
|
107
108
|
|
108
109
|
def enrich_jekyll
|
109
110
|
if @title.nil?
|
110
|
-
|
111
|
+
SidebarLogger.debug("No title for #{@name}")
|
111
112
|
return
|
112
113
|
end
|
113
114
|
|
114
|
-
|
115
|
+
SidebarLogger.debug("<#{@path}>.lead_title('#{@title.lead}').main_title('#{@title.main}')")
|
115
116
|
|
116
117
|
@jekyll_page.data['lead_title'] = @title.lead
|
117
118
|
@jekyll_page.data['main_title'] = @title.main
|
@@ -120,7 +121,7 @@ module SwedbankPay
|
|
120
121
|
end
|
121
122
|
|
122
123
|
def save
|
123
|
-
|
124
|
+
SidebarLogger.debug(" Writing Sidebar: #{filename}")
|
124
125
|
|
125
126
|
File.open(@filename, 'w') do |file|
|
126
127
|
html = @doc.to_html(encoding: 'UTF-8')
|
@@ -179,14 +180,14 @@ module SwedbankPay
|
|
179
180
|
|
180
181
|
def find_path(current)
|
181
182
|
if current.nil?
|
182
|
-
|
183
|
+
SidebarLogger.warn('Nil current_page')
|
183
184
|
return ''
|
184
185
|
end
|
185
186
|
|
186
187
|
return current if current.is_a? String
|
187
188
|
return current.path if current.respond_to?(:path)
|
188
189
|
|
189
|
-
|
190
|
+
SidebarLogger.warn("#{current.class} ('#{current}') does not respond to :path.")
|
190
191
|
|
191
192
|
''
|
192
193
|
end
|
data/lib/sidebar_parser.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'jekyll'
|
4
4
|
require 'jekyll-redirect-from'
|
5
|
+
require_relative 'sidebar_logger'
|
5
6
|
require_relative 'sidebar_path'
|
6
7
|
|
7
8
|
module SwedbankPay
|
@@ -30,7 +31,7 @@ module SwedbankPay
|
|
30
31
|
|
31
32
|
pages.each do |jekyll_page|
|
32
33
|
if skippable? jekyll_page
|
33
|
-
|
34
|
+
SidebarLogger.debug("Skipping <#{jekyll_page['url']}>")
|
34
35
|
next
|
35
36
|
end
|
36
37
|
|
@@ -81,7 +82,7 @@ module SwedbankPay
|
|
81
82
|
sidebar_containers = page.doc.xpath('//*[@id="dx-sidebar-main-nav-ul"]')
|
82
83
|
|
83
84
|
if sidebar_containers.empty?
|
84
|
-
|
85
|
+
SidebarLogger.error("No sidebar container found in <#{page.filename}>!")
|
85
86
|
return nil
|
86
87
|
end
|
87
88
|
|
data/lib/sidebar_renderer.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative 'sidebar_logger'
|
3
4
|
require_relative 'sidebar_html_builder'
|
4
5
|
|
5
6
|
module SwedbankPay
|
@@ -31,12 +32,12 @@ module SwedbankPay
|
|
31
32
|
name = page.filename || page.name || page.to_s
|
32
33
|
|
33
34
|
if sidebar_html.nil?
|
34
|
-
|
35
|
+
SidebarLogger.warn("No HTML rendered for #{name}.")
|
35
36
|
next
|
36
37
|
end
|
37
38
|
|
38
39
|
if page.sidebar_container.nil?
|
39
|
-
|
40
|
+
SidebarLogger.warn("No sidebar container found in '#{name}'. #{page.filename}")
|
40
41
|
next
|
41
42
|
end
|
42
43
|
|
@@ -57,8 +58,8 @@ module SwedbankPay
|
|
57
58
|
File.open('_site/sidebar.html', 'w') { |f| f.write(sidebar_html) }
|
58
59
|
rescue StandardError => e
|
59
60
|
name = page.filename || page.name || page.to_s
|
60
|
-
|
61
|
-
|
61
|
+
SidebarLogger.error("Unable to render sidebar for '#{name}'.")
|
62
|
+
SidebarLogger.debug("#{e.message}. #{e.backtrace.inspect}")
|
62
63
|
end
|
63
64
|
|
64
65
|
sidebar_html
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: swedbank-pay-design-guide-jekyll-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Swedbank Pay
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -258,6 +258,7 @@ files:
|
|
258
258
|
- assets/img/external-url.svg
|
259
259
|
- assets/js/mermaid.min.js
|
260
260
|
- assets/js/swedbank-pay-design-guide-theme.js
|
261
|
+
- assets/puml-theme-swedbankpay.puml
|
261
262
|
- assets/tipuesearch/search.png
|
262
263
|
- assets/tipuesearch/tipuesearch.min.js
|
263
264
|
- assets/tipuesearch/tipuesearch_content.js
|
@@ -268,6 +269,7 @@ files:
|
|
268
269
|
- lib/sanitized_filename.rb
|
269
270
|
- lib/sidebar.rb
|
270
271
|
- lib/sidebar_html_builder.rb
|
272
|
+
- lib/sidebar_logger.rb
|
271
273
|
- lib/sidebar_page.rb
|
272
274
|
- lib/sidebar_page_collection.rb
|
273
275
|
- lib/sidebar_page_title.rb
|