swedbank-pay-design-guide-jekyll-theme 2.5.0 → 2.5.3

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: 43e4e25eb102311920cdcf465e83ec1dc9aef878563a84bc023c2e5ac2102666
4
- data.tar.gz: 7fcb1155c5a6cb0d3e733f44557899d82cc0ac32b1df3e7be7688481b96d8daf
3
+ metadata.gz: 11e81f83b802c5728114c8ae18ea3ba6fe85fa41a2ec4b54af31ab4be81c4aa6
4
+ data.tar.gz: a3d10d13365d182d0ea57179e9ce884f7217123e699503d3fbf7f6e1f7390df7
5
5
  SHA512:
6
- metadata.gz: edb911d75c11b541a40466f7d6f23f7ec8d434f695406d8fd9c4cb3eaadaf6d9a01bfc7effd2f53e502feee79ddf0e033bd89c3562b145a6cc31e4b8dceecf9e
7
- data.tar.gz: 78f658977a7fa49f555d90a6a269a8ba0f2cc9db2de5a9a4a71519d261885576c4a0760f972f4bd2f93f8556eed90f5808de6478afe4f50c310d614b5757bf6b
6
+ metadata.gz: eed83c54a8aa5b80f8f6e3b01c783d4fd99c42c5e4b14950112a6e7ce1d2e361db2abb8eb371e4a771c6a5094f90439b36f89d66145e8e033bd9b4919f35ae0f
7
+ data.tar.gz: 3d7beb7aee16dbac5c83ad5d18a9ecee603c812cc86bfe25a420d70241b31a8f4bb6fb0d0093d5459010cebf24f851ca9d02b83ff4b7c99a16394e0b3e653895
@@ -3,7 +3,7 @@
3
3
  normal-padding
4
4
  {% elsif page.card_overview %}
5
5
  normal-padding max-width-card-overview
6
- {% elsif page.release_notes %}
6
+ {% elsif page.has_release_notes %}
7
7
  dg-front-page py-0
8
8
  {% else %}
9
9
  normal-padding max-width
@@ -14,8 +14,8 @@ normal-padding max-width
14
14
  <article>
15
15
  {% if page.card_overview %}
16
16
  {% include card-overview.html %}
17
- {% elsif page.release_notes %}
18
- {% include release_notes.html num_of_releases_to_display=5 release_notes_title="What's new in " %}
17
+ {% elsif page.has_release_notes %}
18
+ {% include release_notes.html num_of_releases_to_display=5 %}
19
19
  {% else %}
20
20
  {% include anchor_headings.html html=content anchorClass='header-anchor' %}
21
21
  {% endif %}
@@ -1,19 +1,32 @@
1
+ {%- comment -%}
2
+ **Parameters
3
+ release_notes: The release notes pages to use if sitePage.content cannot be used.
4
+ {%- endcomment -%}
5
+
6
+ {% assign release_notes = include.release_notes %}
1
7
  {% assign num_of_releases_to_display = include.num_of_releases_to_display %}
2
- {% assign release_notes_title = include.release_notes_title %}
8
+ {% assign min_cnt = num_of_releases_to_display | plus: 1 %}
9
+
10
+ {% if page.url contains '/release-notes' %}
11
+ {% if release_notes %}
12
+ {% assign max_cnt = release_notes | markdownify | split: '</h2>' | size %}
13
+ {% assign releases = release_notes | markdownify | split: '<h2' | slice: 1, num_of_releases_to_display %}
14
+ {% assign archive = release_notes | markdownify | split: '<h2' | slice: min_cnt, max_cnt %}
15
+ {% else %}
16
+ {% for sitePage in site.pages %}
17
+ {% if sitePage.url == page.url %}
18
+ {% assign max_cnt = sitePage.content | markdownify | split: '</h2>' | size %}
19
+ {% assign releases = sitePage.content | markdownify | split: '<h2' | slice: 1, num_of_releases_to_display %}
20
+ {% assign archive = sitePage.content | markdownify | split: '<h2' | slice: min_cnt, max_cnt %}
21
+ {% endif %}
22
+ {% endfor %}
23
+ {% endif %}
24
+ {% endif %}
25
+
3
26
  {% if page.url contains '/release-notes' %}
4
- {% for sitePage in site.pages %}
5
- {% if sitePage.url == page.url %}
6
- {% assign min_cnt = num_of_releases_to_display | plus: 1 %}
7
- {% assign max_cnt = sitePage.content | split: '</h2>' | size %}
8
- {% assign releases = sitePage.content | markdownify | split: '<h2' | slice: 1, num_of_releases_to_display %}
9
- {% assign archive = sitePage.content | markdownify | split: '<h2' | slice: min_cnt, max_cnt %}
10
27
  <section class="dg-changelog-container d-flex flex-column mb-0">
11
28
  <div class="container dg-changelog-content">
12
29
  <div class="row mt-3">
13
- <span class="dg-changlelog-title">
14
- {{ release_notes_title | append: sitePage.lead_title }}
15
- <div class="dg-changelog-divider my-2"></div>
16
- </span>
17
30
  {% include alert.html type="informative" icon="info" header="Version numbers"
18
31
  body="The version numbers used in headers on this page refers to the version of
19
32
  this very documentation, not to a version of any APIs described by it." %}
@@ -33,7 +46,7 @@
33
46
  {{ release_value[1] | strip }}
34
47
  </div>
35
48
  {% assign version_list = versions | shift %}
36
- <div class="dg-changelog-description px-0">
49
+ <div class="col dg-changelog-description px-0">
37
50
  {% for version in version_list %}
38
51
  {% assign version_parts = version | split: '</h3>' %}
39
52
  {% assign version_value = version_parts[0] | split: '>' %}
@@ -79,7 +92,4 @@
79
92
  {% endif %}
80
93
 
81
94
  </section>
82
- {% endif %}
83
-
84
- {% endfor %}
85
95
  {% endif %}
data/_includes/tabs.html CHANGED
@@ -1,8 +1,9 @@
1
1
  {%- comment -%}
2
2
  **Parameters
3
3
  tab_list(required): An array with items having the attributes title(required), content_text (required),
4
- content_src(optional), mark_with_star (optional)
4
+ content_src(optional), mark_with_star (optional).
5
5
  default_tab_index(optional): Index of the tab to be active by default, starting from 1
6
+ has_release_notes(optional): Indicate if the tabs contains release notes.
6
7
  {%- endcomment -%}
7
8
 
8
9
  {% assign tabs = include.tab_list %}
@@ -29,7 +30,12 @@ default_tab_index(optional): Index of the tab to be active by default, starting
29
30
  {% capture sourced_content %}
30
31
  {% include {{tab.content_src}} %}
31
32
  {% endcapture %}
33
+
34
+ {% if include.has_release_notes %}
35
+ {% include release_notes.html release_notes=sourced_content num_of_releases_to_display=5 %}
36
+ {% else %}
32
37
  {{ sourced_content | markdownify }}
38
+ {% endif %}
33
39
  </div>
34
40
  {% endif %}
35
41
  {% endfor %}
@@ -38,7 +44,13 @@ default_tab_index(optional): Index of the tab to be active by default, starting
38
44
  var defaultIndex = {{ default_tab_index | jsonify }};
39
45
  const allTabs = {{ tabs | jsonify }};
40
46
  const compiledTabTextContents = allTabs?.map(tab => tab.content_text);
41
- const compiledTabSrcContents = $(".tab-src");
47
+ const compiledTabSrcContents = $(".tab-src");
48
+ const hasReleaseNotes = {{ include.has_release_notes | jsonify }};
49
+ if(hasReleaseNotes){
50
+ const container = $(".doc-container");
51
+ container.attr("class", "doc-container dg-front-page py-0");
52
+ }
53
+
42
54
  </script>
43
55
 
44
56
  <script>
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.0'
7
+ '2.5.3'
8
8
  end
9
9
  end
10
10
  end
@@ -28,20 +28,22 @@ module SwedbankPay
28
28
  return if pages.empty?
29
29
 
30
30
  pages.each do |page|
31
- sidebar_html = render_sidebar(page)
32
- name = page.filename || page.name || page.to_s
31
+ unless page.filename.include?('404.html')
32
+ sidebar_html = render_sidebar(page)
33
+ name = page.filename || page.name || page.to_s
33
34
 
34
- if sidebar_html.nil?
35
- SidebarLogger.warn("No HTML rendered for #{name}.")
36
- next
37
- end
35
+ if sidebar_html.nil?
36
+ SidebarLogger.warn("No HTML rendered for #{name}.")
37
+ next
38
+ end
38
39
 
39
- if page.sidebar_container.nil?
40
- SidebarLogger.warn("No sidebar container found in '#{name}'. #{page.filename}")
41
- next
42
- end
40
+ if page.sidebar_container.nil?
41
+ SidebarLogger.warn("No sidebar container found in '#{name}'. #{page.filename}")
42
+ next
43
+ end
43
44
 
44
- page.sidebar_container.inner_html = sidebar_html
45
+ page.sidebar_container.inner_html = sidebar_html
46
+ end
45
47
 
46
48
  page.save
47
49
 
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.0
4
+ version: 2.5.3
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-03-28 00:00:00.000000000 Z
11
+ date: 2025-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday