diff --git a/.dev/assets/shared/css/shared-style.css b/.dev/assets/shared/css/shared-style.css index 7ef1e9fda..6b531dbae 100755 --- a/.dev/assets/shared/css/shared-style.css +++ b/.dev/assets/shared/css/shared-style.css @@ -118,6 +118,15 @@ @import url("gravity/radio.css"); @import url("gravity/button.css"); +/* Everything below here still needs organizing */ +.u-informational { + background-color: hsla(var(--theme-feedback-informational-color), 0.1); + border: 1px solid hsla(var(--theme-feedback-informational-color), 1); + color: hsla(var(--theme-feedback-informational-color), 1); + line-height: 2; + padding: 0 0.5em; +} + .hero-center-center-align .wp-block-coblocks-hero__box { margin: 0 auto; } @@ -261,12 +270,6 @@ strong { padding-right: var(--theme-block-padding-x); } -.u-informational { - background-color: hsla(var(--theme-feedback-informational-color), 0.1); - border: 1px solid hsla(var(--theme-feedback-informational-color), 1); - color: hsla(var(--theme-feedback-informational-color), 1); -} - @media (--small) { .sm\:flex { diff --git a/includes/customizer.php b/includes/customizer.php index 60764461e..de61afcb2 100644 --- a/includes/customizer.php +++ b/includes/customizer.php @@ -31,7 +31,9 @@ function setup() { add_action( 'customize_preview_init', $n( 'customize_preview_init' ) ); add_action( 'customize_controls_enqueue_scripts', $n( 'customize_preview_init' ) ); add_action( 'customize_preview_init', $n( 'enqueue_controls_assets' ) ); + add_action( 'wp_head', $n( 'inline_css' ) ); + add_action( 'wp_nav_menu_args', $n( 'wp_nav_register_fallback' ) ); } @@ -51,6 +53,63 @@ function register_control_types( \WP_Customize_Manager $wp_customize ) { $wp_customize->register_control_type( Range_Control::class ); } +/** + * Display a placeholder in the customizer if a menu has not been assigned, + * + * @param array $args Array of nav menu arguments. + */ +function wp_nav_fallback( $args ) { + if ( ! is_customize_preview() ) { + return; + } + + $registered_nav_menus = get_registered_nav_menus(); + + $menu_slug = $args['theme_location']; + $instance_id = $args['customize_preview_nav_menus_args']['args_hmac']; + $attributes = ''; + + $attrs = array( + 'data-customize-partial-id' => 'nav_menu_instance[' . esc_attr( $instance_id ) . ']', + 'data-customize-partial-type' => 'nav_menu_instance', + 'data-customize-partial-placement-context' => esc_attr( wp_json_encode( $args['customize_preview_nav_menus_args'] ) ), + ); + + $attributes = implode( + ' ', + array_map( + function( $key, $value ) { + return sprintf( '%s="%s"', $key, esc_attr( $value ) ); + }, + array_keys( $attrs ), + $attrs + ) + ); + ?> +
id="menu-primary-navigation"> + +
+ 'social-icons list-reset' ] ); ?> - + - - - + 'site-info text-sm mb-0' ] ); ?> diff --git a/partials/footers/footer-2.php b/partials/footers/footer-2.php index 70f5b85cf..2a527f3d3 100644 --- a/partials/footers/footer-2.php +++ b/partials/footers/footer-2.php @@ -12,7 +12,7 @@ diff --git a/partials/footers/footer-4.php b/partials/footers/footer-4.php index 4ee13feed..ac94ddefa 100644 --- a/partials/footers/footer-4.php +++ b/partials/footers/footer-4.php @@ -17,7 +17,7 @@ false ) ); ?> - + - - - + - + - - - + - + - - - + diff --git a/partials/headers/header-1.php b/partials/headers/header-1.php index 063445c48..c461c753a 100644 --- a/partials/headers/header-1.php +++ b/partials/headers/header-1.php @@ -14,33 +14,27 @@ - - - - - - - - + + + diff --git a/partials/headers/header-2.php b/partials/headers/header-2.php index de7f7334d..c987214ae 100644 --- a/partials/headers/header-2.php +++ b/partials/headers/header-2.php @@ -12,10 +12,9 @@