From 1603d907c899f7bb61cb3ff40e7938ea9ca0af26 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sun, 10 Nov 2019 11:53:45 -0500 Subject: [PATCH] Show the feed an item is from on the item show page --- lib/frenzy_web/templates/item/show.html.eex | 20 ++++++++++++-------- priv/static/css/app.css | 8 ++++++++ 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/lib/frenzy_web/templates/item/show.html.eex b/lib/frenzy_web/templates/item/show.html.eex index 1fc5210..9edf4f3 100644 --- a/lib/frenzy_web/templates/item/show.html.eex +++ b/lib/frenzy_web/templates/item/show.html.eex @@ -2,15 +2,19 @@ <%= @item.title || "(Untitled)" %> -<%= if @item.read do %> - <%= form_tag Routes.item_path(@conn, :unread, @item.id), method: :post do %> - <%= submit "Mark as Unread", class: "btn btn-secondary" %> +
+ <%= @item.feed.title %> + + <%= if @item.read do %> + <%= form_tag Routes.item_path(@conn, :unread, @item.id), method: :post do %> + <%= submit "Mark as Unread", class: "btn btn-sm btn-secondary" %> + <% end %> + <% else %> + <%= form_tag Routes.item_path(@conn, :read, @item.id), method: :post do %> + <%= submit "Mark as Read", class: "btn btn-sm btn-secondary" %> + <% end %> <% end %> -<% else %> - <%= form_tag Routes.item_path(@conn, :read, @item.id), method: :post do %> - <%= submit "Mark as Read", class: "btn btn-secondary" %> - <% end %> -<% end %> +
<%= raw(@item.content) %> diff --git a/priv/static/css/app.css b/priv/static/css/app.css index f6402ac..fa6f478 100644 --- a/priv/static/css/app.css +++ b/priv/static/css/app.css @@ -124,3 +124,11 @@ label.sidebar-toggle > .oi { width: 90%; } +.item-controls a { + vertical-align: middle; +} + +.item-controls form { + display: inline-block; +} +