Skip to content

Instantly share code, notes, and snippets.

@matrixfox
Created November 23, 2013 17:38
Show Gist options
  • Save matrixfox/7617585 to your computer and use it in GitHub Desktop.
Save matrixfox/7617585 to your computer and use it in GitHub Desktop.
/ ==================================================
/ BOOTSTRAP NAVBAR DEFAULT HAML
/ http://getbootstrap.com/components/#navbar-default
/ ==================================================
%nav{'class' => 'navbar navbar-default', 'role' => 'navigation'}
/ Brand and toggle get grouped for better mobile display
%div.navbar-header
%button{'type' => 'button', 'class' => 'navbar-toggle', 'data-toggle' => 'collapse', 'data-target' => '#bs-example-navbar-collapse-1'}
%span.sr-only Toggle navigation
%span.icon-bar
%span.icon-bar
%span.icon-bar
%a{'class' => 'navbar-brand', 'href' => '#'}Brand
/ Collect the nav links, forms, and other content for toggling
%div{'class' => 'collapse navbar-collapse', 'id' => 'bs-example-navbar-collapse-1'}
%ul.nav.navbar-nav
%li.active
%a{'href' => '#'}Link
%li
%a{'href' => '#'}Link
%li.dropdown
%a{'href' => '#', 'class' => 'dropdown-toggle', 'data-toggle' => 'dropdown'}
Dropdown
%b.caret
%ul.dropdown-menu
%li
%a{'href' => '#'}Action
%li
%a{'href' => '#'}Another action
%li
%a{'href' => '#'}Something else here
%li.divider
%li
%a{'href' => '#'}Separated link
%li.divider
%li
%a{'href' => '#'}One more separated link
%form{'class' => 'navbar-form navbar-left', 'role' => 'search'}
%div.form-group
%input{'type' => 'text', 'class' => 'form-control', 'placeholder' => 'Search'}
%button{'type' => 'submit', 'class' => 'btn btn-default'}Submit
%ul.nav.navbar-nav.navbar-right
%li
%a{'href' => '#'}Link
%li.dropdown
%a{'href' => '#', 'class' => 'dropdown-toggle', 'data-toggle' => 'dropdown'}
Dropdown
%b.caret
%ul.dropdown-menu
%li
%a{'href' => '#'}Action
%li
%a{'href' => '#'}Another action
%li
%a{'href' => '#'}Something else here
%li{'class' => 'divider'}
%li
%a{'href' => '#'}Separated link
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment