mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-25 06:57:22 +00:00
Add header
This commit is contained in:
parent
060c4da96d
commit
eed7a25e7d
@ -1 +1,4 @@
|
|||||||
|
<% content_for "header" do %>
|
||||||
|
<%= "Error" %>
|
||||||
|
<% end %>
|
||||||
<%= error_message %>
|
<%= error_message %>
|
@ -8,6 +8,8 @@
|
|||||||
<link rel="stylesheet" href="/css/pure-min.css">
|
<link rel="stylesheet" href="/css/pure-min.css">
|
||||||
<link rel="stylesheet" href="/css/grids-responsive-min.css">
|
<link rel="stylesheet" href="/css/grids-responsive-min.css">
|
||||||
<link rel="stylesheet" href="/css/font-awesome.min.css">
|
<link rel="stylesheet" href="/css/font-awesome.min.css">
|
||||||
|
<link rel="stylesheet" href="/css/custom.css">
|
||||||
|
<title><%= yield_content "header" %> - Invidious</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
<% content_for "header" do %>
|
||||||
|
<%= query.size > 30 ? query[0,30] + "..." : query %>
|
||||||
|
<% end %>
|
||||||
<% videos_list.each do |video| %>
|
<% videos_list.each do |video| %>
|
||||||
<p><a href="/watch?v=<%= video.id %>"><%= video.info["title"] %></a></p>
|
<p><a href="/watch?v=<%= video.id %>"><%= video.info["title"] %></a></p>
|
||||||
<% end %>
|
<% end %>
|
@ -1,4 +1,6 @@
|
|||||||
<title><%= video.info["title"] %> - Invidious</title>
|
<% content_for "header" do %>
|
||||||
|
<%= video.info["title"] %>
|
||||||
|
<% end %>
|
||||||
<video style="width: 100%" poster="<%= video.info.has_key?("iurlhq720") ? video.info["iurlhq720"] : video.info["iurlmq"] %>" controls>
|
<video style="width: 100%" poster="<%= video.info.has_key?("iurlhq720") ? video.info["iurlhq720"] : video.info["iurlmq"] %>" controls>
|
||||||
<% if listen %>
|
<% if listen %>
|
||||||
<% adaptive_fmts.each do |fmt| %>
|
<% adaptive_fmts.each do |fmt| %>
|
||||||
@ -14,7 +16,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</video>
|
</video>
|
||||||
<h1><%= video.info["title"] %> <a href="/watch?<%= env.request.query %>">
|
<h1><%= video.info["title"] %> <a class="link" href="/watch?<%= query.to_s %>">
|
||||||
<i class="fa <%= listen ? "fa-video-camera" : "fa-volume-up" %>" aria-hidden="true"></i>
|
<i class="fa <%= listen ? "fa-video-camera" : "fa-volume-up" %>" aria-hidden="true"></i>
|
||||||
</a>
|
</a>
|
||||||
</h1>
|
</h1>
|
||||||
@ -25,7 +27,6 @@
|
|||||||
<p><i class="fa fa-thumbs-down" aria-hidden="true"></i> <%= dislikes.to_i %></p>
|
<p><i class="fa fa-thumbs-down" aria-hidden="true"></i> <%= dislikes.to_i %></p>
|
||||||
<p>Wilson Score : <%= ci_lower_bound(likes, likes + dislikes).round(4) %></p>
|
<p>Wilson Score : <%= ci_lower_bound(likes, likes + dislikes).round(4) %></p>
|
||||||
<p>Rating : <%= rating.round(4) %> / 5</p>
|
<p>Rating : <%= rating.round(4) %> / 5</p>
|
||||||
<!-- <p>Calculated Rating : <%= calculated_rating.round(4) %> / 5</p> -->
|
|
||||||
<p>Engagement : <%= engagement.round(2) %>%</p>
|
<p>Engagement : <%= engagement.round(2) %>%</p>
|
||||||
<p>Earnings : <%= video.info.has_key?("allowed_ads") ? "~$" + ((views.to_f / 500).round(2)).to_s : "Unmonetized" %></p>
|
<p>Earnings : <%= video.info.has_key?("allowed_ads") ? "~$" + ((views.to_f / 500).round(2)).to_s : "Unmonetized" %></p>
|
||||||
<p>Allowed ads : <br><%= video.info.has_key?("allowed_ads") ? video.info["allowed_ads"] : "Unmonetized" %></p>
|
<p>Allowed ads : <br><%= video.info.has_key?("allowed_ads") ? video.info["allowed_ads"] : "Unmonetized" %></p>
|
||||||
@ -36,7 +37,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="pure-u-1 pure-u-md-1-5">
|
<div class="pure-u-1 pure-u-md-1-5">
|
||||||
<% related_videos_list.each do |video| %>
|
<% related_videos_list.each do |video| %>
|
||||||
<p><a href="/watch?v=<%= video.id %>"><%= video.info["title"] %></a></p>
|
<a class="link" href="/watch?v=<%= video.id %>"><p><%= video.info["title"] %></p></a>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
Loading…
Reference in New Issue
Block a user