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.
 
 
 
 
 

39 lines
993 B

<div class="hero">
<h1>Listing Notes</h1>
</div>
<section class="notes">
<%= for note <- @notes do %>
<article>
<%= link to: Routes.note_path(@conn, :show, note) do %>
<header class="width-full bg-content">
<h2 class="title">
<%= note.title %>
</h2>
</header>
<% end %>
<section>
<div class="content html width-full bg-content">
<%= Earmark.as_html!(note.content) |> raw %>
</div>
</section>
<footer class="width-full bg-content">
<time datetime="<%= note.inserted_at %>"><%= Timex.from_now(note.inserted_at) %></time>
<span class="tags">
<%= for topic <- note.topics do %>
<span class="tag"><%= topic.text %></span>
<% end %>
</span>
</footer class="width-full bg-content">
</article>
<% end %>
</section>
<%= if @current_user do %>
<div class="buttons">
<span><%= link "New Note", to: Routes.note_path(@conn, :new), class: "button" %></span>
</div>
<% end %>