Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try: A simple photoblogging theme #120

Merged
merged 14 commits into from
Dec 15, 2020
Merged

Try: A simple photoblogging theme #120

merged 14 commits into from
Dec 15, 2020

Conversation

kjellr
Copy link
Collaborator

@kjellr kjellr commented Dec 9, 2020

I hadn't seen a block-based example of a typical photo blog theme, so I built this to try it out. This heavily uses the Query block's new Grid view.

A few bumps I ran into:

I left a few other small notes in the code itself.

Index Single
gutenberg test_ gutenberg test__p=2029

GIF

Kapture 2020-12-09 at 10 25 22

@kjellr kjellr added the block-based theme A theme using HTML templates label Dec 9, 2020
@kjellr kjellr self-assigned this Dec 9, 2020
@@ -0,0 +1,11 @@
<!-- wp:spacer {"height":38} -->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a lot of blocks with this exact setting - could we make it a reusable block, or a block style?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm that's a good point! A block style might get confusing if the user were to edit it... and themes can't bundle reusable blocks today... I think the right way to do this would be to have a global styles setting for the default spacer block height. I'll open a Gutenberg issue for it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scruffian
Copy link
Collaborator

scruffian commented Dec 9, 2020

This looks great. It would be good to open issues for the parts that aren't working in Gutenberg yet, if you haven't already.

photo-blocks/style.css Outdated Show resolved Hide resolved
photo-blocks/style.css Outdated Show resolved Hide resolved
@kjellr
Copy link
Collaborator Author

kjellr commented Dec 10, 2020

Most of the easy-to-fix Gutenberg pieces in this theme have been merged, and the rest have open issues. So I think we're probably at a good place for merging this experiment in if someone would give it one more review?

add_theme_support( 'align-wide' );

// Adding support for core block visual styles.
add_theme_support( 'wp-block-styles' );
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume we need these here rather than putting them in theme.json?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, yes.

Copy link
Collaborator

@scruffian scruffian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kjellr kjellr merged commit f92bd1e into master Dec 15, 2020
@kjellr
Copy link
Collaborator Author

kjellr commented Dec 15, 2020

Thanks, everyone!

@kjellr kjellr deleted the try/photo-block-theme branch December 15, 2020 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
block-based theme A theme using HTML templates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants