From 83b5fd252e2cef88f5cc4164b84fa94737a4dae1 Mon Sep 17 00:00:00 2001 From: syeopite Date: Mon, 1 Mar 2021 01:28:54 -0800 Subject: Enhance search filter UI for JS disabled users Change filters UI box to use
. Stylize detail button for filter ui Fix localization for 'filter' Fix CSS Fix styling --- src/invidious/views/search.ecr | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/invidious/views/search.ecr b/src/invidious/views/search.ecr index 3fa9242b..92e32b30 100644 --- a/src/invidious/views/search.ecr +++ b/src/invidious/views/search.ecr @@ -2,18 +2,10 @@ <%= search_query.not_nil!.size > 30 ? HTML.escape(query.not_nil![0,30].rstrip(".") + "...") : HTML.escape(query.not_nil!) %> - Invidious <% end %> -

- [ + ] - <%= translate(locale, "filter") %> -

- - +
+ +

<%= translate(locale, "filter") %>

+
<%= translate(locale, "date") %> @@ -95,6 +87,7 @@ <% end %>
+

@@ -141,4 +134,4 @@ <% end %> - \ No newline at end of file + -- cgit v1.2.3 From b56ebd13b6fc9e02e92710dc40ca1516584bbd0b Mon Sep 17 00:00:00 2001 From: syeopite Date: Sat, 13 Mar 2021 09:14:55 -0800 Subject: Fix indent in search.ecr for filters --- src/invidious/views/search.ecr | 166 ++++++++++++++++++++--------------------- 1 file changed, 83 insertions(+), 83 deletions(-) (limited to 'src') diff --git a/src/invidious/views/search.ecr b/src/invidious/views/search.ecr index 92e32b30..f24d8c43 100644 --- a/src/invidious/views/search.ecr +++ b/src/invidious/views/search.ecr @@ -3,90 +3,90 @@ <% end %>
- -

<%= translate(locale, "filter") %>

-
-
-
- <%= translate(locale, "date") %> -
- <% ["hour", "today", "week", "month", "year"].each do |date| %> -
- <% if operator_hash.fetch("date", "all") == date %> - <%= translate(locale, date) %> - <% else %> - &page=<%= page %>"> - <%= translate(locale, date) %> - - <% end %> -
- <% end %> -
-
- <%= translate(locale, "content_type") %> -
- <% ["video", "channel", "playlist", "movie", "show"].each do |content_type| %> -
- <% if operator_hash.fetch("content_type", "all") == content_type %> - <%= translate(locale, content_type) %> - <% else %> - &page=<%= page %>"> - <%= translate(locale, content_type) %> - - <% end %> -
- <% end %> -
-
- <%= translate(locale, "duration") %> -
- <% ["short", "long"].each do |duration| %> -
- <% if operator_hash.fetch("duration", "all") == duration %> - <%= translate(locale, duration) %> - <% else %> - &page=<%= page %>"> - <%= translate(locale, duration) %> - - <% end %> -
- <% end %> + +

<%= translate(locale, "filter") %>

+
+
+
+ <%= translate(locale, "date") %> +
+ <% ["hour", "today", "week", "month", "year"].each do |date| %> +
+ <% if operator_hash.fetch("date", "all") == date %> + <%= translate(locale, date) %> + <% else %> + &page=<%= page %>"> + <%= translate(locale, date) %> + + <% end %> +
+ <% end %> +
+
+ <%= translate(locale, "content_type") %> +
+ <% ["video", "channel", "playlist", "movie", "show"].each do |content_type| %> +
+ <% if operator_hash.fetch("content_type", "all") == content_type %> + <%= translate(locale, content_type) %> + <% else %> + &page=<%= page %>"> + <%= translate(locale, content_type) %> + + <% end %> +
+ <% end %> +
+
+ <%= translate(locale, "duration") %> +
+ <% ["short", "long"].each do |duration| %> +
+ <% if operator_hash.fetch("duration", "all") == duration %> + <%= translate(locale, duration) %> + <% else %> + &page=<%= page %>"> + <%= translate(locale, duration) %> + + <% end %> +
+ <% end %> +
+
+ <%= translate(locale, "features") %> +
+ <% ["hd", "subtitles", "creative_commons", "3d", "live", "purchased", "4k", "360", "location", "hdr"].each do |feature| %> +
+ <% if operator_hash.fetch("features", "all").includes?(feature) %> + <%= translate(locale, feature) %> + <% elsif operator_hash.has_key?("features") %> + &page=<%= page %>"> + <%= translate(locale, feature) %> + + <% else %> + &page=<%= page %>"> + <%= translate(locale, feature) %> + + <% end %> +
+ <% end %> +
+
+ <%= translate(locale, "sort") %> +
+ <% ["relevance", "rating", "date", "views"].each do |sort| %> +
+ <% if operator_hash.fetch("sort", "relevance") == sort %> + <%= translate(locale, sort) %> + <% else %> + &page=<%= page %>"> + <%= translate(locale, sort) %> + + <% end %> +
+ <% end %> +
-
- <%= translate(locale, "features") %> -
- <% ["hd", "subtitles", "creative_commons", "3d", "live", "purchased", "4k", "360", "location", "hdr"].each do |feature| %> -
- <% if operator_hash.fetch("features", "all").includes?(feature) %> - <%= translate(locale, feature) %> - <% elsif operator_hash.has_key?("features") %> - &page=<%= page %>"> - <%= translate(locale, feature) %> - - <% else %> - &page=<%= page %>"> - <%= translate(locale, feature) %> - - <% end %> -
- <% end %> -
-
- <%= translate(locale, "sort") %> -
- <% ["relevance", "rating", "date", "views"].each do |sort| %> -
- <% if operator_hash.fetch("sort", "relevance") == sort %> - <%= translate(locale, sort) %> - <% else %> - &page=<%= page %>"> - <%= translate(locale, sort) %> - - <% end %> -
- <% end %> -
-

-- cgit v1.2.3 From 48a3c3a0c13c6bd0b7bec916ebac1c0f5bcd2e38 Mon Sep 17 00:00:00 2001 From: syeopite Date: Sat, 13 Mar 2021 10:57:27 -0800 Subject: Add hover state to filter UI --- assets/css/default.css | 9 ++++++--- src/invidious/views/search.ecr | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/assets/css/default.css b/assets/css/default.css index 18b7d7ad..a76ecd48 100644 --- a/assets/css/default.css +++ b/assets/css/default.css @@ -495,7 +495,8 @@ video.video-js { */ .light-theme a:hover, -.light-theme a:active { +.light-theme a:active, +.light-theme summary:hover { color: #075A9E !important; } @@ -521,7 +522,8 @@ video.video-js { @media (prefers-color-scheme: light) { .no-theme a:hover, - .no-theme a:active { + .no-theme a:active, + .no-theme summary:hover { color: #075A9E !important; } @@ -551,7 +553,8 @@ video.video-js { */ .dark-theme a:hover, -.dark-theme a:active { +.dark-theme a:active, +.dark-theme summary:hover { color: rgb(0, 182, 240); } diff --git a/src/invidious/views/search.ecr b/src/invidious/views/search.ecr index f24d8c43..873ec20f 100644 --- a/src/invidious/views/search.ecr +++ b/src/invidious/views/search.ecr @@ -4,7 +4,7 @@
-

<%= translate(locale, "filter") %>

+

<%= translate(locale, "filter") %>

-- cgit v1.2.3 From 977c34c0d72eacb07d5e51c537402fff6f4ae3fc Mon Sep 17 00:00:00 2001 From: syeopite Date: Fri, 19 Mar 2021 11:33:27 -0700 Subject: Remove unused script element in search.ecr --- src/invidious/views/search.ecr | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/invidious/views/search.ecr b/src/invidious/views/search.ecr index 873ec20f..fefc9fbb 100644 --- a/src/invidious/views/search.ecr +++ b/src/invidious/views/search.ecr @@ -134,4 +134,3 @@ <% end %>
- -- cgit v1.2.3