swedbank-pay-design-guide-jekyll-theme 2.6.0 → 2.6.2

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: 5f064c159a68f7f5ad682ffc591d3f2bb7bac1fd8fa59eec465307b87fe6544a
4
- data.tar.gz: e6214d9121ffbacd0723992c3dcbc3c7181c3e4e04c589f8e34b69592dea3057
3
+ metadata.gz: 5139b7dd89db56dad179299ec6cec015bb8fe5b1e39c61836faee0d9fb601684
4
+ data.tar.gz: e470ceff59f60ac7d70662870ad4455853d3c21e1d454a021db43ef9587aa498
5
5
  SHA512:
6
- metadata.gz: 1d0a28aef9616de7940d184f845b6af4e99741d57a6397724a75ccbb0d0908160512699b61a68c35acf6b31ead7af147cea52e921c3e846759771dafb2888945
7
- data.tar.gz: de9915b0c2305b9b49d8c80129339e38ecae283e84ba7b13efae52344b0920c61144659aab5786001cee2ddc793b0dad4a3429c9cdb7bf8e884c5efa708a2080
6
+ metadata.gz: 4b696cb70a20ead6259e2330c4940781ea244d460b02825dff78123f6584a4a6cd35c021209956b96b6f3e9bd9e86fb794c2f5af0d399fc8f2bfc1c5af2ce881
7
+ data.tar.gz: '099f4a79c0ce99dcdb8814edde76eba24ff5ec5dd3c6d285f90af97b151aae176e1bfcc7a82002973ed61ee9bb495883572b4cf26b648efa22a3ee874e06d24c'
@@ -16,7 +16,6 @@ Original creator: https://sebnitu.com/2016/10/13/dynamic-menus-in-jekyll/
16
16
  placeholder="Search..." autocomplete="off" pattern=".{3,}"
17
17
  title="At least 3 characters">
18
18
  </form>
19
- <p id="search-hint-text" class="hint-text">Tip: Try using quotes for more precise results.</p>
20
19
  {% endif %}
21
20
 
22
21
  <ul class="main-nav-ul">
@@ -87,7 +87,6 @@
87
87
  <i class="material-icons-outlined" aria-hidden="true">search</i>
88
88
  </button>
89
89
  </form>
90
- <p id="search-hint-text" class="hint-text">Tip: Try using quotes for more precise results.</p>
91
90
  {% endif %}
92
91
  </div>
93
92
  <div class="d-md-flex">
data/_layouts/search.html CHANGED
@@ -6,7 +6,7 @@ layout: default
6
6
  placeholder="Search in documentation" onfocus="this.placeholder=''"
7
7
  onblur="this.placeholder='Search in documentation'" pattern=".{3,}" title="At least 3 characters">
8
8
  <script>
9
- (function() {
9
+ (function () {
10
10
  var params = new URLSearchParams(window.location.search);
11
11
  var q = params.get('q');
12
12
  if (q) {
@@ -18,6 +18,7 @@ layout: default
18
18
  <i class="material-icons-outlined" aria-hidden="true">search</i>
19
19
  </button>
20
20
  </form>
21
- <p id="search-hint-text" class="hint-text mb-5">Tip: Try using quotes for more precise results. Ex: "online payments"</p>
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 compared to <code>"online payments"</code>.</p>
22
23
 
23
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%);
@@ -472,8 +473,7 @@ body {
472
473
  border-bottom-left-radius: var(--border-radius);
473
474
  }
474
475
 
475
- #tipue_search_input,
476
- #search-hint-text {
476
+ #tipue_search_input {
477
477
  display: none;
478
478
  }
479
479
 
@@ -483,10 +483,6 @@ body {
483
483
  }
484
484
  }
485
485
 
486
- .light {
487
- color: white !important;
488
- }
489
-
490
486
  .topbar-logo {
491
487
  @media screen and (max-width: $breakpoint-sm) {
492
488
  display: block;
@@ -0,0 +1,51 @@
1
+ #tipue_search_content {
2
+
3
+ nav {
4
+ display: flex;
5
+ font-family: Swedbank Headline, Arial, sans-serif;
6
+ justify-content: center;
7
+ margin: 1rem 0;
8
+ padding-left: 0;
9
+
10
+ ul {
11
+ display: flex;
12
+ color: #2f2424;
13
+ margin-top: 0;
14
+ margin-bottom: 0;
15
+ padding-left: 0;
16
+ line-height: 24px;
17
+
18
+ li {
19
+ border-radius: .125rem;
20
+ display: flex;
21
+ margin: .5rem;
22
+ color: #2f2424;
23
+
24
+ a {
25
+ border: 2px solid transparent;
26
+ color: #2f2424;
27
+ cursor: pointer;
28
+ min-width: 1.75rem;
29
+ padding-top: .1rem;
30
+ text-align: center;
31
+ -webkit-text-decoration: none;
32
+ text-decoration: none;
33
+ max-height: 29.6px;
34
+
35
+ &:hover {
36
+ border: 2px solid #2f2424;
37
+ border-radius: .125rem;
38
+ }
39
+ }
40
+
41
+ &.current {
42
+ background-color: #2f2424;
43
+
44
+ a {
45
+ color: white;
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }
@@ -231,58 +231,6 @@ function _handleSimpleSidebar(e) {
231
231
  });
232
232
  })();
233
233
 
234
- //set SearchHintText color depending on background
235
- (function () {
236
- document.addEventListener("DOMContentLoaded", function () {
237
- const searchHintTexts = document.querySelectorAll("#search-hint-text");
238
- let visibleSearchHintText = null;
239
- searchHintTexts.forEach(function (el) {
240
- if (el.offsetParent !== null) { // visible in DOM
241
- visibleSearchHintText = el;
242
- }
243
- });
244
- if (visibleSearchHintText) {
245
- let parentElement = visibleSearchHintText.parentElement;
246
- let siblingWithTitleHeader = null;
247
- if (parentElement && parentElement.nextElementSibling) {
248
- siblingWithTitleHeader = parentElement.nextElementSibling.querySelector(".title-header");
249
- }
250
-
251
- let bgColor = "white";
252
-
253
- if (siblingWithTitleHeader) {
254
- bgColor = window.getComputedStyle(siblingWithTitleHeader).backgroundColor;
255
- }
256
-
257
- // Check for fully transparent background
258
- const isTransparent = bgColor === "transparent" || /^rgba\(\s*\d+,\s*\d+,\s*\d+,\s*0\s*\)$/.test(bgColor);
259
-
260
- // Function to calculate luminance
261
- function getLuminance(rgb) {
262
- const match = rgb.match(/\d+/g);
263
- if (!match) return 1; // fallback to white
264
- // Convert to sRGB
265
- let [r, g, b] = match.map(Number).map(v => v / 255);
266
- [r, g, b] = [r, g, b].map(c => {
267
- return c <= 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4);
268
- });
269
- return 0.2126 * r + 0.7152 * g + 0.0722 * b;
270
- }
271
-
272
- let luminance = 1; // default to high luminance
273
- if (!isTransparent) {
274
- luminance = getLuminance(bgColor);
275
- }
276
-
277
- // Set color: dark text on light bg, light text on dark bg
278
- if (luminance > 0.5)
279
- visibleSearchHintText.classList.remove("light");
280
- else
281
- visibleSearchHintText.classList.add("light");
282
- }
283
- });
284
- })();
285
-
286
234
  // Initialize Tipue search
287
235
  (function () {
288
236
  $(document).ready(function () {
@@ -1,4 +1,4 @@
1
- (function($){$.fn.tipuesearch=function(options){var set=$.extend({'contentLocation':'tipuesearch/tipuesearch_content.json','contextBuffer':60,'contextLength':60,'contextStart':90,'debug':false,'descriptiveWords':25,'highlightTerms':true,'liveContent':'*','liveDescription':'*','minimumLength':3,'mode':'static','newWindow':false,'show':9,'showContext':true,'showRelated':true,'showTime':true,'showTitleCount':true,'showURL':true,'wholeWords':true},options);return this.each(function(){var tipuesearch_in={pages:[]};$.ajaxSetup({async:false});var tipuesearch_t_c=0;$('#tipue_search_content').hide().html('<div class="tipue_search_spinner"><div class="tipue_search_rect1"></div><div class="tipue_search_rect2"></div><div class="rect3"></div></div>').show();if(set.mode=='live')
1
+ (function($){$.fn.tipuesearch=function(options){var set=$.extend({'contentLocation':'tipuesearch/tipuesearch_content.json','contextBuffer':60,'contextLength':60,'contextStart':90,'debug':false,'descriptiveWords':25, 'footerPages':10,'highlightTerms':true,'liveContent':'*','liveDescription':'*','minimumLength':3,'mode':'static','newWindow':false,'show':10,'showContext':true,'showRelated':true,'showTime':true,'showTitleCount':true,'showURL':true,'wholeWords':true},options);return this.each(function(){var tipuesearch_in={pages:[]};$.ajaxSetup({async:false});var tipuesearch_t_c=0;$('#tipue_search_content').hide().html('<div class="tipue_search_spinner"><div class="tipue_search_rect1"></div><div class="tipue_search_rect2"></div><div class="rect3"></div></div>').show();if(set.mode=='live')
2
2
  {for(var i=0;i<tipuesearch_pages.length;i++)
3
3
  {$.get(tipuesearch_pages[i]).done(function(html)
4
4
  {var cont=$(set.liveContent,html).text();cont=cont.replace(/\s+/g,' ');var desc=$(set.liveDescription,html).text();desc=desc.replace(/\s+/g,' ');var t_1=html.toLowerCase().indexOf('<title>');var t_2=html.toLowerCase().indexOf('</title>',t_1+7);if(t_1!=-1&&t_2!=-1)
@@ -143,13 +143,14 @@ if(f)
143
143
  {out+='</div>';}}
144
144
  if(c>set.show)
145
145
  {var pages=Math.ceil(c / set.show);var page=(start / set.show);out+='<nav><div id="tipue_search_foot"><ul id="tipue_search_foot_boxes">';if(start>0)
146
- {out+='<li role="navigation"><a class="tipue_search_foot_box" accesskey="b" id="'+(start-set.show)+'_'+replace+'">'+tipuesearch_string_6+'</a></li>';}
146
+ {out+='<li role="navigation"><a class="tipue_search_foot_box" accesskey="b" id="'+(start-set.show)+'_'+replace+'"><i class="swepay-icon-chevron-left" aria-label="back"></i></a></li>';} //tipuesearch_string_6
147
147
  if(page<=2)
148
148
  {var p_b=pages;if(pages>3)
149
149
  {p_b=3;}
150
150
  for(var f=0;f<p_b;f++)
151
151
  {if(f==page)
152
- {out+='<li class="current" role="navigation">'+(f+1)+'</li>';}
152
+ //{out+='<li class="current" role="navigation">'+(f+1)+'</li>';}
153
+ {out+='<li class="current" role="navigation"><a class="tipue_search_foot_box" id="'+(f*set.show)+'_'+replace+'">'+(f+1)+'</a></li>';}
153
154
  else
154
155
  {out+='<li role="navigation"><a class="tipue_search_foot_box" id="'+(f*set.show)+'_'+replace+'">'+(f+1)+'</a></li>';}}}
155
156
  else
@@ -157,11 +158,12 @@ else
157
158
  {p_b=pages;}
158
159
  for(var f=page-1;f<p_b;f++)
159
160
  {if(f==page)
160
- {out+='<li class="current" role="navigation">'+(f+1)+'</li>';}
161
+ //{out+='<li class="current" role="navigation">'+(f+1)+'</li>';}
162
+ {out+='<li class="current" role="navigation"><a class="tipue_search_foot_box" id="'+(f*set.show)+'_'+replace+'">'+(f+1)+'</a></li>';}
161
163
  else
162
164
  {out+='<li role="navigation"><a class="tipue_search_foot_box" id="'+(f*set.show)+'_'+replace+'">'+(f+1)+'</a></li>';}}}
163
165
  if(page+1!=pages)
164
- {out+='<li role="navigation"><a class="tipue_search_foot_box" accesskey="m" id="'+(start+set.show)+'_'+replace+'">'+tipuesearch_string_7+'</a></li>';}
166
+ {out+='<li role="navigation"><a class="tipue_search_foot_box" accesskey="m" id="'+(start+set.show)+'_'+replace+'"><i class="swepay-icon-chevron-right" aria-label="forward"></i></a></li>';} //tipuesearch_string_7
165
167
  out+='</ul></div></nav>';}}
166
168
  else
167
169
  {out+='<div id="tipue_search_warning">'+tipuesearch_string_8+'</div>';}}
@@ -60,7 +60,7 @@ var tipuesearch_string_3 = 'Search instead for';
60
60
  var tipuesearch_string_4 = '1 result';
61
61
  var tipuesearch_string_5 = 'results';
62
62
  var tipuesearch_string_6 = 'Back';
63
- var tipuesearch_string_7 = 'More';
63
+ var tipuesearch_string_7 = 'Next';
64
64
  var tipuesearch_string_8 = 'Nothing found.';
65
65
  var tipuesearch_string_9 = 'Common words are largely ignored.';
66
66
  var tipuesearch_string_10 = 'Search too short';
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.6.0'
7
+ '2.6.2'
8
8
  end
9
9
  end
10
10
  end
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.6.0
4
+ version: 2.6.2
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-07-02 00:00:00.000000000 Z
11
+ date: 2025-07-03 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