swedbank-pay-design-guide-jekyll-theme 2.1.2 → 2.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_sass/accordion-table.scss +2 -0
- data/_sass/sidebar.scss +2 -0
- data/_sass/swedbank-pay-design-guide-theme.scss +6 -1
- data/lib/field_tag.rb +7 -2
- data/lib/gem_version.rb +1 -1
- data/lib/sidebar_html_builder.rb +5 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bd0d14feada281feea751c1da6df4925d867153d132553742fa97bdc8e1d8d0c
|
4
|
+
data.tar.gz: 1b10c80a6d932d4db5e2948c7f3cbc9d67ce1fffb0273f02264359ca8c58056e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa217d5c31a8bf836b27de51c51abe10b91dda890a1a68a6c156f99cd112557835ba9c710ae42d0165ef5542da75461987d563a73727774c969a232681c9c225
|
7
|
+
data.tar.gz: 9d9e8a63c9b5f61ce8375192a93178ba26dae99628e4eacaee55f97e3fb919e43b4e519b3473f00b053cffe089d79c38372817c373b3e97a61a82a7e792d2bdb
|
data/_sass/accordion-table.scss
CHANGED
data/_sass/sidebar.scss
CHANGED
@@ -330,10 +330,15 @@ body {
|
|
330
330
|
}
|
331
331
|
|
332
332
|
code {
|
333
|
-
border:
|
333
|
+
border: 1px solid $yellow;
|
334
|
+
border-radius: 8px;
|
334
335
|
}
|
335
336
|
}
|
336
337
|
|
338
|
+
.field-level-0::before {
|
339
|
+
content: '';
|
340
|
+
}
|
341
|
+
|
337
342
|
.field-level-2 {
|
338
343
|
margin-left: 2rem;
|
339
344
|
}
|
data/lib/field_tag.rb
CHANGED
@@ -38,9 +38,14 @@ module SwedbankPay
|
|
38
38
|
def level(values)
|
39
39
|
return 1 if values.size == 1
|
40
40
|
|
41
|
-
field_level = values[1].strip
|
41
|
+
field_level = values[1].strip
|
42
42
|
|
43
|
-
|
43
|
+
# Check if the level is a valid number, otherwise default to 1
|
44
|
+
return 1 unless /\A[-+]?\d*\.?\d+\z/.match(field_level)
|
45
|
+
|
46
|
+
field_level = field_level.to_i
|
47
|
+
|
48
|
+
field_level >= 0 ? field_level : 1
|
44
49
|
rescue StandardError
|
45
50
|
1
|
46
51
|
end
|
data/lib/gem_version.rb
CHANGED
data/lib/sidebar_html_builder.rb
CHANGED
@@ -47,9 +47,8 @@ module SwedbankPay
|
|
47
47
|
level = is_leaf ? -1 : page.level
|
48
48
|
title_markup = title_markup(page, level, is_leaf)
|
49
49
|
item_class = item_class(page, current_page, level, is_leaf)
|
50
|
-
root_class = root_class(
|
51
|
-
|
52
|
-
page.doc.xpath('//*[@id="dg-sidebar"]').first.set_attribute('class', root_class)
|
50
|
+
root_class = root_class(current_page)
|
51
|
+
page.doc.xpath('//*[@id="dg-sidebar"]').first.set_attribute('class', root_class)
|
53
52
|
"<li class=\"#{item_class}\">
|
54
53
|
#{title_markup}
|
55
54
|
#{if item_class === 'main-nav-li' || item_class === 'main-nav-li active'
|
@@ -63,9 +62,9 @@ module SwedbankPay
|
|
63
62
|
</li>"
|
64
63
|
end
|
65
64
|
|
66
|
-
def root_class(
|
67
|
-
|
68
|
-
|
65
|
+
def root_class(current_page)
|
66
|
+
is_home = current_page.path == '/'
|
67
|
+
is_home ? 'sidebar dg-sidebar' : 'sidebar dg-sidebar has-secondary-nav'
|
69
68
|
end
|
70
69
|
|
71
70
|
def item_class(page, current_page, level, is_leaf)
|
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: 2.1.
|
4
|
+
version: 2.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Swedbank Pay
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02-
|
11
|
+
date: 2023-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|