Responsive Navigation Block
This Plugin allows you to display and apply alternative styling to different navigation menus based on the screen size using the WordPress Navigation block. Video Walkthrough Features Two new Navigation Block (variations) for: Mobile Desktop Style your menu differently depending on screen size. Use a different menu for each screen size. Customize the “breakpoint” (where you switch between mobile and desktop). Automatically switch editor to “mobile” preview when editing the mobile navigation. Usage This Plugin creates two block variations from the Navigation block which will be automatically hidden/shown at the configured screensize (breakpoint): Navigation (Mobile) – will be displayed only on smaller screen sizes. Navigation (Desktop) – will be displayed only on larger screen sizes. This affords the ability to independently style mobile vs desktop navigation and even allows for completely different menus to be used. The Plugin should be used as follows: Install and Activate the plugin – two new block variations will be automatically registered for “Mobile” and “Desktop”. Go to the Editor and remove any existing Navigation block. Add the “Desktop Navigation” block – style and configure the menu for “desktop” as required. Add the “Mobile Navigation” block – style and configure the menu for “mobile” as required. View the front of your website and resize your browser to see the navigations swap out at the appropriate breakpoint/screensize. Alternatively you can transform the default Navigation block to either Mobile or Desktop variations via the block’s interface. Support Please see FAQs. If you still have an issue please: check Github for existing Issue reports. (if none) then file a new Issue on Github Privacy Statement Responsive Navigation does not: use cookies. send data to any third party. include any third party resources. Contributing Contributions to this Plugin are welcome. Please fork the Github repository and submit a PR for review. Development Setup This Plugin uses the @wordpress/scripts package. Check out the Github repo into the wp-content/plugins directory of a WordPress installation. cd into the Plugin’s directory install the dependencies with npm i. Running npm start will start the @wordpress/scripts package in watch mode ready to compile the JavaScript on modification. PHP files can be edited in the usual manner. Testing The Plugin has e2e test coverage for the key features courtesey of @wordpress/scripts and Playwright. To run the tests – in your terminal of choice: npm run build. npm run wp-env start. Run the tests: npm run test:e2e Releasing Releasing the Plugin to the WordPress.org Plugin repo is the prerogative of the Plugin owner (@get_dave). The process is as follows: Test the Plugin Commit all changes to trunk branch. Push changes to trunk (only) – git push origin trunk. In Github: Actions Select the Build Release Zip action. Select the Run workflow dropdown and run the workflow to generate a zip file. When action completes download the generated Plugin zip artifact. Manually install and test the .zip. Deploy to WP.org When ready to deploy. Bump Plugin version and tag release – npm run bump-version. Push trunk and tags – git push origin trunk --tags Deployment to WP.org will be handled automatically.
Top keywords
- navigation13×2.51%
- block10×1.93%
- mobile10×1.93%
- desktop8×1.55%
- run8×1.55%
- navigation block7×1.35%
- npm6×1.16%
- wordpress6×1.16%
- github5×0.97%
- screen5×0.97%
- trunk5×0.97%
- automatically4×0.77%
Bootstrap Blocks
Bootstrap Gutenberg Blocks for WordPress. This plugin adds Bootstrap components and layout options as Gutenberg blocks. Features Supports Bootstrap v5 and v4 Support for CSS grid (experimental) Fully customizable with filters Configuration via option page or programmatically with constants Block templates can be overwritten in your theme The full documentation of this plugin can be found on GitHub: https://github.com/tschortsch/bootstrap-blocks-wordpress-plugin#readme Available Blocks Container Options: Fluid: If enabled the container will use the full available width, spanning the entire width of the viewport. Fluid Breakpoint: Used to enable responsive containers. This feature only works with Bootstrap v4.4+. The container will use 100% of the width until the specified breakpoint is reached, after which the defined max-widths will apply for each of the higher breakpoints. Margin After: Define a margin which should be added after the container. Row Options: Template: Choose from a predefined template for the inner column blocks. No Gutters: Disable gutters between columns. Alignment: Horizontal alignment of inner column blocks. Vertical Alignment: Vertical alignment of inner column blocks. Editor stack columns: Displays stacked columns in the editor to enhance readability of block content. Horizontal Gutters: Size of horizontal gutters. Vertical Gutters: Size of vertical gutters. CSS Grid Gutters: Size of gutters when CSS grid is used. Column Options: Sizes for all breakpoints (xxl, xl, lg, md, sm, xs): How much space the column should use for the given breakpoint. Equal width for all breakpoints (xxl, xl, lg, md, sm, xs): If enabled column will spread width evenly with other columns. Background Color: Set background color to column. Content vertical alignment: Align content vertically in column. This option is only needed if a background color is set. Otherwise use the Alignment option of the outer row block. Padding: Define padding inside the column. Button Options: Style: Choose the styling of the button. Open in new tab: Choose if link should be opened in a new tab. Rel: Set rel attribute of the link. Alignment: Horizontal alignment of the button. Supported Bootstrap versions This plugin supports Bootstrap v4 and v5. The version can be selected in the plugin settings (Settings > Bootstrap Blocks) or by defining the WP_BOOTSTRAP_BLOCKS_BOOTSTRAP_VERSION constant in the wp-config.php file: Bootstrap 4: define( 'WP_BOOTSTRAP_BLOCKS_BOOTSTRAP_VERSION', '4' ); Bootstrap 5 (default): define( 'WP_BOOTSTRAP_BLOCKS_BOOTSTRAP_VERSION', '5' ); Possible values right now are '4' or '5'. By default Bootstrap version 5 is selected. CSS Grid The CSS grid (supported with Bootstrap >= 5.1.0) can be enabled in the plugin settings (Settings > Bootstrap Blocks) or by defining the WP_BOOTSTRAP_BLOCKS_ENABLE_CSS_GRID constant in the wp-config.php file: eg. define( 'WP_BOOTSTRAP_BLOCKS_ENABLE_CSS_GRID', true ); When the CSS grid is enabled the row and the column blocks will use custom templates for the rendering process: Row: row-css.grid.php Column: column-css-grid.php The support is still experimental since it’s also marked as experimental in the Bootstarp library. Please read the official Bootstrap documentation to get more information on how to use it. Bootstrap library Please be aware that this plugin does not include the Bootstrap library in your website. You need to do this by yourself. We decided not to include the library so that you can modify Bootstrap to your own needs before loading it. You’ll find an example how to include it in your theme’s functions.php in the documentation. Templates All blocks are implemented as dynamic blocks. This makes it possible to overwrite the template of a block in your theme. To overwrite a block template create a folder called wp-bootstrap-blocks/ in your theme directory. You can copy the original template from wp-bootstrap-blocks/src/templates/ .php as a starting point and adjust it to your needs. Requirements WordPress >= 5.0 PHP >= 5.6 Further Information Documentation: https://github.com/tschortsch/bootstrap-blocks-wordpress-plugin#readme WordPress Plugin: https://wordpress.org/plugins/wp-bootstrap-blocks GitHub Repository: https://github.com/tschortsch/bootstrap-blocks-wordpress-plugin Changelog: https://github.com/tschortsch/bootstrap-blocks-wordpress-plugin/releases Issue tracker: https://github.com/tschortsch/bootstrap-blocks-wordpress-plugin/issues