totem.module.menu
v0.2.0
Published
Twig partial for outputting different variants of menu's.
Downloads
36
Maintainers
Readme
Totem module: menu
Twig partial for outputting different variants of menu's.
This module is created for Totem projects, but can also be used in any other Twig related project.
Installation
Install totem.module.menu with npm (we assume you have pre-installed node.js).
$ npm install totem.module.menu --save
Usage
You can choose between a list of menu variants:
- Centered
- Right to left
- Justify
- Vertical
- Distribute
Use of a variant is possible by adding the corresponding class as a modifer on the base class.
Snippets
menu centered
<nav class="menu menu--center">
<ul>
<li><a href="">Lorem ipsum</a></li>
<li><a href="">Dolor sit amet</a></li>
<li><a href="">Sed do eiusmod.</a></li>
<li>
<a href="">dropdown</a>
<div class="menu-dropdown">
<div class="menu-dropdown-wrapper">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
</div>
</li>
</ul>
</nav>
menu right to left
<nav class="menu menu--right">
<ul>
<li><a href="">Lorem ipsum</a></li>
<li><a href="">Dolor sit amet</a></li>
<li><a href="">Sed do eiusmod.</a></li>
<li>
<a href="">dropdown</a>
<div class="menu-dropdown">
<div class="menu-dropdown-wrapper">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</div>
</div>
</li>
</ul>
</nav>
menu justified
<nav class="menu menu--justify">
<ul>
<li><a href="">Lorem ipsum</a></li>
<li><a href="">Dolor sit amet</a></li>
<li><a href="">Sed do eiusmod.</a></li>
</ul>
</nav>
menu vertical
<nav class="menu menu--vertical">
<ul>
<li><a href="">Lorem ipsum</a></li>
<li><a href="">Dolor sit amet</a></li>
<li><a href="">Sed do eiusmod.</a></li>
</ul>
</nav>
menu distribute
<nav class="menu menu--distribute">
<ul>
<li><a href="">Lorem ipsum Dolor sit amet</a></li>
<li><a href="">Dolor sit amet</a></li>
<li><a href="">Sed do eiusmod.</a></li>
</ul>
</nav>