swedbank-pay-design-guide-jekyll-theme 1.9.0 → 1.9.5
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/_includes/accordion-table.html +11 -0
- data/_includes/apple-touch-startup-image.html +1 -1
- data/_includes/github.html +11 -0
- data/_includes/iterator.html +2 -2
- data/_includes/release_notes.html +11 -10
- data/_includes/title-header.html +34 -0
- data/_layouts/default.html +31 -46
- data/_layouts/front-page.html +26 -21
- data/_layouts/search.html +5 -0
- data/_plugins/swedbank-pay-design-guide-jekyll-theme.rb +3 -0
- data/_sass/accordion-table.scss +96 -0
- data/_sass/breakpoints.scss +5 -0
- data/_sass/card.scss +1 -0
- data/_sass/front-page.scss +108 -71
- data/_sass/sidebar.scss +33 -3
- data/_sass/swedbank-pay-design-guide-theme.scss +22 -1
- data/_sass/title-header.scss +3 -0
- data/_sass/variables.scss +1 -1
- data/assets/css/pygments-autumn.css +1 -1
- data/lib/gem_version.rb +1 -1
- data/lib/regex_capture_filter.rb +18 -0
- data/lib/sidebar.rb +14 -22
- data/lib/sidebar_html_builder.rb +55 -42
- data/lib/sidebar_page.rb +87 -23
- data/lib/sidebar_page_collection.rb +1 -2
- data/lib/sidebar_page_title.rb +71 -6
- data/lib/sidebar_parser.rb +53 -20
- data/lib/sidebar_renderer.rb +26 -10
- data/lib/sidebar_text_builder.rb +5 -4
- data/lib/sidebar_tree_builder.rb +17 -4
- data/lib/swedbank-pay-design-guide-jekyll-theme.rb +1 -0
- metadata +11 -4
- data/_plugins/sidebar.rb +0 -3
data/_sass/card.scss
CHANGED
data/_sass/front-page.scss
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
@import 'colors.scss';
|
2
2
|
@import 'fonts.scss';
|
3
|
+
@import 'breakpoints.scss';
|
3
4
|
|
4
5
|
$front-page-padding: 0 4rem;
|
5
|
-
$front-page-max-width:
|
6
|
+
$front-page-max-width: 1312px;
|
6
7
|
|
7
8
|
@mixin row-cards {
|
8
9
|
>[class*='col-'] {
|
@@ -49,77 +50,87 @@ $front-page-max-width: 1280px;
|
|
49
50
|
}
|
50
51
|
|
51
52
|
.front-page {
|
53
|
+
margin: 3rem 2rem 0;
|
52
54
|
position: relative;
|
53
55
|
display: flex;
|
54
56
|
flex-direction: column;
|
55
57
|
align-items: center;
|
58
|
+
|
59
|
+
.front-page-top {
|
60
|
+
position: relative;
|
61
|
+
padding: 4rem 4rem 2rem;
|
62
|
+
width: 100%;
|
63
|
+
margin-bottom: 3rem;
|
64
|
+
max-width: 1432px;
|
65
|
+
background-color: $dark-brown;
|
66
|
+
z-index: 0;
|
67
|
+
border-radius: 1rem;
|
68
|
+
min-height: 33rem;
|
56
69
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
.front-page-top {
|
62
|
-
padding-top: 4rem;
|
63
|
-
width: 100%;
|
70
|
+
.front-page-hero {
|
71
|
+
position: relative;
|
72
|
+
max-width: 38rem;
|
64
73
|
margin-bottom: 3rem;
|
74
|
+
z-index: 1;
|
65
75
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
top: 0;
|
71
|
-
left: 0;
|
72
|
-
background-color: $dark-brown;
|
73
|
-
width: 100%;
|
74
|
-
height: 34rem;
|
75
|
-
z-index: 0;
|
76
|
+
h3 {
|
77
|
+
color: $yellow;
|
78
|
+
font-family: $headline;
|
79
|
+
margin-bottom: 0;
|
76
80
|
}
|
77
81
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
z-index: 1;
|
82
|
+
p {
|
83
|
+
color: $white;
|
84
|
+
font-size: 1.125rem;
|
85
|
+
}
|
83
86
|
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
87
|
+
.front-page-hero-name {
|
88
|
+
font-family: $mono;
|
89
|
+
font-weight: bold;
|
90
|
+
font-size: 2rem;
|
91
|
+
color: $yellow;
|
92
|
+
margin-bottom: 1rem;
|
89
93
|
|
90
|
-
|
94
|
+
span {
|
91
95
|
color: $white;
|
92
|
-
font-size: 1.125rem;
|
93
96
|
}
|
97
|
+
}
|
98
|
+
|
99
|
+
}
|
94
100
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
font-size: 2rem;
|
99
|
-
color: $yellow;
|
100
|
-
margin-bottom: 1rem;
|
101
|
+
.front-page-intro-cards {
|
102
|
+
h2 {
|
103
|
+
color: $white;
|
101
104
|
|
102
|
-
|
103
|
-
|
104
|
-
}
|
105
|
+
.header-anchor {
|
106
|
+
display: none;
|
105
107
|
}
|
108
|
+
}
|
106
109
|
|
110
|
+
.row {
|
111
|
+
@include row-cards();
|
107
112
|
}
|
113
|
+
}
|
108
114
|
|
115
|
+
@media screen and (min-width: $breakpoint-xxl) {
|
116
|
+
margin-bottom: 10rem;
|
117
|
+
|
109
118
|
.front-page-intro-cards {
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
display: none;
|
115
|
-
}
|
116
|
-
}
|
117
|
-
|
118
|
-
.row {
|
119
|
-
@include row-cards();
|
120
|
-
}
|
119
|
+
position: absolute;
|
120
|
+
left: 0;
|
121
|
+
width: 100%;
|
122
|
+
padding: 0 4rem;
|
121
123
|
}
|
122
124
|
}
|
125
|
+
}
|
126
|
+
.front-page-container {
|
127
|
+
max-width: $front-page-max-width;
|
128
|
+
margin: $front-page-padding;
|
129
|
+
position: relative;
|
130
|
+
|
131
|
+
@media screen and (max-width: $breakpoint-md) {
|
132
|
+
margin: 0;
|
133
|
+
}
|
123
134
|
|
124
135
|
.front-page-merchants {
|
125
136
|
margin-bottom: 3.75rem;
|
@@ -221,19 +232,7 @@ $front-page-max-width: 1280px;
|
|
221
232
|
height: 22.5rem;
|
222
233
|
background-color: $dark-brown;
|
223
234
|
text-decoration: none;
|
224
|
-
|
225
|
-
&:hover,
|
226
|
-
&:focus {
|
227
|
-
.front-page-demoshop-link {
|
228
|
-
background-color: $white;
|
229
|
-
color: $brown;
|
230
|
-
|
231
|
-
.h3 {
|
232
|
-
color: $brown;
|
233
|
-
}
|
234
|
-
|
235
|
-
}
|
236
|
-
}
|
235
|
+
border-radius: 1rem;
|
237
236
|
|
238
237
|
&:after {
|
239
238
|
display: none;
|
@@ -249,17 +248,29 @@ $front-page-max-width: 1280px;
|
|
249
248
|
|
250
249
|
.h2 {
|
251
250
|
color: $white;
|
252
|
-
|
253
|
-
span {
|
254
|
-
color: $yellow;
|
255
|
-
}
|
256
251
|
}
|
257
252
|
|
258
253
|
.demoshop-text-description {
|
259
254
|
color: $white;
|
260
|
-
width:
|
261
|
-
height: 4.5rem;
|
255
|
+
width: 40%;
|
256
|
+
min-height: 4.5rem;
|
257
|
+
font-size: 1rem;
|
258
|
+
|
262
259
|
}
|
260
|
+
|
261
|
+
}
|
262
|
+
|
263
|
+
@media screen and (max-width: $breakpoint-md) {
|
264
|
+
padding-top: 3rem;
|
265
|
+
height: 18rem;
|
266
|
+
|
267
|
+
.front-page-demoshop-text {
|
268
|
+
.demoshop-text-description {
|
269
|
+
width: 100%;
|
270
|
+
min-height: 2.25rem;
|
271
|
+
}
|
272
|
+
}
|
273
|
+
|
263
274
|
}
|
264
275
|
|
265
276
|
.front-page-demoshop-link {
|
@@ -274,6 +285,21 @@ $front-page-max-width: 1280px;
|
|
274
285
|
box-shadow: 1px 2px 10px rgba(0, 0, 0, 0.15);
|
275
286
|
max-width: $front-page-max-width;
|
276
287
|
width: 100%;
|
288
|
+
cursor: pointer;
|
289
|
+
|
290
|
+
a::after{
|
291
|
+
content: '';
|
292
|
+
}
|
293
|
+
|
294
|
+
&:hover,
|
295
|
+
&:focus {
|
296
|
+
background-color: $white;
|
297
|
+
color: $brown;
|
298
|
+
|
299
|
+
.h3 {
|
300
|
+
color: $brown;
|
301
|
+
}
|
302
|
+
}
|
277
303
|
|
278
304
|
.demoshop-link-img {
|
279
305
|
display: flex;
|
@@ -281,6 +307,7 @@ $front-page-max-width: 1280px;
|
|
281
307
|
position: absolute;
|
282
308
|
bottom: -1rem;
|
283
309
|
right: 3%;
|
310
|
+
pointer-events: none;
|
284
311
|
|
285
312
|
.demoshop-link-img-web {
|
286
313
|
width: 26.5rem;
|
@@ -297,8 +324,6 @@ $front-page-max-width: 1280px;
|
|
297
324
|
}
|
298
325
|
}
|
299
326
|
|
300
|
-
|
301
|
-
|
302
327
|
.h3 {
|
303
328
|
color: $white;
|
304
329
|
padding-right: 1rem;
|
@@ -306,6 +331,18 @@ $front-page-max-width: 1280px;
|
|
306
331
|
margin: 0;
|
307
332
|
}
|
308
333
|
}
|
334
|
+
|
335
|
+
@media screen and (min-width: $breakpoint-xxl) {
|
336
|
+
.front-page-demoshop-text {
|
337
|
+
margin-bottom: 1rem;
|
338
|
+
}
|
339
|
+
|
340
|
+
.front-page-demoshop-link {
|
341
|
+
.demoshop-link-img {
|
342
|
+
bottom: -2rem;
|
343
|
+
}
|
344
|
+
}
|
345
|
+
}
|
309
346
|
}
|
310
347
|
|
311
348
|
|
data/_sass/sidebar.scss
CHANGED
@@ -6,14 +6,13 @@
|
|
6
6
|
display: flex;
|
7
7
|
flex-direction: column;
|
8
8
|
align-items: center;
|
9
|
-
margin-bottom: 2.5rem;
|
10
9
|
margin-top: 2rem;
|
11
10
|
text-decoration: none;
|
12
11
|
color: #512b2b;
|
13
12
|
|
14
13
|
img {
|
15
|
-
|
16
|
-
margin-
|
14
|
+
margin-top: 1.5rem;
|
15
|
+
margin-bottom: 1.25rem;
|
17
16
|
}
|
18
17
|
|
19
18
|
span {
|
@@ -30,6 +29,37 @@
|
|
30
29
|
}
|
31
30
|
}
|
32
31
|
|
32
|
+
.search-container {
|
33
|
+
box-shadow: 1px 2px 10px rgba(0, 0, 0, 0.15);
|
34
|
+
border-radius: 0.125rem;
|
35
|
+
|
36
|
+
&:focus-within {
|
37
|
+
outline: -webkit-focus-ring-color auto 0.5px;
|
38
|
+
}
|
39
|
+
|
40
|
+
.search-input {
|
41
|
+
color: $medium-brown;
|
42
|
+
font-size: 0.875rem;
|
43
|
+
border: none;
|
44
|
+
padding: 0.375rem;
|
45
|
+
|
46
|
+
&:focus {
|
47
|
+
color: $brown;
|
48
|
+
outline: none
|
49
|
+
}
|
50
|
+
}
|
51
|
+
|
52
|
+
i {
|
53
|
+
display: block;
|
54
|
+
color: $brown;
|
55
|
+
|
56
|
+
&:hover {
|
57
|
+
color: $turquoise-link;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
}
|
62
|
+
|
33
63
|
.main-nav-ul {
|
34
64
|
.nav-group {
|
35
65
|
.nav-ul {
|
@@ -1,11 +1,13 @@
|
|
1
1
|
@import 'colors.scss';
|
2
2
|
@import 'fonts.scss';
|
3
3
|
@import 'variables.scss';
|
4
|
+
@import 'breakpoints.scss';
|
4
5
|
|
5
6
|
@import 'card.scss';
|
6
7
|
@import 'code-view.scss';
|
7
8
|
@import 'front-page.scss';
|
8
9
|
@import 'heading.scss';
|
10
|
+
@import 'accordion-table.scss';
|
9
11
|
@import 'paragraph-highlight.scss';
|
10
12
|
@import 'sidebar.scss';
|
11
13
|
@import 'title-header.scss';
|
@@ -17,8 +19,11 @@ img {
|
|
17
19
|
max-width: 100%;
|
18
20
|
}
|
19
21
|
|
20
|
-
|
22
|
+
body {
|
23
|
+
font-size: 1.125rem;
|
24
|
+
}
|
21
25
|
|
26
|
+
.table {
|
22
27
|
th,
|
23
28
|
td {
|
24
29
|
>.material-icons {
|
@@ -287,4 +292,20 @@ a[href ^='https://']:not([href *='{{ site.url }}']):after {
|
|
287
292
|
font-size: 1rem !important;
|
288
293
|
}
|
289
294
|
}
|
295
|
+
|
296
|
+
.github {
|
297
|
+
opacity: .5;
|
298
|
+
position: absolute;
|
299
|
+
right: 4rem;
|
300
|
+
top: 4rem;
|
301
|
+
transition: opacity .3s;
|
302
|
+
}
|
303
|
+
|
304
|
+
a.github:after {
|
305
|
+
display: none;
|
306
|
+
}
|
307
|
+
|
308
|
+
a.github:hover {
|
309
|
+
opacity: 1;
|
310
|
+
}
|
290
311
|
}
|
data/_sass/title-header.scss
CHANGED
data/_sass/variables.scss
CHANGED
@@ -1 +1 @@
|
|
1
|
-
$max-width:
|
1
|
+
$max-width: 880px;
|
@@ -36,7 +36,7 @@
|
|
36
36
|
.highlight .nf { color: #00aa00 } /* Name.Function */
|
37
37
|
.highlight .nn { color: #00aaaa; text-decoration: underline } /* Name.Namespace */
|
38
38
|
.highlight .nt { color: #1e90ff; font-weight: bold } /* Name.Tag */
|
39
|
-
.highlight .nv { color: #
|
39
|
+
.highlight .nv { color: #e07088 } /* Name.Variable */
|
40
40
|
.highlight .ow { color: #0000aa } /* Operator.Word */
|
41
41
|
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
|
42
42
|
.highlight .mb { color: #009999 } /* Literal.Number.Bin */
|
data/lib/gem_version.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'liquid'
|
4
|
+
|
5
|
+
# Jekyll
|
6
|
+
module Jekyll
|
7
|
+
# Adds a 'regex_capture' filter to Liquid. Performs a regular expression match
|
8
|
+
# on the provided string and returns the capture as an array. Example usage:
|
9
|
+
# {{ html | regex_capture: 'id="([^"]+)"' | first }}
|
10
|
+
module RegexCaptureFilter
|
11
|
+
def regex_capture(str, regex)
|
12
|
+
match = /#{regex}/.match(str)
|
13
|
+
match ? match.captures : []
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
Liquid::Template.register_filter(Jekyll::RegexCaptureFilter)
|
data/lib/sidebar.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# frozen_string_literal:
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'jekyll'
|
4
4
|
require 'nokogiri'
|
@@ -14,35 +14,27 @@ module SwedbankPay
|
|
14
14
|
class << self
|
15
15
|
attr_reader :pages
|
16
16
|
|
17
|
-
def
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
sidebar_page = SidebarPage.new(jekyll_page)
|
23
|
-
@pages_hash[sidebar_page.path] = sidebar_page
|
17
|
+
def pre_render(site)
|
18
|
+
Jekyll.logger.debug(' Sidebar: pre_render')
|
19
|
+
@parser = SidebarParser.new(site)
|
20
|
+
@pages = SidebarTreeBuilder.new(@parser.pages)
|
21
|
+
Jekyll.logger.debug(" Sidebar: #{@pages.inspect}")
|
24
22
|
end
|
25
23
|
|
26
|
-
def post_write
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
renderer = SidebarRenderer.new
|
32
|
-
renderer.render(@pages)
|
24
|
+
def post_write
|
25
|
+
@sidebar_renderer = SidebarRenderer.new(@pages)
|
26
|
+
@parser.parse(@pages)
|
27
|
+
Jekyll.logger.debug(' Sidebar: post_write')
|
28
|
+
@sidebar_renderer.render
|
33
29
|
end
|
34
30
|
end
|
35
31
|
end
|
36
32
|
end
|
37
33
|
|
38
|
-
SwedbankPay::Sidebar.init
|
39
|
-
|
40
34
|
Jekyll::Hooks.register :site, :pre_render do |site, _|
|
41
|
-
|
42
|
-
SwedbankPay::Sidebar.pre_render page
|
43
|
-
end
|
35
|
+
SwedbankPay::Sidebar.pre_render site
|
44
36
|
end
|
45
37
|
|
46
|
-
Jekyll::Hooks.register :site, :post_write do
|
47
|
-
SwedbankPay::Sidebar.post_write
|
38
|
+
Jekyll::Hooks.register :site, :post_write do
|
39
|
+
SwedbankPay::Sidebar.post_write
|
48
40
|
end
|