Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions assets/css/src/blocks/_navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,35 @@
.wp-block-navigation__submenu-container {
gap: 24px !important;
}

.wp-block-navigation__responsive-container-content {

.wp-block-navigation-item {
display: flex;
justify-content: space-between;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
padding: 0 24px;
width: 100vw;
Comment thread
girishpanchal30 marked this conversation as resolved.
box-sizing: border-box;

.wp-block-navigation__submenu-container {
display: none;
}

.wp-block-navigation__submenu-icon {
display: inline-block;
cursor: pointer;
}
Comment thread
girishpanchal30 marked this conversation as resolved.

&.is-submenu-open > .wp-block-navigation__submenu-container {
display: block;
width: 100%;
padding: 0;
padding-top: var(--wp--style--block-gap, 2em);
}
}
}

}
7 changes: 7 additions & 0 deletions assets/js/src/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* global jQuery */

jQuery( document ).ready( ( $ ) => {
$( '.wp-block-navigation-submenu__toggle' ).on( 'click', function () {
$( this ).parent( 'li' ).toggleClass( 'is-submenu-open' );
} );
} );
1 change: 1 addition & 0 deletions inc/Assets_Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class Assets_Manager {
'editor-css' => 'riverbank-editor',
'welcome-notice' => 'riverbank-welcome-notice',
'design-pack-notice' => 'riverbank-design-pack-notice',
'frontend-js' => 'riverbank-script',
);

/**
Expand Down
1 change: 1 addition & 0 deletions inc/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public function setup() {
*/
public function enqueue() {
Assets_Manager::enqueue_style( Assets_Manager::ASSETS_SLUGS['frontend-css'], 'style' );
Assets_Manager::enqueue_script( Assets_Manager::ASSETS_SLUGS['frontend-js'], 'script', true, array( 'jquery' ) );
}

/**
Expand Down
Loading