From eed7a25e7d86efefaefa5aca8aae1572974b7d14 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Sun, 7 Jan 2018 11:40:03 -0600 Subject: [PATCH] Add header --- src/views/error.ecr | 3 +++ src/views/layout.ecr | 2 ++ src/views/search.ecr | 3 +++ src/views/watch.ecr | 9 +++++---- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/views/error.ecr b/src/views/error.ecr index 8431acb4..74626dcf 100644 --- a/src/views/error.ecr +++ b/src/views/error.ecr @@ -1 +1,4 @@ +<% content_for "header" do %> +<%= "Error" %> +<% end %> <%= error_message %> \ No newline at end of file diff --git a/src/views/layout.ecr b/src/views/layout.ecr index 26ad27fd..3c589706 100644 --- a/src/views/layout.ecr +++ b/src/views/layout.ecr @@ -8,6 +8,8 @@ + + <%= yield_content "header" %> - Invidious diff --git a/src/views/search.ecr b/src/views/search.ecr index 59dd7577..9dedd89f 100644 --- a/src/views/search.ecr +++ b/src/views/search.ecr @@ -1,3 +1,6 @@ +<% content_for "header" do %> + <%= query.size > 30 ? query[0,30] + "..." : query %> +<% end %> <% videos_list.each do |video| %>

<%= video.info["title"] %>

<% end %> \ No newline at end of file diff --git a/src/views/watch.ecr b/src/views/watch.ecr index 4e5e7b00..d05e2739 100644 --- a/src/views/watch.ecr +++ b/src/views/watch.ecr @@ -1,4 +1,6 @@ -<%= video.info["title"] %> - Invidious +<% content_for "header" do %> +<%= video.info["title"] %> +<% end %> -

<%= video.info["title"] %> +

<%= video.info["title"] %> " aria-hidden="true">

@@ -25,7 +27,6 @@

<%= dislikes.to_i %>

Wilson Score : <%= ci_lower_bound(likes, likes + dislikes).round(4) %>

Rating : <%= rating.round(4) %> / 5

-

Engagement : <%= engagement.round(2) %>%

Earnings : <%= video.info.has_key?("allowed_ads") ? "~$" + ((views.to_f / 500).round(2)).to_s : "Unmonetized" %>

Allowed ads :
<%= video.info.has_key?("allowed_ads") ? video.info["allowed_ads"] : "Unmonetized" %>

@@ -36,7 +37,7 @@
<% related_videos_list.each do |video| %> -

<%= video.info["title"] %>

+

<%= video.info["title"] %>

<% end %>
\ No newline at end of file