summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOmar Roth <omarroth@hotmail.com>2018-03-16 12:14:40 -0500
committerOmar Roth <omarroth@hotmail.com>2018-03-16 12:14:40 -0500
commit1b175505458d93e4f1569fb0a1b2ead2bdb32018 (patch)
tree3e262b6a528727b56dbdfead770cb4779e0ae7db
parent6581f96b70274194f0f1ea4a3cea8de1fc033f5c (diff)
downloadinvidious-1b175505458d93e4f1569fb0a1b2ead2bdb32018.tar.gz
invidious-1b175505458d93e4f1569fb0a1b2ead2bdb32018.tar.bz2
invidious-1b175505458d93e4f1569fb0a1b2ead2bdb32018.zip
Format views and add link to cookie issue
-rw-r--r--src/cookie_fix.cr1
-rw-r--r--src/views/index.ecr4
-rw-r--r--src/views/login.ecr2
-rw-r--r--src/views/search.ecr6
-rw-r--r--src/views/watch.ecr56
5 files changed, 38 insertions, 31 deletions
diff --git a/src/cookie_fix.cr b/src/cookie_fix.cr
index 536d5887..1c0345e0 100644
--- a/src/cookie_fix.cr
+++ b/src/cookie_fix.cr
@@ -1,3 +1,4 @@
+# See https://github.com/crystal-lang/crystal/pull/5408
module HTTP
class Cookie
module Parser
diff --git a/src/views/index.ecr b/src/views/index.ecr
index 9338bbcc..9bdff0cc 100644
--- a/src/views/index.ecr
+++ b/src/views/index.ecr
@@ -12,7 +12,9 @@
<img style="width:100%;" src="<%= player_response["videoDetails"]["thumbnail"]["thumbnails"][0]["url"] %>"/>
<p><%= video.title %></p>
</a>
- <p><b><a style="width:100%;" href="https://youtube.com/channel/<%= video.info["ucid"] %>"><%= video.info["author"] %></a></b></p>
+ <p>
+ <b><a style="width:100%;" href="https://youtube.com/channel/<%= video.info["ucid"] %>"><%= video.info["author"] %></a></b>
+ </p>
</div>
</div>
<% end %>
diff --git a/src/views/login.ecr b/src/views/login.ecr
index c19a91a4..01ee348e 100644
--- a/src/views/login.ecr
+++ b/src/views/login.ecr
@@ -22,4 +22,4 @@
</div>
</div>
<div class="pure-u-1 pure-u-md-1-5"></div>
-</div> \ No newline at end of file
+</div>
diff --git a/src/views/search.ecr b/src/views/search.ecr
index 0d6b12bc..56ca976d 100644
--- a/src/views/search.ecr
+++ b/src/views/search.ecr
@@ -4,14 +4,16 @@
<% videos.each_slice(4) do |slice| %>
<div class="pure-g">
-<% slice.each do |video| %>
+ <% slice.each do |video| %>
<div class="pure-u-1 pure-u-md-1-4">
<div class="h-box">
<a style="width:100%;" href="<%= video["link"] %>">
<img style="width:100%;" src="<%= video["thumbnail"] %>"/>
<%= video["title"] %>
</a>
- <p><b><a style="width:100%;" href="<%= video["author_url"]%>"><%= video["author"] %></a></b></p>
+ <p>
+ <b><a style="width:100%;" href="<%= video["author_url"]%>"><%= video["author"] %></a></b>
+ </p>
</div>
</div>
<% end %>
diff --git a/src/views/watch.ecr b/src/views/watch.ecr
index 423db4fd..a8d4a2e5 100644
--- a/src/views/watch.ecr
+++ b/src/views/watch.ecr
@@ -116,28 +116,28 @@ function toggle_comments(target) {
<div class="pure-g">
<div class="pure-u-1 pure-u-md-1-5">
<div class="h-box">
- <p><i class="fa fa-eye" aria-hidden="true"></i> <%= number_with_separator(video.views) %></p>
- <p><i class="fa fa-thumbs-up" aria-hidden="true"></i> <%= number_with_separator(video.likes) %></p>
- <p><i class="fa fa-thumbs-down" aria-hidden="true"></i> <%= number_with_separator(video.dislikes) %></p>
- <p id="Wilson">Wilson Score : <%= video.wilson_score.round(4) %></p>
- <p id="Rating">Rating : <%= rating.round(4) %> / 5</p>
- <p id="Engagement">Engagement : <%= engagement.round(2) %>%</p>
- </div>
+ <p><i class="fa fa-eye" aria-hidden="true"></i> <%= number_with_separator(video.views) %></p>
+ <p><i class="fa fa-thumbs-up" aria-hidden="true"></i> <%= number_with_separator(video.likes) %></p>
+ <p><i class="fa fa-thumbs-down" aria-hidden="true"></i> <%= number_with_separator(video.dislikes) %></p>
+ <p id="Wilson">Wilson Score : <%= video.wilson_score.round(4) %></p>
+ <p id="Rating">Rating : <%= rating.round(4) %> / 5</p>
+ <p id="Engagement">Engagement : <%= engagement.round(2) %>%</p>
+ </div>
</div>
<div class="pure-u-1 pure-u-md-3-5">
<div class="h-box">
- <p>
- <a href="https://youtube.com/channel/<%= video.info["ucid"] %>">
- <h3><%= video.info["author"] %></h3>
- </a>
- </p>
- <p>
- <b>Shared <%= video.published.to_s("%B %-d, %Y") %></b>
- </p>
+ <p>
+ <a href="https://youtube.com/channel/<%= video.info["ucid"] %>">
+ <h3><%= video.info["author"] %></h3>
+ </a>
+ </p>
+ <p>
+ <b>Shared <%= video.published.to_s("%B %-d, %Y") %></b>
+ </p>
<div style="overflow-wrap:break-word; word-wrap:break-word;">
- <%= video.description %>
- </div>
+ <%= video.description %>
+ </div>
<hr style="margin-left:1em; margin-right:1em;">
<% if reddit_thread && !reddit_html.empty? %>
<div>
@@ -154,21 +154,23 @@ function toggle_comments(target) {
<%= reddit_html %>
</div>
</div>
- <% end %>
+ <% end %>
</div>
</div>
<div class="pure-u-1 pure-u-md-1-5">
<div class="h-box">
- <% rvs.each do |rv| %>
- <% if rv.has_key?("id") %>
- <a href="/watch?v=<%= rv["id"] %>">
- <img style="width:100%;" alt="thumbnail" src="<%= rv["iurlmq"] %>">
- <p style="width:100%"><%= rv["title"] %></p>
- <p><b style="width: 100%"><%= rv["author"] %></b></p>
- </a>
+ <% rvs.each do |rv| %>
+ <% if rv.has_key?("id") %>
+ <a href="/watch?v=<%= rv["id"] %>">
+ <img style="width:100%;" alt="thumbnail" src="<%= rv["iurlmq"] %>">
+ <p style="width:100%"><%= rv["title"] %></p>
+ <p>
+ <b style="width: 100%"><%= rv["author"] %></b>
+ </p>
+ </a>
+ <% end %>
<% end %>
- <% end %>
+ </div>
</div>
</div>
-</div>