swedbank-pay-design-guide-jekyll-theme 1.9.12 → 1.10.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 +4 -4
- data/_includes/card-list.html +24 -11
- data/_includes/card-overview.html +14 -0
- data/_includes/card.html +35 -40
- data/_includes/doc-container.html +19 -0
- data/_includes/google_analytics.html +8 -9
- data/_layouts/default.html +2 -9
- data/_sass/card.scss +38 -4
- data/_sass/colors.scss +4 -0
- data/lib/gem_version.rb +1 -1
- data/lib/sidebar_html_builder.rb +2 -2
- data/lib/sidebar_page.rb +11 -0
- data/lib/sidebar_page_collection.rb +4 -0
- data/lib/sidebar_parser.rb +10 -7
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 107fe32dcdd6919798c50bc86a8933442abadabf1120a24b6dfbbcf634e427b3
|
4
|
+
data.tar.gz: 0f1c6521f1eded78dfef148a0f17537c2cacdcadb2eb7a344060fac494257a51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6aaac38681e036d6e1a3db0e0919a02cf89f47d3db876a85d67142219a44fd129698a4f69ff9ee63d6b13798248ea185ba4df8e0bb67429f2f50a1a345aa6522
|
7
|
+
data.tar.gz: 3dc72e03582095cb5ea5721bf1b63d63a1827f51282623035124eb875cfd4ca23a0d89a889a7186a6000b5317b1bd8e7a80cf777ef5c69b54a4ad183e4926dea
|
data/_includes/card-list.html
CHANGED
@@ -7,22 +7,35 @@ 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
|
11
|
-
{% assign
|
12
|
-
{% assign col_class = include.col_class %}
|
10
|
+
{% assign cards = include.card_list | default: page.children %}
|
11
|
+
{% assign col_class = include.col_class | default: 'col-lg-4' %}
|
13
12
|
|
14
13
|
<div class="row card-list">
|
15
|
-
{% for card in
|
14
|
+
{% for card in cards %}
|
16
15
|
{% assign title = card.title | split: '–' | last %}
|
16
|
+
{% assign link_to = card.absolute_path | default: card.url %}
|
17
|
+
|
18
|
+
{% assign card_type = card.card.type | default: card.card_type | default: include.type %}
|
19
|
+
{% assign icon_content = card.card.icon.content | default: card.icon.content %}
|
20
|
+
{% assign icon_outlined = card.card.icon.outlined | default: card.icon.outlined %}
|
21
|
+
{% assign icon_svg = card.card.icon.svg | default: card.icon.svg %}
|
22
|
+
{% assign no_icon = card.card.icon.no_icon | default: card.icon.no_icon %}
|
23
|
+
{% assign horizontal = card.card.horizontal | default: false %}
|
24
|
+
{% assign disabled = card.card.disabled | default: card.disabled %}
|
25
|
+
|
17
26
|
<div class="{{ col_class }}">
|
18
|
-
{% include card.html
|
27
|
+
{% include card.html
|
28
|
+
title=title
|
19
29
|
text=card.description
|
20
|
-
icon_content=
|
21
|
-
icon_outlined=
|
22
|
-
icon_svg=
|
23
|
-
|
24
|
-
|
30
|
+
icon_content=icon_content
|
31
|
+
icon_outlined=icon_outlined
|
32
|
+
icon_svg=icon_svg
|
33
|
+
no_icon=no_icon
|
34
|
+
to=link_to
|
35
|
+
type=card_type
|
36
|
+
horizontal=horizontal
|
37
|
+
disabled=disabled
|
25
38
|
%}
|
26
39
|
</div>
|
27
40
|
{% endfor %}
|
28
|
-
</div>
|
41
|
+
</div>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
{% for child in page.children %}
|
2
|
+
{% if child.children && child.children.size > 0 %}
|
3
|
+
{% assign title = child.title | default: child.section %}
|
4
|
+
{% capture header %}
|
5
|
+
{:.heading-line}
|
6
|
+
## {{ title }}
|
7
|
+
{% endcapture %}
|
8
|
+
{% assign header = header | markdownify %}
|
9
|
+
{% include anchor_headings.html html=header anchorClass='header-anchor' %}
|
10
|
+
{% assign col_class = child.card.col_class | default: 'col-lg-4' %}
|
11
|
+
{% assign card_type = child.card.type %}
|
12
|
+
{% include card-list.html card_list=child.children col_class=col_class type=card_type %}
|
13
|
+
{% endif %}
|
14
|
+
{% endfor %}
|
data/_includes/card.html
CHANGED
@@ -12,7 +12,6 @@ to(required): Url to the page to be directed to on click
|
|
12
12
|
type: sdk | module - Empty type result in default card styling
|
13
13
|
{%- endcomment -%}
|
14
14
|
|
15
|
-
{% assign title = include.title %}
|
16
15
|
{% assign title_type = include.title_type | default: 'h4', %}
|
17
16
|
{% assign icon_content = include.icon_content %}
|
18
17
|
{% assign icon_outlined = include.icon_outlined | default: false %}
|
@@ -21,53 +20,49 @@ type: sdk | module - Empty type result in default card styling
|
|
21
20
|
{% assign text = include.text %}
|
22
21
|
{% assign horizontal = include.horizontal | default: false %}
|
23
22
|
{% assign to = include.to %}
|
23
|
+
{% assign disabled = include.disabled %}
|
24
|
+
|
24
25
|
{% if include.type %}
|
25
|
-
{% assign type = include.type %}
|
26
|
-
{% assign type_class = 'dx-card-' | append: type %}
|
26
|
+
{% assign type = include.type %}
|
27
|
+
{% assign type_class = 'dx-card-' | append: type %}
|
27
28
|
{% else %}
|
28
|
-
{% assign type_class = '' %}
|
29
|
+
{% assign type_class = '' %}
|
29
30
|
{% endif %}
|
30
31
|
|
31
|
-
{%
|
32
|
-
|
33
|
-
|
34
|
-
{%
|
32
|
+
{% unless icon_svg %}
|
33
|
+
{% if icon_content contains '/' or icon_content contains '.svg' %}
|
34
|
+
{% assign icon_svg = true %}
|
35
|
+
{% endif %}
|
36
|
+
{% endunless %}
|
35
37
|
|
38
|
+
{% assign card_class = 'dx-card ' | append: type_class | strip %}
|
36
39
|
{% if horizontal %}
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
<span>{{ text }}</span>
|
44
|
-
</span>
|
45
|
-
<i class="material-icons">arrow_forward</i>
|
46
|
-
</a>
|
47
|
-
{% else %}
|
48
|
-
{% if icon_svg %}
|
49
|
-
<a href="{{ to }}" class="dx-card {{type_class}}">
|
50
|
-
<span class="dx-card-icon">
|
51
|
-
{% include {{ icon_content }} %}
|
52
|
-
</span>
|
53
|
-
<span class="dx-card-content">
|
54
|
-
<span class="{{ title_type }}">{{ title }}</span>
|
55
|
-
<span>{{ text }}</span>
|
56
|
-
</span>
|
57
|
-
<i class="material-icons">arrow_forward</i>
|
58
|
-
</a>
|
40
|
+
{% assign card_class = card_class | append: ' dx-card-horizontal' | strip %}
|
41
|
+
{% endif %}
|
42
|
+
|
43
|
+
{% if disabled %}
|
44
|
+
{% assign card_class = card_class | append: ' dx-card-disabled' | strip %}
|
45
|
+
{% assign card_tag = 'span' %}
|
59
46
|
{% else %}
|
60
|
-
|
47
|
+
{% assign card_tag = 'a' %}
|
48
|
+
{% capture card_attributes %}href="{{ to }}"{% endcapture %}
|
49
|
+
{% endif %}
|
50
|
+
|
51
|
+
<{{ card_tag }} {{ card_attributes }} class="{{ card_class }}">
|
61
52
|
<span class="dx-card-icon{% if no_icon %} d-none{% endif %}">
|
62
|
-
|
63
|
-
{{ icon_content }}
|
64
|
-
|
53
|
+
{% if icon_svg %}
|
54
|
+
{% include {{ icon_content }} %}
|
55
|
+
{% else %}
|
56
|
+
<i class="material-icons{% if icon_outlined %}-outlined{% endif %}">
|
57
|
+
{{ icon_content }}
|
58
|
+
</i>
|
59
|
+
{% endif %}
|
65
60
|
</span>
|
66
61
|
<span class="dx-card-content">
|
67
|
-
<span class="{{ title_type }}">{{ title }}</span>
|
68
|
-
<span>{{ text }}</span>
|
62
|
+
<span class="{{ title_type }}">{{ include.title }}</span>
|
63
|
+
<span>{{ text | markdownify }}</span>
|
69
64
|
</span>
|
70
|
-
|
71
|
-
</
|
72
|
-
{%
|
73
|
-
{
|
65
|
+
{% unless disabled %}
|
66
|
+
<i class="material-icons">arrow_forward</i>
|
67
|
+
{% endunless %}
|
68
|
+
</{{ card_tag }}>
|
@@ -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>
|
@@ -1,9 +1,8 @@
|
|
1
|
-
<!-- Global site tag (gtag.js) - Google Analytics -->
|
2
|
-
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics.tracking_id }}"></script>
|
3
|
-
<script>
|
4
|
-
window.dataLayer = window.dataLayer || [];
|
5
|
-
function gtag(){dataLayer.push(arguments);}
|
6
|
-
gtag('js', new Date());
|
7
|
-
|
8
|
-
|
9
|
-
</script>
|
1
|
+
<!-- Global site tag (gtag.js) - Google Analytics -->
|
2
|
+
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics.tracking_id }}"></script>
|
3
|
+
<script>
|
4
|
+
window.dataLayer = window.dataLayer || [];
|
5
|
+
function gtag(){ dataLayer.push(arguments); }
|
6
|
+
gtag('js', new Date());
|
7
|
+
gtag('config', '{{ site.google_analytics.tracking_id }}', { 'anonymize_ip': true });
|
8
|
+
</script>
|
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/_sass/card.scss
CHANGED
@@ -95,10 +95,8 @@
|
|
95
95
|
}
|
96
96
|
|
97
97
|
&.dx-card-sdk {
|
98
|
-
|
99
98
|
&:hover,
|
100
99
|
&:focus {
|
101
|
-
|
102
100
|
&:after {
|
103
101
|
border-bottom: 4px solid $turquoise;
|
104
102
|
}
|
@@ -116,13 +114,21 @@
|
|
116
114
|
fill: $white;
|
117
115
|
}
|
118
116
|
}
|
117
|
+
|
118
|
+
&.dx-card-disabled {
|
119
|
+
&, .h1, .h2, .h3, .h4, h5, .h6 {
|
120
|
+
color: $soft-turquoise;
|
121
|
+
}
|
122
|
+
|
123
|
+
.dx-card-icon {
|
124
|
+
background-color: $soft-turquoise;
|
125
|
+
}
|
126
|
+
}
|
119
127
|
}
|
120
128
|
|
121
129
|
&.dx-card-module {
|
122
|
-
|
123
130
|
&:hover,
|
124
131
|
&:focus {
|
125
|
-
|
126
132
|
&:after {
|
127
133
|
border-bottom: 4px solid $card-pink;
|
128
134
|
}
|
@@ -140,8 +146,36 @@
|
|
140
146
|
fill: $white;
|
141
147
|
}
|
142
148
|
}
|
149
|
+
|
150
|
+
&.dx-card-disabled {
|
151
|
+
&, .h1, .h2, .h3, .h4, h5, .h6 {
|
152
|
+
color: $soft-card-pink;
|
153
|
+
}
|
154
|
+
|
155
|
+
.dx-card-icon {
|
156
|
+
background-color: $soft-card-pink;
|
157
|
+
}
|
158
|
+
}
|
143
159
|
}
|
144
160
|
|
161
|
+
&.dx-card-disabled {
|
162
|
+
&, .h1, .h2, .h3, .h4, h5, .h6 {
|
163
|
+
color: $soft-brown;
|
164
|
+
}
|
165
|
+
|
166
|
+
&:hover,
|
167
|
+
&:focus {
|
168
|
+
box-shadow: 1px 2px 10px rgba(0, 0, 0, 0.1);
|
169
|
+
|
170
|
+
&:after {
|
171
|
+
border-bottom: none;
|
172
|
+
}
|
173
|
+
}
|
174
|
+
|
175
|
+
.dx-card-icon {
|
176
|
+
background-color: $soft-yellow;
|
177
|
+
}
|
178
|
+
}
|
145
179
|
}
|
146
180
|
|
147
181
|
|
data/_sass/colors.scss
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
$yellow: #fdc129;
|
2
|
+
$soft-yellow: #fff3d5;
|
2
3
|
$light-turquoise: #ebf8f2;
|
3
4
|
$apricot: #fbf2ea;
|
4
5
|
$pink: #efb7b6;
|
@@ -7,12 +8,15 @@ $brand-info-light: #e8eff9;
|
|
7
8
|
$brand-success: #51971b;
|
8
9
|
$brand-success-light: #f2f7eb;
|
9
10
|
$turquoise: #31a3ae;
|
11
|
+
$soft-turquoise: #98d0d6;
|
10
12
|
$turquoise-link: #257886;
|
11
13
|
$brown: #512b2b;
|
12
14
|
$dark-brown: #493c3b;
|
13
15
|
$medium-brown: #72605e;
|
16
|
+
$soft-brown: #a38b80;
|
14
17
|
$white: #fff;
|
15
18
|
$card-pink: #c5569a;
|
19
|
+
$soft-card-pink: #d698c8;
|
16
20
|
$background-gray: #ebE7E2;
|
17
21
|
$background-front-page: #fefcfa;
|
18
22
|
$code-green: #9c6;
|
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,8 @@ 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
|
118
|
+
@jekyll_page.data['absolute_path'] = @path
|
116
119
|
end
|
117
120
|
|
118
121
|
def save
|
@@ -144,6 +147,14 @@ module SwedbankPay
|
|
144
147
|
@doc
|
145
148
|
end
|
146
149
|
|
150
|
+
def to_liquid
|
151
|
+
@jekyll_page.to_liquid
|
152
|
+
end
|
153
|
+
|
154
|
+
def card_overview?
|
155
|
+
@card_overview
|
156
|
+
end
|
157
|
+
|
147
158
|
private
|
148
159
|
|
149
160
|
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.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: 2021-
|
11
|
+
date: 2021-04-22 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
|
@@ -287,14 +289,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
287
289
|
requirements:
|
288
290
|
- - ">="
|
289
291
|
- !ruby/object:Gem::Version
|
290
|
-
version: 2.
|
292
|
+
version: 2.5.0
|
291
293
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
292
294
|
requirements:
|
293
295
|
- - ">="
|
294
296
|
- !ruby/object:Gem::Version
|
295
297
|
version: '0'
|
296
298
|
requirements: []
|
297
|
-
rubygems_version: 3.1.
|
299
|
+
rubygems_version: 3.1.6
|
298
300
|
signing_key:
|
299
301
|
specification_version: 4
|
300
302
|
summary: Swedbank Pay Design Guide theme for Jekyll
|