gatsby-core-theme 22.0.7 → 22.0.9
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 +25 -0
- package/gatsby-node.esm.js +10 -2
- package/package.json +1 -1
- package/src/components/app.js +9 -1
- package/src/components/atoms/breadcrumbs/index.js +4 -1
- package/src/components/atoms/sitemap/index.js +5 -6
- package/src/components/molecules/main/index.js +1 -1
- package/src/helpers/processor/index.js +5 -3
- package/src/helpers/processor/modules.js +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
## [22.0.9](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v22.0.8...v22.0.9) (2023-06-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* breadcrumbs ([83521ea](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/83521eac2c344185bf12651baf9bbcbe36ee3311))
|
|
7
|
+
* html sitemap per market ([97c0de0](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/97c0de0bf1b0f5cae88c311b945053abf9e9181a))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
* Merge branch 'tm-3510-html-sitemap' into 'master' ([c2df940](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/c2df94066ba68c8cc10bf1999b4ae26e7cc4c496))
|
|
11
|
+
|
|
12
|
+
## [22.0.8](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v22.0.7...v22.0.8) (2023-06-09)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* add the author image on the item, to use in toplist ([9aaccee](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/9aaccee6e411e67a38a3f4bef8ad7cb58e3fd4ff))
|
|
18
|
+
* feedback module bug fix ([f681982](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/f68198282a8902136f60b7c2c9bcee832691bcf4))
|
|
19
|
+
* inverted style ([6c0d4da](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/6c0d4da76fd052d576ab46e664c1527d287151e1))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
* Merge branch 'inverted_style' into 'master' ([6f32469](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/6f324695b3a54a8c4a86c3e6cf999907de0d2800))
|
|
23
|
+
* Merge branch 'tm-3223-toplist' into 'master' ([e0b3a80](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/e0b3a80f30a9a011bd5aaafe13eba7d57505f03e))
|
|
24
|
+
* Merge branch 'feedback-module-bug-fix' into 'master' ([c8c3482](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/c8c34829c05f6bd33a6f7b2d8ddcac63d84546c7))
|
|
25
|
+
|
|
1
26
|
## [22.0.7](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v22.0.6...v22.0.7) (2023-06-05)
|
|
2
27
|
|
|
3
28
|
|
package/gatsby-node.esm.js
CHANGED
|
@@ -262,13 +262,21 @@ exports.createPages = async ({ actions: { createPage } }, themeOptions) => {
|
|
|
262
262
|
...themeOptions,
|
|
263
263
|
};
|
|
264
264
|
|
|
265
|
+
const pathPrefix = processed.site_markets[siteMarket].path_prefix
|
|
266
|
+
? `${processed.site_markets[siteMarket].path_prefix}/`
|
|
267
|
+
: null;
|
|
268
|
+
|
|
265
269
|
if (page.path === '404') {
|
|
266
270
|
context404 = contextData;
|
|
267
|
-
} else if (page.path === 'sitemap
|
|
271
|
+
} else if (page.path === `${pathPrefix || ''}sitemap`) {
|
|
268
272
|
createPage({
|
|
269
273
|
path: `/${page.path}`,
|
|
270
274
|
component: require.resolve('./src/components/app.js'),
|
|
271
|
-
context: {
|
|
275
|
+
context: {
|
|
276
|
+
...contextData,
|
|
277
|
+
sitemapData: { ...htmlSitemapPages[page.market] },
|
|
278
|
+
templates,
|
|
279
|
+
},
|
|
272
280
|
});
|
|
273
281
|
} else {
|
|
274
282
|
const component =
|
package/package.json
CHANGED
package/src/components/app.js
CHANGED
|
@@ -73,7 +73,15 @@ const App = ({ pageContext }) => {
|
|
|
73
73
|
</>
|
|
74
74
|
) : (
|
|
75
75
|
<MainProvider value={{ translations }}>
|
|
76
|
-
<
|
|
76
|
+
<div
|
|
77
|
+
dir={
|
|
78
|
+
(isPreview ? previewContext.page?.language === 'ar' : pageContext.page?.language === 'ar')
|
|
79
|
+
? 'rtl'
|
|
80
|
+
: 'ltr'
|
|
81
|
+
}
|
|
82
|
+
>
|
|
83
|
+
<Body pageContext={isPreview ? previewContext : pageContext} />
|
|
84
|
+
</div>
|
|
77
85
|
</MainProvider>
|
|
78
86
|
);
|
|
79
87
|
};
|
|
@@ -12,7 +12,10 @@ function Breadcrumbs({ page, separator = <span> / </span>, markets }) {
|
|
|
12
12
|
const { translations } = useContext(Context) || {};
|
|
13
13
|
const activeMarket = markets && markets[page.market];
|
|
14
14
|
|
|
15
|
-
if (
|
|
15
|
+
if (
|
|
16
|
+
page.path ===
|
|
17
|
+
`${activeMarket && activeMarket.path_prefix ? `${activeMarket.path_prefix}/` : '/'}`
|
|
18
|
+
) {
|
|
16
19
|
return <></>;
|
|
17
20
|
}
|
|
18
21
|
const isPPC = page?.template === 'ppc';
|
|
@@ -14,7 +14,6 @@ import Link from '~hooks/link';
|
|
|
14
14
|
const Sitemap = ({ pageContext, templateIcon = <BiSitemap />, linkIcon = <IoMdLink /> }) => {
|
|
15
15
|
const { templates, sitemapData } = pageContext;
|
|
16
16
|
const { translations } = useContext(Context) || {};
|
|
17
|
-
const market = Object.keys(sitemapData)[0];
|
|
18
17
|
|
|
19
18
|
const getTemplateName = (template) => {
|
|
20
19
|
const templateName = translate(
|
|
@@ -22,7 +21,7 @@ const Sitemap = ({ pageContext, templateIcon = <BiSitemap />, linkIcon = <IoMdLi
|
|
|
22
21
|
templates[template].short_name,
|
|
23
22
|
templates[template].short_name.replace('_', ' ')
|
|
24
23
|
);
|
|
25
|
-
const templatePages = sitemapData[
|
|
24
|
+
const templatePages = sitemapData[template];
|
|
26
25
|
const templatePagesCount = templatePages && templatePages.length;
|
|
27
26
|
|
|
28
27
|
return (
|
|
@@ -39,10 +38,10 @@ const Sitemap = ({ pageContext, templateIcon = <BiSitemap />, linkIcon = <IoMdLi
|
|
|
39
38
|
};
|
|
40
39
|
|
|
41
40
|
const getTemplatePages = (template) => {
|
|
42
|
-
if (sitemapData[
|
|
43
|
-
const pageList = Object.keys(sitemapData[
|
|
41
|
+
if (sitemapData[template]) {
|
|
42
|
+
const pageList = Object.keys(sitemapData[template]).map((page) => {
|
|
44
43
|
if (page !== undefined) {
|
|
45
|
-
const pageObj = sitemapData[
|
|
44
|
+
const pageObj = sitemapData[template][page];
|
|
46
45
|
return (
|
|
47
46
|
<li key={page}>
|
|
48
47
|
{linkIcon && linkIcon}
|
|
@@ -59,7 +58,7 @@ const Sitemap = ({ pageContext, templateIcon = <BiSitemap />, linkIcon = <IoMdLi
|
|
|
59
58
|
|
|
60
59
|
return (
|
|
61
60
|
<Masonry breakpointCols={3} className={styles.container || ''} columnClassName={styles.list}>
|
|
62
|
-
{Object.keys(sitemapData
|
|
61
|
+
{Object.keys(sitemapData).map((template) => (
|
|
63
62
|
<ul key={template}>
|
|
64
63
|
{getTemplateName(template)}
|
|
65
64
|
{getTemplatePages(template)}
|
|
@@ -8,7 +8,7 @@ import keygen from '~helpers/keygen';
|
|
|
8
8
|
const Main = ({ section = {}, pageContext = {}, serverData = {}, exclOperator = false }) => {
|
|
9
9
|
const { page } = pageContext;
|
|
10
10
|
const SearchPage = page.path === 's' ? loadable(() => import(`~pages/search`)) : null;
|
|
11
|
-
const HtmlSitemap =
|
|
11
|
+
const HtmlSitemap = pageContext.sitemapData ? loadable(() => import(`~atoms/sitemap`)) : null;
|
|
12
12
|
const AuthorBox = page.author_id ? loadable(() => import(`~atoms/author-box`)) : null;
|
|
13
13
|
const NotFound = page?.path?.includes('404') ? loadable(() => import(`~atoms/not-found`)) : null;
|
|
14
14
|
|
|
@@ -382,14 +382,16 @@ export default {
|
|
|
382
382
|
sectionList &&
|
|
383
383
|
sectionList.forEach((res) => {
|
|
384
384
|
if (data.market_sections[market][res]) {
|
|
385
|
+
if (page.sections.main) {
|
|
386
|
+
page.sections.main.feedbackCounter =
|
|
387
|
+
templateFeadbackCounter.includes(`${page.template_id}`) || null;
|
|
388
|
+
}
|
|
389
|
+
|
|
385
390
|
const postSectionModules = data.market_sections[market][res].modules || [];
|
|
386
391
|
postSectionModules.forEach((item) => {
|
|
387
392
|
if (!page.sections.main) {
|
|
388
393
|
return;
|
|
389
394
|
}
|
|
390
|
-
page.sections.main.feedbackCounter = templateFeadbackCounter.includes(
|
|
391
|
-
`${page.template_id}`
|
|
392
|
-
);
|
|
393
395
|
|
|
394
396
|
if (item.value_type === ModuleValue.VALUE_TYPE_PREFILLED_MODULE_MARKET) {
|
|
395
397
|
page.sections.main.modules.push(
|
|
@@ -281,6 +281,11 @@ export function processTopListModule(module, relations, pages, markets) {
|
|
|
281
281
|
clone.authorName = operatorPage[0].author.name && operatorPage[0].author.name;
|
|
282
282
|
clone.authorPath =
|
|
283
283
|
operatorPage[0].author.profile_page_path && operatorPage[0].author.profile_page_path;
|
|
284
|
+
|
|
285
|
+
clone.authorImage = operatorPage[0].author.image && operatorPage[0].author.image;
|
|
286
|
+
|
|
287
|
+
clone.authorImageObject =
|
|
288
|
+
operatorPage[0].author.image_object && operatorPage[0].author.image_object;
|
|
284
289
|
}
|
|
285
290
|
|
|
286
291
|
// Multiple market fix
|