From 3ded5d84fdba24f348672e8b805a66e75906892d Mon Sep 17 00:00:00 2001
From: Blair Anderson
Date: Sat, 7 Nov 2015 12:56:42 -0800
Subject: [PATCH] add so titles for article pages
---
app/views/items/show.html.erb | 6 ++++--
app/views/layouts/application.html.erb | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/app/views/items/show.html.erb b/app/views/items/show.html.erb
index f51d21a..d141176 100644
--- a/app/views/items/show.html.erb
+++ b/app/views/items/show.html.erb
@@ -3,10 +3,12 @@
<%= render_votes_for_item(@item) %>
comments: <%= @item.comments_count %>
-
+<%= content_for(:title) do %>
+ <%= @item.title %>
+<% end %>
- <%= link_to @item.title, @item, title: @item.url %>
+ <%= link_to @item.title, @item, title: @item.url %>
(<%= @item.url %>)
(posted by: <%= link_to @item.user.username, @item.user %>)
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index b35b93f..308f661 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -1,7 +1,7 @@
- <%= seo_title_text %>
+ <%= "#{yield(:title)} |" %><%= seo_title_text %>
<%= stylesheet_link_tag 'application', media: 'all' %>
<%= javascript_include_tag 'application' %>
<%= csrf_meta_tags %>