gatsby-core-theme 30.0.39 → 30.0.41
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.
- package/CHANGELOG.md +26 -0
- package/package.json +1 -1
- package/src/components/molecules/content/content.test.js +1 -1
- package/src/components/organisms/anchor/template-one/anchor.module.scss +81 -44
- package/src/components/organisms/anchor/template-one/anchor.stories.js +4 -2
- package/src/constants/settings.mjs +1 -0
- package/src/helpers/processor/relations.mjs +8 -6
- package/src/styles/utils/_mixins.scss +18 -0
- package/src/styles/utils/variables/_main.scss +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
|
+
## [30.0.41](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v30.0.40...v30.0.41) (2024-01-03)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* fix ribbon id issue when ribbons are missing ([a1cc42a](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/a1cc42aabe865b8f3d080077b4423099a6b96e72))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
* Merge branch 'tm-ribbon-issue' into 'master' ([08408a0](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/08408a0825ad0ec6ccacfcc7848325d8c0037acb))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Tests
|
|
13
|
+
|
|
14
|
+
* fix test ([1fea807](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/1fea807b6a2709420679b04d5a690c1cd26f191d))
|
|
15
|
+
|
|
16
|
+
## [30.0.40](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v30.0.39...v30.0.40) (2023-12-28)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* added new mixin ([b5d9ee6](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/b5d9ee64b2eae4f6f531811a3f50600c5e6b1013))
|
|
22
|
+
* anchor ([554e3e6](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/554e3e6d9b95485a3dd3b47605304a43394efc7c))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
* Merge branch 'tm-3800-anchor-core' into 'master' ([7a2e331](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/7a2e331e3a05df414b334488742e4b904ca9d53a))
|
|
26
|
+
|
|
1
27
|
## [30.0.39](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v30.0.38...v30.0.39) (2023-12-27)
|
|
2
28
|
|
|
3
29
|
|
package/package.json
CHANGED
|
@@ -223,7 +223,7 @@ describe('Content Component', () => {
|
|
|
223
223
|
|
|
224
224
|
test('renders content with placeholder string for h2', () => {
|
|
225
225
|
const { container } = render(<Content module={module} page={page} />);
|
|
226
|
-
expect(container.querySelector('h2')).toHaveTextContent(
|
|
226
|
+
expect(container.querySelector('h2')).toHaveTextContent(new Date().getFullYear());
|
|
227
227
|
});
|
|
228
228
|
|
|
229
229
|
test('renders content without placeholder string for h2', () => {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
0% {
|
|
3
3
|
opacity: 0;
|
|
4
4
|
}
|
|
5
|
+
|
|
5
6
|
100% {
|
|
6
7
|
opacity: 1;
|
|
7
8
|
}
|
|
@@ -42,16 +43,20 @@
|
|
|
42
43
|
max-width: var(--main-container-max);
|
|
43
44
|
margin: 0 auto;
|
|
44
45
|
@include flex-direction(row);
|
|
46
|
+
|
|
45
47
|
&::-webkit-scrollbar {
|
|
46
48
|
height: 0.4rem;
|
|
47
49
|
display: none;
|
|
48
50
|
}
|
|
51
|
+
|
|
49
52
|
&::-webkit-scrollbar-track {
|
|
50
53
|
background: #9c9ab0;
|
|
51
54
|
}
|
|
55
|
+
|
|
52
56
|
&::-webkit-scrollbar-thumb {
|
|
53
57
|
background: #1c1a28;
|
|
54
58
|
}
|
|
59
|
+
|
|
55
60
|
overflow-x: scroll;
|
|
56
61
|
}
|
|
57
62
|
|
|
@@ -85,7 +90,7 @@
|
|
|
85
90
|
}
|
|
86
91
|
|
|
87
92
|
.anchorItem {
|
|
88
|
-
&.active
|
|
93
|
+
&.active>a {
|
|
89
94
|
background-color: #1c1a28;
|
|
90
95
|
color: #fff;
|
|
91
96
|
border: 1.5px solid #3e3c47;
|
|
@@ -119,7 +124,7 @@
|
|
|
119
124
|
display: flex;
|
|
120
125
|
}
|
|
121
126
|
|
|
122
|
-
>
|
|
127
|
+
>svg {
|
|
123
128
|
width: 3.2rem;
|
|
124
129
|
height: 3.2rem;
|
|
125
130
|
padding: 0.8rem;
|
|
@@ -130,7 +135,7 @@
|
|
|
130
135
|
}
|
|
131
136
|
|
|
132
137
|
.disabled {
|
|
133
|
-
>
|
|
138
|
+
>svg {
|
|
134
139
|
color: #515156;
|
|
135
140
|
background-color: #f4f4f4;
|
|
136
141
|
}
|
|
@@ -139,44 +144,46 @@
|
|
|
139
144
|
.staticShowButtons {
|
|
140
145
|
display: flex;
|
|
141
146
|
|
|
142
|
-
>
|
|
147
|
+
>button:first-child {
|
|
143
148
|
padding-right: 1.6rem;
|
|
144
149
|
}
|
|
145
150
|
|
|
146
|
-
>
|
|
151
|
+
>button:last-of-type {
|
|
147
152
|
padding-left: 1.6rem;
|
|
148
153
|
}
|
|
149
154
|
}
|
|
150
155
|
|
|
151
156
|
.stickyShowButtons {
|
|
152
|
-
>
|
|
157
|
+
>button:first-child {
|
|
153
158
|
position: absolute;
|
|
154
159
|
top: 0.6rem;
|
|
155
160
|
padding-right: 1.6rem;
|
|
156
161
|
height: 4rem;
|
|
162
|
+
|
|
157
163
|
@include custom-min(960) {
|
|
158
164
|
left: calc(50% - (var(--anchor-max-width, --main-container-max) / 2) - 2.6rem);
|
|
159
165
|
transform: translateX(50%);
|
|
160
166
|
}
|
|
161
167
|
}
|
|
162
168
|
|
|
163
|
-
>
|
|
169
|
+
>button:last-of-type {
|
|
164
170
|
position: absolute;
|
|
165
171
|
top: 0.6rem;
|
|
166
172
|
height: 4rem;
|
|
167
173
|
padding-left: 1.6rem;
|
|
174
|
+
|
|
168
175
|
@include custom-min(960) {
|
|
169
176
|
right: calc(50% - (var(--anchor-max-width, --main-container-max) / 2) - 2.6rem);
|
|
170
177
|
transform: translateX(-50%);
|
|
171
178
|
}
|
|
172
179
|
}
|
|
173
180
|
|
|
174
|
-
>
|
|
175
|
-
>
|
|
181
|
+
>ul {
|
|
182
|
+
>li:first-child {
|
|
176
183
|
margin-left: 4.8rem;
|
|
177
184
|
}
|
|
178
185
|
|
|
179
|
-
>
|
|
186
|
+
>li:last-child {
|
|
180
187
|
margin-right: 4.8rem;
|
|
181
188
|
}
|
|
182
189
|
}
|
|
@@ -199,72 +206,102 @@
|
|
|
199
206
|
|
|
200
207
|
.staticFullScrollWidth {
|
|
201
208
|
min-width: 100vw;
|
|
202
|
-
max-width: 100vw;
|
|
203
209
|
display: inline-grid;
|
|
204
210
|
|
|
205
|
-
|
|
211
|
+
@include min(tablet) {
|
|
212
|
+
max-width: 100vw;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
&:not(.staticShowButtons) {
|
|
216
|
+
&::before {
|
|
217
|
+
display: none;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
>ul {
|
|
221
|
+
>li:first-child {
|
|
222
|
+
padding-left: calc((100vw - var(--anchor-max-width, --main-container-max)) / 2) !important;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
&::before,
|
|
228
|
+
&::after {
|
|
206
229
|
content: '';
|
|
230
|
+
display: none;
|
|
207
231
|
position: absolute;
|
|
208
232
|
top: 0;
|
|
209
|
-
left: 0;
|
|
210
|
-
display: block;
|
|
211
233
|
background-color: var(--body-background-color, white);
|
|
212
|
-
width: calc((100% - var(--anchor-max-width, --main-container-max)) / 2 + 1.6rem);
|
|
213
234
|
height: 4.5rem;
|
|
214
235
|
z-index: 1;
|
|
236
|
+
|
|
237
|
+
@include custom-min(960) {
|
|
238
|
+
display: block;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
@include custom-min-max(960, 1100) {
|
|
242
|
+
width: 2.4rem;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
width: calc((100% - var(--anchor-max-width, --main-container-max)) / 2 + 6.8rem);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
&::before {
|
|
249
|
+
left: 0;
|
|
215
250
|
}
|
|
216
251
|
|
|
217
252
|
&::after {
|
|
218
|
-
content: '';
|
|
219
|
-
position: absolute;
|
|
220
|
-
top: 0;
|
|
221
253
|
right: 0;
|
|
222
|
-
display: block;
|
|
223
|
-
background-color: var(--body-background-color, white);
|
|
224
|
-
width: calc((100% - var(--anchor-max-width, --main-container-max)) / 2 + 1.6rem);
|
|
225
|
-
height: 4.5rem;
|
|
226
|
-
z-index: 1;
|
|
227
254
|
}
|
|
228
255
|
|
|
229
|
-
>
|
|
256
|
+
>button {
|
|
230
257
|
position: absolute;
|
|
231
258
|
z-index: 2;
|
|
232
|
-
left: calc((100% - var(--anchor-max-width, --main-container-max)) / 2 + 1.6rem);
|
|
233
259
|
height: 4.5rem;
|
|
234
260
|
padding-right: 1.6rem;
|
|
235
|
-
|
|
261
|
+
left: calc((100vw - var(--anchor-max-width, --main-container-max)) / 2 + 2.4rem);
|
|
236
262
|
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
263
|
+
&:last-of-type {
|
|
264
|
+
left: unset;
|
|
265
|
+
right: calc((100vw - var(--anchor-max-width, --main-container-max)) / 2 + 2.4rem);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
@include custom-min-max(960, 1100) {
|
|
269
|
+
left: 2.4rem;
|
|
270
|
+
|
|
271
|
+
&:last-of-type {
|
|
272
|
+
right: 2.4rem;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
243
275
|
}
|
|
244
276
|
|
|
245
|
-
>
|
|
277
|
+
>ul {
|
|
246
278
|
max-width: unset !important;
|
|
247
279
|
margin: 0 !important;
|
|
280
|
+
padding: 0 1.6rem;
|
|
248
281
|
|
|
249
282
|
&::-webkit-scrollbar {
|
|
250
283
|
display: block !important;
|
|
251
284
|
}
|
|
252
285
|
|
|
253
|
-
>
|
|
254
|
-
padding-left: calc(
|
|
255
|
-
|
|
256
|
-
)
|
|
286
|
+
>li:first-child {
|
|
287
|
+
padding-left: calc((100vw - var(--anchor-max-width, --main-container-max)) / 2 + 5.8rem) !important;
|
|
288
|
+
|
|
289
|
+
@include custom-min-max(960, 1100) {
|
|
290
|
+
padding-left: 7.2rem !important;
|
|
291
|
+
}
|
|
292
|
+
|
|
257
293
|
}
|
|
258
294
|
|
|
259
|
-
>
|
|
260
|
-
padding-right: calc(
|
|
261
|
-
|
|
262
|
-
)
|
|
295
|
+
>li:last-child {
|
|
296
|
+
padding-right: calc((100vw - var(--anchor-max-width, --main-container-max)) / 2 + 5.8rem) !important;
|
|
297
|
+
|
|
298
|
+
@include custom-min-max(960, 1100) {
|
|
299
|
+
padding-right: 7.2rem !important;
|
|
300
|
+
}
|
|
263
301
|
}
|
|
264
302
|
}
|
|
265
303
|
}
|
|
266
304
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
visibility: hidden !important;
|
|
305
|
+
.displayNone {
|
|
306
|
+
visibility: hidden !important;
|
|
270
307
|
}
|
|
@@ -131,6 +131,7 @@ Default.args = {
|
|
|
131
131
|
{ label: 'section-twelf' },
|
|
132
132
|
],
|
|
133
133
|
},
|
|
134
|
+
fullScrollWidth: false,
|
|
134
135
|
isShowButtons: false,
|
|
135
136
|
sliderGap: 10,
|
|
136
137
|
headerOffset: 20,
|
|
@@ -138,7 +139,7 @@ Default.args = {
|
|
|
138
139
|
|
|
139
140
|
export const FullWidth = Template.bind({});
|
|
140
141
|
FullWidth.args = {
|
|
141
|
-
width: '
|
|
142
|
+
width: '100%',
|
|
142
143
|
module: {
|
|
143
144
|
items: [
|
|
144
145
|
{ label: 'section-one' },
|
|
@@ -163,7 +164,7 @@ FullWidth.args = {
|
|
|
163
164
|
|
|
164
165
|
export const Buttons = Template.bind({});
|
|
165
166
|
Buttons.args = {
|
|
166
|
-
width: '
|
|
167
|
+
width: '100%',
|
|
167
168
|
module: {
|
|
168
169
|
items: [
|
|
169
170
|
{ label: 'section-one' },
|
|
@@ -180,6 +181,7 @@ Buttons.args = {
|
|
|
180
181
|
{ label: 'section-twelf' },
|
|
181
182
|
],
|
|
182
183
|
},
|
|
184
|
+
fullScrollWidth: false,
|
|
183
185
|
isShowButtons: true,
|
|
184
186
|
sliderGap: 10,
|
|
185
187
|
headerOffset: 80,
|
|
@@ -40,12 +40,14 @@ export const processRelations = (
|
|
|
40
40
|
selling_point_short_names,
|
|
41
41
|
translations
|
|
42
42
|
);
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
if (ribbons && ribbons.length) {
|
|
44
|
+
ribbons.forEach((res, indexOfRibbon) => {
|
|
45
|
+
ribbons[indexOfRibbon] = data.ribbons[res] ? data.ribbons[res]?.label : null;
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
// filter out null ribbons
|
|
49
|
+
page.relation.ribbons = ribbons.filter(n => n);
|
|
50
|
+
}
|
|
49
51
|
if (ribbons && ribbons.length === 0 && extra_fields.ribbon_text) {
|
|
50
52
|
page.relation.ribbons = extra_fields.ribbon_text.split(',');
|
|
51
53
|
}
|
|
@@ -146,6 +146,24 @@
|
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
+
@mixin border-gradient-single($color-1, $bgcolor, $radius: 0.8rem, $border-width: 0.1rem) {
|
|
150
|
+
background: $bgcolor;
|
|
151
|
+
&:before {
|
|
152
|
+
content: '';
|
|
153
|
+
position: absolute;
|
|
154
|
+
top: 0;
|
|
155
|
+
left: 0;
|
|
156
|
+
right: 0;
|
|
157
|
+
bottom: 0;
|
|
158
|
+
border-radius: $radius;
|
|
159
|
+
border: $border-width solid transparent;
|
|
160
|
+
background: $color-1 border-box;
|
|
161
|
+
-webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
|
|
162
|
+
-webkit-mask-composite: destination-out;
|
|
163
|
+
mask-composite: exclude;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
149
167
|
@mixin buttonsColor($color1, $color2, $color3, $textColor: 'white') {
|
|
150
168
|
display: inline-flex;
|
|
151
169
|
align-items: center;
|