frenzy/lib/frenzy_web/templates/item/show.html.eex

26 lines
868 B
Elixir
Raw Permalink Normal View History

2019-04-01 16:24:22 +00:00
<h1>
<a href="<%= @item.url %>" target="_blank" rel="noopener noreferrer"><%= @item.title || "(Untitled)" %></a>
2019-04-01 16:24:22 +00:00
</h1>
<div class="item-controls">
<a href="<%= Routes.feed_path(@conn, :show, @item.feed_id) %>" class="mr-2"><%= @item.feed.title %></a>
<%= 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 %>
2019-02-11 22:22:35 +00:00
<% end %>
</div>
2019-02-11 22:22:35 +00:00
2020-07-19 02:18:41 +00:00
<article class="item-content mt-4">
<%= if @item.content_type in [nil, "text/html"] do %>
<%= raw(@item.content) %>
<% else %>
<pre class="raw-content"><%= raw(@item.content) %></pre>
<% end %>
</article>