swedbank-pay-design-guide-jekyll-theme 2.6.0 → 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: 5f064c159a68f7f5ad682ffc591d3f2bb7bac1fd8fa59eec465307b87fe6544a
4
- data.tar.gz: e6214d9121ffbacd0723992c3dcbc3c7181c3e4e04c589f8e34b69592dea3057
3
+ metadata.gz: 43f30d3e0dbcbb4f245c6b139c5088e377f9b31a7b3fabee50af5f221731e140
4
+ data.tar.gz: f3ca2d804cb52e7f7bfe07f170ce39a39bcc12468e71434f7444cf6627f188fa
5
5
  SHA512:
6
- metadata.gz: 1d0a28aef9616de7940d184f845b6af4e99741d57a6397724a75ccbb0d0908160512699b61a68c35acf6b31ead7af147cea52e921c3e846759771dafb2888945
7
- data.tar.gz: de9915b0c2305b9b49d8c80129339e38ecae283e84ba7b13efae52344b0920c61144659aab5786001cee2ddc793b0dad4a3429c9cdb7bf8e884c5efa708a2080
6
+ metadata.gz: 89660adaa6374392391b463406236f7730728c47438dc785978323b6686e81ea4da1ee2348178dc06711709e8e55380a82fe23e01cf97b5ff1f726a59fe451e5
7
+ data.tar.gz: b28a9be2d346fb985e8420d69800878742e462f480ec8d68ce9a1db21580c68c829bf107492cd11f932ce6e456ef96fa335f77ab6cc1f541b3af008c72b8ed75
@@ -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 compare 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,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
+ }
@@ -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 () {
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.1'
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
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.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Swedbank Pay
@@ -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