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

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.
@@ -59,6 +59,7 @@
59
59
  display: flex;
60
60
  flex-direction: column;
61
61
  margin-bottom: 1.25rem;
62
+ font-size: 1rem;
62
63
 
63
64
  .h4 {
64
65
  margin-top: 0;
@@ -1,8 +1,9 @@
1
1
  @import 'colors.scss';
2
2
  @import 'fonts.scss';
3
+ @import 'breakpoints.scss';
3
4
 
4
5
  $front-page-padding: 0 4rem;
5
- $front-page-max-width: 1280px;
6
+ $front-page-max-width: 1312px;
6
7
 
7
8
  @mixin row-cards {
8
9
  >[class*='col-'] {
@@ -49,77 +50,87 @@ $front-page-max-width: 1280px;
49
50
  }
50
51
 
51
52
  .front-page {
53
+ margin: 3rem 2rem 0;
52
54
  position: relative;
53
55
  display: flex;
54
56
  flex-direction: column;
55
57
  align-items: center;
58
+
59
+ .front-page-top {
60
+ position: relative;
61
+ padding: 4rem 4rem 2rem;
62
+ width: 100%;
63
+ margin-bottom: 3rem;
64
+ max-width: 1432px;
65
+ background-color: $dark-brown;
66
+ z-index: 0;
67
+ border-radius: 1rem;
68
+ min-height: 33rem;
56
69
 
57
- .front-page-container {
58
- max-width: $front-page-max-width;
59
- margin: $front-page-padding;
60
-
61
- .front-page-top {
62
- padding-top: 4rem;
63
- width: 100%;
70
+ .front-page-hero {
71
+ position: relative;
72
+ max-width: 38rem;
64
73
  margin-bottom: 3rem;
74
+ z-index: 1;
65
75
 
66
- &:before {
67
- content: "";
68
- display: block;
69
- position: absolute;
70
- top: 0;
71
- left: 0;
72
- background-color: $dark-brown;
73
- width: 100%;
74
- height: 34rem;
75
- z-index: 0;
76
+ h3 {
77
+ color: $yellow;
78
+ font-family: $headline;
79
+ margin-bottom: 0;
76
80
  }
77
81
 
78
- .front-page-hero {
79
- position: relative;
80
- max-width: 35rem;
81
- margin-bottom: 3.5rem;
82
- z-index: 1;
82
+ p {
83
+ color: $white;
84
+ font-size: 1.125rem;
85
+ }
83
86
 
84
- h3 {
85
- color: $yellow;
86
- font-family: $headline;
87
- margin-bottom: 0;
88
- }
87
+ .front-page-hero-name {
88
+ font-family: $mono;
89
+ font-weight: bold;
90
+ font-size: 2rem;
91
+ color: $yellow;
92
+ margin-bottom: 1rem;
89
93
 
90
- p {
94
+ span {
91
95
  color: $white;
92
- font-size: 1.125rem;
93
96
  }
97
+ }
98
+
99
+ }
94
100
 
95
- .front-page-hero-name {
96
- font-family: $mono;
97
- font-weight: bold;
98
- font-size: 2rem;
99
- color: $yellow;
100
- margin-bottom: 1rem;
101
+ .front-page-intro-cards {
102
+ h2 {
103
+ color: $white;
101
104
 
102
- span {
103
- color: $white;
104
- }
105
+ .header-anchor {
106
+ display: none;
105
107
  }
108
+ }
106
109
 
110
+ .row {
111
+ @include row-cards();
107
112
  }
113
+ }
108
114
 
115
+ @media screen and (min-width: $breakpoint-xxl) {
116
+ margin-bottom: 10rem;
117
+
109
118
  .front-page-intro-cards {
110
- h2 {
111
- color: $white;
112
-
113
- .header-anchor {
114
- display: none;
115
- }
116
- }
117
-
118
- .row {
119
- @include row-cards();
120
- }
119
+ position: absolute;
120
+ left: 0;
121
+ width: 100%;
122
+ padding: 0 4rem;
121
123
  }
122
124
  }
125
+ }
126
+ .front-page-container {
127
+ max-width: $front-page-max-width;
128
+ margin: $front-page-padding;
129
+ position: relative;
130
+
131
+ @media screen and (max-width: $breakpoint-md) {
132
+ margin: 0;
133
+ }
123
134
 
124
135
  .front-page-merchants {
125
136
  margin-bottom: 3.75rem;
@@ -221,19 +232,7 @@ $front-page-max-width: 1280px;
221
232
  height: 22.5rem;
222
233
  background-color: $dark-brown;
223
234
  text-decoration: none;
224
-
225
- &:hover,
226
- &:focus {
227
- .front-page-demoshop-link {
228
- background-color: $white;
229
- color: $brown;
230
-
231
- .h3 {
232
- color: $brown;
233
- }
234
-
235
- }
236
- }
235
+ border-radius: 1rem;
237
236
 
238
237
  &:after {
239
238
  display: none;
@@ -249,17 +248,29 @@ $front-page-max-width: 1280px;
249
248
 
250
249
  .h2 {
251
250
  color: $white;
252
-
253
- span {
254
- color: $yellow;
255
- }
256
251
  }
257
252
 
258
253
  .demoshop-text-description {
259
254
  color: $white;
260
- width: 45%;
261
- height: 4.5rem;
255
+ width: 40%;
256
+ min-height: 4.5rem;
257
+ font-size: 1rem;
258
+
262
259
  }
260
+
261
+ }
262
+
263
+ @media screen and (max-width: $breakpoint-md) {
264
+ padding-top: 3rem;
265
+ height: 18rem;
266
+
267
+ .front-page-demoshop-text {
268
+ .demoshop-text-description {
269
+ width: 100%;
270
+ min-height: 2.25rem;
271
+ }
272
+ }
273
+
263
274
  }
264
275
 
265
276
  .front-page-demoshop-link {
@@ -274,6 +285,21 @@ $front-page-max-width: 1280px;
274
285
  box-shadow: 1px 2px 10px rgba(0, 0, 0, 0.15);
275
286
  max-width: $front-page-max-width;
276
287
  width: 100%;
288
+ cursor: pointer;
289
+
290
+ a::after{
291
+ content: '';
292
+ }
293
+
294
+ &:hover,
295
+ &:focus {
296
+ background-color: $white;
297
+ color: $brown;
298
+
299
+ .h3 {
300
+ color: $brown;
301
+ }
302
+ }
277
303
 
278
304
  .demoshop-link-img {
279
305
  display: flex;
@@ -281,6 +307,7 @@ $front-page-max-width: 1280px;
281
307
  position: absolute;
282
308
  bottom: -1rem;
283
309
  right: 3%;
310
+ pointer-events: none;
284
311
 
285
312
  .demoshop-link-img-web {
286
313
  width: 26.5rem;
@@ -297,8 +324,6 @@ $front-page-max-width: 1280px;
297
324
  }
298
325
  }
299
326
 
300
-
301
-
302
327
  .h3 {
303
328
  color: $white;
304
329
  padding-right: 1rem;
@@ -306,6 +331,18 @@ $front-page-max-width: 1280px;
306
331
  margin: 0;
307
332
  }
308
333
  }
334
+
335
+ @media screen and (min-width: $breakpoint-xxl) {
336
+ .front-page-demoshop-text {
337
+ margin-bottom: 1rem;
338
+ }
339
+
340
+ .front-page-demoshop-link {
341
+ .demoshop-link-img {
342
+ bottom: -2rem;
343
+ }
344
+ }
345
+ }
309
346
  }
310
347
 
311
348
 
@@ -6,14 +6,13 @@
6
6
  display: flex;
7
7
  flex-direction: column;
8
8
  align-items: center;
9
- margin-bottom: 2.5rem;
10
9
  margin-top: 2rem;
11
10
  text-decoration: none;
12
11
  color: #512b2b;
13
12
 
14
13
  img {
15
- width: 120px;
16
- margin-top: -1rem;
14
+ margin-top: 1.5rem;
15
+ margin-bottom: 1.25rem;
17
16
  }
18
17
 
19
18
  span {
@@ -30,6 +29,37 @@
30
29
  }
31
30
  }
32
31
 
32
+ .search-container {
33
+ box-shadow: 1px 2px 10px rgba(0, 0, 0, 0.15);
34
+ border-radius: 0.125rem;
35
+
36
+ &:focus-within {
37
+ outline: -webkit-focus-ring-color auto 0.5px;
38
+ }
39
+
40
+ .search-input {
41
+ color: $medium-brown;
42
+ font-size: 0.875rem;
43
+ border: none;
44
+ padding: 0.375rem;
45
+
46
+ &:focus {
47
+ color: $brown;
48
+ outline: none
49
+ }
50
+ }
51
+
52
+ i {
53
+ display: block;
54
+ color: $brown;
55
+
56
+ &:hover {
57
+ color: $turquoise-link;
58
+ }
59
+ }
60
+
61
+ }
62
+
33
63
  .main-nav-ul {
34
64
  .nav-group {
35
65
  .nav-ul {
@@ -1,11 +1,13 @@
1
1
  @import 'colors.scss';
2
2
  @import 'fonts.scss';
3
3
  @import 'variables.scss';
4
+ @import 'breakpoints.scss';
4
5
 
5
6
  @import 'card.scss';
6
7
  @import 'code-view.scss';
7
8
  @import 'front-page.scss';
8
9
  @import 'heading.scss';
10
+ @import 'accordion-table.scss';
9
11
  @import 'paragraph-highlight.scss';
10
12
  @import 'sidebar.scss';
11
13
  @import 'title-header.scss';
@@ -17,8 +19,11 @@ img {
17
19
  max-width: 100%;
18
20
  }
19
21
 
20
- .table {
22
+ body {
23
+ font-size: 1.125rem;
24
+ }
21
25
 
26
+ .table {
22
27
  th,
23
28
  td {
24
29
  >.material-icons {
@@ -287,4 +292,20 @@ a[href ^='https://']:not([href *='{{ site.url }}']):after {
287
292
  font-size: 1rem !important;
288
293
  }
289
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
+ }
290
311
  }
@@ -32,6 +32,9 @@
32
32
  margin-right: 0.5rem;
33
33
  }
34
34
  }
35
+ a {
36
+ color: #43d0dd;
37
+ }
35
38
  }
36
39
 
37
40
 
@@ -1 +1 @@
1
- $max-width: 704px;
1
+ $max-width: 880px;
@@ -36,7 +36,7 @@
36
36
  .highlight .nf { color: #00aa00 } /* Name.Function */
37
37
  .highlight .nn { color: #00aaaa; text-decoration: underline } /* Name.Namespace */
38
38
  .highlight .nt { color: #1e90ff; font-weight: bold } /* Name.Tag */
39
- .highlight .nv { color: #aa0000 } /* Name.Variable */
39
+ .highlight .nv { color: #e07088 } /* Name.Variable */
40
40
  .highlight .ow { color: #0000aa } /* Operator.Word */
41
41
  .highlight .w { color: #bbbbbb } /* Text.Whitespace */
42
42
  .highlight .mb { color: #009999 } /* Literal.Number.Bin */
@@ -4,7 +4,7 @@ module Gem
4
4
  # Gem Specification
5
5
  class Specification
6
6
  def self.gem_version
7
- '1.9.0'
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'
@@ -14,35 +14,27 @@ module SwedbankPay
14
14
  class << self
15
15
  attr_reader :pages
16
16
 
17
- def init
18
- @pages_hash = {}
19
- end
20
-
21
- def pre_render(jekyll_page)
22
- sidebar_page = SidebarPage.new(jekyll_page)
23
- @pages_hash[sidebar_page.path] = sidebar_page
17
+ def pre_render(site)
18
+ Jekyll.logger.debug(' Sidebar: pre_render')
19
+ @parser = SidebarParser.new(site)
20
+ @pages = SidebarTreeBuilder.new(@parser.pages)
21
+ Jekyll.logger.debug(" Sidebar: #{@pages.inspect}")
24
22
  end
25
23
 
26
- def post_write(site)
27
- parser = SidebarParser.new(site)
28
- pages = parser.parse(@pages_hash)
29
- @pages = SidebarTreeBuilder.new(pages)
30
- Jekyll.logger.debug(" Sidebar: #{@pages.inspect}")
31
- renderer = SidebarRenderer.new
32
- renderer.render(@pages)
24
+ def post_write
25
+ @sidebar_renderer = SidebarRenderer.new(@pages)
26
+ @parser.parse(@pages)
27
+ Jekyll.logger.debug(' Sidebar: post_write')
28
+ @sidebar_renderer.render
33
29
  end
34
30
  end
35
31
  end
36
32
  end
37
33
 
38
- SwedbankPay::Sidebar.init
39
-
40
34
  Jekyll::Hooks.register :site, :pre_render do |site, _|
41
- site.pages.each do |page|
42
- SwedbankPay::Sidebar.pre_render page
43
- end
35
+ SwedbankPay::Sidebar.pre_render site
44
36
  end
45
37
 
46
- Jekyll::Hooks.register :site, :post_write do |site|
47
- SwedbankPay::Sidebar.post_write site
38
+ Jekyll::Hooks.register :site, :post_write do
39
+ SwedbankPay::Sidebar.post_write
48
40
  end