Skip to content
AndrewMLeonardPublic
forked from bobbingwide/fizzie

About

Fizzie theme - a Full Site Editing theme using Gutenberg blocks

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

fizzie

screenshot

Fizzie theme - a Full Site Editing theme using Gutenberg blocks.

Description

This is an experimental theme attempting to implement Full Site Editing (FSE) with Gutenberg blocks.

The theme is required to replace the Genesis-a2z theme that is used in blocks.wp-a2z.org

Requirements:

  1. Implement Full Site Editing.
  2. Same look and feel as the Genesis-a2z theme.
  3. Support documentation / demonstration of each of the new blocks in Gutenberg.
  4. Find out what bits are missing from and/or not working on Gutenberg.
  5. Implement on blocks.wp-a2z.org, when stable.

Contents:

  • Fifteen templates
  • Twenty five template parts

The block-templates are:

  • 404 - Not found page

  • archive - generic template used for archives: author, taxonomy, date, tag

  • archive-block - to display archives for Blocks

  • archive-oik-plugins - to display archive for Plugins

  • category - used to display the Category archive

  • front-page - used for Page Shown On Front

  • home - used for Blog Posts index page or Posts Shown on Front (when front-page not implemented)

  • index - used when no other template is found

  • page-13.html - template for page ID 13

  • page-about - template for page with slug about

  • page-i18n-test.html - template for Internationalization test

  • search - Display search results

  • single - used for a single post / attachment / CPT

  • single-oik-plugins - used for a single oik-plugin

  • singular - used when single or page does not exist

  • See the template visualization: https://developer.wordpress.org/files/2014/10/Screenshot-2019-01-23-00.20.04.png

The block-template-parts are:

  • a2z-pagination - Letter pagination for blog posts
  • a2z-pagination-block - Letter pagination for blocks
  • a2z-pagination-oik-plugins - Letter pagination for plugins
  • archive-query - Main query for archive pages
  • breadcrumbs - Breadcrumb trail - using sb-breadcrumbs-block-based-widgets
  • category-description - Uses [archive_description] shortcode
  • category-query - To list posts in a chosen category term
  • download - To download plugins - uses [oikp_download] shortcode
  • footer - Final full width footer
  • footer-menu - Displays the footer menu - after the final full width footer
  • header - Displays the header: site logo, site title and tagline, header menu.
  • header-menu - Displays the header menu
  • home-part - A template part used in debugging. Classic block
  • home-query - Displays the posts on the blog page
  • i18n-test - Internationalization, extraction and localization test file
  • information - Displays post meta data using the oik-block/fields block
  • issue-27 - test case file for issue-27
  • issue-30 - test-case file for issue-30
  • metadates - Displays Date published, last updated and [Edit] link
  • page-content - Primary content part for a page
  • page-footer - Full width footer with 3 columns - representing widgets
  • post-content - Primary content part for a post
  • posts - An attempt to display the posts using query blocks - incomplete- not used
  • search - Using the Search block
  • social-links - Social link icons

Templates not yet implemented:

Some of these templates will be needed for other subdomains of wp-a2z.org.

  • archive-CPT - archive templates for other custom post types - 5 to do
  • image - template for the image mime type
  • page - used for a single page -but see page-13, page-about and page-i18n-test
  • single-CPT - single templates for other custom post types - 10 to do
  • tag - for a particular tag
  • taxonomy - for a particular taxonomy
  • taxonomy-oik_letters - taxonomy specifically for oik_letters

Installation

  • Either install Gutenberg 9.2.2 or higher or install and build the latest Gutenberg source.

  • Activate Gutenberg.

  • Install and activate the Fizzie theme, as you would install any other theme.

  • For Gutenberg 9.2.2 enable Full site editing, in Gutenberg > Experiments. Note: There is no need to Enable Full Site Editing Demo Templates

  • For Gutenberg 9.3.0 and above Full Site Editing will be enabled automatically.

  • For some of the templates and template parts to work properly you will need to install and activate the pre-requisite plugins.

  • For templates which include navigation blocks you will need to edit the supplied menus.

  • Note: Gutenberg 9.4.0 did not choose template parts correctly. Update to Gutenberg 9.5.0

  • Pre-requisite plugins: see also Notes

  • oik

  • oik-fields

  • oik-a2z

  • sb-breadcrumbs-block

  • Yoast SEO - for breadcrumbs logic

Change Log

0.2.0

  • Added: Extracted and localized to UK English ( en_GB ) and the obfuscated bbboing language ( bb_BB ),bobbingwide#46
  • Changed: Add more templates to test the template hierarchy logic: page-13, page-about and search,bobbingwide#38
  • Changed: Enable cloning from wp.a2z to wp-a2z.org,bobbingwide#48
  • Changed: Remove empty paragraph from page footer,bobbingwide#4
  • Changed: Update 'naughty' message from index.php
  • Changed: Update screenshot for v0.1.1
  • Fixed: Add text domain to 'No posts found'
  • Fixed: Update home.html to use header.html,bobbingwide#36

0.1.1

0.1.0

  • Changed: Add styles used for the test of core/post-content recursion detection, Issue #33
  • Changed: Continue refactoring recursion detection and error reporting, Issue #33
  • Changed: Set preset font sizes in pixels. Set default fonts for core/post-title and core/post-date, Issue #4
  • Changed: Update the footer menu to match blocks.wp-a2z.org, Issue #4

0.0.9

  • Changed: Refactored block-override-functions as Fizzie_Block_Recursion_Control, Issue #33
  • Changed: Revert to using block content postId to check for recursion in core/post-content, issue #27
  • Changed: Refactor overrides for core blocks into separate files, issue #25
  • Tested: With WordPress 5.6-beta4

0.0.8

  • Added: Disable the logic that attempts to insert the global post ID into the $fizzie_processed_content array. Issue #31
  • Added: Attempt to allow recursive reusable block problems to be fixed using the editor. Issue #31
  • Changed: Start refactoring of overrides. Issue #25
  • Added: Improve solution to detect recursive post-content blocks. Issue #27
  • Added: Improve solution to detects recursive template-parts. Issue #30
  • Added: core/post-hierarchical terms - cater for unknown taxonomies. Issue #29
  • Added: Attempt to avoid infinite recursion in the core/post-content block. Issue #27
  • Changed: Restructure home.html to use a simplified home-query.html that uses metadates.html, and metadates.html to use [bw_field]

0.0.7

  • Changed: Improve CSS styling for nav menus,bobbingwide#26
  • Changed: Define CSS styling for metadates template part,bobbingwide#23
  • Changed: Improve CSS styling for certain block types,bobbingwide#4
  • Added: Implement metadates template part,bobbingwide#23
  • Changed: When Template Part Not Found is displayed show information for problem determination,bobbingwide#16
  • Added: Add [post-edit] shortcode temporary solution,bobbingwide#24
  • Changed: Update header menu links to match the header menu in blocks.wp-a2z.org,bobbingwide#17
  • Changed: Start implementing menu improvements - by fiddling url and className attributes,[bobbingwide#22

0.0.6

  • Added: Improve solution to fix some Gutenberg issues by replacing render_callback functions with our own.,bobbingwide#18
  • Fixed: Correct badly formed template-part for footer-menu,bobbingwide#19
  • Changed: Update templates and parts for better matching of functionality in genesis-a2z,bobbingwide#4
  • Added: Add posts.html template part - not yet used
  • Changed: Fix up CSS messed up by experimental-theme.json changes.,bobbingwide#3
  • Added: Implement main query pagination for the core/query-pagination block,bobbingwide#18
  • Experiment: Attempt to define typography for core/post-title in experimental-theme.json
  • Changed: Improve styling for h1-h6, separator, preformatted and verse. Add some more colour presets and font sizes
  • Tested: With WordPress 5.6-beta3 and WordPress Multi Site
  • Tested: With Gutenberg 9.2.2, 9.3.0 and development
  • Tested: With PHP 7.4

0.0.5

0.0.4

  • Changed: Create [archive_description] shortcode for the category-description template part,bobbingwide#13
  • Tested: With WordPress 5.6-beta2
  • Tested: With Gutenberg 9.2.2 and development - with a local fix for #25377
  • Tested: With PHP 7.4

0.0.3

  • Changed: Improve styling of drop down menu and page footer column background,bobbingwide#4
  • Added: Implement the 404.html template,bobbingwide#12
  • Changed: remove wp:query to allow use of the main query in archive based templates,bobbingwide#11

0.0.2

  • Added: Implement category.html template,bobbingwide#9
  • Changed: Style the 'home' template - for blog posts,bobbingwide#4
  • Changed: Style page-footer content to be same width as page and post,bobbingwide#1
  • Changed: Support header and footer menus. bobbingwide#1 (comment)
  • Fixed: update wp:template-part to remove postId attr; set theme attr to fizzie
  • Added: Update the theme's files extracted from the exported zip file. See bobbingwide#1 (comment)

0.0.1

  • Added: Start styling as genesis-a2z,bobbingwide#4
  • Added: Enable oik shortcodes in template parts,bobbingwide#5
  • Changed: Copy some stuff from the Stanley theme as per fullsitediting.com,bobbingwide#4
  • Changed: Play with editor-style.css for dropcap and header
  • Changed: Start to support experimental-link-color, reload latest style.css when SCRIPT_DEBUG true, try Twenty Seventeen's frontpage_template hook
  • Changed: Added then delete template part posts in index.html - never ending loop problem
  • Added: Put some logic in index.php for when Gutenberg is not active
  • Added: Add editor-style.css to style the blocks in the editor to the same as the front end,bobbingwide#4

0.0.0

Notes

The theme is designed for use on wp-a2z.org.

It implements template parts which depend on external components. For example

  • a2z pagination requires oik-a2z plugin
  • breadcrumbs requires sb-breadcrumbs-block

The CSS is minimal; just enough to make it look OK on my laptop and external monitor. Responsibility for responsive styling is left to Gutenberg / WordPress core functionality.

Block overrides

Fizzie contains a number of overrides to Gutenberg server rendered blocks which didn't behave the way I expected. These overrides should continue to work even when the PRs to fix the bugs have been implemented.

Improvement areas include:

  • core/query-loop - uses main query when used outside of core/query
  • core/query-pagination - uses the main query when used outside of core/query
  • core/block - handle recursion
  • core/post-hierarchical-terms - cater for invalid taxonomy
  • core/navigation-link - set current-menu-item class for current request
  • core/navigation - tbc
  • core/template-part - handle recursion
  • core/post-content - handle recursion
  • core/post-excerpt - append missing </div>

For more information see bobbingwide#25 and/or the includes folder.

References

See my articles on herbmiller.me:

During the development I have referred to the following articles, sites and repositories.

Some other FSE themes:

Brief development history

Even though FSE is not going to make it into WordPress 5.6, I have to implement the theme in order to document the 24 or so new blocks that are already in Gutenberg and that will eventually appear in WordPress core.

It started as a completely empty theme and then I played with it while following some tutorials.

The tutorials didn't really cover the Site Editor (beta) user interface. So I was on my own from there on. It’s been quite a learning experience. Rather than using the Site Editor ( beta ) user interface, I've found it easier to edit the Templates and Template parts directly.

I've been using the block editor in Code editor mode, then copying and pasting the individual templates and template parts to the .html files that the theme needs to deliver. In some cases these had to be edited to remove the "postId" attributes.

In the target site(s) some of the template parts need importing into the Site Editor to be customised for the target site. These are the ones that include the navigational blocks.

  • Note: You can set the Site icon without having to edit a template or template part. Just create a new post, add the Site icon block and select the image file.

Copyright

(C) Copyright Herb Miller, Bobbing Wide 2020

  • This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

About

Fizzie theme - a Full Site Editing theme using Gutenberg blocks

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages