From 4171ae9455835df8afa6f1ccd1109824444a6ffc Mon Sep 17 00:00:00 2001 From: discollizard Date: Fri, 5 Jul 2024 23:05:12 -0300 Subject: [PATCH] basic search button implemented --- assets/css/default.css | 26 +++++++++++++++++-- src/invidious/views/components/search_box.ecr | 4 +++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/assets/css/default.css b/assets/css/default.css index a47762ec..b04fa543 100644 --- a/assets/css/default.css +++ b/assets/css/default.css @@ -278,10 +278,14 @@ div.thumbnail > .bottom-right-overlay { display: inline; } -.searchbar .pure-form fieldset { padding: 0; } +.searchbar .pure-form fieldset { + padding: 0; + display: flex; + justify-content: space-around; +} .searchbar input[type="search"] { - width: 100%; + width: 90%; margin: 1px; border: 1px solid; @@ -301,6 +305,24 @@ div.thumbnail > .bottom-right-overlay { border-bottom-color: #FED; } +.searchbar button[type="submit"]{ + background: none; + color: inherit; + border: none; + padding: 0; + font: inherit; + cursor: pointer; + outline: inherit; +} + +.searchbar .icon { + font-size: 24px; + position: relative; + top: 5px; + cursor: pointer; +} + + /* https://stackoverflow.com/a/55170420 */ input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; diff --git a/src/invidious/views/components/search_box.ecr b/src/invidious/views/components/search_box.ecr index a03785d1..1ff22652 100644 --- a/src/invidious/views/components/search_box.ecr +++ b/src/invidious/views/components/search_box.ecr @@ -5,5 +5,9 @@ name="q" placeholder="<%= translate(locale, "search") %>" title="<%= translate(locale, "search") %>" value="<%= env.get?("search").try {|x| HTML.escape(x.as(String)) } %>"> +