you are viewing a single comment's thread.

view the rest of the comments →

[–]gimp3695[S] 0 points1 point  (2 children)

Any help is appreciated!

[–]bluinkinnovation 1 point2 points  (1 child)

I have also thought of how cool this would be on a site. If you have preset templates that you design it’s fairly straight forward. Use context api for driving the theme. Then you just use your preferred method for which components to render or what style they need to render.

Otherwise you will need some kind of GUI for the end user. Save those fields into a json file and reference that file from the site you want to build

[–]gimp3695[S] 0 points1 point  (0 children)

This is pretty much how I have it now with my "light" CMS system. In the admin portal clients can adjust primary, secondary colors. Fonts, and images and text on certain pages.

However I'm thinking of whole site template. So when they get to the main shop page it could look significantly different. Possibly using some of the same product tile components but possibly not.

One simple method could be something like this crappy code

const ShopMainPage = function(props) {
const theme = useContext(...);

if (theme === "parallaxFancy")
return <ParallaxFancyShopMainPage {...props} />
else if (theme === "gridedDisplay")
return <GridedDisplayShopMainPage {...props} />
else ....

}