Permalink
Browse files

♻️ Improve display of multiple syndicates in posts

  • Loading branch information...
adamdawkins committed Jan 22, 2019
1 parent 704b7c7 commit c98af644c9d4da493ca0419e10aaa8329b277c68
Showing with 8 additions and 5 deletions.
  1. +1 −5 app/views/notes/_note.html.erb
  2. +7 −0 app/views/posts/_syndicates.html.erb
@@ -14,11 +14,7 @@
<p class="p-name e-content"><%= note.content %></p>
<% if note.syndicates.any? %>
<footer>
<div class="syndication">
<% note.syndicates.each do |syndicate| %>
<p>Also posted to <%= link_to syndicate.silo.name, syndicate.url, rel: "external syndication", class: "u-syndication" %>
<% end %>
</div>
<%= render "syndicates", post: note %>
</footer>
<% end %>
<a class="u-author" href="/"></a>
@@ -0,0 +1,7 @@
<% if post.syndicates.any? %>
<div class="syndication">
<p>Also posted to <% post.syndicates.each_with_index do |syndicate, index| %>
<%= link_to syndicate.silo.name, syndicate.url, rel: "external syndication", class: "u-syndication" -%><%= (index < post.syndicates.size - 1) ? ',' : '' %>
<% end %>
</div>
<% end %>

0 comments on commit c98af64

Please sign in to comment.