mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Improve support for old browsers (#9515)
* FEATURE: Improve crawler view
* FIX: Make lazyYT crawler-friendly
* DEV: Rename discourse-internet-explorer to discourse-unsupported-browser
* DEV: Detect more unsupported browsers
Follow-up to 4eebbd2212.
* FIX: Hide browser update notice in print view
This commit is contained in:
@@ -44,7 +44,9 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t 'js.topic.title' %></th>
|
||||
<th></th>
|
||||
<th><%= t 'js.replies' %></th>
|
||||
<th><%= t 'js.views' %></th>
|
||||
<th><%= t 'js.activity' %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -52,25 +54,53 @@
|
||||
<tbody>
|
||||
<meta itemprop='itemListOrder' content='http://schema.org/ItemListOrderDescending'>
|
||||
<% @list.topics.each_with_index do |t,i| %>
|
||||
<tr>
|
||||
<td itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'>
|
||||
<meta itemprop='position' content='<%= i %>'>
|
||||
<meta itemprop='url' content='<%= t.url %>'>
|
||||
<tr class="topic-list-item">
|
||||
<td class="main-link" itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'>
|
||||
<meta itemprop='name' content='<%= t.title %>'>
|
||||
<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>
|
||||
<meta itemprop='url' content='<%= t.url %>'>
|
||||
<% if t.image_url.present? %>
|
||||
<meta itemprop='image' content='<%= t.image_url %>'>
|
||||
<% end %>
|
||||
<meta itemprop='position' content='<%= i + 1 %>'>
|
||||
<span class="link-top-line">
|
||||
<a href='<%= t.url %>' class='title raw-link raw-topic-link'><%= t.title %></a>
|
||||
</span>
|
||||
<div class="link-bottom-line">
|
||||
<% if (!@category || @category.has_children?) && t.category %>
|
||||
<a href='<%= t.category.url %>' class='badge-wrapper bullet'>
|
||||
<span class='badge-category-bg' style='background-color: #<%= t.category.color %>'></span>
|
||||
<span class='category-title'><%= t.category.name %></span>
|
||||
</a>
|
||||
<% end %>
|
||||
<% if t.tags %>
|
||||
<div class="discourse-tags">
|
||||
<% t.tags.each_with_index do |tag, index| %>
|
||||
<a href='<%= tag.full_url %>' class='discourse-tag'><%= tag.name %></a>
|
||||
<% if index < t.tags.size - 1 %>, <% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% 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 class='posters'>
|
||||
<% t.posters.each do |poster| %>
|
||||
<% if poster.moreCount %>
|
||||
<a class="posters-more-count"><% poster.moreCount %></a>
|
||||
<% else %>
|
||||
<a href="<%= Discourse.base_url %>/u/<%= poster.user.username %>" class="<%= poster.extraClasses %>">
|
||||
<img width="25" height="25" src="<%= poster.user.avatar_template.gsub('{size}', '25') %>" class="avatar" title='<%= h("#{poster.user.username} - #{poster.description}") %>' aria-label='<%= h("#{poster.user.username} - #{poster.description}") %>'>
|
||||
</a>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<span class='views' title='<%= t 'views' %>'><%= t.views %></span>
|
||||
</td>
|
||||
<td>
|
||||
<span class='posts' title='<%= t 'posts' %>'><%= t.posts_count %></span>
|
||||
</td>
|
||||
@@ -89,7 +119,9 @@
|
||||
<% if params[:page].to_i > 0 %>
|
||||
<span itemprop='name'><a href='<%= @list.prev_topics_url %>' rel='prev' itemprop='url'><%= t 'prev_page' %></a> </span>
|
||||
<% end %>
|
||||
<span itemprop='name'><b><a href='<%= @list.more_topics_url %>' rel='next' itemprop='url'><%= t 'next_page' %></a></b></span>
|
||||
<% if @list.topics.size == @list.per_page %>
|
||||
<span itemprop='name'><b><a href='<%= @list.more_topics_url %>' rel='next' itemprop='url'><%= t 'next_page' %></a></b></span>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% content_for :head do %>
|
||||
|
||||
Reference in New Issue
Block a user