minute badge added to watch page

This commit is contained in:
discollizard 2023-11-19 21:35:21 -03:00
parent 7993784701
commit a06166a014
2 changed files with 19 additions and 0 deletions

View File

@ -5,6 +5,17 @@ body {
Arial, sans-serif; Arial, sans-serif;
} }
.length-watch-page{
position: relative;
background-color: rgba(35, 35, 35, 0.75);
color: #fff;
border-radius: 2px;
padding: 4px;
font-size: 20px;
right: 0.25em;
bottom: 0.25em;
}
#contents { #contents {
display: flex; display: flex;
flex-direction: column; flex-direction: column;

View File

@ -85,7 +85,15 @@ we're going to need to do it here in order to allow for translations.
<i class="icon ion-md-headset"></i> <i class="icon ion-md-headset"></i>
</a> </a>
<% end %> <% end %>
<span class="length-watch-page">
<% if (video.length_seconds // 60) < 60 %>
<%= video.length_seconds // 60 %> min
<% else %>
<%= video.length_seconds // 3600 %> hr <%= (video.length_seconds % 3600) // 60 %> min
<% end %>
</span>
</h1> </h1>
<% if !video.is_listed %> <% if !video.is_listed %>
<h3> <h3>