gatsby-core-theme 40.0.1 → 40.0.2
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
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [40.0.2](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v40.0.1...v40.0.2) (2024-10-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add extra classname when admin navbar is present ([5e41df2](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/5e41df2c567e3a6ef861ad9c3e33d490ac779bed))
|
|
7
|
+
* added show less fallback ([1215791](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/12157910702e1006d5cd20363037e7a35b65f055))
|
|
8
|
+
* build error ([67d198a](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/67d198ae9d2e5d028865a13bbf4ef7ea5946255d))
|
|
9
|
+
* make pros and cons titles translatable ([7387f5e](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/7387f5e7f8a6f44615b401c662288c922900f9f3))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
* Merge branch 'update-navbar-style' into 'master' ([ec10b56](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/ec10b5631416cde4ce2761b4a4adb5e221bc8e96))
|
|
13
|
+
* Merge branch 'pros-cons-translatable' into 'master' ([ec62390](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/ec6239009fc64b163f556f673f6702eec52823cf))
|
|
14
|
+
|
|
1
15
|
## [40.0.1](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v40.0.0...v40.0.1) (2024-10-10)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -60,7 +60,7 @@ const Faq = ({ module, closeAll = false, openItem, closeOthers = false, icon = '
|
|
|
60
60
|
return (
|
|
61
61
|
<>
|
|
62
62
|
<div className={styles.faqContainer || ''}>
|
|
63
|
-
{items.map((item, index) => (
|
|
63
|
+
{items && items.map((item, index) => (
|
|
64
64
|
<div key={keygen()} className={styles.faqItem || ''}>
|
|
65
65
|
<div
|
|
66
66
|
onClick={() => toggle(index)}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/* eslint-disable no-unused-expressions */
|
|
2
2
|
/* eslint-disable no-restricted-syntax */
|
|
3
|
-
import React, { useRef } from "react";
|
|
3
|
+
import React, { useContext, useRef } from "react";
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
5
|
import styles from "./mega-item.module.scss";
|
|
6
6
|
import Item from "../items/item";
|
|
7
7
|
import Toplist from "~molecules/toplist/header";
|
|
8
|
+
import { Context } from "~context/MainProvider.js";
|
|
8
9
|
import { getPositionClass } from "~helpers/menu";
|
|
9
10
|
import { isMobileDevice } from "~helpers/device-detect";
|
|
10
11
|
|
|
@@ -14,6 +15,7 @@ const Items = ({ item, gtmClass = "", level = 1, toplist }) => {
|
|
|
14
15
|
const subMenuListRef = useRef(null);
|
|
15
16
|
const megaItemRef = useRef(null);
|
|
16
17
|
const parentMenuRef = useRef(null);
|
|
18
|
+
const { admin } = useContext(Context) || {};
|
|
17
19
|
|
|
18
20
|
const onClick = () => {
|
|
19
21
|
subMenuListRef.current.classList.toggle(styles.show);
|
|
@@ -53,7 +55,12 @@ const Items = ({ item, gtmClass = "", level = 1, toplist }) => {
|
|
|
53
55
|
>
|
|
54
56
|
{link}
|
|
55
57
|
{item.children && (
|
|
56
|
-
<div
|
|
58
|
+
<div
|
|
59
|
+
ref={megaItemRef}
|
|
60
|
+
className={`${styles.subMenuList || ""} ${
|
|
61
|
+
admin && styles.adminPresent || ''
|
|
62
|
+
}`}
|
|
63
|
+
>
|
|
57
64
|
<div className={styles.megaContainer}>
|
|
58
65
|
<ul ref={subMenuListRef} className={`${styles.megaItems}`}>
|
|
59
66
|
{item.children.map((child) => (
|
|
@@ -107,7 +107,7 @@ const Content = ({
|
|
|
107
107
|
onClick={handleChange}
|
|
108
108
|
title="showMoreContentButton"
|
|
109
109
|
>
|
|
110
|
-
{showMore ? show_less_label : show_more_label}
|
|
110
|
+
{showMore ? show_less_label || show_more_label : show_more_label}
|
|
111
111
|
{icon && isContentCollapsible && icon}
|
|
112
112
|
</button>
|
|
113
113
|
|
|
@@ -4,12 +4,13 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
|
|
5
5
|
import styles from './pros-cons.module.scss';
|
|
6
6
|
import keygen from '~helpers/keygen';
|
|
7
|
+
import useTranslate from "~hooks/useTranslate/useTranslate";
|
|
7
8
|
|
|
8
9
|
const ProsCons = ({ module = {}, pros = 'Pros', cons = 'Cons', icons }) => (
|
|
9
10
|
<div className={styles.prosCons || ''}>
|
|
10
11
|
<div className={styles.pros || ''}>
|
|
11
12
|
{icons && <span className={styles.icon || ''}>{icons[0]}</span>}
|
|
12
|
-
<span className={styles.title || ''}>{pros}</span>
|
|
13
|
+
<span className={styles.title || ''}>{useTranslate('pros', pros)}</span>
|
|
13
14
|
<ul>
|
|
14
15
|
{module.pros?.map((perk) => (
|
|
15
16
|
<li key={keygen()}>
|
|
@@ -21,7 +22,7 @@ const ProsCons = ({ module = {}, pros = 'Pros', cons = 'Cons', icons }) => (
|
|
|
21
22
|
</div>
|
|
22
23
|
<div className={styles.cons || ''}>
|
|
23
24
|
{icons && <span className={styles.icon || ''}>{icons[1]}</span>}
|
|
24
|
-
<span className={styles.title || ''}>{cons}</span>
|
|
25
|
+
<span className={styles.title || ''}>{useTranslate('pros', cons)}</span>
|
|
25
26
|
<ul>
|
|
26
27
|
{module.cons?.map((con) => (
|
|
27
28
|
<li key={keygen()}>
|