From 1b175505458d93e4f1569fb0a1b2ead2bdb32018 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Fri, 16 Mar 2018 12:14:40 -0500 Subject: [PATCH] Format views and add link to cookie issue --- src/cookie_fix.cr | 1 + src/views/index.ecr | 4 +++- src/views/login.ecr | 2 +- src/views/search.ecr | 6 +++-- src/views/watch.ecr | 56 +++++++++++++++++++++++--------------------- 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 @@ "/>

<%= video.title %>

-

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

+

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

<% 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 @@
- \ No newline at end of file + 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| %>
-<% slice.each do |video| %> + <% slice.each do |video| %> <% 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) {
-

<%= number_with_separator(video.views) %>

-

<%= number_with_separator(video.likes) %>

-

<%= number_with_separator(video.dislikes) %>

-

Wilson Score : <%= video.wilson_score.round(4) %>

-

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

-

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

-
+

<%= number_with_separator(video.views) %>

+

<%= number_with_separator(video.likes) %>

+

<%= number_with_separator(video.dislikes) %>

+

Wilson Score : <%= video.wilson_score.round(4) %>

+

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

+

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

+
-

- "> -

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

- -

-

- Shared <%= video.published.to_s("%B %-d, %Y") %> -

+

+ "> +

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

+ +

+

+ Shared <%= video.published.to_s("%B %-d, %Y") %> +

- <%= video.description %> -
+ <%= video.description %> +

<% if reddit_thread && !reddit_html.empty? %>
@@ -154,21 +154,23 @@ function toggle_comments(target) { <%= reddit_html %>
- <% end %> + <% end %>
- <% rvs.each do |rv| %> - <% if rv.has_key?("id") %> - "> - thumbnail"> -

<%= rv["title"] %>

-

<%= rv["author"] %>

-
+ <% rvs.each do |rv| %> + <% if rv.has_key?("id") %> + "> + thumbnail"> +

<%= rv["title"] %>

+

+ <%= rv["author"] %> +

+
+ <% end %> <% end %> - <% end %> +
-