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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6ceeee12feb026dc51636613eea16a0acb54b1a6b5dbca8ebd0ff9e14351d1fe
4
- data.tar.gz: f60aadc3c877e138bcbd12f0e4530835f55e50b9919626e7f7393dff2b1fceb6
3
+ metadata.gz: bd0d14feada281feea751c1da6df4925d867153d132553742fa97bdc8e1d8d0c
4
+ data.tar.gz: 1b10c80a6d932d4db5e2948c7f3cbc9d67ce1fffb0273f02264359ca8c58056e
5
5
  SHA512:
6
- metadata.gz: 77bae9e99eefb895cc20aeba3796592206ef8494eeb7f399891455ae2aee7e45e41dc6a87874842c87abb7891be1cc2ad2608ba8e3cafc73a7a414fe7ca6e83e
7
- data.tar.gz: f6d15e7eea3b0365c5ebf15c49124f56195e93071ef5bac27ac44437eef2054f642c5d1dbf3e956693d01bc5da7a8f9a3b2febe2fa9081e0f672180085e1ca79
6
+ metadata.gz: aa217d5c31a8bf836b27de51c51abe10b91dda890a1a68a6c156f99cd112557835ba9c710ae42d0165ef5542da75461987d563a73727774c969a232681c9c225
7
+ data.tar.gz: 9d9e8a63c9b5f61ce8375192a93178ba26dae99628e4eacaee55f97e3fb919e43b4e519b3473f00b053cffe089d79c38372817c373b3e97a61a82a7e792d2bdb
@@ -25,6 +25,8 @@
25
25
  .hide {
26
26
  display: block;
27
27
  width: 70vw;
28
+ max-width: 100%;
29
+ padding-left: 1rem;
28
30
  }
29
31
  }
30
32
 
data/_sass/sidebar.scss CHANGED
@@ -34,6 +34,8 @@
34
34
 
35
35
  .main-nav-ul {
36
36
  margin-top: 0;
37
+ height: calc(100vh - 120px);
38
+ padding: 0 1rem;
37
39
  }
38
40
  }
39
41
  }
@@ -330,10 +330,15 @@ body {
330
330
  }
331
331
 
332
332
  code {
333
- border: 2px solid $yellow;
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.to_i
41
+ field_level = values[1].strip
42
42
 
43
- field_level.positive? ? field_level : 1
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
@@ -4,7 +4,7 @@ module Gem
4
4
  # Gem Specification
5
5
  class Specification
6
6
  def self.gem_version
7
- '2.1.2'
7
+ '2.1.3'
8
8
  end
9
9
  end
10
10
  end
@@ -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(page, current_page)
51
- level.zero? &&
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(page, current_page)
67
- active = page.active?(current_page)
68
- active && current_page.path != '/' ? 'sidebar dg-sidebar has-secondary-nav' : 'sidebar dg-sidebar'
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.2
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-24 00:00:00.000000000 Z
11
+ date: 2023-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday