Skip to content

Commit

Permalink
Updated for master
Browse files Browse the repository at this point in the history
  • Loading branch information
phiamo committed Oct 24, 2013
1 parent 6488ed2 commit a8e39d8
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Menu/Builder.php
Expand Up @@ -40,7 +40,7 @@ public function createMainMenu(FactoryInterface $factory, array $options)
$dropdown->addChild('Collections Fields', array('route' => 'mopa_bootstrap_forms_collections'));
$dropdown->addChild('Form Tabs', array('route' => 'mopa_bootstrap_forms_tabs'));

$menu->addChild('Navbars', array('route' => 'mopa_bootstrap_navbar'));
$menu->addChild('Menus & Navbars', array('route' => 'mopa_bootstrap_navbar'));
$menu->addChild('Macros for components', array('route' => 'mopa_bootstrap_components'));

return $menu;
Expand All @@ -53,9 +53,9 @@ public function createNavbarsSubnavMenu(FactoryInterface $factory, array $option
));

$menu->addChild('Top', array('uri' => '#top'));
$menu->addChild('Menus', array('uri' => '#menus'));
$menu->addChild('Navbars', array('uri' => '#navbars'));
$menu->addChild('Template', array('uri' => '#template'));
$menu->addChild('Menus', array('uri' => '#menus'));
// ... add more children
return $menu;
}
Expand Down
57 changes: 46 additions & 11 deletions Resources/views/Examples/navbar.html.twig
Expand Up @@ -8,7 +8,7 @@
<h1>The Navbars made easy
<small>Reusable navigation built into</small>
</h1>
<p class="lead">Providing programatic ways to create Navbars and Subnavigations, beeing responsive and if wanted also sticky while scrolling.</p>
<p class="lead">Providing programatic ways to create Menus, Navbars and Subnavigations, beeing responsive and if wanted also sticky while scrolling.</p>

{% block subnavbar %}
{% embed '@MopaBootstrap/Navbar/subnavbar.html.twig' %}
Expand All @@ -25,18 +25,55 @@
{% endblock body_tag %}

{% block content %}
<div class="span12">
<section id="navbars">
<div class="col-lg-6">
<section id="menus">
<div class="page-header">
<h1>Navbars:</h1>
<h1>Menus:</h1>
<p>Menus provides serveral ways to get Bootstrap 3 Menus</p>
<p>You need to enable the extension by addint to your config.yml:</p>
<pre class="prettyprint">mopa_bootstrap:
menu': ~
</pre>
<p>Then you can use the mopa_boostrap_menu twig function:</p>

<pre class="prettyprint">
{%- raw -%}
{{ mopa_bootstrap_menu('mymenu') }}
{%- endraw -%}
</pre>
<p>this will add everything necessary to show menu in the navbar</p>
<pre class="prettyprint">
{%- raw -%}
{{ mopa_bootstrap_menu('mymenu', {'automenu': 'navbar'}) }}
{%- endraw -%}
</pre>
<p>this will add everything necessary to show menu as subnavbar</p>
<pre class="prettyprint">
{%- raw -%}
{{ mopa_bootstrap_menu('mymenu', {'automenu': 'pills'}) }}
{%- endraw -%}
</pre>
<p>this will add everything necessary to show menu as sidebar</p>
<pre class="prettyprint">
{%- raw -%}
{{ mopa_bootstrap_menu('mymenu', {'automenu': 'pills', 'stacked':true}) }}
{%- endraw -%}
</pre>
<p>Will add everything to show a list group</p>
<pre class="prettyprint">
{%- raw -%}
{{ mopa_bootstrap_menu('mymenu', {'automenu': 'list-group', 'autochilds':true}) }}
{%- endraw -%}
</pre>

</div>
</section>

<section id="template">
<div class="page-header">
<h1>Template:</h1>
<h1>Navbars and its Template:</h1>
</div>
<p>And to show the bar in your template just use</p>
<p>And to show the Navbar in your template just use</p>
<pre class="prettyprint">
{%- raw -%}
{% embed '@MopaBootstrap/Navbar/navbar.html.twig' with { fixedTop: true } %}
Expand All @@ -51,12 +88,10 @@
{%- endraw -%}
</pre>
</section>
<section id="menus">
<div class="page-header">
<h1>Menus:</h1>
</div>
</div>
<div class="col-lg-6">

<p>The menues are created Knpmenu Style and the AbstractNavbarMenuBuilder helps you adding the correct styles to e.g. Dropdown menues:</p>
<pre class="prettyprint">{{ fileSource('@MopaBootstrapSandboxBundle/Menu/Builder.php') }}</pre>
</section>
</div>
{% endblock content %}

0 comments on commit a8e39d8

Please sign in to comment.