Files
WordPress/wp-includes/block-patterns/navigation-overlay-centered.php
scruffian 60e5bce8c2 Editor: Navigation overlay - patterns and template part definition.
Adds a new template part for the Navigation block called WP_TEMPLATE_PART_AREA_NAVIGATION_OVERLAY, corresponding area definition in block-template-utils.php to support navigation overlay template parts.

Also adds the navigation block pattern category registration in block-patterns.php and five new navigation overlay block patterns.

Reviewed by mikachan, get_dave.

Props onemaggie, scruffian, get_dave, mikachan, wildworks.
Fixes #64589.
Built from https://develop.svn.wordpress.org/trunk@61609


git-svn-id: http://core.svn.wordpress.org/trunk@60920 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2026-02-10 16:37:40 +00:00

22 lines
1.6 KiB
PHP

<?php
/**
* Navigation: Overlay with centered navigation.
*
* @package WordPress
*/
return array(
'title' => _x( 'Overlay with centered navigation', 'Block pattern title' ),
'blockTypes' => array( 'core/template-part/navigation-overlay' ),
'categories' => array( 'navigation' ),
'content' => '<!-- wp:group {"metadata":{"name":"' . esc_attr( __( 'Navigation Overlay' ) ) . '"},"style":{"spacing":{"padding":{"right":"var:preset|spacing|40","left":"var:preset|spacing|40","top":"var:preset|spacing|40","bottom":"var:preset|spacing|40"}},"dimensions":{"minHeight":"100vh"},"elements":{"link":{"color":{"text":"var:preset|color|black"}}},"color":{"background":"#eeeeee"}},"textColor":"black","layout":{"type":"default"}} -->
<div class="wp-block-group has-black-color has-text-color has-background has-link-color" style="background-color:#eeeeee;min-height:100vh;padding-top:var(--wp--preset--spacing--40);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--40)"><!-- wp:group {"align":"wide","layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"right"}} -->
<div class="wp-block-group alignwide"><!-- wp:navigation-overlay-close /--></div>
<!-- /wp:group -->
<!-- wp:group {"align":"wide","style":{"dimensions":{"minHeight":"90vh"}},"layout":{"type":"flex","orientation":"vertical","justifyContent":"center","verticalAlignment":"center"}} -->
<div class="wp-block-group alignwide" style="min-height:90vh"><!-- wp:navigation {"layout":{"type":"flex","orientation":"vertical","justifyContent":"center"}} /--></div>
<!-- /wp:group --></div>
<!-- /wp:group -->',
);