From b0837920bd19fb53328004ff15250a5633820b7f Mon Sep 17 00:00:00 2001 From: Karl Hasselbring <Karl Hasselbring> Date: Mon, 20 Nov 2017 09:53:02 +0100 Subject: [PATCH] =?UTF-8?q?Refactoring:=20searchbar=20dateien=20aufger?= =?UTF-8?q?=C3=A4umt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/assets/less/metager/searchbar.less | 107 ++++++++----------- resources/views/index.blade.php | 14 --- 2 files changed, 47 insertions(+), 74 deletions(-) diff --git a/resources/assets/less/metager/searchbar.less b/resources/assets/less/metager/searchbar.less index 7b9225d67..9f7cdcf45 100644 --- a/resources/assets/less/metager/searchbar.less +++ b/resources/assets/less/metager/searchbar.less @@ -4,8 +4,10 @@ font-size: 16px; background-color: white; .search-focus-selector { - background-color: transparent; border-radius: 5px 0px 0px 5px; + background-color: white; + position: relative; + text-overflow: ellipsis; select { width: 100%; color: #777; @@ -15,6 +17,18 @@ background-color: transparent; padding-right: 35px; } + &:after { + content: "\f078"; + font: 15px "FontAwesome", sans-serif; //text-align: center; + line-height: 30px; + color: #aaa; + background-color: transparent; + right: 8px; + top: 2px; + padding: 2px 2px 2px 5px; + position: absolute; + pointer-events: none; + } } .search-add-focus { display: flex; @@ -84,32 +98,39 @@ .search-custom-hidden { display: none; } - @media (max-width: @screen-xs-max) { - flex-direction: column-reverse; - } -} - -.search-focus-selector { - background-color: white; - position: relative; - text-overflow: ellipsis; - &:after { - content: "\f078"; - font: 15px "FontAwesome", sans-serif; //text-align: center; - line-height: 30px; - color: #aaa; - background-color: transparent; - right: 8px; - top: 2px; - padding: 2px 2px 2px 5px; + .searchbar-tooltip { + display: none; position: absolute; - pointer-events: none; + margin-top: 40px; + &>.searchbar-tooltip-arrow { + width: 0; + height: 0; + border-left: 5px solid transparent; + border-right: 5px solid transparent; + border-bottom: 5px solid #ff8000; + margin-left: 5%; + } + &>.searchbar-tooltip-content { + position: relative; + margin-left: -45%; + &>p { + display: inline-block; + background: #ff8000; + border-radius: .25em; + font-size: 16px; + color: white; + padding: 5px 10px; + } + } + div:hover>& { + display: inline-block; + @media (max-width: @screen-xs-max) { + display: none; + } + } } -} - -.searchform-bonus { - li { - margin: 5px; + @media (max-width: @screen-xs-max) { + flex-direction: column-reverse; } } @@ -154,41 +175,7 @@ .resultpage-searchbar { margin: 5px 0px 0px 5px; - :first-child { + :first-child { border-left: none; } -} - -.searchbar-tooltip { - display: none; - position: absolute; - margin-top: 40px; - &>.searchbar-tooltip-arrow { - width: 0; - height: 0; - border-left: 5px solid transparent; - border-right: 5px solid transparent; - border-bottom: 5px solid #ff8000; - margin-left: 5%; - } - &>.searchbar-tooltip-content { - position: relative; - margin-left: -45%; - &>p { - display: inline-block; - background: #ff8000; - border-radius: .25em; - font-size: 16px; - color: white; - padding: 5px 10px; - } - } -} - -div:hover>.searchbar-tooltip { - display: inline-block; - - @media (max-width: @screen-xs-max) { - display: none; - } } \ No newline at end of file diff --git a/resources/views/index.blade.php b/resources/views/index.blade.php index 3eaa61b53..b26cf97ea 100644 --- a/resources/views/index.blade.php +++ b/resources/views/index.blade.php @@ -7,20 +7,6 @@ @include('modals.plugin-modal') <h1 id="mglogo"><a class="hidden-xs" href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), "/") }}">MetaGer</a></h1> @include('parts.searchbar', ['class' => 'startpage-searchbar']) - <ul class="list-inline searchform-bonus hidden"> - <li id="plug" - @unless ($browser === 'Firefox' || $browser === 'Mozilla' || $browser === 'Chrome' || $browser === 'Opera' || $browser === 'IE' || $browser === 'Edge' || $browser === 'Safari' || $browser === 'Vivaldi') - class="hidden" - @endunless> - <a href="#" data-toggle="modal" data-target="#plugin-modal" class="btn btn-default mutelink" title="{{ trans('index.plugintitle') }}"><i class="fa fa-plug" aria-hidden="true"></i> {{ trans('index.plugin') }}</a></li> - @if (LaravelLocalization::getCurrentLocale() == "de") - <li> - <a href="https://suma-ev.de/presse/Werbefreie-Suche-mit-MetaGer.html" target="_blank" class="btn btn-default mutelink"> - Werbefreie Suche mit MetaGer - </a> - </li> - @endif - </ul> <script type="text/javascript" src="{{ elixir('js/scriptStartPage.js') }}"></script> <script type="text/javascript" src="{{ elixir('js/searchbar.js') }}"></script> @endsection -- GitLab