diff --git a/assets/css/search.css b/assets/css/search.css index 7601fa8a..7f95c88a 100644 --- a/assets/css/search.css +++ b/assets/css/search.css @@ -21,3 +21,29 @@ content: "[ - ]"; font-size: 1.5em; } + +.remove-filter { + margin-left: 6px; + vertical-align: middle; +} + +/* No theme */ + +.no-theme .remove-filter { + color: #ffffff +} + + +/* Light theme */ +@media (prefers-color-scheme: light) { + .light-theme .remove-filter { + color: #ffffff + } +} + + +/* Dark theme */ + +.no-theme .remove-filter { + color: #030303 +} diff --git a/src/invidious/views/search.ecr b/src/invidious/views/search.ecr index 0ed47ede..2b9615be 100644 --- a/src/invidious/views/search.ecr +++ b/src/invidious/views/search.ecr @@ -16,92 +16,117 @@ - <% filter_params = env.request.query_params.to_s.gsub(/q=.+?(?=&)/, "") %> - <% base_url = "/search?q=#{HTML.escape(query.not_nil!)}" %> + <% filter_params = env.request.query_params.to_s.gsub(/q=.+?(?=&|$)/, "") %> + <% base_url = "/search?q=#{HTML.escape(query.not_nil!)}" %> -