FEATURE: change layout when default page is category to tabular for _… (#7270)

This commit is contained in:
Saurabh Patel
2019-04-04 19:27:18 +05:30
committed by Régis Hanol
parent df6ef856e6
commit 90fc2d15c4

View File

@@ -1,17 +1,34 @@
<div class='category-list' itemscope itemtype='http://schema.org/ItemList'> <div itemscope itemtype='http://schema.org/ItemList'>
<meta itemprop='itemListOrder' content='http://schema.org/ItemListOrderDescending'> <table class='category-list'>
<% @category_list.categories.each_with_index do |c, index| %> <thead>
<div class='category' itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'> <tr>
<meta itemprop='position' content='<%= index %>'> <th class='category'><%= t 'js.categories.category' %></th>
<meta itemprop='url' content='<%= "#{c.url}" %>'> <th class='topics'><%= t 'js.topic.list' %></th>
<h2> </tr>
<a href='<%= "#{c.url}" %>' itemprop='item'> </thead>
<span itemprop='name'><%= c.name %></span> <tbody>
</a> <meta itemprop='itemListOrder' content='http://schema.org/ItemListOrderDescending'>
</h2> <% @category_list.categories.each_with_index do |c, index| %>
<span itemprop='description'><%= c.description&.html_safe %></span> <tr>
</div> <td class='category' style='border-color: #<%= c.color %>;'>
<% end %> <div itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'>
<meta itemprop='position' content='<%= index %>'>
<meta itemprop='url' content='<%= c.url %>'>
<h3>
<a href='<%= c.url %>'>
<span itemprop='name'><%= c.name %></span>
</a>
</h3>
<div itemprop='description'><%= c.description&.html_safe %></div>
</div>
</td>
<td class='topics'>
<div title='<%= c.topic_count %> <%= t 'js.topic.list' %>'><%= c.topic_count %></div>
</td>
</tr>
<% end %>
</tbody>
</table>
</div> </div>
<% content_for :title do %><%= @title %><% end %> <% content_for :title do %><%= @title %><% end %>