swedbank-pay-design-guide-jekyll-theme 2.1.3 → 2.1.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/_layouts/default.html +1 -1
- data/_sass/swedbank-pay-design-guide-theme.scss +2 -2
- data/lib/gem_version.rb +1 -1
- data/lib/sidebar_html_builder.rb +9 -5
- 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: 04fe2440eb0620ec5a7116d1afa9146d7125ea21f3678a52fac2acbdb4ae1d83
|
4
|
+
data.tar.gz: 972d264157d5199802f918826b1732fc072634116e92b7f1027fb3101a23a0e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fb35252549b20de9c6c1c2e8ee00e3cb355949465fbfe5f94844509ce97ab9ff8b53e4389376a85ec1a2b8e035082785084e26fa51e050e4f5c364b9712e058
|
7
|
+
data.tar.gz: 4e2b159ab1a399bc0633addbee79c4fba5bd2b4c3cffd936dfcfdb006966e3c7324df566e17818ed06ff55224a7b816544bc83db02e515988290b28afdcb2675
|
data/_layouts/default.html
CHANGED
@@ -88,7 +88,7 @@
|
|
88
88
|
{% endif %}
|
89
89
|
</div>
|
90
90
|
<div class="d-md-flex">
|
91
|
-
<div id="dg-sidebar" class="sidebar dg-sidebar">
|
91
|
+
<div id="dg-sidebar" class="sidebar dg-sidebar has-secondary-nav">
|
92
92
|
<nav class="sidebar-main-nav">
|
93
93
|
<div class="sidebar-logo">
|
94
94
|
<a href="/" class="sidebar-header">
|
@@ -364,7 +364,7 @@ body {
|
|
364
364
|
opacity: .5;
|
365
365
|
position: absolute;
|
366
366
|
right: 4rem;
|
367
|
-
top:
|
367
|
+
top: 2rem;
|
368
368
|
transition: opacity .3s;
|
369
369
|
|
370
370
|
@media screen and (max-width: $breakpoint-lg){
|
@@ -400,7 +400,7 @@ body {
|
|
400
400
|
.search-box {
|
401
401
|
position: absolute;
|
402
402
|
right: 8rem;
|
403
|
-
top:
|
403
|
+
top: 2rem;
|
404
404
|
z-index: 2;
|
405
405
|
|
406
406
|
@media screen and (max-width: $breakpoint-lg) {
|
data/lib/gem_version.rb
CHANGED
data/lib/sidebar_html_builder.rb
CHANGED
@@ -38,6 +38,10 @@ module SwedbankPay
|
|
38
38
|
markup << item_markup(page, current_page, sub_items_markup, false)
|
39
39
|
end
|
40
40
|
|
41
|
+
# We need to wait with the root class replacement until here because
|
42
|
+
# earlier in the process, the page HTML isn't loaded yet.
|
43
|
+
change_root_class(current_page)
|
44
|
+
|
41
45
|
markup
|
42
46
|
end
|
43
47
|
|
@@ -47,8 +51,6 @@ module SwedbankPay
|
|
47
51
|
level = is_leaf ? -1 : page.level
|
48
52
|
title_markup = title_markup(page, level, is_leaf)
|
49
53
|
item_class = item_class(page, current_page, level, is_leaf)
|
50
|
-
root_class = root_class(current_page)
|
51
|
-
page.doc.xpath('//*[@id="dg-sidebar"]').first.set_attribute('class', root_class)
|
52
54
|
"<li class=\"#{item_class}\">
|
53
55
|
#{title_markup}
|
54
56
|
#{if item_class === 'main-nav-li' || item_class === 'main-nav-li active'
|
@@ -62,9 +64,11 @@ module SwedbankPay
|
|
62
64
|
</li>"
|
63
65
|
end
|
64
66
|
|
65
|
-
def
|
66
|
-
|
67
|
-
|
67
|
+
def change_root_class(current_page)
|
68
|
+
return if current_page.path != '/'
|
69
|
+
|
70
|
+
# On 'home', set the 'class' to 'sidebar dg-sidebar' to effectively remove 'has-secondary-nav'.
|
71
|
+
current_page.doc.xpath('//*[@id="dg-sidebar"]').first.set_attribute('class', 'sidebar dg-sidebar')
|
68
72
|
end
|
69
73
|
|
70
74
|
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.5
|
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-
|
11
|
+
date: 2023-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|