summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2018-01-07 11:40:03 -0600
committerOmar Roth <omarroth@hotmail.com>2018-01-07 11:40:03 -0600
commiteed7a25e7d86efefaefa5aca8aae1572974b7d14 (patch)
tree66b819ad178e38f694fd93c70689ae92e4d5939c /src
parent060c4da96dedd51b86fafc8407792942b9362f0f (diff)
downloadinvidious-eed7a25e7d86efefaefa5aca8aae1572974b7d14.tar.gz
invidious-eed7a25e7d86efefaefa5aca8aae1572974b7d14.tar.bz2
invidious-eed7a25e7d86efefaefa5aca8aae1572974b7d14.zip
Add header
Diffstat (limited to 'src')
-rw-r--r--src/views/error.ecr3
-rw-r--r--src/views/layout.ecr2
-rw-r--r--src/views/search.ecr3
-rw-r--r--src/views/watch.ecr9
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 @@
<link rel="stylesheet" href="/css/pure-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/custom.css">
+ <title><%= yield_content "header" %> - Invidious</title>
</head>
<body>
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| %>
<p><a href="/watch?v=<%= video.id %>"><%= video.info["title"] %></a></p>
<% 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 @@
-<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>
<% if listen %>
<% adaptive_fmts.each do |fmt| %>
@@ -14,7 +16,7 @@
<% end %>
<% end %>
</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>
</a>
</h1>
@@ -25,7 +27,6 @@
<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>Rating : <%= rating.round(4) %> / 5</p>
- <!-- <p>Calculated Rating : <%= calculated_rating.round(4) %> / 5</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>Allowed ads : <br><%= video.info.has_key?("allowed_ads") ? video.info["allowed_ads"] : "Unmonetized" %></p>
@@ -36,7 +37,7 @@
</div>
<div class="pure-u-1 pure-u-md-1-5">
<% 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 %>
</div>
</div> \ No newline at end of file