GithubHelp home page GithubHelp logo

pross / bb-ui-enhancements Goto Github PK

View Code? Open in Web Editor NEW

This project forked from badabingbreda/bb-ui-enhancements

0.0 0.0 1.0 45 KB

Add better visible controls on Beaver Builder editor. Work by Matt Eastwood

CSS 31.82% PHP 28.09% JavaScript 18.41% SCSS 21.67%

bb-ui-enhancements's Introduction

Beaver Builder UI Enhancements

Community Plugin by Matt Eastwood / Guy Barry / Didou Schol / Marleen Kiral


Add extra styling when editing Beaver Builder layouts. Hit CTRL+e or CMD+e to activate/deactivate enhancements.

  • Distinguishes nested columns by showing dotted outlines
  • Adds a small icon to nested columns
  • Highlights columns and their parents on hover
  • Gives distinct colours to rows, columns and modules
  • Shows all columns when hovering BB admin bar
  • Shows all rows and columns when hovering "Responsive Editing" bar

Once you've selected to show the enhancements, it will be remembered until you disable it again, much like the dark/light mode option.


change styling

You can change the styling of the enhancements by adding CSS variables to your global CSS. All default colors and the outline width are set at root level, so redeclaring them at anything below that should work:

body.fl-builder-edit {
    --bbui-row-color                        : #5fb238;
    --bbui-row-color-hover                  : #8ac171;
    --bbui-column-color                     : #00A0D2;
    --bbui-column-color-hover               : #00A0D2;
    --bbui-module-color                     : #d2005f;
    --bbui-module-color-hover               : #e05292;
    --bbui-empty-col-highlight-bgcolor      : rgba(0, 160, 210, 0.1);
    --bbui-nested-col-parent-border-color   : rgba(0, 160, 210, 0.5);
    --bbui-outline-width                    : 2px;
    --bbui-module-hover-opacity             : .4;
}

disable Enhance button

You can remove the enhance button from the toolbar if needed. Simply add a filter to your theme's functions.php

add_filter( 'bb-ui-enhancements-settings' , 'disable_enhance_button' , 10 , 1 );
/**
* disable_enhance_button
*
* @param  mixed $settings
* @return array
*/
function disable_enhance_button( $settings ) {
    $settings[ 'enhanceButton' ] = false;
    return $settings; 
}

Tested with the following themes

BB UI Enhancements has been succesfully tested with the following popular (child-)themes:

  • Beaver Theme
  • Page Builder Framework
  • Astra
  • GeneratePress

Version history

Version Changes
1.1.3 Added module outline on admin-bar hover. Added --bbui-module-hover-opacity css variable to allow control over opacity
1.1.2 Added Enhance Button on Beaver Builder toolbar; tweaked CSS for theme compatability.
1.1.1 Moved loading of bb-ui-enhancements.js to footer to ensure jQuery is loaded.
1.1.0 Store Enhancement preference to local storage so it also starts that way on reload, adding css vars so custom colors and border width can be set easily.
1.0.0 First commit.

Mandatory attribution:

Icons made by Freepik from www.flaticon.com

bb-ui-enhancements's People

Contributors

badabingbreda avatar

Forkers

theperfectwill

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.