gatsby-core-theme 29.0.0 → 29.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 +14 -0
- package/gatsby-node.mjs +1 -1
- package/package.json +1 -1
- package/src/components/atoms/menu/items/index.js +11 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [29.0.2](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v29.0.1...v29.0.2) (2023-09-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* main menu ([a20db33](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/a20db33c25997d78716b06fbb90473649682950a))
|
|
7
|
+
|
|
8
|
+
## [29.0.1](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v29.0.0...v29.0.1) (2023-09-04)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* change path from translation ([c57611a](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/c57611aeb5bd2535fcc81125438d48ee5e6403f8))
|
|
14
|
+
|
|
1
15
|
# [29.0.0](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v28.0.6...v29.0.0) (2023-09-04)
|
|
2
16
|
|
|
3
17
|
|
package/gatsby-node.mjs
CHANGED
|
@@ -283,7 +283,7 @@ export const createPages = async ({ actions: { createPage } }, themeOptions) =>
|
|
|
283
283
|
|
|
284
284
|
if (page.path === '404') {
|
|
285
285
|
context404 = contextData;
|
|
286
|
-
} else if (page.path === `${pathPrefix || ''}sitemap`) {
|
|
286
|
+
} else if (page.path === `${pathPrefix || ''}${translate(contextData.translations, 'sitemap', 'sitemap')}`) {
|
|
287
287
|
createPage({
|
|
288
288
|
path: `/${page.path}`,
|
|
289
289
|
component: `${__dirname}/src/components/app.js`,
|
package/package.json
CHANGED
|
@@ -6,6 +6,7 @@ import keygen from '~helpers/keygen';
|
|
|
6
6
|
import Item from './item';
|
|
7
7
|
import styles from './items.module.scss';
|
|
8
8
|
import { getPositionClass, itemHasChildren } from '~helpers/menu';
|
|
9
|
+
import { isMobileDevice } from '~helpers/device-detect';
|
|
9
10
|
|
|
10
11
|
// Test included with menu molecule test
|
|
11
12
|
const Items = ({ item, menuListRef, gtmClass = '', level = 1, canOpenAllSubMenus = true }) => {
|
|
@@ -69,7 +70,6 @@ const Items = ({ item, menuListRef, gtmClass = '', level = 1, canOpenAllSubMenus
|
|
|
69
70
|
} else {
|
|
70
71
|
link = <Item item={item} gtmClass={gtmClass} />;
|
|
71
72
|
}
|
|
72
|
-
|
|
73
73
|
return (
|
|
74
74
|
<li
|
|
75
75
|
ref={parentMenuRef}
|
|
@@ -81,14 +81,18 @@ const Items = ({ item, menuListRef, gtmClass = '', level = 1, canOpenAllSubMenus
|
|
|
81
81
|
role="menuitem"
|
|
82
82
|
tabIndex="0"
|
|
83
83
|
onKeyDown={(e) => {
|
|
84
|
-
if (
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
if (isMobileDevice()) {
|
|
85
|
+
if (e.defaultPrevented) return;
|
|
86
|
+
e.preventDefault();
|
|
87
|
+
onClick(e);
|
|
88
|
+
}
|
|
87
89
|
}}
|
|
88
90
|
onClick={(e) => {
|
|
89
|
-
if (
|
|
90
|
-
|
|
91
|
-
|
|
91
|
+
if (isMobileDevice()) {
|
|
92
|
+
if (e.defaultPrevented) return;
|
|
93
|
+
e.preventDefault();
|
|
94
|
+
onClick(e);
|
|
95
|
+
}
|
|
92
96
|
}}
|
|
93
97
|
>
|
|
94
98
|
{link}
|