1
0
Fork 0

Implement Bootstrap layout

This commit is contained in:
Andrew Tomaka 2014-10-02 17:06:30 -04:00
parent 458a29d12f
commit 34ec10189c
2 changed files with 30 additions and 8 deletions

View file

@ -0,0 +1,3 @@
body {
padding-top: 70px;
}

View file

@ -8,16 +8,35 @@
</head> </head>
<body> <body>
<div> <div class="navbar navbar-default navbar-fixed-top" role="navigation">
<% if current_user %> <div class="container">
Welcome, <%= current_user.name %>! <div class="navbar-header">
<%= link_to 'Logout', logout_path, id: 'logout' %> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<% else %> <span class="sr-only">Toggle navigation</span>
<%= link_to 'Login with Google', '/auth/google_oauth2', id: 'login' %> <span class="icon-bar"></span>
<% end %> <span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">Find Us Lunch</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><%= link_to 'Home', root_path %></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<% if current_user %>
<li><%= link_to 'Logout', logout_path, id: 'logout' %></li>
<% else %>
<li><%= link_to 'Login with Google', '/auth/google_oauth2', id: 'login' %></li>
<% end %>
</ul>
</div>
</div>
</div> </div>
<%= yield %> <div class="container">
<%= yield %>
</div>
</body> </body>
</html> </html>