diff --git a/assets/css/default.css b/assets/css/default.css index 793295d9..09c7d237 100644 --- a/assets/css/default.css +++ b/assets/css/default.css @@ -628,6 +628,31 @@ body.dark-theme { } } -#filters { - display: none; -} \ No newline at end of file +#filters + display: inline; + margin-top: 15px; +} + +#filters > div { + display: inline-block; +} + +#filters > summary { + display: inline-block; + margin-bottom:15px; +} + +#filters > summary { + display: inline-block; + margin-bottom:15px; +} + +#filters > summary::before { + content: "[ + ]"; + font-size: 1.5em; +} + +#filters[open] > summary::before { + content: "[ - ]"; + font-size: 1.5em; +} diff --git a/assets/js/search.js b/assets/js/search.js deleted file mode 100644 index 36edd053..00000000 --- a/assets/js/search.js +++ /dev/null @@ -1,13 +0,0 @@ -function toggle_comments(event) { - var target = event.target; - var body = document.getElementById('filters'); - if (body.style.display === 'flex') { - target.innerHTML = '[ + ]'; - body.style.display = 'none'; - } else { - target.innerHTML = '[ - ]'; - body.style.display = 'flex'; - } -} - -document.getElementById('togglefilters').onclick = toggle_comments; \ No newline at end of file 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 +