Skip to content

Commit

Permalink
DEV: remove span from inside <tr> and move meta info to a td (#7324)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrfinch authored and ZogStriP committed Apr 5, 2019
1 parent 6f1652b commit 9b28861
Showing 1 changed file with 21 additions and 23 deletions.
44 changes: 21 additions & 23 deletions app/views/list/list.erb
Expand Up @@ -53,32 +53,30 @@
<meta itemprop='itemListOrder' content='http://schema.org/ItemListOrderDescending'>
<% @list.topics.each_with_index do |t,i| %>
<tr>
<span itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'>
<td itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'>
<meta itemprop='position' content='<%= i %>'>
<meta itemprop='url' content='<%= t.url %>'>
<meta itemprop='name' content='<%= t.title %>'>
<td>
<a href='<%= t.url %>' class='title raw-link raw-topic-link'>
<span><%= t.title %></span>
</a>
<% if (!@category || @category.has_children?) && t.category %>
<div>
<a href='<%= t.category.url %>'><span class='category-name'><%= t.category.name %></span></a>
</div>
<% end %>
<% if t.pinned_until && (t.pinned_until > Time.zone.now) && (t.pinned_globally || @list.category) && t.excerpt %>
<p class='excerpt'>
<%= t.excerpt.html_safe %>
</p>
<% end %>
</td>
<td>
<span class='posts' title='<%= t 'posts' %>'><%= t.posts_count %></span>
</td>
<td>
<%= I18n.l(t.created_at, format: :date_only) %>
</td>
</span>
<a href='<%= t.url %>' class='title raw-link raw-topic-link'>
<span><%= t.title %></span>
</a>
<% if (!@category || @category.has_children?) && t.category %>
<div>
<a href='<%= t.category.url %>'><span class='category-name'><%= t.category.name %></span></a>
</div>
<% end %>
<% if t.pinned_until && (t.pinned_until > Time.zone.now) && (t.pinned_globally || @list.category) && t.excerpt %>
<p class='excerpt'>
<%= t.excerpt.html_safe %>
</p>
<% end %>
</td>
<td>
<span class='posts' title='<%= t 'posts' %>'><%= t.posts_count %></span>
</td>
<td>
<%= I18n.l(t.created_at, format: :date_only) %>
</td>
</tr>
<% end %>
</tbody>
Expand Down

0 comments on commit 9b28861

Please sign in to comment.