Skip to content

Instantly share code, notes, and snippets.

@christoshrousis
Created May 12, 2014 00:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christoshrousis/30ee8a6c8fbaccf1c504 to your computer and use it in GitHub Desktop.
Save christoshrousis/30ee8a6c8fbaccf1c504 to your computer and use it in GitHub Desktop.
Simple Bootstrap Navbar written as a HAML Partial. Useful for Middleman / Sinatra / Ruby on Rails.
.container
#nav{:role => "navigation", :class => "navbar navbar-default"}
.container-fluid
.navbar-header
%button{:class => "navbar-toggle", :type => "button", :'data-toggle' => "collapse", :'data-target' => "#bs-example-navbar-collapse-1"}
%span{:class => "sr-only"} Toggle Navigation
%span{:class => "icon-bar"}
%span{:class => "icon-bar"}
%span{:class => "icon-bar"}
%a{:class => "navbar-brand", :href => "/"} Home
#bs-example-navbar-collapse-1.collapse.navbar-collapse
%ul.nav.navbar-nav.navbar-right
%li
%a{:href => "/posts/new"} A Link
@christoshrousis
Copy link
Author

For some reason the editor likes to change my code to be tab indented even if I choose 2 spaces... If you use an editor like Sublime you should be able to change the indentation, but makes it a little bit illegible here in github.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment