Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Conversation

@jffng
Copy link
Contributor

@jffng jffng commented Apr 14, 2021

This PR adds a header template that renders a classic menu. It's un-styled but I'm looking for input on the approach. I tried distilling it down to the minimum boilerplate required to support classic menus.

Screen Shot 2021-04-14 at 11 44 48 AM

The PR also reorganizes the project a bit into block-template-parts and template-parts.

I have a feeling this is going to be the ugliest part of the theme, so wanted to tackle it early.

@jffng jffng requested a review from a team April 14, 2021 15:49
@jffng jffng linked an issue Apr 14, 2021 that may be closed by this pull request
4 tasks
<header id="masthead" class="site-header" role="banner">
<div class="site-branding">
<?php if ( has_custom_logo() ) : ?>
<div class="site-logo"><?php the_custom_logo(); ?></div>
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we could reduce this file to only use php for mostly just the navigation. We could replace some of the php using blocks like in this case we could simply do <?php echo do_blocks( '<!-- wp:site-logo {"align":"center","width":128} /-->' ); ?> I tested locally and that seemed to work fine and was editable via the customizer

danieldudzic and others added 8 commits April 15, 2021 07:09
* Quadrat: Add new heading sizes

* Quadrat: Further work on Lists and Quotes

* Quadrat: Remove whitespace

* Quadrat: Add responsive Heading font-sizes
* Add the hosts block pattern.

* Fix categories.

* Update img refs.

* Add alt text to media text pattern.

* Revise block pattern names.
* override BCB's templates with php ones
@jffng
Copy link
Contributor Author

jffng commented Apr 16, 2021

Note: we prefer #3658 which depends on a Gutenberg change.

@MaggieCabrera MaggieCabrera added this to the Quadrat v1 milestone Apr 20, 2021
'theme_location' => 'primary',
'menu_class' => 'menu-wrapper',
'container_class' => 'primary-menu-container',
'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>',
Copy link
Contributor

Choose a reason for hiding this comment

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

Even if we have to use PHP to render this I think it would still be good to use add_theme_support( 'block-nav-menus' ); and render the menu like this. Those nav blocks are already styled in BCB settings.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great point, I will refactor this to use block-nav-menus.

@jffng
Copy link
Contributor Author

jffng commented Apr 20, 2021

I updated this so that the theme renders the menu using the nav block, and we pick up some styles from BCB:

Screen Shot 2021-04-20 at 12 25 22 PM

@jffng jffng mentioned this pull request Apr 23, 2021
@scruffian scruffian force-pushed the make/quadrat branch 2 times, most recently from 0b57627 to fd635dd Compare April 26, 2021 16:09
@jffng
Copy link
Contributor Author

jffng commented Apr 27, 2021

Closing! See #3714

@jffng jffng closed this Apr 27, 2021
@scruffian scruffian deleted the try/header-template-part branch April 28, 2021 10:01
@jffng jffng removed a link to an issue Apr 30, 2021
4 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants