summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamantaz Fox <coding@samantaz.fr>2023-04-24 22:19:46 +0200
committerSamantaz Fox <coding@samantaz.fr>2023-07-08 20:48:37 +0200
commit06b2bab795ebf54e9c6a396e37a129a87d39675a (patch)
tree44e08c91d72b45dfb1cd66fa427750b40dcc094f /src
parent411208bbd211d7effe278eabe23d5e2f502b5ea6 (diff)
downloadinvidious-06b2bab795ebf54e9c6a396e37a129a87d39675a.tar.gz
invidious-06b2bab795ebf54e9c6a396e37a129a87d39675a.tar.bz2
invidious-06b2bab795ebf54e9c6a396e37a129a87d39675a.zip
HTML: Fix thumbnails of related videos (watch page)
Diffstat (limited to 'src')
-rw-r--r--src/invidious/views/watch.ecr29
1 files changed, 21 insertions, 8 deletions
diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr
index 4f4354a9..9275631c 100644
--- a/src/invidious/views/watch.ecr
+++ b/src/invidious/views/watch.ecr
@@ -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| %>
<% if rv["id"]? %>
- <a href="/watch?v=<%= rv["id"] %>&listen=<%= params.listen %>">
- <% if !env.get("preferences").as(Preferences).thin_mode %>
- <div class="thumbnail">
+ <div class="pure-u-1">
+
+ <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="" />
- <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">
<div class="pure-u-14-24">
<% if rv["ucid"]? %>
@@ -330,6 +341,8 @@ we're going to need to do it here in order to allow for translations.
%></b>
</div>
</h5>
+
+ </div>
<% end %>
<% end %>
</div>