|
|
|
@ -1,3 +1,5 @@
|
|
|
|
|
<% item_watched = !item.is_a?(SearchChannel) && !item.is_a?(SearchPlaylist) && !item.is_a?(InvidiousPlaylist) && !item.is_a?(Category) && env.get("user") && env.get("user").as(User).watched && env.get("user").as(User).watched.index(item.id) != nil %>
|
|
|
|
|
|
|
|
|
|
<div class="pure-u-1 pure-u-md-1-4">
|
|
|
|
|
<div class="h-box">
|
|
|
|
|
<% case item when %>
|
|
|
|
@ -40,6 +42,11 @@
|
|
|
|
|
<% if item.length_seconds != 0 %>
|
|
|
|
|
<p class="length"><%= recode_length_seconds(item.length_seconds) %></p>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<% if item_watched %>
|
|
|
|
|
<div class="watched-overlay"></div>
|
|
|
|
|
<div class="watched-indicator" data-length="<%= item.length_seconds %>" data-id="<%= item.id %>"></div>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<p dir="auto"><%= HTML.escape(item.title) %></p>
|
|
|
|
@ -67,6 +74,11 @@
|
|
|
|
|
<% elsif item.length_seconds != 0 %>
|
|
|
|
|
<p class="length"><%= recode_length_seconds(item.length_seconds) %></p>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<% if item_watched %>
|
|
|
|
|
<div class="watched-overlay"></div>
|
|
|
|
|
<div class="watched-indicator" data-length="<%= item.length_seconds %>" data-id="<%= item.id %>"></div>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<p dir="auto"><%= HTML.escape(item.title) %></p>
|
|
|
|
@ -99,8 +111,7 @@
|
|
|
|
|
<% else %>
|
|
|
|
|
<a style="width:100%" href="/watch?v=<%= item.id %>">
|
|
|
|
|
<% if !env.get("preferences").as(Preferences).thin_mode %>
|
|
|
|
|
<% item_watched = env.get("user") && env.get("user").as(User).watched && env.get("user").as(User).watched.index(item.id) != nil %>
|
|
|
|
|
<div class="thumbnail<%= item_watched ? " thumbnail-watched" : "" %>">
|
|
|
|
|
<div class="thumbnail">
|
|
|
|
|
<img loading="lazy" tabindex="-1" class="thumbnail" src="/vi/<%= item.id %>/mqdefault.jpg"/>
|
|
|
|
|
<% if env.get? "show_watched" %>
|
|
|
|
|
<form data-onsubmit="return_false" action="/watch_ajax?action_mark_watched=1&id=<%= item.id %>&referer=<%= env.get("current_page") %>" method="post">
|
|
|
|
@ -127,6 +138,7 @@
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<% if item_watched %>
|
|
|
|
|
<div class="watched-overlay"></div>
|
|
|
|
|
<div class="watched-indicator" data-length="<%= item.length_seconds %>" data-id="<%= item.id %>"></div>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|