swedbank-pay-design-guide-jekyll-theme 1.10.2 → 1.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -4
- data/_includes/card-list.html +7 -3
- 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 +14 -7
- data/lib/sidebar_parser.rb +4 -3
- data/lib/sidebar_renderer.rb +5 -4
- metadata +66 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7496ea1019d6c9f4cc0d675177dfffbcb024c58f4969df9425820ba92aea62c1
|
4
|
+
data.tar.gz: 00d25e31ac068728f8558a194130630a12d0693977e83e2ad91dfbd57b0a0608
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9d95f5c24bfe7da3bcf3e5397154bbf1e192f9e1c8548e740c69397e39bc3f5eb90f5760389c35de6acc11ab9d77a2b921856f7c7a0cd784a9cc81d7a75af48
|
7
|
+
data.tar.gz: ec17f6c0c330de27b814bac66399b5980b69ac12a40d9b4d8b2f4817f1faa7e026ea5a9599d7d5b466f4482f9f0a0cceff9826dcb12f46dac5def6e96a7a7a40
|
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>
|
data/_includes/card-list.html
CHANGED
@@ -7,10 +7,14 @@ type: sdk | module - Empty type result in default card styling
|
|
7
7
|
col_class(required): Describes what grid column class(es) each card should be wrapped in
|
8
8
|
{%- endcomment -%}
|
9
9
|
|
10
|
+
{% assign cards = include.card_list | default: page.children %}
|
11
|
+
{% assign col_class = include.col_class | default: 'col-lg-4' %}
|
12
|
+
|
10
13
|
<div class="row card-list">
|
11
|
-
{% for card in
|
14
|
+
{% for card in cards %}
|
12
15
|
{% assign title = card.title | split: '–' | last %}
|
13
|
-
{% assign link_to = card.
|
16
|
+
{% assign link_to = card.absolute_path | default: card.url %}
|
17
|
+
|
14
18
|
{% assign card_type = card.card.type | default: card.card_type | default: include.type %}
|
15
19
|
{% assign icon_content = card.card.icon.content | default: card.icon.content %}
|
16
20
|
{% assign icon_outlined = card.card.icon.outlined | default: card.icon.outlined %}
|
@@ -19,7 +23,7 @@ col_class(required): Describes what grid column class(es) each card should be wr
|
|
19
23
|
{% assign horizontal = card.card.horizontal | default: false %}
|
20
24
|
{% assign disabled = card.card.disabled | default: card.disabled %}
|
21
25
|
|
22
|
-
<div class="{{
|
26
|
+
<div class="{{ col_class }}">
|
23
27
|
{% include card.html
|
24
28
|
title=title
|
25
29
|
text=card.description
|
@@ -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'
|
@@ -10,7 +11,7 @@ require_relative 'sidebar_text_builder'
|
|
10
11
|
module SwedbankPay
|
11
12
|
# Represents a jekyll_page in the Sidebar
|
12
13
|
class SidebarPage
|
13
|
-
FIXNUM_MAX = (2**(0.size * 8 - 2) - 1)
|
14
|
+
FIXNUM_MAX = ((2**((0.size * 8) - 2)) - 1)
|
14
15
|
|
15
16
|
attr_reader :path, :title, :level, :order, :children, :name, :filename, :doc
|
16
17
|
attr_accessor :headers, :sidebar_container, :number, :parent
|
@@ -31,6 +32,7 @@ module SwedbankPay
|
|
31
32
|
@order = menu_order(jekyll_page)
|
32
33
|
@children = SidebarPageCollection.new(self)
|
33
34
|
@card_overview = jekyll_page['card_overview'].nil? ? false : jekyll_page['card_overview']
|
35
|
+
@anchor_headings = jekyll_page['anchor_headings'].nil? ? true : jekyll_page['anchor_headings']
|
34
36
|
end
|
35
37
|
|
36
38
|
def active?(current, is_leaf: false)
|
@@ -67,7 +69,7 @@ module SwedbankPay
|
|
67
69
|
hidden = hidden?
|
68
70
|
|
69
71
|
if other_page.nil? || !other_page.is_a?(SidebarPage)
|
70
|
-
|
72
|
+
SidebarLogger.debug("Other page '#{other_page}' is nil or not a SidebarPage")
|
71
73
|
return hidden
|
72
74
|
end
|
73
75
|
|
@@ -106,19 +108,20 @@ module SwedbankPay
|
|
106
108
|
|
107
109
|
def enrich_jekyll
|
108
110
|
if @title.nil?
|
109
|
-
|
111
|
+
SidebarLogger.debug("No title for #{@name}")
|
110
112
|
return
|
111
113
|
end
|
112
114
|
|
113
|
-
|
115
|
+
SidebarLogger.debug("<#{@path}>.lead_title('#{@title.lead}').main_title('#{@title.main}')")
|
114
116
|
|
115
117
|
@jekyll_page.data['lead_title'] = @title.lead
|
116
118
|
@jekyll_page.data['main_title'] = @title.main
|
117
119
|
@jekyll_page.data['children'] = @children
|
120
|
+
@jekyll_page.data['absolute_path'] = @path
|
118
121
|
end
|
119
122
|
|
120
123
|
def save
|
121
|
-
|
124
|
+
SidebarLogger.debug(" Writing Sidebar: #{filename}")
|
122
125
|
|
123
126
|
File.open(@filename, 'w') do |file|
|
124
127
|
html = @doc.to_html(encoding: 'UTF-8')
|
@@ -154,6 +157,10 @@ module SwedbankPay
|
|
154
157
|
@card_overview
|
155
158
|
end
|
156
159
|
|
160
|
+
def anchor_headings?
|
161
|
+
@anchor_headings
|
162
|
+
end
|
163
|
+
|
157
164
|
private
|
158
165
|
|
159
166
|
def menu_order(jekyll_page)
|
@@ -173,14 +180,14 @@ module SwedbankPay
|
|
173
180
|
|
174
181
|
def find_path(current)
|
175
182
|
if current.nil?
|
176
|
-
|
183
|
+
SidebarLogger.warn('Nil current_page')
|
177
184
|
return ''
|
178
185
|
end
|
179
186
|
|
180
187
|
return current if current.is_a? String
|
181
188
|
return current.path if current.respond_to?(:path)
|
182
189
|
|
183
|
-
|
190
|
+
SidebarLogger.warn("#{current.class} ('#{current}') does not respond to :path.")
|
184
191
|
|
185
192
|
''
|
186
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
|
|
@@ -60,7 +61,7 @@ module SwedbankPay
|
|
60
61
|
headers = []
|
61
62
|
|
62
63
|
# Don't include headers in the sidebar if we're on a card overview page.
|
63
|
-
return headers if page.card_overview?
|
64
|
+
return headers if page.card_overview? || !page.anchor_headings?
|
64
65
|
|
65
66
|
page.doc.xpath('//h2').each do |header|
|
66
67
|
id = header['id']
|
@@ -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,19 +1,22 @@
|
|
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.1
|
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-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1'
|
17
20
|
- - ">="
|
18
21
|
- !ruby/object:Gem::Version
|
19
22
|
version: 1.0.1
|
@@ -21,6 +24,9 @@ dependencies:
|
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1'
|
24
30
|
- - ">="
|
25
31
|
- !ruby/object:Gem::Version
|
26
32
|
version: 1.0.1
|
@@ -28,16 +34,22 @@ dependencies:
|
|
28
34
|
name: html-proofer
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '3'
|
31
40
|
- - ">="
|
32
41
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
42
|
+
version: '3.19'
|
34
43
|
type: :runtime
|
35
44
|
prerelease: false
|
36
45
|
version_requirements: !ruby/object:Gem::Requirement
|
37
46
|
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '3'
|
38
50
|
- - ">="
|
39
51
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
52
|
+
version: '3.19'
|
41
53
|
- !ruby/object:Gem::Dependency
|
42
54
|
name: jekyll
|
43
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -62,72 +74,90 @@ dependencies:
|
|
62
74
|
name: jekyll-contentblocks
|
63
75
|
requirement: !ruby/object:Gem::Requirement
|
64
76
|
requirements:
|
77
|
+
- - "~>"
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '1'
|
65
80
|
- - ">="
|
66
81
|
- !ruby/object:Gem::Version
|
67
|
-
version: '
|
82
|
+
version: '1.2'
|
68
83
|
type: :runtime
|
69
84
|
prerelease: false
|
70
85
|
version_requirements: !ruby/object:Gem::Requirement
|
71
86
|
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1'
|
72
90
|
- - ">="
|
73
91
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
92
|
+
version: '1.2'
|
75
93
|
- !ruby/object:Gem::Dependency
|
76
94
|
name: jekyll-material-icon-tag
|
77
95
|
requirement: !ruby/object:Gem::Requirement
|
78
96
|
requirements:
|
97
|
+
- - "~>"
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '1'
|
79
100
|
- - ">="
|
80
101
|
- !ruby/object:Gem::Version
|
81
|
-
version: '
|
102
|
+
version: '1.1'
|
82
103
|
type: :runtime
|
83
104
|
prerelease: false
|
84
105
|
version_requirements: !ruby/object:Gem::Requirement
|
85
106
|
requirements:
|
107
|
+
- - "~>"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '1'
|
86
110
|
- - ">="
|
87
111
|
- !ruby/object:Gem::Version
|
88
|
-
version: '
|
112
|
+
version: '1.1'
|
89
113
|
- !ruby/object:Gem::Dependency
|
90
114
|
name: jekyll-redirect-from
|
91
115
|
requirement: !ruby/object:Gem::Requirement
|
92
116
|
requirements:
|
93
|
-
- - "
|
117
|
+
- - "~>"
|
94
118
|
- !ruby/object:Gem::Version
|
95
|
-
version: '0'
|
119
|
+
version: '0.16'
|
96
120
|
type: :runtime
|
97
121
|
prerelease: false
|
98
122
|
version_requirements: !ruby/object:Gem::Requirement
|
99
123
|
requirements:
|
100
|
-
- - "
|
124
|
+
- - "~>"
|
101
125
|
- !ruby/object:Gem::Version
|
102
|
-
version: '0'
|
126
|
+
version: '0.16'
|
103
127
|
- !ruby/object:Gem::Dependency
|
104
128
|
name: jemoji
|
105
129
|
requirement: !ruby/object:Gem::Requirement
|
106
130
|
requirements:
|
107
|
-
- - "
|
131
|
+
- - "~>"
|
108
132
|
- !ruby/object:Gem::Version
|
109
|
-
version: '0'
|
133
|
+
version: '0.12'
|
110
134
|
type: :runtime
|
111
135
|
prerelease: false
|
112
136
|
version_requirements: !ruby/object:Gem::Requirement
|
113
137
|
requirements:
|
114
|
-
- - "
|
138
|
+
- - "~>"
|
115
139
|
- !ruby/object:Gem::Version
|
116
|
-
version: '0'
|
140
|
+
version: '0.12'
|
117
141
|
- !ruby/object:Gem::Dependency
|
118
142
|
name: kramdown-plantuml
|
119
143
|
requirement: !ruby/object:Gem::Requirement
|
120
144
|
requirements:
|
145
|
+
- - "~>"
|
146
|
+
- !ruby/object:Gem::Version
|
147
|
+
version: '1'
|
121
148
|
- - ">="
|
122
149
|
- !ruby/object:Gem::Version
|
123
|
-
version:
|
150
|
+
version: 1.1.9
|
124
151
|
type: :runtime
|
125
152
|
prerelease: false
|
126
153
|
version_requirements: !ruby/object:Gem::Requirement
|
127
154
|
requirements:
|
155
|
+
- - "~>"
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '1'
|
128
158
|
- - ">="
|
129
159
|
- !ruby/object:Gem::Version
|
130
|
-
version:
|
160
|
+
version: 1.1.9
|
131
161
|
- !ruby/object:Gem::Dependency
|
132
162
|
name: nokogiri
|
133
163
|
requirement: !ruby/object:Gem::Requirement
|
@@ -160,30 +190,42 @@ dependencies:
|
|
160
190
|
name: sass
|
161
191
|
requirement: !ruby/object:Gem::Requirement
|
162
192
|
requirements:
|
193
|
+
- - "~>"
|
194
|
+
- !ruby/object:Gem::Version
|
195
|
+
version: '3'
|
163
196
|
- - ">="
|
164
197
|
- !ruby/object:Gem::Version
|
165
|
-
version: '
|
198
|
+
version: '3.7'
|
166
199
|
type: :runtime
|
167
200
|
prerelease: false
|
168
201
|
version_requirements: !ruby/object:Gem::Requirement
|
169
202
|
requirements:
|
203
|
+
- - "~>"
|
204
|
+
- !ruby/object:Gem::Version
|
205
|
+
version: '3'
|
170
206
|
- - ">="
|
171
207
|
- !ruby/object:Gem::Version
|
172
|
-
version: '
|
208
|
+
version: '3.7'
|
173
209
|
- !ruby/object:Gem::Dependency
|
174
210
|
name: bundler
|
175
211
|
requirement: !ruby/object:Gem::Requirement
|
176
212
|
requirements:
|
213
|
+
- - "~>"
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '2'
|
177
216
|
- - ">="
|
178
217
|
- !ruby/object:Gem::Version
|
179
|
-
version: '
|
218
|
+
version: '2.2'
|
180
219
|
type: :development
|
181
220
|
prerelease: false
|
182
221
|
version_requirements: !ruby/object:Gem::Requirement
|
183
222
|
requirements:
|
223
|
+
- - "~>"
|
224
|
+
- !ruby/object:Gem::Version
|
225
|
+
version: '2'
|
184
226
|
- - ">="
|
185
227
|
- !ruby/object:Gem::Version
|
186
|
-
version: '
|
228
|
+
version: '2.2'
|
187
229
|
description:
|
188
230
|
email:
|
189
231
|
- opensource@swedbankpay.com
|
@@ -258,6 +300,7 @@ files:
|
|
258
300
|
- assets/img/external-url.svg
|
259
301
|
- assets/js/mermaid.min.js
|
260
302
|
- assets/js/swedbank-pay-design-guide-theme.js
|
303
|
+
- assets/puml-theme-swedbankpay.puml
|
261
304
|
- assets/tipuesearch/search.png
|
262
305
|
- assets/tipuesearch/tipuesearch.min.js
|
263
306
|
- assets/tipuesearch/tipuesearch_content.js
|
@@ -268,6 +311,7 @@ files:
|
|
268
311
|
- lib/sanitized_filename.rb
|
269
312
|
- lib/sidebar.rb
|
270
313
|
- lib/sidebar_html_builder.rb
|
314
|
+
- lib/sidebar_logger.rb
|
271
315
|
- lib/sidebar_page.rb
|
272
316
|
- lib/sidebar_page_collection.rb
|
273
317
|
- lib/sidebar_page_title.rb
|