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>
<body>
<div>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<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 %>
Welcome, <%= current_user.name %>!
<%= link_to 'Logout', logout_path, id: 'logout' %>
<li><%= link_to 'Logout', logout_path, id: 'logout' %></li>
<% else %>
<%= link_to 'Login with Google', '/auth/google_oauth2', id: 'login' %>
<li><%= link_to 'Login with Google', '/auth/google_oauth2', id: 'login' %></li>
<% end %>
</ul>
</div>
</div>
</div>
<div class="container">
<%= yield %>
</div>
</body>
</html>