Implement Bootstrap layout
This commit is contained in:
parent
458a29d12f
commit
34ec10189c
2 changed files with 30 additions and 8 deletions
|
@ -0,0 +1,3 @@
|
|||
body {
|
||||
padding-top: 70px;
|
||||
}
|
|
@ -8,16 +8,35 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<div>
|
||||
<% if current_user %>
|
||||
Welcome, <%= current_user.name %>!
|
||||
<%= link_to 'Logout', logout_path, id: 'logout' %>
|
||||
<% else %>
|
||||
<%= link_to 'Login with Google', '/auth/google_oauth2', id: 'login' %>
|
||||
<% end %>
|
||||
<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 %>
|
||||
<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>
|
||||
|
||||
<%= yield %>
|
||||
<div class="container">
|
||||
<%= yield %>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue