swedbank-pay-design-guide-jekyll-theme 1.9.13 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/_includes/card-list.html +16 -13
- data/_includes/card-overview.html +12 -0
- data/_includes/doc-container.html +19 -0
- data/_layouts/default.html +2 -9
- data/lib/gem_version.rb +1 -1
- data/lib/sidebar_html_builder.rb +2 -2
- data/lib/sidebar_page.rb +10 -0
- data/lib/sidebar_page_collection.rb +4 -0
- data/lib/sidebar_parser.rb +10 -7
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d75a81c46fdd8b54db9bdedbd6f2ab116f3c5b39da55fe1e394b1194a44ecff
|
4
|
+
data.tar.gz: a5f07b043e51424f139e61eb40aac49f227a26dfd9b3976e634882836d2bd2d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb181bd3f5a33e421344f7dfa84991551dd3897a10f0cb3dbaaede72007ac4008d347d925e6b38290f8451e770bb59ffb1c8a2cf74210357118f2a9ce52755ee
|
7
|
+
data.tar.gz: d96ffc9da54916d3dbdc9cf8319e0091ccedcd37a6ab7488b4adecccfe2fc1423cde1b8a86a0d62fc95654b7afc1d03106eeacbd529319d7f55b7a74226f7207
|
data/_includes/card-list.html
CHANGED
@@ -7,22 +7,25 @@ type: sdk | module - Empty type result in default card styling
|
|
7
7
|
col_class(required): Describes what grid column class(es) each card should be wrapped in
|
8
8
|
{%- endcomment -%}
|
9
9
|
|
10
|
-
{% assign card_list = include.card_list %}
|
11
|
-
{% assign type = include.type %}
|
12
|
-
{% assign col_class = include.col_class %}
|
13
|
-
|
14
10
|
<div class="row card-list">
|
15
|
-
{% for card in card_list %}
|
11
|
+
{% for card in include.card_list %}
|
16
12
|
{% assign title = card.title | split: '–' | last %}
|
17
|
-
|
18
|
-
|
13
|
+
{% assign link_to = card.extensionless_path | default: card.url %}
|
14
|
+
{% assign card_type = card.card_type | default: include.type %}
|
15
|
+
{% assign icon_content = card.card.icon.content | default: card.icon.content %}
|
16
|
+
{% assign icon_outlined = card.card.icon.outlined | default: card.icon.outlined %}
|
17
|
+
{% assign icon_svg = card.card.icon.svg | default: card.icon.svg %}
|
18
|
+
|
19
|
+
<div class="{{ include.col_class }}">
|
20
|
+
{% include card.html
|
21
|
+
title=title
|
19
22
|
text=card.description
|
20
|
-
icon_content=
|
21
|
-
icon_outlined=
|
22
|
-
icon_svg=
|
23
|
-
to=
|
24
|
-
type=
|
23
|
+
icon_content=icon_content
|
24
|
+
icon_outlined=icon_outlined
|
25
|
+
icon_svg=icon_svg
|
26
|
+
to=link_to
|
27
|
+
type=card_type
|
25
28
|
%}
|
26
29
|
</div>
|
27
30
|
{% endfor %}
|
28
|
-
</div>
|
31
|
+
</div>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
{% for child in page.children %}
|
2
|
+
{% if child.children && child.children.size > 0 %}
|
3
|
+
{% capture header %}
|
4
|
+
{:.heading-line}
|
5
|
+
## {{ child.title }}
|
6
|
+
{% endcapture %}
|
7
|
+
{% assign header = header | markdownify %}
|
8
|
+
{% include anchor_headings.html html=header anchorClass='header-anchor' %}
|
9
|
+
{% assign col_class = child.card.col_class | default: 'col-lg-4' %}
|
10
|
+
{% include card-list.html card_list=child.children col_class=col_class %}
|
11
|
+
{% endif %}
|
12
|
+
{% endfor %}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
{% capture max_width_class %}
|
2
|
+
{% if page.layout == 'front-page' %}
|
3
|
+
no-padding
|
4
|
+
{% elsif page.card_overview %}
|
5
|
+
normal-padding max-width-card-overview
|
6
|
+
{% else %}
|
7
|
+
normal-padding max-width
|
8
|
+
{% endif %}
|
9
|
+
{% endcapture %}
|
10
|
+
|
11
|
+
<div class="doc-container {{ max_width_class | strip }}">
|
12
|
+
<article>
|
13
|
+
{% if page.card_overview %}
|
14
|
+
{% include card-overview.html %}
|
15
|
+
{% else %}
|
16
|
+
{% include anchor_headings.html html=content anchorClass='header-anchor' %}
|
17
|
+
{% endif %}
|
18
|
+
</article>
|
19
|
+
</div>
|
data/_layouts/default.html
CHANGED
@@ -95,14 +95,7 @@
|
|
95
95
|
{% if page.layout != 'front-page' %}
|
96
96
|
{% include title-header.html %}
|
97
97
|
{% endif %}
|
98
|
-
|
99
|
-
{% elsif page.card_overview %} normal-padding max-width-card-overview
|
100
|
-
{% else %} normal-padding max-width
|
101
|
-
{% endif %}">
|
102
|
-
<article>
|
103
|
-
{% include anchor_headings.html html=content anchorClass='header-anchor' %}
|
104
|
-
</article>
|
105
|
-
</div>
|
98
|
+
{% include doc-container.html %}
|
106
99
|
</main>
|
107
100
|
</div>
|
108
101
|
</div>
|
@@ -110,7 +103,7 @@
|
|
110
103
|
<script src="{{ design_guide_url }}/scripts/dg.js"></script>
|
111
104
|
<script src="{{ '/assets/js/swedbank-pay-design-guide-theme.js' | relative_url }}"></script>
|
112
105
|
{%- if site.google_analytics.tracking_id %}
|
113
|
-
|
106
|
+
{% include google_analytics.html %}
|
114
107
|
{%- endif %}
|
115
108
|
</body>
|
116
109
|
|
data/lib/gem_version.rb
CHANGED
data/lib/sidebar_html_builder.rb
CHANGED
@@ -100,9 +100,9 @@ module SwedbankPay
|
|
100
100
|
return leaf_markup(page.path, main_title, page.level) unless page.headers?
|
101
101
|
|
102
102
|
# If there's no children, only return the headers as leaf node items.
|
103
|
-
return page.headers.map { |h| header_markup(page, h) }.join
|
103
|
+
return page.headers.map { |h| header_markup(page, h) }.join unless page.children?
|
104
104
|
|
105
|
-
headers_markup = page.headers.map { |h| header_markup(page, h) }.join
|
105
|
+
headers_markup = page.headers.map { |h| header_markup(page, h) }.join
|
106
106
|
headers_markup = "<ul class=\"nav-ul\">#{headers_markup}</ul>"
|
107
107
|
|
108
108
|
item_markup(page, current_page, headers_markup, true)
|
data/lib/sidebar_page.rb
CHANGED
@@ -30,6 +30,7 @@ module SwedbankPay
|
|
30
30
|
@title = SidebarPageTitle.parse(jekyll_page, self)
|
31
31
|
@order = menu_order(jekyll_page)
|
32
32
|
@children = SidebarPageCollection.new(self)
|
33
|
+
@card_overview = jekyll_page['card_overview'].nil? ? false : jekyll_page['card_overview']
|
33
34
|
end
|
34
35
|
|
35
36
|
def active?(current, is_leaf: false)
|
@@ -113,6 +114,7 @@ module SwedbankPay
|
|
113
114
|
|
114
115
|
@jekyll_page.data['lead_title'] = @title.lead
|
115
116
|
@jekyll_page.data['main_title'] = @title.main
|
117
|
+
@jekyll_page.data['children'] = @children
|
116
118
|
end
|
117
119
|
|
118
120
|
def save
|
@@ -144,6 +146,14 @@ module SwedbankPay
|
|
144
146
|
@doc
|
145
147
|
end
|
146
148
|
|
149
|
+
def to_liquid
|
150
|
+
@jekyll_page.to_liquid
|
151
|
+
end
|
152
|
+
|
153
|
+
def card_overview?
|
154
|
+
@card_overview
|
155
|
+
end
|
156
|
+
|
147
157
|
private
|
148
158
|
|
149
159
|
def menu_order(jekyll_page)
|
data/lib/sidebar_parser.rb
CHANGED
@@ -59,16 +59,19 @@ module SwedbankPay
|
|
59
59
|
def find_headers(page)
|
60
60
|
headers = []
|
61
61
|
|
62
|
+
# Don't include headers in the sidebar if we're on a card overview page.
|
63
|
+
return headers if page.card_overview?
|
64
|
+
|
62
65
|
page.doc.xpath('//h2').each do |header|
|
63
|
-
|
66
|
+
id = header['id']
|
67
|
+
|
68
|
+
next unless id
|
64
69
|
|
65
70
|
child_markup = header.last_element_child
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
}
|
71
|
-
headers.push(header)
|
71
|
+
hash = child_markup['href'].to_s if child_markup.respond_to? :[]
|
72
|
+
title = header.content.strip
|
73
|
+
|
74
|
+
headers.push({ id: id, title: title, hash: hash })
|
72
75
|
end
|
73
76
|
|
74
77
|
headers
|
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.
|
4
|
+
version: 1.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Swedbank Pay
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -203,7 +203,9 @@ files:
|
|
203
203
|
- _includes/apple-touch-startup-images.md
|
204
204
|
- _includes/card-horizontal-list.html
|
205
205
|
- _includes/card-list.html
|
206
|
+
- _includes/card-overview.html
|
206
207
|
- _includes/card.html
|
208
|
+
- _includes/doc-container.html
|
207
209
|
- _includes/github.html
|
208
210
|
- _includes/google_analytics.html
|
209
211
|
- _includes/img/merchants/logo-coop.svg
|