2017 © Pedro Peláez
 

library navigation-menu-bearframework-addon

Navigation menu addon for Bear Framework

image

ivopetkov/navigation-menu-bearframework-addon

Navigation menu addon for Bear Framework

  • Thursday, July 12, 2018
  • by ivopetkov
  • Repository
  • 2 Watchers
  • 0 Stars
  • 635 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 17 Versions
  • 15 % Grown

The README.md

Navigation Menu

Addon for Bear Framework, (*1)

This addon enables you to easily create multiple types of navigations for your website., (*2)

Build Status Latest Stable Version codecov.io License Codacy Badge, (*3)

Download and install

Install via Composer, (*4)

composer require ivopetkov/navigation-menu-bearframework-addon

Download an archive, (*5)

Download the latest release from the GitHub page and include the autoload file., (*6)

include '/path/to/the/addon/autoload.php';

Enable the addon

Enable the addon for your Bear Framework application., (*7)

$app->addons->add('ivopetkov/navigation-menu-bearframework-addon');

Usage

<component src="navigation-menu">
    <ul>
        <li><a>Button 1</a></li>
        <li><a>Button 2</a>
            <ul>
                <li><a>Button 2.1</a></li>
                <li><a>Button 2.2</a></li>
                <li><a>Button 2.3</a></li>
            </ul>
        </li>
        <li><a>Button 3</a></li>
    </ul>
</component>

Attributes

type, (*8)

      The type of the navigation. Available values: horizontal-down, vertical-left, vertical-right, list-vertical, list-horizontal, (*9)

moreItemHtml, (*10)

      The HTML code for the more item. Must contain li and ul tags. Example: <li><a>...</a><ul></ul></li>, (*11)

class, (*12)

      HTML class attribute value, (*13)

style, (*14)

      HTML style attribute value, (*15)

Examples

The navigation will be horizontal and submenus will show bellow. If there are too many first level items, a more item will be shown., (*16)

<component src="navigation-menu" type="horizontal-down">
    <ul>
        <li><a>Button 1</a></li>
        <li><a>Button 2</a>
            <ul>
                <li><a>Button 2.1</a></li>
                <li><a>Button 2.2</a></li>
                <li><a>Button 2.3</a></li>
            </ul>
        </li>
        <li><a>Button 3</a></li>
    </ul>
</component>

The navigation will be vertical and submenus will open to the right., (*17)

<component src="navigation-menu" type="vertical-right">
    <ul>
        <li><a>Button 1</a></li>
        <li><a>Button 2</a>
            <ul>
                <li><a>Button 2.1</a></li>
                <li><a>Button 2.2</a></li>
                <li><a>Button 2.3</a></li>
            </ul>
        </li>
        <li><a>Button 3</a></li>
    </ul>
</component>

License

Navigation menu addon for Bear Framework is open-sourced software. It's free to use under the MIT license. See the license file for more information., (*18)

Author

This addon is created by Ivo Petkov. Feel free to contact me at @IvoPetkovCom or ivopetkov.com., (*19)

The Versions