-
-
Save nicedawg/fc953bf06cae995032f8c40590b7f4bb to your computer and use it in GitHub Desktop.
[Beginning Rails 6] Listing 8-34. Updated app/views/layouts/application.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Blog</title> | |
<%= csrf_meta_tags %> | |
<%= csp_meta_tag %> | |
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> | |
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %> | |
</head> | |
<body> | |
<div id="header"> | |
<h1><%= link_to "Blog", root_path %></h1> | |
<div id="user_bar"> | |
<% if logged_in? %> | |
<%= link_to "New Article", new_article_path %> | | |
<%= link_to "Edit Password", edit_user_path(current_user) %> | | |
<%= link_to "Logout", logout_path %> | |
<% else %> | |
<%= link_to "Login", login_path %> | |
<% end %> | |
</div> | |
</div> | |
<div id="main"> | |
<%= content_tag :p, notice, class: 'notice' if notice.present? %> | |
<%= content_tag :p, alert, class: 'alert' if alert.present? %> | |
<%= yield %> | |
</div> | |
<div id="footer"> | |
A simple blog built for the book Beginning Rails 6 | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment