My space on the web https://inhji.de
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

35 lines
1.2 KiB

<div class="hero">
<h1><span class="id"><%= "##{@note.id}" %></span> <%= @note.title %></h1>
<p><time datetime="<%= @note.inserted_at %>"><%= Timex.from_now(@note.inserted_at) %></time> / <time datetime="<%= @note.updated_at %>"><%= Timex.from_now(@note.updated_at) %></time></p>
<p class="tags">
<%= for topic <- @note.topics do %>
<span class="tag"><%= topic.text %></span>
<% end %>
</p>
</div>
<div class="width-full bg-content">
<article>
<div class="content html">
<%= raw @note.content_html %>
</div>
</article>
</div>
<%= if not Enum.empty?(@note.backlinks) do %>
<section class="backlinks">
<h4>Backlinks</h4>
<%= for backlink <- @note.backlinks do %>
<%= link backlink.title, to: Routes.note_path(@conn, :show, backlink), class: "backlink bg-content" %>
<% end %>
</section>
<% end %>
<%= if @current_user do %>
<div class="buttons">
<span><%= link "Edit", to: Routes.note_path(@conn, :edit, @note), class: "button" %></span>
<span><%= link "Back", to: Routes.note_path(@conn, :index), class: "button" %></span>
<span><%= link "Delete", to: Routes.note_path(@conn, :delete, @note), method: :delete, data: [confirm: "Are you sure?"], class: "button" %></span>
</div>
<% end %>