WordPress / theme-experiments

Experimenting with themes made out of blocks.
GNU General Public License v2.0
546 stars 180 forks source link

A WIP Theme Experiment using theme.json and Customizer #173

Closed pbking closed 3 years ago

pbking commented 3 years ago

This adds two (very) experimental themes: cblock and c0block.

cblock leverages block-templates to define the content

c0block leverages php templates to define the content

Both themes leverage theme.json to define styles.

The theme.json has a block called 'customizer' which is used to populate the customizer controls. Currently only 'color' types of controls are presented though additional (Boolean, text, etc) should be easy to add.

The objects in the 'customizer' collection define a slug, label, default value and type.

The "customizer-bridge.php" has been added to both themes but ideally this would instead be added somewhere higher (core?) or perhaps as a plugin.

This concept demonstrates a few things:

Most important I believe that this method of styling a block-based theme allows for the introduction of Block-based theme as a way of designing and building themes BEFORE the FSE/GSE tools are complete.

It puts into the hands of theme designers new tools, but doesn't eliminate the existing tools providing a bridge between how things work today and how things will eventually work.

image