From 52a00cfa2948058c73d0c4ac814ca0263767fb53 Mon Sep 17 00:00:00 2001 From: syeopite Date: Fri, 9 Apr 2021 22:23:43 -0700 Subject: [PATCH] Move search.ecr specific css to another file --- assets/css/default.css | 24 ------------------------ assets/css/search.css | 23 +++++++++++++++++++++++ src/invidious/views/search.ecr | 1 + 3 files changed, 24 insertions(+), 24 deletions(-) create mode 100644 assets/css/search.css diff --git a/assets/css/default.css b/assets/css/default.css index bf86c19a..b36d6432 100644 --- a/assets/css/default.css +++ b/assets/css/default.css @@ -488,30 +488,6 @@ body.dark-theme { } } -#filters { - display: inline; - margin-top: 15px; -} - -#filters > div { - display: inline-block; -} - -#filters > summary { - display: block; - margin-bottom: 15px; -} - -#filters > summary::before { - content: "[ + ]"; - font-size: 1.5em; -} - -#filters[open] > summary::before { - content: "[ - ]"; - font-size: 1.5em; -} - /*With commit d9528f5 all contents of the page is now within a flexbox. However, the hr element is rendered improperly within one. See https://stackoverflow.com/a/34372979 for more info */ diff --git a/assets/css/search.css b/assets/css/search.css new file mode 100644 index 00000000..7601fa8a --- /dev/null +++ b/assets/css/search.css @@ -0,0 +1,23 @@ +#filters { + display: inline; + margin-top: 15px; +} + +#filters > div { + display: inline-block; +} + +#filters > summary { + display: block; + margin-bottom: 15px; +} + +#filters > summary::before { + content: "[ + ]"; + font-size: 1.5em; +} + +#filters[open] > summary::before { + content: "[ - ]"; + font-size: 1.5em; +} diff --git a/src/invidious/views/search.ecr b/src/invidious/views/search.ecr index d2bc1c40..ad28ec79 100644 --- a/src/invidious/views/search.ecr +++ b/src/invidious/views/search.ecr @@ -1,4 +1,5 @@ <% content_for "header" do %> + <%= search_query.not_nil!.size > 30 ? HTML.escape(query.not_nil![0,30].rstrip(".") + "...") : HTML.escape(query.not_nil!) %> - Invidious <% end %>