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>
|
</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>
|
||||||
|
|
Loading…
Reference in a new issue