Skip to content

Instantly share code, notes, and snippets.

@mt9304
Created October 7, 2018 01:59
Embed
What would you like to do?
<!DOCTYPE html>
<html>
<head>
<title>RailsTemplate</title>
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= stylesheet_link_tag 'application', media: 'all' %>
<%= javascript_include_tag 'application' %>
</head>
<body>
<nav class="navbar navbar-top navbar-fixed-top navbar-light" style="background-color: #F5F5F5;">
<div class="container-fluid">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<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 menu-item" href="/">Home</a>
</div>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle menu-item" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Users<span class="caret"></span></a>
<ul class="dropdown-menu">
<% if user_signed_in? %>
<li><%= link_to "Edit profile", edit_user_registration_path %></li>
<% else %>
<li><%= link_to "Sign up", new_user_registration_path %></li>
<li><%= link_to "Login", new_user_session_path %></li>
<% end %>
<% if user_signed_in? %>
<li role="separator" class="divider"></li>
<li><%= link_to "Logout", destroy_user_session_path, method: :delete %></li>
<% end %>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<div>
<div id="main-container" class="container">
<%= yield %>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment