Created
June 10, 2012 15:21
-
-
Save strangematter/2906172 to your computer and use it in GitHub Desktop.
bootstrap dropdown login form in haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.navbar.navbar-fixed-top | |
.navbar-inner | |
.container-fluid | |
%a.btn.btn-navbar{"data-target" => ".nav-collapse", "data-toggle" => "collapse"} | |
%span.icon-bar | |
%span.icon-bar | |
%span.icon-bar | |
%a.brand{:href => "#"} appname | |
.nav-collapse | |
%ul.nav | |
%li.active | |
%a{:href => "#"} Home | |
%li | |
%a{:href => "#about"} About | |
%li | |
%a{:href => "#contact"} Contact | |
- if !@user | |
%ul.nav.pull-right | |
%li | |
%a{:href => "/users/sign_up"} Sign Up | |
%li.divider-vertical | |
%li.dropdown | |
%a{:href=>"#", :class=>"dropdown-toggle", "data-toggle"=>"dropdown"}Sign In <b class="caret"></b> | |
%div.dropdown-menu{:style=>"padding:15px;padding-bottom:0px;"} | |
%form{"accept-charset" => "UTF-8", :action => "/login", :method => "post"} | |
%input#username{:name => "username", :size => "30", :style => "margin-bottom: 15px;", :type => "text"}/ | |
%input#password{:name => "password", :size => "30", :style => "margin-bottom: 15px;", :type => "password"}/ | |
%input#remember_me{:name => "remember_me", :style => "float: left; margin-right: 10px;", :type => "checkbox", :value => "1"}/ | |
%label.string.optional{:for => "remember_me"} Remember me | |
%input.btn.btn-primary{:name => "commit", :style => "clear: left; width: 100%; height: 32px; font-size: 13px;", :type => "submit", :value => "Sign In"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment