Code Monkey home page Code Monkey logo

theme-twenty's Introduction

Chromatic Storybook GitHub release

This is a Wordpress Theme Built on Timber with built-in Storybook documentation

Requirements

Available Scripts

In the project directory, you can run:

npm run storybook

Runs storybook.
Open http://localhost:9009 to view it in the browser.

The page will reload if you make edits.

npm run build

TODO

  1. Builds theme
    • Compiles SASS
    • Minifies CSS and JS
  2. Builds static storybook for github pages in docs/ directory

Notes

Structure

This theme uses repeatable components (Atoms and Molecules as defined in Atomic Design) to create blocks (Organisms)

Components

  • A component definition is comprised of:
    • A directory within the /components folder
    • One or more .twig template files
    • Corresponding SCSS definitions
    • A Storybook stories file

For example, the button component is:

/components/button/
button.scss
button.stories.js
button.twig

Blocks

Blocks are made available to all pages, and must be used in lieu of the classic editor to take advantage of theme functionality

Available blocks:

  • Section
    • Uses section and container components
    • Section background color: default, muted, primary, secondary
    • Section background cover image
    • Container width: default, xsmall, small, large, xlarge, expand
    • content
  • Switcher Section
    • Uses section, container, and switcher components
    • Like section, but switches between content section panes added as children blocks
    • Repeater: pane name, section
  • Grid
    • Useful for custom grid layout combining different blocks. Check that another block doesn't already exist displaying your content in a grid
    • Uses grid component
    • Grid gap: default, small, medium, large, collapse
    • Grid child width: default, 1/2, 1/3, 1/4, 1/5, 1/6
      • Always set to collapse to single column
    • Grid match height: yes, no
    • Repeater: content
  • Heading
    • Default gutenberg heading block
  • Icon Grid

Development Process

  1. Use the develop branch for visual testing.
  2. Chromatic will run automatically on commit.
  3. When you are ready to push a new version, create a pull request
  4. The Chromatic build must be approved for the pull request to succeed

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.