gatsby-core-theme 30.0.34 → 30.0.36
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 +28 -0
- package/package.json +1 -1
- package/src/components/molecules/module/module.module.scss +6 -0
- package/src/components/molecules/spotlights_v2/icon/template-one/template-one.module.scss +6 -0
- package/src/components/molecules/spotlights_v2/image/template-one/template-one.module.scss +13 -0
- package/src/components/molecules/spotlights_v2/image/template-two/template-two.module.scss +14 -2
- package/src/components/molecules/spotlights_v2/image-text/template-one/index.js +1 -1
- package/src/components/molecules/spotlights_v2/image-text/template-one/template-one.module.scss +4 -1
- package/src/components/molecules/spotlights_v2/image-text/template-three/item/style.module.scss +9 -5
- package/src/components/molecules/spotlights_v2/image-text/template-three/template-three.module.scss +0 -76
- package/src/components/molecules/spotlights_v2/image-text/template-two/template-two.module.scss +1 -0
- package/src/components/organisms/anchor/template-one/anchor.module.scss +135 -46
- package/src/components/organisms/anchor/template-one/anchor.stories.js +27 -2
- package/src/components/organisms/anchor/template-one/index.js +41 -22
- package/src/constants/pick-keys.mjs +1 -0
- package/src/constants/settings.mjs +2 -0
- package/src/hooks/scroll-x/index.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
## [30.0.36](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v30.0.35...v30.0.36) (2023-12-18)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* anchor storybook ([dfa8123](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/dfa8123822358d409b3b1c007cc316880a751a84))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Code Refactoring
|
|
10
|
+
|
|
11
|
+
* changes to settings ([3120777](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/3120777b9c82077766e2b6cb49cf5810f1c43917))
|
|
12
|
+
|
|
13
|
+
## [30.0.35](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v30.0.34...v30.0.35) (2023-12-18)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
* add dev data for core theme ([924b94e](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/924b94e87352be7417cbb5d6b0285e0a388d7ab1))
|
|
19
|
+
* anchor link ([55a7e76](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/55a7e76c868a9933697436ecbf43355a3718fddb))
|
|
20
|
+
* anchor links ([999185e](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/999185eee11ddfc86ee25bdfcf17038613988563))
|
|
21
|
+
* make style ([cbd7c17](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/cbd7c1717419cae1d58f36fe562d41483432a21a))
|
|
22
|
+
* make style ([48ecae0](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/48ecae03f8ba0aa3487bd2908e816a1a68251f16))
|
|
23
|
+
* make style and delete unused css ([f5077d5](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/f5077d5b51f7188b8e6b6235a3898e8e4614d856))
|
|
24
|
+
* small scss change ([5ff3c80](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/5ff3c803e86858a3d65aa1eba38cad70584ac19d))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
* Merge branch 'tm-3800-anchor-link' into 'master' ([fc1e436](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/fc1e4368d16e9f35f59dc53d892b7bbe48538ca2))
|
|
28
|
+
|
|
1
29
|
## [30.0.34](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v30.0.33...v30.0.34) (2023-12-12)
|
|
2
30
|
|
|
3
31
|
|
package/package.json
CHANGED
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
box-shadow: 0px 4px 4px -2px rgba(27, 27, 28, 0.04), 0px 6px 8px -2px rgba(27, 27, 28, 0.06);
|
|
18
18
|
padding: 1.6rem 0.8rem;
|
|
19
19
|
text-decoration: none;
|
|
20
|
+
@include min(laptop){
|
|
21
|
+
min-height: 29.4rem;
|
|
22
|
+
}
|
|
20
23
|
}
|
|
21
24
|
img {
|
|
22
25
|
width: 6.4rem;
|
|
@@ -25,6 +28,8 @@
|
|
|
25
28
|
@include min(tablet){
|
|
26
29
|
width: 10.4rem;
|
|
27
30
|
height: 10.4rem;
|
|
31
|
+
margin-top: 4rem;
|
|
32
|
+
margin-bottom: 1.2rem;
|
|
28
33
|
}
|
|
29
34
|
}
|
|
30
35
|
p {
|
|
@@ -38,6 +43,7 @@
|
|
|
38
43
|
@include min(tablet){
|
|
39
44
|
font-size: 2.4rem;
|
|
40
45
|
line-height: 3.2rem;
|
|
46
|
+
padding: 0 2rem;
|
|
41
47
|
}
|
|
42
48
|
}
|
|
43
49
|
span{
|
|
@@ -5,8 +5,17 @@
|
|
|
5
5
|
@include flex-align(center, center);
|
|
6
6
|
gap: 1.6rem;
|
|
7
7
|
@include min(tablet) {
|
|
8
|
+
@include flex-direction(row);
|
|
9
|
+
@include flex-align(start, start);
|
|
10
|
+
overflow-x: scroll;
|
|
11
|
+
&::-webkit-scrollbar {
|
|
12
|
+
display: none;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
@include min(laptop) {
|
|
8
16
|
display: grid;
|
|
9
17
|
grid-template-columns: repeat(3, 1fr);
|
|
18
|
+
overflow-x: hidden;
|
|
10
19
|
}
|
|
11
20
|
> * {
|
|
12
21
|
border-radius: 1.6rem;
|
|
@@ -15,7 +24,11 @@
|
|
|
15
24
|
width: 100%;
|
|
16
25
|
padding: 2.4rem;
|
|
17
26
|
gap: 1.6rem;
|
|
27
|
+
height: 100%;
|
|
18
28
|
@include flex-direction(column);
|
|
29
|
+
@include min-max(tablet, tablet) {
|
|
30
|
+
min-width: 28.8rem;
|
|
31
|
+
}
|
|
19
32
|
> img {
|
|
20
33
|
width: 100%;
|
|
21
34
|
height: 26rem;
|
|
@@ -5,6 +5,14 @@
|
|
|
5
5
|
@include flex-align(center, center);
|
|
6
6
|
gap: 1.6rem;
|
|
7
7
|
@include min(tablet) {
|
|
8
|
+
@include flex-direction(row);
|
|
9
|
+
@include flex-align(stretch, start);
|
|
10
|
+
overflow-x: scroll;
|
|
11
|
+
&::-webkit-scrollbar {
|
|
12
|
+
display: none;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
@include min(laptop) {
|
|
8
16
|
display: grid;
|
|
9
17
|
grid-template-columns: repeat(3, 1fr);
|
|
10
18
|
}
|
|
@@ -13,7 +21,11 @@
|
|
|
13
21
|
background: var(--spotlight-template-two-backgorund-image-mode, #fff);
|
|
14
22
|
box-shadow: 0px 4px 6px -2px rgba(27, 27, 28, 0.02), 0px 12px 16px -4px rgba(27, 27, 28, 0.05);
|
|
15
23
|
width: 100%;
|
|
24
|
+
height: 100%;
|
|
16
25
|
@include flex-direction(column);
|
|
26
|
+
@include min-max(tablet, tablet) {
|
|
27
|
+
min-width: 28rem;
|
|
28
|
+
}
|
|
17
29
|
> img {
|
|
18
30
|
width: 100%;
|
|
19
31
|
height: 26.8rem;
|
|
@@ -31,11 +43,11 @@
|
|
|
31
43
|
@include flex-direction(row);
|
|
32
44
|
@include flex-align(center, space-between);
|
|
33
45
|
>svg{
|
|
34
|
-
width: 5.6rem;
|
|
46
|
+
min-width: 5.6rem;
|
|
35
47
|
height: 5.6rem;
|
|
36
48
|
background-color: var(--spotlight-template-two-button-color-image-mode, #6E33E5);
|
|
37
49
|
border-radius: 100%;
|
|
38
|
-
padding:2rem
|
|
50
|
+
padding:2rem;
|
|
39
51
|
}
|
|
40
52
|
}
|
|
41
53
|
}
|
|
@@ -18,7 +18,7 @@ export default function TemplateOne({ module, scrollableContent = false }) {
|
|
|
18
18
|
items?.map((res) => {
|
|
19
19
|
const TitleTag = res?.title_tag || 'label';
|
|
20
20
|
return (
|
|
21
|
-
<div className={styles.item}>
|
|
21
|
+
<div className={`${styles.item} ${scrollableContent && styles.scrollContent}`}>
|
|
22
22
|
<div className={styles.topSection}>
|
|
23
23
|
{res?.image && (
|
|
24
24
|
<LazyImage width={300} height={176} src={imagePrettyUrl(res?.image)} />
|
package/src/components/molecules/spotlights_v2/image-text/template-one/template-one.module.scss
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
box-shadow: 0px 4px 6px -2px rgba(27, 27, 28, 0.02), 0px 12px 16px -4px rgba(27, 27, 28, 0.05);
|
|
16
16
|
width: 100%;
|
|
17
17
|
height: 100%;
|
|
18
|
-
padding:
|
|
18
|
+
padding: 1.6rem;
|
|
19
19
|
gap: 1.6rem;
|
|
20
20
|
@include flex-direction(column);
|
|
21
21
|
@include flex-align(start, space-between);
|
|
@@ -76,3 +76,6 @@
|
|
|
76
76
|
background: #555;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
+
.scrollContent{
|
|
80
|
+
padding: 2.4rem;
|
|
81
|
+
}
|
package/src/components/molecules/spotlights_v2/image-text/template-three/item/style.module.scss
CHANGED
|
@@ -8,23 +8,27 @@
|
|
|
8
8
|
align-items: flex-start;
|
|
9
9
|
}
|
|
10
10
|
> img {
|
|
11
|
-
width:
|
|
12
|
-
height:
|
|
11
|
+
width: 8rem;
|
|
12
|
+
height: 8rem;
|
|
13
13
|
object-fit: cover;
|
|
14
14
|
border-radius: 100%;
|
|
15
15
|
margin-bottom: 1.6rem;
|
|
16
16
|
@include min(tablet) {
|
|
17
17
|
grid-column: 1/2;
|
|
18
18
|
grid-row: 1/5;
|
|
19
|
-
width:
|
|
20
|
-
height:
|
|
19
|
+
width: 12rem;
|
|
20
|
+
height: 12rem;
|
|
21
21
|
margin-top: 4rem;
|
|
22
22
|
margin-right: 2.4rem;
|
|
23
23
|
}
|
|
24
|
+
@include min(laptop){
|
|
25
|
+
width: 12.6rem;
|
|
26
|
+
height: 12.6rem;
|
|
27
|
+
}
|
|
24
28
|
}
|
|
25
29
|
> label {
|
|
26
30
|
color: var(--spotlight-template-two-label-image-text-mode, #1b1b1c);
|
|
27
|
-
font-size:
|
|
31
|
+
font-size: 1.8rem;
|
|
28
32
|
font-style: normal;
|
|
29
33
|
font-weight: 700;
|
|
30
34
|
line-height: 2.8rem;
|
package/src/components/molecules/spotlights_v2/image-text/template-three/template-three.module.scss
CHANGED
|
@@ -5,80 +5,4 @@
|
|
|
5
5
|
@include flex-align(center, center);
|
|
6
6
|
gap: 1.6rem;
|
|
7
7
|
}
|
|
8
|
-
.item {
|
|
9
|
-
border-radius: 1.6rem;
|
|
10
|
-
background: var(--spotlight-template-two-backgorund-image-text-mode, #fff);
|
|
11
|
-
box-shadow: 0px 4px 6px -2px rgba(27, 27, 28, 0.02), 0px 12px 16px -4px rgba(27, 27, 28, 0.05);
|
|
12
|
-
width: 100%;
|
|
13
|
-
height: 100%;
|
|
14
|
-
padding: 2.4rem;
|
|
15
|
-
gap: 1.6rem;
|
|
16
|
-
@include flex-direction(column);
|
|
17
|
-
@include flex-align(start, space-between);
|
|
18
|
-
> a {
|
|
19
|
-
height: 5.6rem;
|
|
20
|
-
width: 100%;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
.topSection {
|
|
24
|
-
@include flex-direction(column);
|
|
25
|
-
@include flex-align(center, center);
|
|
26
|
-
gap: .8rem;
|
|
27
|
-
> img {
|
|
28
|
-
width: 10.4rem;
|
|
29
|
-
height: 10.4rem;
|
|
30
|
-
object-fit: cover;
|
|
31
|
-
border-radius: 100%;
|
|
32
|
-
margin-bottom: 1.6rem;
|
|
33
|
-
}
|
|
34
|
-
> label {
|
|
35
|
-
color: var(--spotlight-template-two-label-image-text-mode, #1b1b1c);
|
|
36
|
-
font-size: 2rem;
|
|
37
|
-
font-style: normal;
|
|
38
|
-
font-weight: 700;
|
|
39
|
-
line-height: 2.8rem;
|
|
40
|
-
text-transform: capitalize;
|
|
41
|
-
}
|
|
42
|
-
> span {
|
|
43
|
-
color: #64646d;
|
|
44
|
-
text-align: center;
|
|
45
|
-
font-size: 1.4rem;
|
|
46
|
-
font-style: normal;
|
|
47
|
-
font-weight: 700;
|
|
48
|
-
line-height: 2.2rem;
|
|
49
|
-
margin-bottom: 1.6rem;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
8
|
|
|
53
|
-
.desc {
|
|
54
|
-
color: var(--uspotlight-template-one-desc-image-text-mode, #515156);
|
|
55
|
-
text-align: justify;
|
|
56
|
-
font-size: 1.6rem;
|
|
57
|
-
font-style: normal;
|
|
58
|
-
font-weight: 400;
|
|
59
|
-
line-height: 2.7rem;
|
|
60
|
-
margin-bottom: 0.8rem;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.scroll {
|
|
64
|
-
height: 16.2rem;
|
|
65
|
-
overflow-y: scroll;
|
|
66
|
-
padding-right: 1.6rem;
|
|
67
|
-
&::-webkit-scrollbar {
|
|
68
|
-
width: 0.6rem;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&::-webkit-scrollbar-track {
|
|
72
|
-
background: #c4c4c4;
|
|
73
|
-
border-radius: 0.5rem;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
&::-webkit-scrollbar-thumb {
|
|
77
|
-
background: #515156;
|
|
78
|
-
border-radius: 0.5rem;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
&::-webkit-scrollbar-thumb:hover {
|
|
82
|
-
background: #555;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
@keyframes fadeIn {
|
|
2
|
+
0% {
|
|
3
|
+
opacity: 0;
|
|
4
|
+
}
|
|
5
|
+
100% {
|
|
6
|
+
opacity: 1;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
1
10
|
.containerAnchor {
|
|
2
11
|
min-height: 8.4rem;
|
|
3
12
|
}
|
|
@@ -12,10 +21,10 @@
|
|
|
12
21
|
left: 0;
|
|
13
22
|
right: 0;
|
|
14
23
|
top: var(--nav-height);
|
|
15
|
-
}
|
|
16
24
|
|
|
17
|
-
|
|
18
|
-
|
|
25
|
+
&.usingExclOperator {
|
|
26
|
+
top: calc(var(--nav-height) + var(--exc-operator-height));
|
|
27
|
+
}
|
|
19
28
|
}
|
|
20
29
|
|
|
21
30
|
.progressBar {
|
|
@@ -29,18 +38,8 @@
|
|
|
29
38
|
position: relative;
|
|
30
39
|
}
|
|
31
40
|
|
|
32
|
-
@keyframes fadeIn {
|
|
33
|
-
0% {
|
|
34
|
-
opacity: 0;
|
|
35
|
-
}
|
|
36
|
-
100% {
|
|
37
|
-
opacity: 1;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
41
|
.anchor {
|
|
42
|
-
|
|
43
|
-
max-width: var(--anchor-max-width, --main-container-max);
|
|
42
|
+
max-width: var(--main-container-max);
|
|
44
43
|
margin: 0 auto;
|
|
45
44
|
@include flex-direction(row);
|
|
46
45
|
&::-webkit-scrollbar {
|
|
@@ -55,6 +54,7 @@
|
|
|
55
54
|
}
|
|
56
55
|
overflow-x: scroll;
|
|
57
56
|
}
|
|
57
|
+
|
|
58
58
|
.link {
|
|
59
59
|
word-break: inherit;
|
|
60
60
|
white-space: nowrap;
|
|
@@ -110,65 +110,154 @@
|
|
|
110
110
|
.buttLeft,
|
|
111
111
|
.buttRight {
|
|
112
112
|
@include flex-align(center, center);
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
113
|
+
background-color: var(--body-background-color, white);
|
|
114
|
+
@include flex-align(center, center);
|
|
115
|
+
display: none;
|
|
116
|
+
z-index: 1;
|
|
117
|
+
|
|
118
|
+
@include custom-min(960) {
|
|
119
|
+
display: flex;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
> svg {
|
|
123
|
+
width: 3.2rem;
|
|
124
|
+
height: 3.2rem;
|
|
125
|
+
padding: 0.8rem;
|
|
126
|
+
color: #ffffff;
|
|
127
|
+
background-color: #262629;
|
|
128
|
+
border-radius: 10rem;
|
|
129
|
+
}
|
|
120
130
|
}
|
|
121
131
|
|
|
122
132
|
.disabled {
|
|
123
|
-
|
|
124
|
-
|
|
133
|
+
> svg {
|
|
134
|
+
color: #515156;
|
|
135
|
+
background-color: #f4f4f4;
|
|
136
|
+
}
|
|
125
137
|
}
|
|
126
138
|
|
|
127
139
|
.staticShowButtons {
|
|
128
140
|
display: flex;
|
|
129
|
-
gap: 1.6rem;
|
|
130
141
|
|
|
131
|
-
>
|
|
132
|
-
|
|
142
|
+
> button:first-child {
|
|
143
|
+
padding-right: 1.6rem;
|
|
133
144
|
}
|
|
134
145
|
|
|
135
|
-
> button {
|
|
136
|
-
|
|
146
|
+
> button:last-of-type {
|
|
147
|
+
padding-left: 1.6rem;
|
|
137
148
|
}
|
|
138
149
|
}
|
|
139
150
|
|
|
140
151
|
.stickyShowButtons {
|
|
141
152
|
> button:first-child {
|
|
142
153
|
position: absolute;
|
|
143
|
-
top: 0.
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
154
|
+
top: 0.6rem;
|
|
155
|
+
padding-right: 1.6rem;
|
|
156
|
+
height: 4rem;
|
|
157
|
+
@include custom-min(960) {
|
|
158
|
+
left: calc(50% - (var(--anchor-max-width, --main-container-max) / 2) - 2.6rem);
|
|
159
|
+
transform: translateX(50%);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
147
162
|
|
|
148
|
-
|
|
149
|
-
|
|
163
|
+
> button:last-of-type {
|
|
164
|
+
position: absolute;
|
|
165
|
+
top: 0.6rem;
|
|
166
|
+
height: 4rem;
|
|
167
|
+
padding-left: 1.6rem;
|
|
168
|
+
@include custom-min(960) {
|
|
169
|
+
right: calc(50% - (var(--anchor-max-width, --main-container-max) / 2) - 2.6rem);
|
|
150
170
|
transform: translateX(-50%);
|
|
151
171
|
}
|
|
152
172
|
}
|
|
153
173
|
|
|
154
|
-
>
|
|
174
|
+
> ul {
|
|
175
|
+
> li:first-child {
|
|
176
|
+
margin-left: 4.8rem;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
> li:last-child {
|
|
180
|
+
margin-right: 4.8rem;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.containerAnchorFullWidth {
|
|
186
|
+
max-width: 100% !important;
|
|
187
|
+
padding: 0 !important;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.titleFullWidth {
|
|
191
|
+
padding: 0 1.6rem;
|
|
192
|
+
max-width: var(--anchor-max-width, --main-container-max);
|
|
193
|
+
margin: 0 auto;
|
|
194
|
+
|
|
195
|
+
@include min(tablet) {
|
|
196
|
+
padding: 0 2.4rem;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.staticFullScrollWidth {
|
|
201
|
+
max-width: unset;
|
|
202
|
+
|
|
203
|
+
&::before {
|
|
204
|
+
content: '';
|
|
155
205
|
position: absolute;
|
|
156
|
-
top: 0
|
|
206
|
+
top: 0;
|
|
207
|
+
left: 0;
|
|
208
|
+
display: block;
|
|
209
|
+
background-color: var(--body-background-color, white);
|
|
210
|
+
width: calc((100% - var(--anchor-max-width, --main-container-max)) / 2 + 1.6rem);
|
|
211
|
+
height: 4.5rem;
|
|
212
|
+
z-index: 1;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
&::after {
|
|
216
|
+
content: '';
|
|
217
|
+
position: absolute;
|
|
218
|
+
top: 0;
|
|
157
219
|
right: 0;
|
|
158
|
-
|
|
159
|
-
|
|
220
|
+
display: block;
|
|
221
|
+
background-color: var(--body-background-color, white);
|
|
222
|
+
width: calc((100% - var(--anchor-max-width, --main-container-max)) / 2 + 1.6rem);
|
|
223
|
+
height: 4.5rem;
|
|
224
|
+
z-index: 1;
|
|
225
|
+
}
|
|
160
226
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
227
|
+
> button:first-child {
|
|
228
|
+
position: absolute;
|
|
229
|
+
z-index: 2;
|
|
230
|
+
left: calc((100% - var(--anchor-max-width, --main-container-max)) / 2 + 1.6rem);
|
|
231
|
+
height: 4.5rem;
|
|
232
|
+
padding-right: 1.6rem;
|
|
165
233
|
}
|
|
166
234
|
|
|
167
|
-
>
|
|
168
|
-
|
|
235
|
+
> button:last-of-type {
|
|
236
|
+
position: absolute;
|
|
237
|
+
z-index: 2;
|
|
238
|
+
right: calc((100% - var(--anchor-max-width, --main-container-max)) / 2 + 1.6rem);
|
|
239
|
+
height: 4.5rem;
|
|
240
|
+
padding-left: 1.6rem;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
> ul {
|
|
244
|
+
max-width: unset !important;
|
|
245
|
+
margin: 0 !important;
|
|
246
|
+
|
|
247
|
+
&::-webkit-scrollbar {
|
|
248
|
+
display: block !important;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
> li:first-child {
|
|
252
|
+
padding-left: calc(
|
|
253
|
+
(100% - var(--anchor-max-width, --main-container-max)) / 2 + 6.8rem
|
|
254
|
+
) !important;
|
|
255
|
+
}
|
|
169
256
|
|
|
170
|
-
|
|
171
|
-
|
|
257
|
+
> li:last-child {
|
|
258
|
+
padding-right: calc(
|
|
259
|
+
(100% - var(--anchor-max-width, --main-container-max)) / 2 + 6.8rem
|
|
260
|
+
) !important;
|
|
172
261
|
}
|
|
173
262
|
}
|
|
174
263
|
}
|
|
@@ -136,8 +136,33 @@ Default.args = {
|
|
|
136
136
|
headerOffset: 20,
|
|
137
137
|
};
|
|
138
138
|
|
|
139
|
-
export const
|
|
140
|
-
|
|
139
|
+
export const FullWidth = Template.bind({});
|
|
140
|
+
FullWidth.args = {
|
|
141
|
+
width: '90%',
|
|
142
|
+
module: {
|
|
143
|
+
items: [
|
|
144
|
+
{ label: 'section-one' },
|
|
145
|
+
{ label: 'section-two' },
|
|
146
|
+
{ label: 'section-three' },
|
|
147
|
+
{ label: 'section-four' },
|
|
148
|
+
{ label: 'section-five' },
|
|
149
|
+
{ label: 'section-six' },
|
|
150
|
+
{ label: 'section-seven' },
|
|
151
|
+
{ label: 'section-eight' },
|
|
152
|
+
{ label: 'section-nine' },
|
|
153
|
+
{ label: 'section-ten' },
|
|
154
|
+
{ label: 'section-eleven' },
|
|
155
|
+
{ label: 'section-twelf' },
|
|
156
|
+
],
|
|
157
|
+
},
|
|
158
|
+
fullScrollWidth: true,
|
|
159
|
+
isShowButtons: true,
|
|
160
|
+
sliderGap: 10,
|
|
161
|
+
headerOffset: 80,
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
export const Buttons = Template.bind({});
|
|
165
|
+
Buttons.args = {
|
|
141
166
|
width: '90%',
|
|
142
167
|
module: {
|
|
143
168
|
items: [
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable no-nested-ternary */
|
|
1
2
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
2
3
|
/* eslint-disable no-unused-expressions */
|
|
3
4
|
/* eslint-disable prefer-destructuring */
|
|
@@ -29,10 +30,11 @@ function Anchor({
|
|
|
29
30
|
buttonScroll = 200,
|
|
30
31
|
leftButtonIcon = <IoIosArrowBack />,
|
|
31
32
|
rightButtonIcon = <IoIosArrowForward />,
|
|
33
|
+
fullScrollWidth = false,
|
|
32
34
|
}) {
|
|
33
35
|
const [scrollX, setScrollX] = useState(0);
|
|
34
36
|
const [scrollEnd, setScrollEnd] = useState(false);
|
|
35
|
-
const [showButtons, setShowButtons] = useState(
|
|
37
|
+
const [showButtons, setShowButtons] = useState(isShowButtons);
|
|
36
38
|
|
|
37
39
|
const itemsRef = useRef([]);
|
|
38
40
|
const anchorContainerRef = useRef(null);
|
|
@@ -51,6 +53,7 @@ function Anchor({
|
|
|
51
53
|
anchorListRef.current.offsetWidth
|
|
52
54
|
);
|
|
53
55
|
};
|
|
56
|
+
|
|
54
57
|
const scroll = (shift) => {
|
|
55
58
|
anchorListRef.current.scrollTo({
|
|
56
59
|
left: anchorListRef.current.scrollLeft + shift,
|
|
@@ -149,24 +152,53 @@ function Anchor({
|
|
|
149
152
|
anchorListRef.current.scrollLeft = 0;
|
|
150
153
|
}
|
|
151
154
|
} else if (anchorListRef.current) {
|
|
152
|
-
anchorListRef.current.scrollLeft = 0;
|
|
155
|
+
// anchorListRef.current.scrollLeft = 0;
|
|
153
156
|
}
|
|
154
157
|
};
|
|
155
158
|
|
|
156
159
|
const sticky = isFixed && isSticky(stickyOffset, setActiveAnchor, anchorContainerRef);
|
|
157
160
|
|
|
161
|
+
const anchorItems = anchorList?.map((item, index) => (
|
|
162
|
+
<li className={styles.anchorItem || ''}>
|
|
163
|
+
<a
|
|
164
|
+
className={`${styles.link || ''} anchor-carousel-gtm anchor-menu-gtm`}
|
|
165
|
+
key={keygen()}
|
|
166
|
+
draggable="false"
|
|
167
|
+
// eslint-disable-next-line no-return-assign
|
|
168
|
+
ref={(el) => (itemsRef.current[index] = el)}
|
|
169
|
+
onClick={handleClick}
|
|
170
|
+
href={`#${item?.id && item.id}`}
|
|
171
|
+
>
|
|
172
|
+
{translate(translations, item.slug, item.label)}
|
|
173
|
+
{icon}
|
|
174
|
+
</a>
|
|
175
|
+
</li>
|
|
176
|
+
));
|
|
177
|
+
|
|
158
178
|
return (
|
|
159
|
-
<div
|
|
179
|
+
<div
|
|
180
|
+
className={`${styles.containerAnchor || ''} ${
|
|
181
|
+
(fullScrollWidth && !sticky && styles.containerAnchorFullWidth) || ''
|
|
182
|
+
}`}
|
|
183
|
+
ref={anchorContainerRef}
|
|
184
|
+
>
|
|
160
185
|
{showTitle ? (
|
|
161
|
-
<div className={styles.anchorTitle || ''}>
|
|
186
|
+
<div className={`${styles.anchorTitle || ''} ${fullScrollWidth && styles.titleFullWidth}`}>
|
|
162
187
|
<span>{translate(translations, 'anchor_title', 'Table of Contents')}</span>
|
|
163
188
|
</div>
|
|
164
189
|
) : null}
|
|
165
190
|
<div
|
|
166
191
|
className={`${sticky ? styles.stickyContainer || '' : styles.defaultConatiner || ''} ${
|
|
167
|
-
// eslint-disable-next-line no-nested-ternary, no-undef
|
|
168
192
|
showButtons ? (sticky ? styles.stickyShowButtons : styles.staticShowButtons) : ''
|
|
169
|
-
}
|
|
193
|
+
}
|
|
194
|
+
${
|
|
195
|
+
fullScrollWidth
|
|
196
|
+
? sticky
|
|
197
|
+
? styles.stickyFullScrollWidth
|
|
198
|
+
: styles.staticFullScrollWidth
|
|
199
|
+
: ''
|
|
200
|
+
}
|
|
201
|
+
${exclOperator ? styles.usingExclOperator || '' : ''}`}
|
|
170
202
|
>
|
|
171
203
|
{showButtons && (
|
|
172
204
|
<button
|
|
@@ -182,24 +214,10 @@ function Anchor({
|
|
|
182
214
|
scroll={isScrollable}
|
|
183
215
|
stopScrolling={() => onStopScrolling()}
|
|
184
216
|
onScroll={onScroll}
|
|
217
|
+
leftPosition={scrollX}
|
|
185
218
|
>
|
|
186
219
|
<ul ref={anchorListRef} className={`${styles.anchor || ''}`}>
|
|
187
|
-
{
|
|
188
|
-
<li className={styles.anchorItem || ''}>
|
|
189
|
-
<a
|
|
190
|
-
className={`${styles.link || ''} anchor-carousel-gtm anchor-menu-gtm`}
|
|
191
|
-
key={keygen()}
|
|
192
|
-
draggable="false"
|
|
193
|
-
// eslint-disable-next-line no-return-assign
|
|
194
|
-
ref={(el) => (itemsRef.current[index] = el)}
|
|
195
|
-
onClick={handleClick}
|
|
196
|
-
href={`#${item?.id && item.id}`}
|
|
197
|
-
>
|
|
198
|
-
{translate(translations, item.slug, item.label)}
|
|
199
|
-
{icon}
|
|
200
|
-
</a>
|
|
201
|
-
</li>
|
|
202
|
-
))}
|
|
220
|
+
{anchorItems}
|
|
203
221
|
</ul>
|
|
204
222
|
</ScollX>
|
|
205
223
|
{showButtons && (
|
|
@@ -240,6 +258,7 @@ Anchor.propTypes = {
|
|
|
240
258
|
buttonScroll: PropTypes.number,
|
|
241
259
|
leftButtonIcon: PropTypes.shape({}),
|
|
242
260
|
rightButtonIcon: PropTypes.shape({}),
|
|
261
|
+
fullScrollWidth: PropTypes.bool,
|
|
243
262
|
};
|
|
244
263
|
|
|
245
264
|
export default Anchor;
|
|
@@ -22,6 +22,8 @@ export default {
|
|
|
22
22
|
'partnerships.gigmedia.com': ['inactive', 'blacklisted'],
|
|
23
23
|
'habibibet.org': ['inactive', 'blacklisted'],
|
|
24
24
|
'xn--nt-casino-v2a.se': ['inactive', 'blacklisted'],
|
|
25
|
+
'casinomobile.co.za': [],
|
|
26
|
+
'betamericalatina.com': ['inactive', 'blacklisted'],
|
|
25
27
|
},
|
|
26
28
|
keep_page_extra_fields: {
|
|
27
29
|
operator: {
|