@pixelated-tech/components 3.1.5 → 3.2.0
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/README.md +60 -39
- package/dist/components/callout/callout.js +10 -9
- package/dist/components/callout/callout.scss +43 -43
- package/dist/components/carousel/carousel.css +24 -22
- package/dist/components/carousel/carousel.drag.js +1 -1
- package/dist/components/carousel/carousel.js +10 -10
- package/dist/components/{tiles → carousel}/tiles.css +10 -10
- package/dist/components/{tiles → carousel}/tiles.js +3 -3
- package/dist/components/cms/contentful.items.components.js +12 -12
- package/dist/components/cms/contentful.items.css +24 -24
- package/dist/components/cms/gravatar.components.js +87 -5
- package/dist/components/cms/instagram.components.js +1 -1
- package/dist/components/cms/wordpress.components.js +3 -3
- package/dist/components/cms/wordpress.css +3 -3
- package/dist/components/general/microinteractions.css +7 -7
- package/dist/components/general/modal.css +5 -5
- package/dist/components/general/modal.js +1 -1
- package/dist/components/general/semantic.js +282 -0
- package/dist/components/general/semantic.scss +359 -0
- package/dist/components/menu/menu-accordion.css +27 -21
- package/dist/components/menu/menu-accordion.js +1 -1
- package/dist/components/menu/menu-simple.css +8 -8
- package/dist/components/menu/menu-simple.js +3 -3
- package/dist/components/nerdjoke/nerdjoke.js +85 -77
- package/dist/components/pagebuilder/components/PageBuilderUI.js +1 -1
- package/dist/components/pagebuilder/components/PageEngine.js +21 -14
- package/dist/components/pagebuilder/lib/componentMap.js +5 -5
- package/dist/components/pagebuilder/lib/componentMetadata.js +1 -1
- package/dist/components/seo/404.css +5 -5
- package/dist/components/seo/404.js +2 -2
- package/dist/components/seo/googlemap.js +2 -1
- package/dist/components/seo/googlesearch.css +11 -0
- package/dist/components/seo/metadata.components.js +35 -0
- package/dist/components/seo/metadata.js +0 -48
- package/dist/components/seo/sitemap.js +192 -53
- package/dist/components/shoppingcart/ebay.css +5 -5
- package/dist/components/shoppingcart/shoppingcart.css +1 -1
- package/dist/components/{resume → structured}/resume.css +4 -0
- package/dist/components/{resume → structured}/resume.js +3 -3
- package/dist/components/{timeline → structured}/timeline.css +14 -14
- package/dist/components/{timeline → structured}/timeline.js +3 -3
- package/dist/css/pixelated.global.css +25 -164
- package/dist/index.js +12 -12
- package/dist/index.server.js +1 -0
- package/dist/types/components/callout/callout.d.ts.map +1 -1
- package/dist/types/components/carousel/carousel.d.ts.map +1 -1
- package/dist/types/components/{tiles → carousel}/tiles.d.ts +1 -1
- package/dist/types/components/carousel/tiles.d.ts.map +1 -0
- package/dist/types/components/cms/contentful.items.components.d.ts.map +1 -1
- package/dist/types/components/cms/gravatar.components.d.ts +53 -24
- package/dist/types/components/cms/gravatar.components.d.ts.map +1 -1
- package/dist/types/components/cms/pixelated.linkedin.d.ts.map +1 -0
- package/dist/types/components/cms/pixelated.linkedin1.d.ts.map +1 -0
- package/dist/types/components/cms/pixelated.linkedin2.d.ts.map +1 -0
- package/dist/types/components/cms/yelp.d.ts.map +1 -0
- package/dist/types/components/general/semantic.d.ts +153 -0
- package/dist/types/components/general/semantic.d.ts.map +1 -0
- package/dist/types/components/general/sidepanel.d.ts.map +1 -0
- package/dist/types/components/nerdjoke/nerdjoke.d.ts +15 -20
- package/dist/types/components/nerdjoke/nerdjoke.d.ts.map +1 -1
- package/dist/types/components/pagebuilder/components/PageEngine.d.ts.map +1 -1
- package/dist/types/components/pagebuilder/lib/componentMap.d.ts +6 -6
- package/dist/types/components/pagebuilder/lib/componentMap.d.ts.map +1 -1
- package/dist/types/components/seo/404.d.ts.map +1 -1
- package/dist/types/components/seo/googlemap.d.ts +1 -0
- package/dist/types/components/seo/googlemap.d.ts.map +1 -1
- package/dist/types/components/seo/metadata.components.d.ts +28 -0
- package/dist/types/components/seo/metadata.components.d.ts.map +1 -0
- package/dist/types/components/seo/metadata.d.ts +0 -14
- package/dist/types/components/seo/metadata.d.ts.map +1 -1
- package/dist/types/components/seo/sitemap.d.ts +107 -14
- package/dist/types/components/seo/sitemap.d.ts.map +1 -1
- package/dist/types/components/{buzzwordbingo → structured}/buzzwordbingo.d.ts +1 -1
- package/dist/types/components/structured/buzzwordbingo.d.ts.map +1 -0
- package/dist/types/components/structured/markdown.d.ts.map +1 -0
- package/dist/types/components/structured/recipe.d.ts.map +1 -0
- package/dist/types/components/{resume → structured}/resume.d.ts +1 -1
- package/dist/types/components/structured/resume.d.ts.map +1 -0
- package/dist/types/components/{socialcard → structured}/socialcard.d.ts +1 -1
- package/dist/types/components/{socialcard → structured}/socialcard.d.ts.map +1 -1
- package/dist/types/components/{timeline → structured}/timeline.d.ts +1 -1
- package/dist/types/components/structured/timeline.d.ts.map +1 -0
- package/dist/types/index.d.ts +10 -10
- package/dist/types/index.server.d.ts +1 -0
- package/dist/types/stories/callout/callout.many.stories.d.ts.map +1 -0
- package/dist/types/stories/{callout.stories.d.ts → callout/callout.stories.d.ts} +1 -1
- package/dist/types/stories/callout/callout.stories.d.ts.map +1 -0
- package/dist/types/stories/{carousel-hero.stories.d.ts → carousel/carousel-hero.stories.d.ts} +1 -1
- package/dist/types/stories/carousel/carousel-hero.stories.d.ts.map +1 -0
- package/dist/types/stories/{carousel-reviews.stories.d.ts → carousel/carousel-reviews.stories.d.ts} +1 -1
- package/dist/types/stories/carousel/carousel-reviews.stories.d.ts.map +1 -0
- package/dist/types/stories/{carousel-workportfolio.stories.d.ts → carousel/carousel-workportfolio.stories.d.ts} +1 -1
- package/dist/types/stories/carousel/carousel-workportfolio.stories.d.ts.map +1 -0
- package/dist/types/stories/{carousel.stories.d.ts → carousel/carousel.stories.d.ts} +1 -1
- package/dist/types/stories/carousel/carousel.stories.d.ts.map +1 -0
- package/dist/types/stories/{tiles.stories.d.ts → carousel/tiles.stories.d.ts} +1 -1
- package/dist/types/stories/carousel/tiles.stories.d.ts.map +1 -0
- package/dist/types/stories/{cms.contentful.item.stories.d.ts → cms/contentful.item.stories.d.ts} +2 -2
- package/dist/types/stories/cms/contentful.item.stories.d.ts.map +1 -0
- package/dist/types/stories/{cms.contentful.items.stories.d.ts → cms/contentful.items.stories.d.ts} +2 -2
- package/dist/types/stories/cms/contentful.items.stories.d.ts.map +1 -0
- package/dist/types/stories/{cms.contentful.stories.d.ts → cms/contentful.stories.d.ts} +2 -2
- package/dist/types/stories/cms/contentful.stories.d.ts.map +1 -0
- package/dist/types/stories/{cms.google.reviews.stories.d.ts → cms/google.reviews.stories.d.ts} +2 -2
- package/dist/types/stories/cms/google.reviews.stories.d.ts.map +1 -0
- package/dist/types/stories/{cms.gravatar.stories.d.ts → cms/gravatar.stories.d.ts} +2 -2
- package/dist/types/stories/cms/gravatar.stories.d.ts.map +1 -0
- package/dist/types/stories/{cms.instagram.stories.d.ts → cms/instagram.stories.d.ts} +2 -2
- package/dist/types/stories/cms/instagram.stories.d.ts.map +1 -0
- package/dist/types/stories/cms/wordpress.stories.d.ts +9 -0
- package/dist/types/stories/cms/wordpress.stories.d.ts.map +1 -0
- package/dist/types/stories/{general.headers.stories.d.ts → general/headers.stories.d.ts} +5 -5
- package/dist/types/stories/general/headers.stories.d.ts.map +1 -0
- package/dist/types/stories/{layout.stories.d.ts → general/layout.stories.d.ts} +1 -1
- package/dist/types/stories/general/layout.stories.d.ts.map +1 -0
- package/dist/types/stories/{general.loading.stories.d.ts → general/loading.stories.d.ts} +2 -2
- package/dist/types/stories/general/loading.stories.d.ts.map +1 -0
- package/dist/types/stories/{general.microinteractions.stories.d.ts → general/microinteractions.stories.d.ts} +2 -2
- package/dist/types/stories/general/microinteractions.stories.d.ts.map +1 -0
- package/dist/types/stories/{general.modal.stories.d.ts → general/modal.stories.d.ts} +2 -2
- package/dist/types/stories/general/modal.stories.d.ts.map +1 -0
- package/dist/types/stories/{sidepanel.stories.d.ts → general/sidepanel.stories.d.ts} +1 -1
- package/dist/types/stories/general/sidepanel.stories.d.ts.map +1 -0
- package/dist/types/stories/{general.table.stories.d.ts → general/table.stories.d.ts} +3 -3
- package/dist/types/stories/general/table.stories.d.ts.map +1 -0
- package/dist/types/stories/{menu-accordion.stories.d.ts → menu/menu-accordion.stories.d.ts} +1 -1
- package/dist/types/stories/menu/menu-accordion.stories.d.ts.map +1 -0
- package/dist/types/stories/{menu-simple.stories.d.ts → menu/menu-simple.stories.d.ts} +1 -1
- package/dist/types/stories/menu/menu-simple.stories.d.ts.map +1 -0
- package/dist/types/stories/nerdjoke.stories.d.ts +1 -1
- package/dist/types/stories/nerdjoke.stories.d.ts.map +1 -1
- package/dist/types/stories/{pagebuilder.form-builder.stories.d.ts → pagebuilder/form-builder.stories.d.ts} +2 -2
- package/dist/types/stories/pagebuilder/form-builder.stories.d.ts.map +1 -0
- package/dist/types/stories/{pagebuilder.form-engine.stories.d.ts → pagebuilder/form-engine.stories.d.ts} +3 -3
- package/dist/types/stories/pagebuilder/form-engine.stories.d.ts.map +1 -0
- package/dist/types/stories/{pagebuilder.form-extractor.stories.d.ts → pagebuilder/form-extractor.stories.d.ts} +2 -2
- package/dist/types/stories/pagebuilder/form-extractor.stories.d.ts.map +1 -0
- package/dist/types/stories/{pagebuilder.stories.d.ts → pagebuilder/pagebuilder.stories.d.ts} +1 -1
- package/dist/types/stories/pagebuilder/pagebuilder.stories.d.ts.map +1 -0
- package/dist/types/stories/{pagebuilder.usageguide.stories.d.ts → pagebuilder/pagebuilder.usageguide.stories.d.ts} +1 -1
- package/dist/types/stories/pagebuilder/pagebuilder.usageguide.stories.d.ts.map +1 -0
- package/dist/types/stories/{pageengine.stories.d.ts → pagebuilder/pageengine.stories.d.ts} +1 -1
- package/dist/types/stories/pagebuilder/pageengine.stories.d.ts.map +1 -0
- package/dist/types/stories/{seo.404.stories.d.ts → seo/seo.404.stories.d.ts} +1 -1
- package/dist/types/stories/seo/seo.404.stories.d.ts.map +1 -0
- package/dist/types/stories/{seo.googleanalytics.stories.d.ts → seo/seo.googleanalytics.stories.d.ts} +1 -1
- package/dist/types/stories/seo/seo.googleanalytics.stories.d.ts.map +1 -0
- package/dist/types/stories/{seo.googlesearch.stories.d.ts → seo/seo.googlesearch.stories.d.ts} +1 -1
- package/dist/types/stories/seo/seo.googlesearch.stories.d.ts.map +1 -0
- package/dist/types/stories/{seo.metadata.stories.d.ts → seo/seo.metadata.stories.d.ts} +2 -2
- package/dist/types/stories/seo/seo.metadata.stories.d.ts.map +1 -0
- package/dist/types/stories/{seo.sitemap.stories.d.ts → seo/seo.sitemap.stories.d.ts} +1 -1
- package/dist/types/stories/seo/seo.sitemap.stories.d.ts.map +1 -0
- package/dist/types/stories/{shoppingcart.ebay.item.stories.d.ts → shoppingcart/shoppingcart.ebay.item.stories.d.ts} +1 -1
- package/dist/types/stories/shoppingcart/shoppingcart.ebay.item.stories.d.ts.map +1 -0
- package/dist/types/stories/{shoppingcart.ebay.items.stories.d.ts → shoppingcart/shoppingcart.ebay.items.stories.d.ts} +1 -1
- package/dist/types/stories/shoppingcart/shoppingcart.ebay.items.stories.d.ts.map +1 -0
- package/dist/types/stories/shoppingcart/shoppingcart.stories.d.ts.map +1 -0
- package/dist/types/stories/{buzzword-bingo.stories.d.ts → structured/buzzword-bingo.stories.d.ts} +2 -2
- package/dist/types/stories/structured/buzzword-bingo.stories.d.ts.map +1 -0
- package/dist/types/stories/{markdown.stories.d.ts → structured/markdown.stories.d.ts} +1 -1
- package/dist/types/stories/structured/markdown.stories.d.ts.map +1 -0
- package/dist/types/stories/{recipe.stories.d.ts → structured/recipe.stories.d.ts} +2 -2
- package/dist/types/stories/structured/recipe.stories.d.ts.map +1 -0
- package/dist/types/stories/{resume.stories.d.ts → structured/resume.stories.d.ts} +1 -1
- package/dist/types/stories/{resume.stories.d.ts.map → structured/resume.stories.d.ts.map} +1 -1
- package/dist/types/stories/{socialcard.stories.d.ts → structured/socialcard.stories.d.ts} +1 -1
- package/dist/types/stories/structured/socialcard.stories.d.ts.map +1 -0
- package/dist/types/stories/{timeline.stories.d.ts → structured/timeline.stories.d.ts} +1 -1
- package/dist/types/stories/structured/timeline.stories.d.ts.map +1 -0
- package/package.json +10 -6
- package/dist/components/general/headers.css +0 -16
- package/dist/components/general/headers.js +0 -27
- package/dist/components/general/layout.js +0 -147
- package/dist/components/general/layout.scss +0 -47
- package/dist/types/components/buzzwordbingo/buzzwordbingo.d.ts.map +0 -1
- package/dist/types/components/general/headers.d.ts +0 -19
- package/dist/types/components/general/headers.d.ts.map +0 -1
- package/dist/types/components/general/layout.d.ts +0 -73
- package/dist/types/components/general/layout.d.ts.map +0 -1
- package/dist/types/components/linkedin/pixelated.linkedin.d.ts.map +0 -1
- package/dist/types/components/linkedin/pixelated.linkedin1.d.ts.map +0 -1
- package/dist/types/components/linkedin/pixelated.linkedin2.d.ts.map +0 -1
- package/dist/types/components/markdown/markdown.d.ts.map +0 -1
- package/dist/types/components/recipe/recipe.d.ts.map +0 -1
- package/dist/types/components/resume/resume.d.ts.map +0 -1
- package/dist/types/components/sidepanel/sidepanel.d.ts.map +0 -1
- package/dist/types/components/tiles/tiles.d.ts.map +0 -1
- package/dist/types/components/timeline/timeline.d.ts.map +0 -1
- package/dist/types/components/yelp/yelp.d.ts.map +0 -1
- package/dist/types/stories/buzzword-bingo.stories.d.ts.map +0 -1
- package/dist/types/stories/callout.many.stories.d.ts.map +0 -1
- package/dist/types/stories/callout.stories.d.ts.map +0 -1
- package/dist/types/stories/carousel-hero.stories.d.ts.map +0 -1
- package/dist/types/stories/carousel-reviews.stories.d.ts.map +0 -1
- package/dist/types/stories/carousel-workportfolio.stories.d.ts.map +0 -1
- package/dist/types/stories/carousel.stories.d.ts.map +0 -1
- package/dist/types/stories/cms.contentful.item.stories.d.ts.map +0 -1
- package/dist/types/stories/cms.contentful.items.stories.d.ts.map +0 -1
- package/dist/types/stories/cms.contentful.stories.d.ts.map +0 -1
- package/dist/types/stories/cms.google.reviews.stories.d.ts.map +0 -1
- package/dist/types/stories/cms.gravatar.stories.d.ts.map +0 -1
- package/dist/types/stories/cms.instagram.stories.d.ts.map +0 -1
- package/dist/types/stories/cms.wordpress.stories.d.ts +0 -26
- package/dist/types/stories/cms.wordpress.stories.d.ts.map +0 -1
- package/dist/types/stories/general.headers.stories.d.ts.map +0 -1
- package/dist/types/stories/general.loading.stories.d.ts.map +0 -1
- package/dist/types/stories/general.microinteractions.stories.d.ts.map +0 -1
- package/dist/types/stories/general.modal.stories.d.ts.map +0 -1
- package/dist/types/stories/general.table.stories.d.ts.map +0 -1
- package/dist/types/stories/layout.stories.d.ts.map +0 -1
- package/dist/types/stories/markdown.stories.d.ts.map +0 -1
- package/dist/types/stories/menu-accordion.stories.d.ts.map +0 -1
- package/dist/types/stories/menu-simple.stories.d.ts.map +0 -1
- package/dist/types/stories/pagebuilder.form-builder.stories.d.ts.map +0 -1
- package/dist/types/stories/pagebuilder.form-engine.stories.d.ts.map +0 -1
- package/dist/types/stories/pagebuilder.form-extractor.stories.d.ts.map +0 -1
- package/dist/types/stories/pagebuilder.stories.d.ts.map +0 -1
- package/dist/types/stories/pagebuilder.usageguide.stories.d.ts.map +0 -1
- package/dist/types/stories/pageengine.stories.d.ts.map +0 -1
- package/dist/types/stories/recipe.stories.d.ts.map +0 -1
- package/dist/types/stories/seo.404.stories.d.ts.map +0 -1
- package/dist/types/stories/seo.googleanalytics.stories.d.ts.map +0 -1
- package/dist/types/stories/seo.googlesearch.stories.d.ts.map +0 -1
- package/dist/types/stories/seo.metadata.stories.d.ts.map +0 -1
- package/dist/types/stories/seo.sitemap.stories.d.ts.map +0 -1
- package/dist/types/stories/shoppingcart.ebay.item.stories.d.ts.map +0 -1
- package/dist/types/stories/shoppingcart.ebay.items.stories.d.ts.map +0 -1
- package/dist/types/stories/shoppingcart.stories.d.ts.map +0 -1
- package/dist/types/stories/sidepanel.stories.d.ts.map +0 -1
- package/dist/types/stories/socialcard.stories.d.ts.map +0 -1
- package/dist/types/stories/tiles.stories.d.ts.map +0 -1
- package/dist/types/stories/timeline.stories.d.ts.map +0 -1
- package/dist/components/{linkedin → cms}/pixelated.linkedin.js +0 -0
- package/dist/components/{linkedin → cms}/pixelated.linkedin1.js +0 -0
- package/dist/components/{linkedin → cms}/pixelated.linkedin2.js +0 -0
- package/dist/components/{yelp → cms}/yelp.js +0 -0
- package/dist/components/{sidepanel → general}/sidepanel.css +0 -0
- package/dist/components/{sidepanel → general}/sidepanel.js +0 -0
- package/dist/components/{buzzwordbingo → structured}/buzzwordbingo.css +0 -0
- package/dist/components/{buzzwordbingo → structured}/buzzwordbingo.js +1 -1
- package/dist/components/{markdown → structured}/markdown.css +0 -0
- package/dist/components/{markdown → structured}/markdown.js +0 -0
- package/dist/components/{recipe → structured}/recipe.css +0 -0
- package/dist/components/{recipe → structured}/recipe.js +0 -0
- package/dist/components/{socialcard → structured}/socialcard.css +0 -0
- package/dist/components/{socialcard → structured}/socialcard.js +1 -1
- /package/dist/types/components/{linkedin → cms}/pixelated.linkedin.d.ts +0 -0
- /package/dist/types/components/{linkedin → cms}/pixelated.linkedin1.d.ts +0 -0
- /package/dist/types/components/{linkedin → cms}/pixelated.linkedin2.d.ts +0 -0
- /package/dist/types/components/{yelp → cms}/yelp.d.ts +0 -0
- /package/dist/types/components/{sidepanel → general}/sidepanel.d.ts +0 -0
- /package/dist/types/components/{markdown → structured}/markdown.d.ts +0 -0
- /package/dist/types/components/{recipe → structured}/recipe.d.ts +0 -0
- /package/dist/types/stories/{callout.many.stories.d.ts → callout/callout.many.stories.d.ts} +0 -0
- /package/dist/types/stories/{shoppingcart.stories.d.ts → shoppingcart/shoppingcart.stories.d.ts} +0 -0
|
@@ -1,9 +1,129 @@
|
|
|
1
1
|
import PropTypes from "prop-types";
|
|
2
|
-
import { getAllRoutes
|
|
2
|
+
import { getAllRoutes } from "./metadata";
|
|
3
3
|
import { getWordPressItems } from "../cms/wordpress.functions";
|
|
4
|
-
import { getContentfulFieldValues } from "../cms/contentful.delivery";
|
|
4
|
+
import { getContentfulFieldValues, getContentfulAssetURLs } from "../cms/contentful.delivery";
|
|
5
5
|
import { getEbayAppToken, getEbayItemsSearch } from "../shoppingcart/ebay.functions";
|
|
6
6
|
import { getFullPixelatedConfig } from '../config/config';
|
|
7
|
+
/**
|
|
8
|
+
* Helper to construct an origin string from a Next-like headers() object or plain values.
|
|
9
|
+
* Accepts an object with `get(key)` method, or `undefined` and falls back to localhost origin.
|
|
10
|
+
*/
|
|
11
|
+
export function getOriginFromHeaders(headersLike, fallbackOrigin = 'http://localhost:3000') {
|
|
12
|
+
try {
|
|
13
|
+
if (!headersLike)
|
|
14
|
+
return fallbackOrigin;
|
|
15
|
+
const proto = headersLike.get('x-forwarded-proto') || 'http';
|
|
16
|
+
const host = headersLike.get('host') || 'localhost:3000';
|
|
17
|
+
return `${proto}://${host}`;
|
|
18
|
+
}
|
|
19
|
+
catch (e) {
|
|
20
|
+
console.log("Error getting origin from headers:", e);
|
|
21
|
+
return fallbackOrigin;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Next-specific async helper: getOriginFromNextHeaders
|
|
26
|
+
* - Convenience wrapper that dynamically imports `next/headers` and calls our `getOriginFromHeaders` function
|
|
27
|
+
* - Falls back to `fallbackOrigin` if `next/headers` not available or on error
|
|
28
|
+
*/
|
|
29
|
+
export async function getOriginFromNextHeaders(fallbackOrigin = 'http://localhost:3000') {
|
|
30
|
+
try {
|
|
31
|
+
// dynamic import ensures we don't require 'next/headers' in non-Next environments
|
|
32
|
+
const mod = await import('next/headers');
|
|
33
|
+
if (mod && typeof mod.headers === 'function') {
|
|
34
|
+
const hdrs = await mod.headers();
|
|
35
|
+
return getOriginFromHeaders(hdrs, fallbackOrigin);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
catch (e) {
|
|
39
|
+
console.log("Error getting origin from Next headers:", e);
|
|
40
|
+
// Not in a Next environment or module not found; return fallback
|
|
41
|
+
}
|
|
42
|
+
return fallbackOrigin;
|
|
43
|
+
}
|
|
44
|
+
export function flattenRoutes(routes) {
|
|
45
|
+
// Convenience wrapper for the project-level getAllRoutes helper
|
|
46
|
+
return getAllRoutes(routes, 'routes');
|
|
47
|
+
}
|
|
48
|
+
export function jsonToSitemapEntries(entries) {
|
|
49
|
+
return entries.map((entry) => `<url>
|
|
50
|
+
<loc>${entry.url}</loc>
|
|
51
|
+
<lastmod>${entry.lastModified}</lastmod>
|
|
52
|
+
<changefreq>${entry.changeFrequency}</changefreq>
|
|
53
|
+
<priority>${entry.priority}</priority>
|
|
54
|
+
</url>`).join('');
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* generateSitemap: compose the individual create* functions based on toggles in SitemapConfig.
|
|
58
|
+
* - Keep this minimal for the MVP: no retries/caching here. Add TODOs for later.
|
|
59
|
+
*/
|
|
60
|
+
export async function generateSitemap(cfg = {}, originInput) {
|
|
61
|
+
const origin = originInput ?? 'http://localhost:3000';
|
|
62
|
+
const sitemapEntries = [];
|
|
63
|
+
// Defaults: pages true, image json true, others false
|
|
64
|
+
const usePages = cfg.createPageURLs ?? true;
|
|
65
|
+
const useWP = cfg.createWordPressURLs ?? false;
|
|
66
|
+
const useImageJSON = cfg.createImageURLsFromJSON ?? true;
|
|
67
|
+
const useContentful = cfg.createContentfulURLs ?? false;
|
|
68
|
+
const useContentfulImages = cfg.createContentfulImageURLs ?? false;
|
|
69
|
+
const usePageBuilder = cfg.createPageBuilderURLs ?? false;
|
|
70
|
+
const useEbay = cfg.createEbayItemURLs ?? false;
|
|
71
|
+
// Pages
|
|
72
|
+
if (usePages) {
|
|
73
|
+
if (cfg.routes) {
|
|
74
|
+
const flat = flattenRoutes(cfg.routes);
|
|
75
|
+
sitemapEntries.push(...(await createPageURLs(flat, origin)));
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
// Image JSON
|
|
79
|
+
if (useImageJSON) {
|
|
80
|
+
sitemapEntries.push(...(await createImageURLsFromJSON(origin, cfg.imageJson?.path ?? 'public/site-images.json')));
|
|
81
|
+
}
|
|
82
|
+
// WordPress
|
|
83
|
+
if (useWP && cfg.wordpress?.site) {
|
|
84
|
+
sitemapEntries.push(...(await createWordPressURLs({ site: cfg.wordpress.site })));
|
|
85
|
+
}
|
|
86
|
+
// Contentful (pages)
|
|
87
|
+
if (useContentful && cfg.contentful) {
|
|
88
|
+
sitemapEntries.push(...(await createContentfulURLs({ apiProps: cfg.contentful, origin })));
|
|
89
|
+
}
|
|
90
|
+
// Contentful images
|
|
91
|
+
if (useContentfulImages && cfg.contentful) {
|
|
92
|
+
sitemapEntries.push(...(await createContentfulImageURLs({ apiProps: cfg.contentful, origin })));
|
|
93
|
+
}
|
|
94
|
+
// Page Builder (existing helper in package not always present)
|
|
95
|
+
if (usePageBuilder && cfg.contentful) {
|
|
96
|
+
// TODO: wire createContentfulPageBuilderURLs if needed; skipping for MVP
|
|
97
|
+
}
|
|
98
|
+
// Ebay items
|
|
99
|
+
if (useEbay) {
|
|
100
|
+
sitemapEntries.push(...(await createEbayItemURLs(origin)));
|
|
101
|
+
}
|
|
102
|
+
// Deduplicate by URL and properly merge images arrays if present
|
|
103
|
+
const map = new Map();
|
|
104
|
+
for (const entry of sitemapEntries.flat()) {
|
|
105
|
+
if (!entry || !entry.url)
|
|
106
|
+
continue;
|
|
107
|
+
const key = entry.url.toLowerCase();
|
|
108
|
+
const existing = map.get(key);
|
|
109
|
+
if (!existing) {
|
|
110
|
+
map.set(key, { ...entry });
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
// Merge images
|
|
114
|
+
if (entry.images && entry.images.length) {
|
|
115
|
+
existing.images = Array.from(new Set([...(existing.images || []), ...entry.images]));
|
|
116
|
+
}
|
|
117
|
+
// Keep the earliest lastModified? Use whichever is present (prefer existing)
|
|
118
|
+
existing.lastModified = existing.lastModified || entry.lastModified;
|
|
119
|
+
existing.priority = existing.priority || entry.priority;
|
|
120
|
+
existing.changeFrequency = existing.changeFrequency || entry.changeFrequency;
|
|
121
|
+
map.set(key, existing);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
const entries = Array.from(map.values());
|
|
125
|
+
return entries;
|
|
126
|
+
}
|
|
7
127
|
export async function createPageURLs(myRoutes, origin) {
|
|
8
128
|
const sitemap = [];
|
|
9
129
|
// const origin = await getOrigin();
|
|
@@ -12,7 +132,7 @@ export async function createPageURLs(myRoutes, origin) {
|
|
|
12
132
|
if (route.path.substring(0, 4).toLowerCase() !== 'http') {
|
|
13
133
|
sitemap.push({
|
|
14
134
|
url: `${origin}${route.path}`,
|
|
15
|
-
lastModified:
|
|
135
|
+
lastModified: new Date(),
|
|
16
136
|
changeFrequency: "hourly",
|
|
17
137
|
priority: 1.0,
|
|
18
138
|
});
|
|
@@ -20,15 +140,34 @@ export async function createPageURLs(myRoutes, origin) {
|
|
|
20
140
|
}
|
|
21
141
|
return sitemap;
|
|
22
142
|
}
|
|
23
|
-
export async function
|
|
143
|
+
export async function createImageURLsFromJSON(origin, jsonPath = 'public/site-images.json') {
|
|
24
144
|
const sitemap = [];
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
145
|
+
try {
|
|
146
|
+
let urlPath = jsonPath;
|
|
147
|
+
if (urlPath.startsWith('public/'))
|
|
148
|
+
urlPath = urlPath.slice('public/'.length);
|
|
149
|
+
if (!urlPath.startsWith('/'))
|
|
150
|
+
urlPath = `/${urlPath}`;
|
|
151
|
+
const resp = await fetch(`${origin}${urlPath}`);
|
|
152
|
+
if (!resp.ok)
|
|
153
|
+
return sitemap;
|
|
154
|
+
const imgs = await resp.json();
|
|
155
|
+
if (!Array.isArray(imgs))
|
|
156
|
+
return sitemap;
|
|
157
|
+
// Use an array of URL strings so the sitemap serializer writes the URL text
|
|
158
|
+
const newImages = imgs.map(i => {
|
|
159
|
+
const rel = i.startsWith('/') ? i : `/${i}`;
|
|
160
|
+
return `${origin}${rel}`;
|
|
161
|
+
});
|
|
162
|
+
sitemap.push({
|
|
163
|
+
url: `${origin}/images`,
|
|
164
|
+
images: newImages,
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
catch (e) {
|
|
168
|
+
if (typeof console !== 'undefined')
|
|
169
|
+
console.warn('createImageURLsFromJSON failed', e);
|
|
170
|
+
}
|
|
32
171
|
return sitemap;
|
|
33
172
|
}
|
|
34
173
|
export async function createWordPressURLs(props) {
|
|
@@ -37,7 +176,7 @@ export async function createWordPressURLs(props) {
|
|
|
37
176
|
for await (const post of blogPosts ?? []) {
|
|
38
177
|
sitemap.push({
|
|
39
178
|
url: post.URL,
|
|
40
|
-
lastModified: post.modified
|
|
179
|
+
lastModified: post.modified ? new Date(post.modified) : new Date(),
|
|
41
180
|
changeFrequency: "hourly",
|
|
42
181
|
priority: 1.0,
|
|
43
182
|
});
|
|
@@ -66,7 +205,7 @@ export async function createContentfulURLs(props) {
|
|
|
66
205
|
for (const title of contentfulTitles) {
|
|
67
206
|
sitemap.push({
|
|
68
207
|
url: `${props.origin}/projects/${encodeURIComponent(title)}`,
|
|
69
|
-
lastModified:
|
|
208
|
+
lastModified: new Date(),
|
|
70
209
|
changeFrequency: "hourly",
|
|
71
210
|
priority: 1.0,
|
|
72
211
|
});
|
|
@@ -92,13 +231,51 @@ export async function createContentfulPageBuilderURLs(props) {
|
|
|
92
231
|
for (const pageName of pageNames) {
|
|
93
232
|
sitemap.push({
|
|
94
233
|
url: `${props.origin}/${encodeURIComponent(pageName)}`,
|
|
95
|
-
lastModified:
|
|
234
|
+
lastModified: new Date(),
|
|
96
235
|
changeFrequency: "hourly",
|
|
97
236
|
priority: 1.0,
|
|
98
237
|
});
|
|
99
238
|
}
|
|
100
239
|
return sitemap;
|
|
101
240
|
}
|
|
241
|
+
createContentfulImageURLs.propTypes = {
|
|
242
|
+
apiProps: PropTypes.shape({
|
|
243
|
+
proxyURL: PropTypes.string,
|
|
244
|
+
base_url: PropTypes.string.isRequired,
|
|
245
|
+
space_id: PropTypes.string.isRequired,
|
|
246
|
+
environment: PropTypes.string.isRequired,
|
|
247
|
+
access_token: PropTypes.string.isRequired,
|
|
248
|
+
}).isRequired,
|
|
249
|
+
origin: PropTypes.string.isRequired,
|
|
250
|
+
};
|
|
251
|
+
export async function createContentfulImageURLs(props) {
|
|
252
|
+
const sitemap = [];
|
|
253
|
+
const providerContentfulApiProps = getFullPixelatedConfig()?.contentful;
|
|
254
|
+
const mergedApiProps = { ...providerContentfulApiProps, ...props.apiProps };
|
|
255
|
+
try {
|
|
256
|
+
const assets = await getContentfulAssetURLs({ apiProps: mergedApiProps });
|
|
257
|
+
if (!Array.isArray(assets) || assets.length === 0)
|
|
258
|
+
return sitemap;
|
|
259
|
+
const newImages = assets.map((a) => {
|
|
260
|
+
let i = a.image || '';
|
|
261
|
+
if (i.startsWith('//'))
|
|
262
|
+
i = `https:${i}`;
|
|
263
|
+
else if (i.startsWith('/'))
|
|
264
|
+
i = `${props.origin}${i}`;
|
|
265
|
+
return i;
|
|
266
|
+
}).filter(Boolean);
|
|
267
|
+
sitemap.push({
|
|
268
|
+
url: `${props.origin}/images`,
|
|
269
|
+
images: newImages,
|
|
270
|
+
lastModified: new Date(),
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
catch (e) {
|
|
274
|
+
if (typeof console !== 'undefined')
|
|
275
|
+
console.warn('createContentfulImageURLs failed', e);
|
|
276
|
+
}
|
|
277
|
+
return sitemap;
|
|
278
|
+
}
|
|
102
279
|
const defaultEbayProps = {
|
|
103
280
|
proxyURL: "https://proxy.pixelated.tech/prod/proxy?url=",
|
|
104
281
|
baseTokenURL: 'https://api.ebay.com/identity/v1/oauth2/token',
|
|
@@ -122,7 +299,7 @@ export async function createEbayItemURLs(origin) {
|
|
|
122
299
|
for (const item of items.itemSummaries) {
|
|
123
300
|
sitemap.push({
|
|
124
301
|
url: `${origin}/store/${item.legacyItemId}`,
|
|
125
|
-
lastModified: item.itemCreationDate,
|
|
302
|
+
lastModified: item.itemCreationDate ? new Date(item.itemCreationDate) : new Date(),
|
|
126
303
|
changeFrequency: "hourly",
|
|
127
304
|
priority: 1.0,
|
|
128
305
|
});
|
|
@@ -131,41 +308,3 @@ export async function createEbayItemURLs(origin) {
|
|
|
131
308
|
});
|
|
132
309
|
return sitemap;
|
|
133
310
|
}
|
|
134
|
-
export function jsonToSitemapEntries(entries) {
|
|
135
|
-
return entries.map((entry) => `<url>
|
|
136
|
-
<loc>${entry.url}</loc>
|
|
137
|
-
<lastmod>${entry.lastModified}</lastmod>
|
|
138
|
-
<changefreq>${entry.changeFrequency}</changefreq>
|
|
139
|
-
<priority>${entry.priority}</priority>
|
|
140
|
-
</url>`).join('');
|
|
141
|
-
}
|
|
142
|
-
export async function createImageURLsFromJSON(origin, jsonPath = 'public/site-images.json') {
|
|
143
|
-
const sitemap = [];
|
|
144
|
-
try {
|
|
145
|
-
let urlPath = jsonPath;
|
|
146
|
-
if (urlPath.startsWith('public/'))
|
|
147
|
-
urlPath = urlPath.slice('public/'.length);
|
|
148
|
-
if (!urlPath.startsWith('/'))
|
|
149
|
-
urlPath = `/${urlPath}`;
|
|
150
|
-
const resp = await fetch(`${origin}${urlPath}`);
|
|
151
|
-
if (!resp.ok)
|
|
152
|
-
return sitemap;
|
|
153
|
-
const imgs = await resp.json();
|
|
154
|
-
if (!Array.isArray(imgs))
|
|
155
|
-
return sitemap;
|
|
156
|
-
// Use an array of URL strings so the sitemap serializer writes the URL text
|
|
157
|
-
const newImages = imgs.map(i => {
|
|
158
|
-
const rel = i.startsWith('/') ? i : `/${i}`;
|
|
159
|
-
return `${origin}${rel}`;
|
|
160
|
-
});
|
|
161
|
-
sitemap.push({
|
|
162
|
-
url: `${origin}/images`,
|
|
163
|
-
images: newImages,
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
catch (e) {
|
|
167
|
-
if (typeof console !== 'undefined')
|
|
168
|
-
console.warn('createImageURLsFromJSON failed', e);
|
|
169
|
-
}
|
|
170
|
-
return sitemap;
|
|
171
|
-
}
|
|
@@ -66,18 +66,18 @@
|
|
|
66
66
|
|
|
67
67
|
.ebayItemPhotoCarousel {
|
|
68
68
|
|
|
69
|
-
.
|
|
69
|
+
.carousel-container {
|
|
70
70
|
background: none;
|
|
71
71
|
border: none;
|
|
72
72
|
height: 400px;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
.
|
|
75
|
+
.carousel-cards-container {
|
|
76
76
|
height: 100%;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
.
|
|
80
|
-
.
|
|
79
|
+
.carousel-buttons,
|
|
80
|
+
.carousel-button {
|
|
81
81
|
display: inline-block;
|
|
82
82
|
}
|
|
83
83
|
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
.ebayItemPhotoCarousel {
|
|
88
88
|
height: 350px;
|
|
89
89
|
}
|
|
90
|
-
.ebayItemPhotoCarousel .
|
|
90
|
+
.ebayItemPhotoCarousel .carousel-container {
|
|
91
91
|
height: 300px;
|
|
92
92
|
}
|
|
93
93
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import { format } from "date-fns";
|
|
4
|
-
import "./resume.css";
|
|
5
|
-
import "../../css/pixelated.grid.scss";
|
|
6
4
|
import { usePixelatedConfig } from "../config/config.client";
|
|
7
5
|
import { SmartImage } from "../cms/cloudinary.image";
|
|
6
|
+
import "../../css/pixelated.grid.scss";
|
|
7
|
+
import "./resume.css";
|
|
8
8
|
/*
|
|
9
9
|
Resume Microformat - https://microformats.org/wiki/h-resume
|
|
10
10
|
Details Summary Expand Collapse - https://www.w3schools.com/tags/tag_details.asp
|
|
@@ -33,7 +33,7 @@ Resume.propTypes = {
|
|
|
33
33
|
data: PropTypes.any.isRequired,
|
|
34
34
|
};
|
|
35
35
|
export function Resume(props) {
|
|
36
|
-
return (_jsx("section", { className: "p-resume", id: "resume-section", children: _jsx("div", { className: "section-container", children: _jsxs("div", { className: "row-12col", children: [_jsx("div", { className: "p-name grid-s1-e13", children: _jsx(ResumeName, { data: props.data.items[0].properties.name }) }), _jsxs("div", { className: "
|
|
36
|
+
return (_jsx("section", { className: "p-resume", id: "resume-section", children: _jsx("div", { className: "section-container", children: _jsxs("div", { className: "row-12col", children: [_jsx("div", { className: "p-name grid-s1-e13", children: _jsx(ResumeName, { data: props.data.items[0].properties.name }) }), _jsxs("div", { className: "divider grid-s1-e4", children: [_jsx("div", { className: "p-contact", children: _jsx(ResumeContact, { title: "Contact Information", data: props.data.items[0].properties.contact }) }), _jsx("div", { className: "p-education", children: _jsx(ResumeEvents, { title: "Education", data: props.data.items[0].properties.education, dateFormat: "MM/yyyy", collapsible: false }) }), _jsx("div", { className: "p-skills", children: _jsx(ResumeSkills, { title: "Skills", data: props.data.items[0].properties.skills }) })] }), _jsxs("div", { className: "grid-s4-e13", children: [_jsx("div", { className: "p-summary", children: _jsx(ResumeSummary, { title: "Professional Summary", data: props.data.items[0].properties.summary }) }), _jsx("div", { className: "p-qualifications", children: _jsx(ResumeQualifications, { title: "Professional Qualifications", data: props.data.items[0].properties.qualifications }) }), _jsx("div", { className: "p-experience", children: _jsx(ResumeEvents, { title: "Work History", data: props.data.items[0].properties.experience, dateFormat: "MM/yyyy", collapsible: false }) }), _jsx("div", { className: "p-projects", children: _jsx(ResumeProjects, { title: "Projects", data: props.data.items[0].properties.experience, collapsible: true }) }), _jsx("div", { className: "p-volunteer", children: _jsx(ResumeEvents, { title: "Volunteer Work", data: props.data.items[0].properties.volunteer, dateFormat: "MM/yyyy", collapsible: true }) }), _jsx("div", { className: "p-certifications", children: _jsx(ResumeEvents, { title: "Certifications", data: props.data.items[0].properties.certifications, dateFormat: "MM/yyyy", collapsible: true }) }), _jsx("div", { className: "p-awards", children: _jsx(ResumeEvents, { title: "Honors & Awards", data: props.data.items[0].properties.awards, dateFormat: "MM/yyyy", collapsible: true }) }), _jsx("div", { className: "p-training", children: _jsx(ResumeEvents, { title: "Training & Conferences", data: props.data.items[0].properties.training, dateFormat: "MM/dd/yyyy", collapsible: true }) }), _jsx("div", { className: "p-references", children: _jsx(ResumeReferences, { title: "References", data: props.data.items[0].properties.references, collapsible: true }) })] })] }) }) }));
|
|
37
37
|
}
|
|
38
38
|
ResumeName.propTypes = {
|
|
39
39
|
data: PropTypes.any.isRequired,
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
/* Container around content */
|
|
28
|
-
.
|
|
28
|
+
.timeline-container {
|
|
29
29
|
padding: 10px 40px;
|
|
30
30
|
position: relative;
|
|
31
31
|
background-color: inherit;
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/* The circles on the timeline */
|
|
36
|
-
.
|
|
36
|
+
.timeline-container::after {
|
|
37
37
|
content: '';
|
|
38
38
|
position: absolute;
|
|
39
39
|
width: 25px;
|
|
@@ -47,25 +47,25 @@
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
@media screen and (max-width: 768px) {
|
|
50
|
-
.
|
|
50
|
+
.timeline-container div[class*='grid-'] {
|
|
51
51
|
grid-column: 1 / -1;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/* Place the container to the left */
|
|
56
|
-
.
|
|
56
|
+
.timeline-left {
|
|
57
57
|
left: 0;
|
|
58
58
|
padding-left: 10px;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
/* Place the container to the right */
|
|
62
|
-
.
|
|
62
|
+
.timeline-right {
|
|
63
63
|
left: 50%;
|
|
64
64
|
padding-right: 10px;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
/* Add arrows to the left container (pointing right) */
|
|
68
|
-
.
|
|
68
|
+
.timeline-left::before {
|
|
69
69
|
content: " ";
|
|
70
70
|
height: 0;
|
|
71
71
|
position: absolute;
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
/* Add arrows to the right container (pointing left) */
|
|
82
|
-
.
|
|
82
|
+
.timeline-right::before {
|
|
83
83
|
content: " ";
|
|
84
84
|
height: 0;
|
|
85
85
|
position: absolute;
|
|
@@ -93,12 +93,12 @@
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
/* Fix the circle for containers on the right side */
|
|
96
|
-
.
|
|
96
|
+
.timeline-right::after {
|
|
97
97
|
left: -16px;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
/* The actual content */
|
|
101
|
-
.
|
|
101
|
+
.timeline-content {
|
|
102
102
|
padding: 10px;
|
|
103
103
|
background-color: #EEE;
|
|
104
104
|
position: relative;
|
|
@@ -113,14 +113,14 @@
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
/* Full-width containers */
|
|
116
|
-
.
|
|
116
|
+
.timeline-container {
|
|
117
117
|
width: 100%;
|
|
118
118
|
padding-left: 70px;
|
|
119
119
|
padding-right: 25px;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
/* Make sure that all arrows are pointing leftwards */
|
|
123
|
-
.
|
|
123
|
+
.timeline-container::before {
|
|
124
124
|
left: 60px;
|
|
125
125
|
border: medium solid white;
|
|
126
126
|
border-width: 10px 10px 10px 0;
|
|
@@ -128,12 +128,12 @@
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
/* Make sure all circles are at the same spot */
|
|
131
|
-
.
|
|
131
|
+
.timeline-left::after, .timeline-right::after {
|
|
132
132
|
left: 15px;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
/* Make all right containers behave like the left ones */
|
|
136
|
-
.
|
|
136
|
+
.timeline-right {
|
|
137
137
|
left: 0%;
|
|
138
138
|
}
|
|
139
|
-
}
|
|
139
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
|
-
import "./timeline.css";
|
|
4
|
-
import "../../css/pixelated.grid.scss";
|
|
5
3
|
import { usePixelatedConfig } from '../config/config.client';
|
|
6
4
|
import { SmartImage } from '../cms/cloudinary.image';
|
|
5
|
+
import "../../css/pixelated.grid.scss";
|
|
6
|
+
import "./timeline.css";
|
|
7
7
|
// https://www.w3schools.com/howto/howto_css_timeline.asp
|
|
8
8
|
Timeline.propTypes = {
|
|
9
9
|
timelineData: PropTypes.arrayOf(PropTypes.shape({
|
|
@@ -24,5 +24,5 @@ TimelineItem.propTypes = {
|
|
|
24
24
|
};
|
|
25
25
|
export default function TimelineItem(props) {
|
|
26
26
|
const config = usePixelatedConfig();
|
|
27
|
-
return (_jsx("div", { className: "
|
|
27
|
+
return (_jsx("div", { className: "timeline-container timeline-" + props.direction, children: _jsx("div", { className: "timeline-content", children: _jsxs("div", { className: "row-3col", children: [_jsx("div", { className: "grid-s1-e2", children: _jsx(SmartImage, { src: props.image || "", title: props.title, alt: props.title, cloudinaryEnv: config?.cloudinary?.product_env ?? undefined }) }), _jsxs("div", { className: "grid-s2-e4", children: [_jsx("h2", { children: props.title }), _jsx("p", { children: props.content })] })] }) }) }));
|
|
28
28
|
}
|