mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-01 19:37:29 -05:00
c955907f60
- add microdata based on schema.org - add breadcrumb on the top of topic - add navigations link on the bottom of every pages - add category description on the category list
26 lines
1.2 KiB
Text
26 lines
1.2 KiB
Text
<div class='category-list' itemscope itemtype='http://schema.org/ItemList'>
|
|
<meta itemprop='itemListOrder' content='http://schema.org/ItemListOrderDescending'>
|
|
<% @list.categories.each do |c| %>
|
|
<div class='category' itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'>
|
|
<meta itemprop='url' content='<%= c.url %>'>
|
|
<h2><a href='/c/<%= c.slug.blank? ? c.id : c.slug %>' itemprop='item'>
|
|
<span itemprop='name'><%= c.name %></span>
|
|
</a></h2>
|
|
<span itemprop='description'><%= c.description %></span>
|
|
<div class='topic-list' itemscope itemtype='http://schema.org/ItemList'>
|
|
<%- if c.displayable_topics.present? %>
|
|
<% c.displayable_topics.each do |t| %>
|
|
<div itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'>
|
|
<meta itemprop='url' content='<%= t.url %>'>
|
|
<a href='<%= t.relative_url %>' itemprop='item'>
|
|
<span itemprop='name'><%= t.title %></span>
|
|
</a> <span title='<%= t 'posts' %>'>(<%= t.posts_count %>)</span>
|
|
</div>
|
|
<% end %>
|
|
<%- end %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
|
|
<% content_for :title do %><%= I18n.t('js.filters.categories.title') %><% end %>
|