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

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f92dcd253d65caf6bcc5ac6663cf8fef62eda89950bc5a0279d6d6893c436ad7
4
- data.tar.gz: 76218fadaf01fde1ec62db738d8b7a02f382121dc3864a367e992a6eb31a81a1
3
+ metadata.gz: 566ba26f6230e74ab04ec6e8b2fb69c2c1a289b5ce565ef7c71ebbdec36288c7
4
+ data.tar.gz: c4e5893779e945141756b3e96d9b35d9a1a038dd101c55987aaba0bf6a98dc90
5
5
  SHA512:
6
- metadata.gz: 12d0597e1ed06b31f81ef396347e6ba3cfbffeb6b7fd3a997092def427e12d154a044d41bc9c6763ba69a19ff2a3340e87e2ee93c0a7ef32c78736b950288761
7
- data.tar.gz: 4521b44c5016625b6af1fb6b4eb1e4cc41f067224a11fb72b1696690ef76b1a25223ff2bc805c2fae189e68cc12fbcc9872e48103637fc432c74e937bb6f7f4f
6
+ metadata.gz: ac4010b99bb84102ed7c62af444a4bca86a8990a248251939fb71d2df5e2a770e6e4a4b4cf37613fa7b9f973867163e7813c5f0577cdaddc720dbc24b1a146e4
7
+ data.tar.gz: 8b922ba6da23f09aa579ca1fc0db09e6b97507d29bb12a80a89fd70bacc4ac0fa148c4d836889d168dc9eba730b4f0be5511dff0be4a19578dca683e2f8a4357
@@ -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="50" 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>
@@ -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
15
  {%- assign design_guide_version = site.design_guide.version | default: '4.8.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
+ onblur="this.placeholder='Search in documentation'"
81
+ pattern=".{3,}"
82
+ title="At least 3 characters">
80
83
  <label for="search-input" class="mb-0">
81
84
  <i class="material-icons m-0" aria-hidden="true">search</i>
82
85
  </label>
83
- </div>
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
+ }
@@ -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 {
@@ -292,4 +292,20 @@ a[href ^='https://']:not([href *='{{ site.url }}']):after {
292
292
  font-size: 1rem !important;
293
293
  }
294
294
  }
295
+
296
+ .github {
297
+ opacity: .5;
298
+ position: absolute;
299
+ right: 4rem;
300
+ top: 4rem;
301
+ transition: opacity .3s;
302
+ }
303
+
304
+ a.github:after {
305
+ display: none;
306
+ }
307
+
308
+ a.github:hover {
309
+ opacity: 1;
310
+ }
295
311
  }
@@ -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.5'
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'
@@ -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.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: 2020-11-24 00:00:00.000000000 Z
11
+ date: 2020-11-30 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
@@ -270,6 +274,7 @@ files:
270
274
  - assets/tipuesearch/tipuesearch_content.js
271
275
  - assets/tipuesearch/tipuesearch_set.js
272
276
  - lib/gem_version.rb
277
+ - lib/regex_capture_filter.rb
273
278
  - lib/safe_merge.rb
274
279
  - lib/sanitized_filename.rb
275
280
  - lib/sidebar.rb
@@ -1,3 +0,0 @@
1
- # frozen_string_literal: false
2
-
3
- require_relative '../lib/sidebar'