swedbank-pay-design-guide-jekyll-theme 2.5.5 → 2.6.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7efc8ed7b9bd61eaf3288c2a4a4e4d23c7f01fd631ef8946ba2d75e4ced2053a
4
- data.tar.gz: 88fe0fa979eb17b6cb91d827808f5552bb5408fd6eb7bc681ccb91cdf92209ed
3
+ metadata.gz: 43f30d3e0dbcbb4f245c6b139c5088e377f9b31a7b3fabee50af5f221731e140
4
+ data.tar.gz: f3ca2d804cb52e7f7bfe07f170ce39a39bcc12468e71434f7444cf6627f188fa
5
5
  SHA512:
6
- metadata.gz: 2af7a399665ee6e819387dd0b283b655c1a03dbb61c4a03e8c9856c6074c2115283d520f100b63f4f1a85a2763a497a226ec19c2c1a77004290937f051945ba7
7
- data.tar.gz: 76ed7dd05bae395cded6af01da6309f9fda44cfbfae6574ba627b87a96d90fe94d47e99197748e5634cc934543e5a04e98b2b09b1652fe769f32b92d117ad97c
6
+ metadata.gz: 89660adaa6374392391b463406236f7730728c47438dc785978323b6686e81ea4da1ee2348178dc06711709e8e55380a82fe23e01cf97b5ff1f726a59fe451e5
7
+ data.tar.gz: b28a9be2d346fb985e8420d69800878742e462f480ec8d68ce9a1db21580c68c829bf107492cd11f932ce6e456ef96fa335f77ab6cc1f541b3af008c72b8ed75
@@ -26,6 +26,4 @@
26
26
  <p>{{ description | markdownify }}</p>
27
27
  {% endif %}
28
28
  </div>
29
-
30
- {% include github.html %}
31
29
  </div>
@@ -72,8 +72,8 @@
72
72
  </a>
73
73
  </header>
74
74
  <div class="documentation">
75
- <div class="form-group search-box search-expander">
76
- {% if site.search.enabled == true %}
75
+ <div id="search-box-container" class="form-group search-box search-expander">
76
+ {% if site.search.enabled == true and page.name != "search.md" %}
77
77
  <form class="search d-flex"
78
78
  method="get" action="{{ site.search.url | relative_url }}">
79
79
  <input name="q" type="text" id="tipue_search_input"
data/_layouts/search.html CHANGED
@@ -1,5 +1,24 @@
1
1
  ---
2
2
  layout: default
3
3
  ---
4
+ <form class="search d-flex" method="get" action="{{ site.search.url | relative_url }}">
5
+ <input name="q" type="text" id="tipue_search_input" class="form-control search-input"
6
+ placeholder="Search in documentation" onfocus="this.placeholder=''"
7
+ onblur="this.placeholder='Search in documentation'" pattern=".{3,}" title="At least 3 characters">
8
+ <script>
9
+ (function () {
10
+ var params = new URLSearchParams(window.location.search);
11
+ var q = params.get('q');
12
+ if (q) {
13
+ document.getElementById('tipue_search_input').value = q;
14
+ }
15
+ })();
16
+ </script>
17
+ <button id="search-btn" class="btn btn-primary btn-icon-lg" type="submit" aria-label="Search button">
18
+ <i class="material-icons-outlined" aria-hidden="true">search</i>
19
+ </button>
20
+ </form>
21
+ <p id="search-hint-text" class="hint-text mb-5">Tip: Try using quotes for more precise
22
+ results. <code>online payments</code> will give a different result compare to <code>"online payments"</code></p>
4
23
 
5
- <div id="tipue_search_content"></div>
24
+ <div id="tipue_search_content"></div>
@@ -9,6 +9,7 @@
9
9
  @import 'paragraph-highlight.scss';
10
10
  @import 'sidebar.scss';
11
11
  @import 'title-header.scss';
12
+ @import 'tipue_search.scss';
12
13
 
13
14
  $bg: #f5f2f0;
14
15
  $darkened-bg: darken($bg, 10%);
@@ -27,7 +28,7 @@ img {
27
28
  padding-left: 0;
28
29
  }
29
30
 
30
- .cards:has(.cards-cta){
31
+ .cards:has(.cards-cta) {
31
32
  min-width: 100% !important;
32
33
  }
33
34
 
@@ -442,40 +443,43 @@ body {
442
443
  }
443
444
  }
444
445
 
446
+ #search-btn {
447
+ height: 56px;
448
+ border-top-left-radius: 0;
449
+ border-bottom-left-radius: 0;
450
+ }
451
+
452
+ .search-input {
453
+ border-top-right-radius: 0;
454
+ border-bottom-right-radius: 0;
455
+ }
456
+
445
457
  .search-box {
446
458
  position: absolute;
447
- right: 8rem;
448
- top: 1.5rem;
459
+ right: 1rem;
460
+ top: 1rem;
449
461
  z-index: 2;
450
462
 
451
-
452
- .search-input {
453
- border-top-right-radius: 0;
454
- border-bottom-right-radius: 0;
455
- }
456
-
457
- #search-btn {
458
- border-top-left-radius: 0;
459
- border-bottom-left-radius: 0;
460
- height: 56px;
461
- }
462
-
463
463
  @media screen and (max-width: $breakpoint-lg) {
464
464
  position: fixed;
465
465
  right: 1rem;
466
466
  top: 1rem;
467
467
  z-index: 401;
468
468
 
469
- #tipue_search_input {
470
- display: none;
471
- }
472
-
473
469
  #search-btn {
474
470
  border-top-left-radius: 8px;
475
471
  border-top-left-radius: var(--border-radius);
476
472
  border-bottom-left-radius: 8px;
477
473
  border-bottom-left-radius: var(--border-radius);
478
474
  }
475
+
476
+ #tipue_search_input {
477
+ display: none;
478
+ }
479
+
480
+ #search-box-container {
481
+ max-width: 54px;
482
+ }
479
483
  }
480
484
  }
481
485
 
@@ -0,0 +1,22 @@
1
+ #tipue_search_content {
2
+
3
+ nav {
4
+ display: flex;
5
+ font-family: Swedbank Headline, Arial, sans-serif;
6
+ font-family: var(--brand-headline);
7
+ justify-content: center;
8
+ margin: 1rem 0;
9
+ padding-left: 0;
10
+
11
+ ul {
12
+ display: flex;
13
+ cursor: pointer;
14
+
15
+ li {
16
+ border-radius: .125rem;
17
+ display: flex;
18
+ margin: .5rem;
19
+ }
20
+ }
21
+ }
22
+ }
@@ -7,7 +7,7 @@
7
7
 
8
8
  .title-header-container {
9
9
  width: 100%;
10
- padding: 3rem 1rem;
10
+ padding: 4rem 1rem;
11
11
 
12
12
  h1,
13
13
  h4,
@@ -96,7 +96,7 @@
96
96
 
97
97
  // Simple sidebar functionality while dg.js is being loaded
98
98
 
99
- function _handleSimpleSidebar (e) {
99
+ function _handleSimpleSidebar(e) {
100
100
  const target = e.target.parentElement.parentElement;
101
101
 
102
102
  if (target.tagName === "LI") {
@@ -121,7 +121,7 @@ function _handleSimpleSidebar (e) {
121
121
 
122
122
  // Remove simple sidebar functionality when proper sidebar functionality is loaded
123
123
  (function () {
124
- document.addEventListener("DOMContentLoaded", function(e) {
124
+ document.addEventListener("DOMContentLoaded", function (e) {
125
125
  const sidebar = document.querySelector(".sidebar");
126
126
 
127
127
  sidebar.removeEventListener("click", _handleSimpleSidebar);
@@ -131,7 +131,7 @@ function _handleSimpleSidebar (e) {
131
131
 
132
132
  // Override the topbar click to show and hide our own sidebar
133
133
  (function () {
134
- const isLeaf = function(currentUrl) {
134
+ const isLeaf = function (currentUrl) {
135
135
  const path = window.location.pathname;
136
136
  const href = currentUrl || window.location.href;
137
137
  const pathIndex = href.indexOf(path);
@@ -142,11 +142,11 @@ function _handleSimpleSidebar (e) {
142
142
  : false;
143
143
  };
144
144
 
145
- const isHome = function() {
145
+ const isHome = function () {
146
146
  return window.location.pathname === "/";
147
147
  };
148
148
 
149
- const controlVisibility = function(currentUrl) {
149
+ const controlVisibility = function (currentUrl) {
150
150
  const sidebar = document.querySelector(".sidebar");
151
151
  const overlay = document.querySelector("#overlay");
152
152
  const topbarButton = document.querySelector(".topbar-btn");
@@ -158,12 +158,10 @@ function _handleSimpleSidebar (e) {
158
158
  overlay.style.display = "none";
159
159
  topbarButton.style.display = "flex";
160
160
  topbarClose.style.display = "none";
161
- } else {
162
- sidebar.classList.add("visible");
163
161
  }
164
162
  };
165
163
 
166
- document.addEventListener("DOMContentLoaded", function() {
164
+ document.addEventListener("DOMContentLoaded", function () {
167
165
  const topbarButton = document.querySelector(".topbar-btn");
168
166
  const newTopbarButton = topbarButton.cloneNode(true);
169
167
  const sidebar = document.querySelector(".sidebar");
@@ -179,7 +177,7 @@ function _handleSimpleSidebar (e) {
179
177
  overlay.style.display = "block";
180
178
  }
181
179
 
182
- newTopbarButton.addEventListener("click", function(e) {
180
+ newTopbarButton.addEventListener("click", function (e) {
183
181
  if (sidebar.classList.contains("visible")) {
184
182
  sidebar.classList.remove("visible");
185
183
  newTopbarButton.style.display = "flex";
@@ -194,7 +192,7 @@ function _handleSimpleSidebar (e) {
194
192
  }
195
193
  });
196
194
 
197
- topbarClose.addEventListener("click", function(e) {
195
+ topbarClose.addEventListener("click", function (e) {
198
196
  if (sidebar.classList.contains("visible")) {
199
197
  sidebar.classList.remove("visible");
200
198
  newTopbarButton.style.display = "flex";
@@ -208,7 +206,7 @@ function _handleSimpleSidebar (e) {
208
206
  }
209
207
  });
210
208
 
211
- overlay.addEventListener("click", function(e) {
209
+ overlay.addEventListener("click", function (e) {
212
210
  if (sidebar.classList.contains("visible")) {
213
211
  sidebar.classList.remove("visible");
214
212
  newTopbarButton.style.display = "flex";
@@ -217,15 +215,15 @@ function _handleSimpleSidebar (e) {
217
215
  }
218
216
  });
219
217
 
220
- document.querySelectorAll(".nav-leaf a").forEach(function(a) {
221
- a.addEventListener("click", function(e) {
218
+ document.querySelectorAll(".nav-leaf a").forEach(function (a) {
219
+ a.addEventListener("click", function (e) {
222
220
  controlVisibility(e.target.href);
223
221
  });
224
222
  });
225
223
 
226
224
  topbarButton.parentNode.replaceChild(newTopbarButton, topbarButton);
227
225
 
228
- searchButton.addEventListener("click", function(e) {
226
+ searchButton.addEventListener("click", function (e) {
229
227
  const searchInput = document.querySelector(".search-input");
230
228
  const searchBtn = document.querySelector("#search-btn");
231
229
  return false;
@@ -233,9 +231,8 @@ function _handleSimpleSidebar (e) {
233
231
  });
234
232
  })();
235
233
 
236
-
237
234
  // Initialize Tipue search
238
- (function() {
235
+ (function () {
239
236
  $(document).ready(function () {
240
237
  $("#tipue_search_input").tipuesearch();
241
238
  });
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.5.5'
7
+ '2.6.1'
8
8
  end
9
9
  end
10
10
  end
@@ -65,9 +65,9 @@ module SwedbankPay
65
65
  end
66
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'.
68
+ return unless current_page.path == '/search/' || current_page.path == '/'
69
+
70
+ # On 'home' or 'search', set the 'class' to 'sidebar dg-sidebar' to effectively remove 'has-secondary-nav'.
71
71
  current_page.doc.xpath('//*[@id="dg-sidebar"]').first.set_attribute('class', 'sidebar dg-sidebar')
72
72
  end
73
73
 
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.5.5
4
+ version: 2.6.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: 2025-06-10 00:00:00.000000000 Z
11
+ date: 2025-07-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -445,6 +445,7 @@ files:
445
445
  - _sass/paragraph-highlight.scss
446
446
  - _sass/sidebar.scss
447
447
  - _sass/swedbank-pay-design-guide-theme.scss
448
+ - _sass/tipue_search.scss
448
449
  - _sass/title-header.scss
449
450
  - _sass/variables.scss
450
451
  - assets/css/pygments-autumn.css