|
|
@ -2,13 +2,13 @@
|
|
|
|
<div class="h-box">
|
|
|
|
<div class="h-box">
|
|
|
|
<% case item when %>
|
|
|
|
<% case item when %>
|
|
|
|
<% when SearchChannel %>
|
|
|
|
<% when SearchChannel %>
|
|
|
|
<a style="width:100%" href="/channel/<%= item.ucid %>">
|
|
|
|
<a href="/channel/<%= item.ucid %>">
|
|
|
|
<% if !env.get("preferences").as(Preferences).thin_mode %>
|
|
|
|
<% if !env.get("preferences").as(Preferences).thin_mode %>
|
|
|
|
<center>
|
|
|
|
<center>
|
|
|
|
<img style="width:56.25%" src="/ggpht<%= URI.parse(item.author_thumbnail).request_target.gsub(/=s\d+/, "=s176") %>"/>
|
|
|
|
<img style="width:56.25%" src="/ggpht<%= URI.parse(item.author_thumbnail).request_target.gsub(/=s\d+/, "=s176") %>"/>
|
|
|
|
</center>
|
|
|
|
</center>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<p><%= item.author %></p>
|
|
|
|
<p dir="auto"><%= HTML.escape(item.author) %></p>
|
|
|
|
</a>
|
|
|
|
</a>
|
|
|
|
<p><%= translate(locale, "`x` subscribers", number_with_separator(item.subscriber_count)) %></p>
|
|
|
|
<p><%= translate(locale, "`x` subscribers", number_with_separator(item.subscriber_count)) %></p>
|
|
|
|
<% if !item.auto_generated %><p><%= translate(locale, "`x` videos", number_with_separator(item.video_count)) %></p><% end %>
|
|
|
|
<% if !item.auto_generated %><p><%= translate(locale, "`x` videos", number_with_separator(item.video_count)) %></p><% end %>
|
|
|
@ -27,15 +27,13 @@
|
|
|
|
<p class="length"><%= number_with_separator(item.video_count) %> videos</p>
|
|
|
|
<p class="length"><%= number_with_separator(item.video_count) %> videos</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<p><%= item.title %></p>
|
|
|
|
<p dir="auto"><%= HTML.escape(item.title) %></p>
|
|
|
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<a href="/channel/<%= item.ucid %>">
|
|
|
|
|
|
|
|
<p dir=auto"><b><%= HTML.escape(item.author) %></b></p>
|
|
|
|
</a>
|
|
|
|
</a>
|
|
|
|
<p>
|
|
|
|
|
|
|
|
<b>
|
|
|
|
|
|
|
|
<a style="width:100%" href="/channel/<%= item.ucid %>"><%= item.author %></a>
|
|
|
|
|
|
|
|
</b>
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<% when MixVideo %>
|
|
|
|
<% when MixVideo %>
|
|
|
|
<a style="width:100%" href="/watch?v=<%= item.id %>&list=<%= item.rdid %>">
|
|
|
|
<a href="/watch?v=<%= item.id %>&list=<%= item.rdid %>">
|
|
|
|
<% if !env.get("preferences").as(Preferences).thin_mode %>
|
|
|
|
<% if !env.get("preferences").as(Preferences).thin_mode %>
|
|
|
|
<div class="thumbnail">
|
|
|
|
<div class="thumbnail">
|
|
|
|
<img class="thumbnail" src="/vi/<%= item.id %>/mqdefault.jpg"/>
|
|
|
|
<img class="thumbnail" src="/vi/<%= item.id %>/mqdefault.jpg"/>
|
|
|
@ -44,13 +42,11 @@
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<p><%= HTML.escape(item.title) %></p>
|
|
|
|
<p dir="auto"><%= HTML.escape(item.title) %></p>
|
|
|
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<a href="/channel/<%= item.ucid %>">
|
|
|
|
|
|
|
|
<p dir=auto"><b><%= HTML.escape(item.author) %></b></p>
|
|
|
|
</a>
|
|
|
|
</a>
|
|
|
|
<p>
|
|
|
|
|
|
|
|
<b>
|
|
|
|
|
|
|
|
<a style="width:100%" href="/channel/<%= item.ucid %>"><%= item.author %></a>
|
|
|
|
|
|
|
|
</b>
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<% when PlaylistVideo %>
|
|
|
|
<% when PlaylistVideo %>
|
|
|
|
<a style="width:100%" href="/watch?v=<%= item.id %>&list=<%= item.plid %>">
|
|
|
|
<a style="width:100%" href="/watch?v=<%= item.id %>&list=<%= item.plid %>">
|
|
|
|
<% if !env.get("preferences").as(Preferences).thin_mode %>
|
|
|
|
<% if !env.get("preferences").as(Preferences).thin_mode %>
|
|
|
@ -76,30 +72,33 @@
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<p><a href="/watch?v=<%= item.id %>"><%= HTML.escape(item.title) %></a></p>
|
|
|
|
<p dir="auto"><%= HTML.escape(item.title) %></p>
|
|
|
|
</a>
|
|
|
|
</a>
|
|
|
|
<p>
|
|
|
|
|
|
|
|
<b>
|
|
|
|
|
|
|
|
<a style="width:100%" href="/channel/<%= item.ucid %>"><%= item.author %></a>
|
|
|
|
|
|
|
|
</b>
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h5 class="pure-g">
|
|
|
|
<div class="video-card-row flexible">
|
|
|
|
<% if item.responds_to?(:premiere_timestamp) && item.premiere_timestamp.try &.> Time.utc %>
|
|
|
|
<div class="flex-left"><a href="/channel/<%= item.ucid %>">
|
|
|
|
<div class="pure-u-2-3"><%= translate(locale, "Premieres in `x`", recode_date((item.premiere_timestamp.as(Time) - Time.utc).ago, locale)) %></div>
|
|
|
|
<p class="channel-name" dir=auto"><%= HTML.escape(item.author) %></p>
|
|
|
|
<% elsif Time.utc - item.published > 1.minute %>
|
|
|
|
</a></div>
|
|
|
|
<div class="pure-u-2-3"><%= translate(locale, "Shared `x` ago", recode_date(item.published, locale)) %></div>
|
|
|
|
</div>
|
|
|
|
<% else %>
|
|
|
|
|
|
|
|
<div class="pure-u-2-3"></div>
|
|
|
|
<div class="video-card-row flexible">
|
|
|
|
<% end %>
|
|
|
|
<div class="flex-left">
|
|
|
|
|
|
|
|
<% if item.responds_to?(:premiere_timestamp) && item.premiere_timestamp.try &.> Time.utc %>
|
|
|
|
|
|
|
|
<p dir="auto"><%= translate(locale, "Premieres in `x`", recode_date((item.premiere_timestamp.as(Time) - Time.utc).ago, locale)) %></p>
|
|
|
|
|
|
|
|
<% elsif Time.utc - item.published > 1.minute %>
|
|
|
|
|
|
|
|
<p dir="auto"><%= translate(locale, "Shared `x` ago", recode_date(item.published, locale)) %></p>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="pure-u-1-3" style="text-align:right">
|
|
|
|
<% if item.responds_to?(:views) && item.views %>
|
|
|
|
<%= item.responds_to?(:views) && item.views ? translate(locale, "`x` views", number_to_short_text(item.views || 0)) : "" %>
|
|
|
|
<div class="flex-right">
|
|
|
|
|
|
|
|
<p dir="auto"><%= translate(locale, "`x` views", number_to_short_text(item.views || 0)) %></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</h5>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<% else %>
|
|
|
|
<% else %>
|
|
|
|
<% if !env.get("preferences").as(Preferences).thin_mode %>
|
|
|
|
<a style="width:100%" href="/watch?v=<%= item.id %>">
|
|
|
|
<a style="width:100%" href="/watch?v=<%= item.id %>">
|
|
|
|
<% if !env.get("preferences").as(Preferences).thin_mode %>
|
|
|
|
<div class="thumbnail">
|
|
|
|
<div class="thumbnail">
|
|
|
|
<img class="thumbnail" src="/vi/<%= item.id %>/mqdefault.jpg"/>
|
|
|
|
<img class="thumbnail" src="/vi/<%= item.id %>/mqdefault.jpg"/>
|
|
|
|
<% if env.get? "show_watched" %>
|
|
|
|
<% if env.get? "show_watched" %>
|
|
|
@ -129,44 +128,49 @@
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
<% if item.responds_to?(:live_now) && item.live_now %>
|
|
|
|
<% if item.responds_to?(:live_now) && item.live_now %>
|
|
|
|
<p class="length"><i class="icon ion-ios-play-circle"></i> <%= translate(locale, "LIVE") %></p>
|
|
|
|
<p class="length" dir="auto"><i class="icon ion-ios-play-circle"></i> <%= translate(locale, "LIVE") %></p>
|
|
|
|
<% elsif item.length_seconds != 0 %>
|
|
|
|
<% elsif item.length_seconds != 0 %>
|
|
|
|
<p class="length"><%= recode_length_seconds(item.length_seconds) %></p>
|
|
|
|
<p class="length"><%= recode_length_seconds(item.length_seconds) %></p>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<p dir="auto"><%= HTML.escape(item.title) %></p>
|
|
|
|
<p><a href="/watch?v=<%= item.id %>"><%= HTML.escape(item.title) %></a></p>
|
|
|
|
</a>
|
|
|
|
<div style="display: flex">
|
|
|
|
|
|
|
|
<b style="flex: 1;">
|
|
|
|
<div class="video-card-row flexible">
|
|
|
|
<a style="width:100%" href="/channel/<%= item.ucid %>"><%= item.author %></a>
|
|
|
|
<div class="flex-left"><a href="/channel/<%= item.ucid %>">
|
|
|
|
</b>
|
|
|
|
<p class="channel-name" dir=auto"><%= HTML.escape(item.author) %></p>
|
|
|
|
<div class="icon-buttons">
|
|
|
|
</a></div>
|
|
|
|
<a title="<%=translate(locale, "Watch on YouTube")%>" href="https://www.youtube.com/watch?v=<%= item.id %>">
|
|
|
|
<div class="flex-right">
|
|
|
|
<i class="icon ion-logo-youtube"></i>
|
|
|
|
<div class="icon-buttons">
|
|
|
|
</a>
|
|
|
|
<a title="<%=translate(locale, "Watch on YouTube")%>" href="https://www.youtube.com/watch?v=<%= item.id %>">
|
|
|
|
<a title="<%=translate(locale, "Audio mode")%>" href="/watch?v=<%= item.id %>&listen=1">
|
|
|
|
<i class="icon ion-logo-youtube"></i>
|
|
|
|
<i class="icon ion-md-headset"></i>
|
|
|
|
</a>
|
|
|
|
</a>
|
|
|
|
<a title="<%=translate(locale, "Audio mode")%>" href="/watch?v=<%= item.id %>&listen=1">
|
|
|
|
<a title="<%=translate(locale, "Switch Invidious Instance")%>" href="/redirect?referer=<%=HTML.escape("watch?v=#{item.id}")%>">
|
|
|
|
<i class="icon ion-md-headset"></i>
|
|
|
|
<i class="icon ion-md-jet"></i>
|
|
|
|
</a>
|
|
|
|
</a>
|
|
|
|
<a title="<%=translate(locale, "Switch Invidious Instance")%>" href="/redirect?referer=<%=HTML.escape("watch?v=#{item.id}")%>">
|
|
|
|
|
|
|
|
<i class="icon ion-md-jet"></i>
|
|
|
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<h5 class="pure-g">
|
|
|
|
<div class="video-card-row flexible">
|
|
|
|
<% if item.responds_to?(:premiere_timestamp) && item.premiere_timestamp.try &.> Time.utc %>
|
|
|
|
<div class="flex-left">
|
|
|
|
<div class="pure-u-2-3"><%= translate(locale, "Premieres in `x`", recode_date((item.premiere_timestamp.as(Time) - Time.utc).ago, locale)) %></div>
|
|
|
|
<% if item.responds_to?(:premiere_timestamp) && item.premiere_timestamp.try &.> Time.utc %>
|
|
|
|
<% elsif Time.utc - item.published > 1.minute %>
|
|
|
|
<p class="video-data" dir="auto"><%= translate(locale, "Premieres in `x`", recode_date((item.premiere_timestamp.as(Time) - Time.utc).ago, locale)) %></p>
|
|
|
|
<div class="pure-u-2-3"><%= translate(locale, "Shared `x` ago", recode_date(item.published, locale)) %></div>
|
|
|
|
<% elsif Time.utc - item.published > 1.minute %>
|
|
|
|
<% else %>
|
|
|
|
<p class="video-data" dir="auto"><%= translate(locale, "Shared `x` ago", recode_date(item.published, locale)) %></p>
|
|
|
|
<div class="pure-u-2-3"></div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="pure-u-1-3" style="text-align:right">
|
|
|
|
<% if item.responds_to?(:views) && item.views %>
|
|
|
|
<%= item.responds_to?(:views) && item.views ? translate(locale, "`x` views", number_to_short_text(item.views || 0)) : "" %>
|
|
|
|
<div class="flex-right">
|
|
|
|
|
|
|
|
<p class="video-data" dir="auto"><%= translate(locale, "`x` views", number_to_short_text(item.views || 0)) %></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</h5>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|