mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-25 15:07:22 +00:00
HTML: Fix thumbnails of related videos (watch page)
This commit is contained in:
parent
411208bbd2
commit
06b2bab795
@ -304,15 +304,26 @@ we're going to need to do it here in order to allow for translations.
|
|||||||
|
|
||||||
<% video.related_videos.each do |rv| %>
|
<% video.related_videos.each do |rv| %>
|
||||||
<% if rv["id"]? %>
|
<% if rv["id"]? %>
|
||||||
<a href="/watch?v=<%= rv["id"] %>&listen=<%= params.listen %>">
|
<div class="pure-u-1">
|
||||||
<% if !env.get("preferences").as(Preferences).thin_mode %>
|
|
||||||
<div class="thumbnail">
|
<div class="thumbnail">
|
||||||
|
<%- if !env.get("preferences").as(Preferences).thin_mode -%>
|
||||||
|
<a tabindex="-1" href="/watch?v=<%= rv["id"] %>&listen=<%= params.listen %>">
|
||||||
<img loading="lazy" class="thumbnail" src="/vi/<%= rv["id"] %>/mqdefault.jpg" alt="" />
|
<img loading="lazy" class="thumbnail" src="/vi/<%= rv["id"] %>/mqdefault.jpg" alt="" />
|
||||||
<p class="length"><%= recode_length_seconds(rv["length_seconds"]?.try &.to_i? || 0) %></p>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
<p style="width:100%"><%= rv["title"] %></p>
|
|
||||||
</a>
|
</a>
|
||||||
|
<%- end -%>
|
||||||
|
|
||||||
|
<div class="bottom-right-overlay">
|
||||||
|
<%- if (length_seconds = rv["length_seconds"]?.try &.to_i?) && length_seconds != 0 -%>
|
||||||
|
<p class="length"><%= recode_length_seconds(length_seconds) %></p>
|
||||||
|
<%- end -%>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="video-card-row">
|
||||||
|
<a href="/watch?v=<%= rv["id"] %>&listen=<%= params.listen %>"><p dir="auto"><%= HTML.escape(rv["title"]) %></p></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h5 class="pure-g">
|
<h5 class="pure-g">
|
||||||
<div class="pure-u-14-24">
|
<div class="pure-u-14-24">
|
||||||
<% if rv["ucid"]? %>
|
<% if rv["ucid"]? %>
|
||||||
@ -330,6 +341,8 @@ we're going to need to do it here in order to allow for translations.
|
|||||||
%></b>
|
%></b>
|
||||||
</div>
|
</div>
|
||||||
</h5>
|
</h5>
|
||||||
|
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user