Coder Social home page Coder Social logo

branchee_block's Introduction

Branchee Block

This module allows the site builder to choose a menu with some options, and output a block that contains the menu with applicable Branchee markup.

Branchee is a lightweight mobile navigation plugin with built in transitions. The menu is generated from a basic unordered list.

A default version of the Branchee library is provided in the module, but can be overridden with a new version by overriding the library in your theme. A built in style for the menu can be chosen in the block settings, or a custom class can be provided if you want to customize the styling as per the styling recommendations in the Branchee library.

How to Use

  • Go to /admin/structure/block and click Place Block in the region you want the mobile menu to appear in.
  • Click Place Block on the Branchee Menu Block.
  • Choose the Menu you would like to display.
  • Choose a built in theme, or select Other and enter a class name that will be used as a prefix so you can style the menu yourself.
  • Click Save Block
  • Click Save Blocks

How to Update/Override Library

A defined library can now be overridden in your theme's *.info.yml file. Here is an example of overriding the branchee library:

libraries-override:
  # Replace an entire library.
  branchee_block/branchee: mytheme/branchee

  # Replace an asset with another.
  branchee_block/branchee:
    js:
      libraries/branchee/dist/branchee.min.js: directory_to_new_branchee/branchee.min.js
    css:
      component:
        libraries/branchee/dist/branchee.min.css: directory_to_new_branchee/branchee.min.css

Useful Tips

Coming Soon

branchee_block's People

Contributors

aeotrin avatar

Stargazers

Matt Horning avatar

branchee_block's Issues

Add second menu support

Add the ability to merge 2 menus into this (potential tertiary and main navigation).
Allow for separate styling via classes.

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.