GithubHelp home page GithubHelp logo

soltrinox / 3d-product-page Goto Github PK

View Code? Open in Web Editor NEW

This project forked from molebox/3d-product-page

0.0 1.0 0.0 63.88 MB

A product page made with snowpack, mdx, chakra and three js

License: MIT License

HTML 7.66% JavaScript 92.34%

3d-product-page's Introduction

snowpack-mdx-chakra

โœจ Bootstrapped with Create Snowpack App (CSA).

This is a snowpack template project setup with MDX Chakra-ui and React Router v6. Its quite opinionated, but in a good way.

Install

Run the following command, replacing my-new-app with the name of your new app.

npx create-snowpack-app my-new-app --template snowpack-mdx-chakra --use-yarn

Project structure

Your pages live inside the pages directory, they are just mdx files. Your components live inside (you guessed it) a components directory. The routing is handle by React Router v6, which has some nice new additions. An mdx-layout component is created and waiting to be used, if at all, inside the components folder. If used, this will wrap all the pages in the pages folder. So if you have a global layout you can crate that there.

Routing

Inside the components folder is the mdx-routes file. This handles the navigation of your app, if you have more than one page that is. Its usage is very simple. You create a new mdx file under pages then in the mdx-routes file you add your new pages route to the MDXRoutes component. You then add a link to your new page in the Nav component in the same file.

Chakra-ui

Chakra-ui has awesome defaults which put accessibility first. The template comes with a default theme initialized but this can be changed in the theme file which lives at the projects root. You are free to import another theme from chakra or invent your own.

Components

Inside the index.jsx file located in the src folder you will see that Chakra components are mapped to markdown elements, meaning that you dont need to import anything into the mdx files, just use the elements and write markdown as you normally would. If you create any custom components you can place them inside the component object and they will be available in the mdx file. Much like the emoji component the template ships with.


Available Scripts

npm start

Runs the app in the development mode. Open http://localhost:8080 to view it in the browser.

The page will reload if you make edits. You will also see any lint errors in the console.

npm run build

Builds a static copy of your site to the build/ folder. Your app is ready to be deployed!

For the best production performance: Add a build bundler plugin like "@snowpack/plugin-webpack" to your snowpack.config.js config file.

npm test

Launches the application test runner. Run with the --watch flag (npm test -- --watch) to run in interactive watch mode.

3d-product-page's People

Contributors

molebox avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.