Demo for the second part of articles on theming - habr
There are 3 types of rendering in this repository
-
SPA in react - https://github.com/vordgi/theming/tree/main/spa
-
SSR in next.js - https://github.com/vordgi/theming/tree/main/ssg
-
SSG in next.js - https://github.com/vordgi/theming/tree/main/ssr
Each variant can be runned with the default dark or light mode.
Clone repository
git clone https://github.com/vordgi/theming.git
cd themingInstall workspaces dependencies:
yarn installhttps://theming-spa.vorfolio.ru/
Test locally
Development mode
cross-env REACT_APP_THEME=light yarn dev:spaProduction mode
cross-env REACT_APP_THEME=light yarn build:spa
serve -s spa/buildhttps://theming-spa-dark.vorfolio.ru/
Test locally
Development mode
cross-env REACT_APP_THEME=dark yarn dev:spaProduction mode
cross-env REACT_APP_THEME=dark yarn build:spa
serve -s spa/buildhttps://theming-ssg.vorfolio.ru/
Test locally
Development mode
cross-env NEXT_PUBLIC_THEME=light yarn dev:ssgProduction mode
cross-env NEXT_PUBLIC_THEME=light yarn build:ssg
yarn start:ssghttps://theming-ssg-dark.vorfolio.ru/
Test locally
Development mode
cross-env NEXT_PUBLIC_THEME=dark yarn dev:ssgProduction mode
cross-env NEXT_PUBLIC_THEME=dark yarn build:ssg
yarn start:ssghttps://theming-ssr.vorfolio.ru/
Test locally
Development mode
cross-env NEXT_PUBLIC_THEME=light yarn dev:ssrProduction mode
cross-env NEXT_PUBLIC_THEME=light yarn build:ssr
cross-env NEXT_PUBLIC_THEME=light yarn start:ssrhttps://theming-ssr-dark.vorfolio.ru/
Test locally
Development mode
cross-env NEXT_PUBLIC_THEME=dark yarn dev:ssrProduction mode
cross-env NEXT_PUBLIC_THEME=dark yarn build:ssr
cross-env NEXT_PUBLIC_THEME=dark yarn start:ssr