swedbank-pay-design-guide-jekyll-theme 1.9.4 → 1.9.9

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: f92dcd253d65caf6bcc5ac6663cf8fef62eda89950bc5a0279d6d6893c436ad7
4
- data.tar.gz: 76218fadaf01fde1ec62db738d8b7a02f382121dc3864a367e992a6eb31a81a1
3
+ metadata.gz: d2d2b335743d0a94cb65044496633ed1ce67af7a5771947daa2d4d4226b07868
4
+ data.tar.gz: fe9ac409a1d26ef80fa259c7366ccffbfd915e071c9b0398b63961b3d9642439
5
5
  SHA512:
6
- metadata.gz: 12d0597e1ed06b31f81ef396347e6ba3cfbffeb6b7fd3a997092def427e12d154a044d41bc9c6763ba69a19ff2a3340e87e2ee93c0a7ef32c78736b950288761
7
- data.tar.gz: 4521b44c5016625b6af1fb6b4eb1e4cc41f067224a11fb72b1696690ef76b1a25223ff2bc805c2fae189e68cc12fbcc9872e48103637fc432c74e937bb6f7f4f
6
+ metadata.gz: 18b0518c041bca19cd867b5abda56dc60e45de2a38c925819d6e0eb88205bd65024e75eb41b875af2cafb57812a89854de644e00c1e5f70666d4c8604cce57bd
7
+ data.tar.gz: d0f3d78eb5c9071d223596f2dea1cfa145c3ceb69a568ff66ba01285473194ef43c6c0c2f94a253ddfdb3c9f9f66997a86f8216735cb21b8dc57a6e6e2c0ce9e
@@ -0,0 +1,11 @@
1
+ {% assign content = include.content | markdownify%}
2
+
3
+ <div class="accordion accordion-table mb-4">
4
+ <button type="button" class="accordion-header pt-0" aria-expanded="false" aria-controls="exp-1">
5
+ <span class="mr-3 show">Show properties</span>
6
+ <span class="mr-3 hide">Hide properties</span>
7
+ </button>
8
+ <div class="accordion-body p-0" id="exp-1">
9
+ {{ content }}
10
+ </div>
11
+ </div>
@@ -10,7 +10,7 @@
10
10
  {%- capture device_height_string -%}
11
11
  (device-height: {{ device_height }})
12
12
  {%- endcapture -%}
13
- {%- if device_orientation != nil && device_orientation != empty -%}
13
+ {%- if device_orientation != nil and device_orientation != empty -%}
14
14
  {%- capture device_orientation_string -%}
15
15
  (orientation: {{ device_orientation }}) and
16
16
  {%- endcapture -%}
@@ -0,0 +1,11 @@
1
+ {% assign github_branch = site.github.branch | default : "develop" %}
2
+
3
+ <a href="{{ site.github.repository_url }}/tree/{{ github_branch }}/{{ page.path }}"
4
+ class="github" target="_blank"
5
+ rel="noopener noreferrer" title="Edit '{{ page.title }}' on GitHub">
6
+ <svg aria-labelledby="simpleicons-github-icon" role="img" width="40" viewBox="0 0 24 24"
7
+ xmlns="http://www.w3.org/2000/svg">
8
+ <title id="simpleicons-github-icon">Edit "{{ page.title }}" on GitHub</title>
9
+ <path fill="#fff" d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" />
10
+ </svg>
11
+ </a>
@@ -5,13 +5,13 @@
5
5
 
6
6
  <nav class="iterator d-flex">
7
7
  {% if prev_href != blank and prev_href != empty and prev_href != nil %}
8
- <a class="mr-auto btn btn-primary" role="button" rel="prev" href="{{ prev_href }}">
8
+ <a class="mr-auto btn btn-secondary" role="button" rel="prev" href="{{ prev_href }}">
9
9
  {{ prev_title }}
10
10
  </a>
11
11
  {% endif %}
12
12
 
13
13
  {% if next_href != blank and next_href != empty and next_href != nil %}
14
- <a class="ml-auto btn btn-primary" role="button" rel="next" href="{{ next_href }}">
14
+ <a class="ml-auto btn btn-secondary" role="button" rel="next" href="{{ next_href }}">
15
15
  {{ next_title }}
16
16
  </a>
17
17
  {% endif %}
@@ -1,24 +1,25 @@
1
1
  {% assign num_dates = include.num_dates %}
2
- {% assign pages = site.pages %}
3
- {% for node in pages %}
4
- {% if node.url contains '/resources/release-notes' %}
2
+ {% for page in site.pages %}
3
+ {% assign release_notes_url = '/resources/release-notes' %}
4
+ {% if page.url contains release_notes_url %}
5
5
  <div class="release-notes-container">
6
- {% assign dates = node.content | markdownify | split: '<h2' | | slice: 1, num_dates %}
7
- {% assign variable = value %}
6
+ {% assign dates = page.content | markdownify | split: '<h2' | slice: 1, num_dates %}
8
7
 
9
8
  {% for date in dates %}
10
9
  <div class="row">
11
10
  {% assign versions = date | split: '<h3' %}
11
+ {% assign date_id = date | regex_capture: 'id="([^"]+)"' | first %}
12
12
  <div class="col-md-2 release-notes-date">
13
- {% assign date_value = versions[0] | remove: '</h2>' | | split: '>' %}
14
- {{ date_value[1] }}
13
+ {% assign date_value = versions[0] | remove: '</h2>' | split: '>' %}
14
+ <a href="{{ release_notes_url }}#{{ date_id }}">{{ date_value[1] | strip }}</a>
15
15
  </div>
16
16
  {% assign version_list = versions | shift %}
17
17
  <div class="col-md-10">
18
18
  {% for version in version_list %}
19
- {% assign version_parts = version | | split: '</h3>' %}
19
+ {% assign version_parts = version | split: '</h3>' %}
20
20
  {% assign version_value = version_parts[0] | split: '>' %}
21
- <p class="h4">{{ version_value[1] }}</p>
21
+ {% assign version_id = version | regex_capture: 'id="([^"]+)"' | first %}
22
+ <p class="h4"><a href="{{ release_notes_url }}#{{ version_id }}">{{ version_value[1] }}</a></p>
22
23
  {{ version_parts[1] }}
23
24
  {% endfor %}
24
25
  </div>
@@ -26,4 +27,4 @@
26
27
  {% endfor %}
27
28
  </div>
28
29
  {% endif %}
29
- {% endfor %}
30
+ {% endfor %}
@@ -29,4 +29,6 @@
29
29
  <p>{{ description | markdownify }}</p>
30
30
  {% endif %}
31
31
  </div>
32
+
33
+ {% include github.html %}
32
34
  </div>
@@ -1,31 +1,30 @@
1
- {%- assign title = page.title | default: "PayEx Design Guide theme for Jekyll" -%}
1
+ {%- assign lead_title = page.lead_title -%}
2
+ {%- if lead_title == nil and page.sidebar.navigation == nil -%}
3
+ {%- unless page.name contains "index" -%}
4
+ {%- assign dirname = page.dir | split: "/" | last | remove: "/" | capitalize -%}
5
+ {%- unless dirname == "" -%}
6
+ {%- assign lead_title = dirname -%}
7
+ {%- endunless -%}
8
+ {%- endunless -%}
9
+ {%- endif -%}
10
+ {%- assign main_title = page.main_title | default: page.title | default: "PayEx Design Guide theme for Jekyll" -%}
11
+ {%- capture title -%}{%- if lead_title != nil -%}{{ lead_title }} – {% endif %}{{ main_title }}{%- endcapture -%}
2
12
  {%- assign description = page.opengraph.description | default: site.opengraph.description -%}
3
13
  {%- assign image = page.opengraph.image | default: site.opengraph.image -%}
4
- {%- assign github_branch = site.github.branch | default : "develop" -%}
5
14
  {%- assign design_guide_base_url = site.design_guide.base_url | default: 'https://design.swedbankpay.com' -%}
6
- {%- assign design_guide_version = site.design_guide.version | default: '4.8.1' -%}
15
+ {%- assign design_guide_version = site.design_guide.version | default: '5.0.1' -%}
7
16
  {%- assign design_guide_url = design_guide_base_url | append: '/v/' | append: design_guide_version -%}
8
- {%- if page.sidebar.navigation == nil -%}
9
- {%- unless page.name contains "index" -%}
10
- {%- assign dirname = page.dir | split: "/" | last | remove: "/" | capitalize -%}
11
- {%- unless dirname == "" -%}
12
- {%- assign title = dirname | append: " – " | append: title -%}
13
- {%- endunless -%}
14
- {%- endunless -%}
15
- {%- endif -%}
16
17
  <!DOCTYPE html>
17
18
  <html lang="{{ site.lang | default: "en-US" }}">
18
-
19
19
  <head>
20
20
  <meta charset="utf-8" />
21
21
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
22
22
  <meta name="mobile-web-app-capable" content="yes">
23
23
  <meta name="theme-color" content="#000">
24
- <meta name="application-name" content="{{ page.title }}">
24
+ <meta name="application-name" content="{{ title }}">
25
25
  <meta name="apple-mobile-web-app-capable" content="yes">
26
26
  <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
27
- <meta name="apple-mobile-web-app-title"
28
- content="{{ page.title | default: 'PayEx Design Guide theme for Jekyll' }}">
27
+ <meta name="apple-mobile-web-app-title" content="{{ title }}">
29
28
  <meta name="msapplication-TileColor" content="#000">
30
29
  <meta name="msapplication-TileImage" content="{{ design_guide_version_url }}/icons/mstile-144x144.png">
31
30
  <meta property="og:type" value="website" />
@@ -71,16 +70,21 @@
71
70
  <span>{</span>developer portal<span>}</span>
72
71
  </div>
73
72
  </a>
74
- <div class="search-container mx-2 my-4 px-3 py-2 d-flex ">
75
- <input type="text" id="search-input" class="search-input w-100 "
73
+ {% if site.search.enabled == true %}
74
+ <form class="search-container mx-2 my-4 px-3 py-2 d-flex"
75
+ method="get" action="{{ site.search.url | relative_url }}">
76
+ <input name="q" type="text" id="tipue_search_input"
77
+ class="search-input w-100 "
76
78
  placeholder="Search in documentation"
77
79
  onfocus="this.placeholder=''"
78
- onblur="this.placeholder='Search in documentation'">
79
-
80
- <label for="search-input" class="mb-0">
80
+ onblur="this.placeholder='Search in documentation'"
81
+ pattern=".{3,}"
82
+ title="At least 3 characters">
83
+ <button class="mb-0">
81
84
  <i class="material-icons m-0" aria-hidden="true">search</i>
82
- </label>
83
- </div>
85
+ </button>
86
+ </form>
87
+ {% endif %}
84
88
  <ul id="dx-sidebar-main-nav-ul" class="main-nav-ul">
85
89
  </ul>
86
90
  </nav>
@@ -21,6 +21,8 @@ layout: default
21
21
  <h2 id="front-page-start" class="heading-line heading-line-white">{{ front_page_start_heading }}</h2>
22
22
  {% contentblock start %}
23
23
  </div>
24
+
25
+ {% include github.html %}
24
26
  </div>
25
27
  <div class="front-page-container">
26
28
  {% if show_merchants_bar == true %}
@@ -0,0 +1,5 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ <div id="tipue_search_content"></div>
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../lib/swedbank-pay-design-guide-jekyll-theme'
@@ -0,0 +1,96 @@
1
+ @import 'colors.scss';
2
+
3
+ .accordion {
4
+ align-items: center;
5
+
6
+ &.accordion-table {
7
+ border: none;
8
+
9
+ .show {
10
+ display: block;
11
+ }
12
+
13
+ .hide {
14
+ display: none;
15
+ }
16
+
17
+ &.accordion-open {
18
+ border: none;
19
+
20
+ .show {
21
+ display: none;
22
+ }
23
+
24
+ .hide {
25
+ display: block;
26
+ }
27
+ }
28
+
29
+ .accordion-header {
30
+ &:before {
31
+ bottom: 1rem;
32
+ margin: auto;
33
+ transition: .3s;
34
+ color: $brown;
35
+ }
36
+
37
+ span {
38
+ font-weight: normal;
39
+ }
40
+ &:hover {
41
+ span {
42
+ font-weight: bold;
43
+ }
44
+ }
45
+ }
46
+
47
+ .accordion-body {
48
+ @media (min-width: 1250px) {
49
+ width: 70vw;
50
+ max-width: 80rem;
51
+ }
52
+ }
53
+
54
+ table {
55
+ border: 1px solid rgba(153, 153, 153, 0.5);
56
+ border-radius: 0.25rem;
57
+
58
+ th {
59
+ font-size: 0.875rem;
60
+ }
61
+
62
+ tbody {
63
+ font-size: 0.875rem;
64
+
65
+ tr:nth-child(odd) {
66
+ background-color: #F9F8F6;
67
+ }
68
+
69
+ tr {
70
+ td:not(:last-child) {
71
+ font-family: $mono;
72
+
73
+ code {
74
+ border: none;
75
+ background-color: transparent;
76
+ padding: 0;
77
+ }
78
+ }
79
+
80
+ td:not(:last-child):not(:nth-last-child(2)) {
81
+ code {
82
+ font-weight: 700;
83
+ }
84
+ }
85
+ }
86
+
87
+ tr {
88
+ &:hover {
89
+ background-color: $apricot;
90
+ transition: .5s;
91
+ }
92
+ }
93
+ }
94
+ }
95
+ }
96
+ }
@@ -83,6 +83,10 @@ $front-page-max-width: 1312px;
83
83
  color: $white;
84
84
  font-size: 1.125rem;
85
85
  }
86
+
87
+ a {
88
+ color: #43d0dd;
89
+ }
86
90
 
87
91
  .front-page-hero-name {
88
92
  font-family: $mono;
@@ -58,6 +58,12 @@
58
58
  }
59
59
  }
60
60
 
61
+ button {
62
+ background-color: $white;
63
+ border: none;
64
+ cursor: pointer;
65
+ }
66
+
61
67
  }
62
68
 
63
69
  .main-nav-ul {
@@ -7,6 +7,7 @@
7
7
  @import 'code-view.scss';
8
8
  @import 'front-page.scss';
9
9
  @import 'heading.scss';
10
+ @import 'accordion-table.scss';
10
11
  @import 'paragraph-highlight.scss';
11
12
  @import 'sidebar.scss';
12
13
  @import 'title-header.scss';
@@ -23,7 +24,6 @@ body {
23
24
  }
24
25
 
25
26
  .table {
26
-
27
27
  th,
28
28
  td {
29
29
  >.material-icons {
@@ -125,6 +125,9 @@ a[href ^='https://']:not([href *='{{ site.url }}']):after {
125
125
  }
126
126
 
127
127
  .documentation {
128
+ .doc-container {
129
+ max-width: 100%;
130
+ }
128
131
  code[data-processed='true'].language-mermaid {
129
132
  background: none;
130
133
  border: none;
@@ -292,4 +295,20 @@ a[href ^='https://']:not([href *='{{ site.url }}']):after {
292
295
  font-size: 1rem !important;
293
296
  }
294
297
  }
298
+
299
+ .github {
300
+ opacity: .5;
301
+ position: absolute;
302
+ right: 4rem;
303
+ top: 4rem;
304
+ transition: opacity .3s;
305
+ }
306
+
307
+ a.github:after {
308
+ display: none;
309
+ }
310
+
311
+ a.github:hover {
312
+ opacity: 1;
313
+ }
295
314
  }
@@ -34,6 +34,10 @@
34
34
  }
35
35
  a {
36
36
  color: #43d0dd;
37
+
38
+ ::after {
39
+ content: url(../img/external-url-dark-bg.svg);
40
+ }
37
41
  }
38
42
  }
39
43
 
@@ -0,0 +1 @@
1
+ <svg style="fill: #43d0dd; stroke: #43d0dd" enable-background="new 0 0 17 17" viewBox="0 0 17 17" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="m17 0v7l-2.8-2.8-8.2 8.2-1.4-1.4 8.2-8.2-2.8-2.8zm-3 17h-14v-14h8v2h-6v10h10v-6h2z" fill-rule="evenodd"/></svg>
@@ -4,7 +4,7 @@ module Gem
4
4
  # Gem Specification
5
5
  class Specification
6
6
  def self.gem_version
7
- '1.9.4'
7
+ '1.9.9'
8
8
  end
9
9
  end
10
10
  end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'liquid'
4
+
5
+ # Jekyll
6
+ module Jekyll
7
+ # Adds a 'regex_capture' filter to Liquid. Performs a regular expression match
8
+ # on the provided string and returns the capture as an array. Example usage:
9
+ # {{ html | regex_capture: 'id="([^"]+)"' | first }}
10
+ module RegexCaptureFilter
11
+ def regex_capture(str, regex)
12
+ match = /#{regex}/.match(str)
13
+ match ? match.captures : []
14
+ end
15
+ end
16
+ end
17
+
18
+ Liquid::Template.register_filter(Jekyll::RegexCaptureFilter)
@@ -1,4 +1,4 @@
1
- # frozen_string_literal: false
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'jekyll'
4
4
  require 'nokogiri'
@@ -1,4 +1,4 @@
1
- # frozen_string_literal: false
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'jekyll'
4
4
  require 'nokogiri'
@@ -56,6 +56,11 @@ module SwedbankPay
56
56
  end
57
57
 
58
58
  def hidden_for?(other_page)
59
+ if @jekyll_page.data['layout'] == 'search'
60
+ # Never show the search result page in the menu.
61
+ return true
62
+ end
63
+
59
64
  # The current page should be hidden for the other page unless the
60
65
  # other page is also hidden.
61
66
  hidden = hidden?
@@ -1,4 +1,4 @@
1
- # frozen_string_literal: false
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'forwardable'
4
4
 
@@ -1,3 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative 'sidebar'
4
+ require_relative 'regex_capture_filter'
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: 1.9.4
4
+ version: 1.9.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Swedbank Pay
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-24 00:00:00.000000000 Z
11
+ date: 2021-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -207,6 +207,7 @@ extra_rdoc_files: []
207
207
  files:
208
208
  - LICENSE
209
209
  - README.md
210
+ - _includes/accordion-table.html
210
211
  - _includes/alert.html
211
212
  - _includes/anchor_headings.html
212
213
  - _includes/apple-mobile-headers.html
@@ -217,6 +218,7 @@ files:
217
218
  - _includes/card-horizontal-list.html
218
219
  - _includes/card-list.html
219
220
  - _includes/card.html
221
+ - _includes/github.html
220
222
  - _includes/google_analytics.html
221
223
  - _includes/img/merchants/logo-coop.svg
222
224
  - _includes/img/merchants/logo-elkjop.svg
@@ -243,7 +245,9 @@ files:
243
245
  - _includes/toc.html
244
246
  - _layouts/default.html
245
247
  - _layouts/front-page.html
246
- - _plugins/sidebar.rb
248
+ - _layouts/search.html
249
+ - _plugins/swedbank-pay-design-guide-jekyll-theme.rb
250
+ - _sass/accordion-table.scss
247
251
  - _sass/breakpoints.scss
248
252
  - _sass/card.scss
249
253
  - _sass/code-view.scss
@@ -262,6 +266,7 @@ files:
262
266
  - assets/img/demoshop-mobile2.svg
263
267
  - assets/img/demoshop-web.svg
264
268
  - assets/img/demoshop.svg
269
+ - assets/img/external-url-dark-bg.svg
265
270
  - assets/img/external-url.svg
266
271
  - assets/js/mermaid.min.js
267
272
  - assets/js/swedbank-pay-design-guide-theme.js
@@ -270,6 +275,7 @@ files:
270
275
  - assets/tipuesearch/tipuesearch_content.js
271
276
  - assets/tipuesearch/tipuesearch_set.js
272
277
  - lib/gem_version.rb
278
+ - lib/regex_capture_filter.rb
273
279
  - lib/safe_merge.rb
274
280
  - lib/sanitized_filename.rb
275
281
  - lib/sidebar.rb
@@ -1,3 +0,0 @@
1
- # frozen_string_literal: false
2
-
3
- require_relative '../lib/sidebar'