diff --git a/metager/app/Http/Controllers/MetaGerSearch.php b/metager/app/Http/Controllers/MetaGerSearch.php index abf54afabc7d1708a5ee6ba6e3f3c19630a7f19e..8a893d005d250f82ea8ee1dec88e5d16877490e2 100644 --- a/metager/app/Http/Controllers/MetaGerSearch.php +++ b/metager/app/Http/Controllers/MetaGerSearch.php @@ -41,7 +41,7 @@ class MetaGerSearch extends Controller $settings = app(SearchSettings::class); if ($settings->fokus === "maps") { - return redirect()->to('https://maps.metager.de/map/' . $settings->q . '/1240908.5493525574,6638783.2192695495,6'); + return redirect()->to('https://maps.metager.de/' . urlencode($settings->q) . '/guess'); } # If there is no query parameter we redirect to the startpage diff --git a/metager/app/SearchSettings.php b/metager/app/SearchSettings.php index c9ac0f3237641664a8b3cd4e2512fb3c972698f7..23fc09b320c91b57457bc620e7646f83da4ffdb2 100644 --- a/metager/app/SearchSettings.php +++ b/metager/app/SearchSettings.php @@ -56,7 +56,7 @@ class SearchSettings $this->user_settings = []; - if (!in_array($this->fokus, array_keys((array) $this->sumasJson->foki))) { + if (!in_array($this->fokus, array_merge(array_keys((array) $this->sumasJson->foki), ["maps"]))) { $this->fokus = "web"; } diff --git a/metager/lang/en/index.php b/metager/lang/en/index.php index fc15ba8c1b156b4b5f251b022b8019f188f59eb4..bdd4533f0bd0e0241dda900cddf028945eae13c9 100644 --- a/metager/lang/en/index.php +++ b/metager/lang/en/index.php @@ -6,26 +6,27 @@ return [ 'fokus' => 'Skip to search focus selection', ], 'lang' => 'wwitch language', - 'plugin' => 'Install MetaGer', + 'plugin' => 'Install MetaGer', 'plugin-title' => 'Add MetaGer to your browser', - 'key' => [ + 'key' => [ 'placeholder' => 'Enter member key', - 'tooltip' => [ + 'tooltip' => [ 'nokey' => 'Set up ad-free search', 'empty' => 'Token used up. Recharge now.', - 'low' => 'Token soon used up. Recharge now.', - 'full' => 'Ad-free search enabled.', + 'low' => 'Token soon used up. Recharge now.', + 'full' => 'Ad-free search enabled.', ], ], - 'placeholder' => 'MetaGer: Privacy Protected Search & Find', + 'placeholder' => 'MetaGer: Privacy Protected Search & Find', 'searchbutton' => 'Start MetaGer-Search', 'searchreset' => 'delete search query input', - 'foki' => [ - 'web' => 'Web', - 'bilder' => 'Images', + 'foki' => [ + 'web' => 'Web', + 'bilder' => 'Images', 'nachrichten' => 'News', - 'science' => 'Science', - 'produkte' => 'Products', + 'science' => 'Science', + 'produkte' => 'Products', + 'maps' => 'Maps' ], - 'adfree' => 'Use MetaGer ad-free', + 'adfree' => 'Use MetaGer ad-free', ]; diff --git a/metager/resources/less/metager/general/specific.less b/metager/resources/less/metager/general/specific.less index 2f812a934e7876c25a8f008fd44cb353fbe9af6f..19c0da06942b030dd2d03dc0248eb2d9368ab98b 100644 --- a/metager/resources/less/metager/general/specific.less +++ b/metager/resources/less/metager/general/specific.less @@ -22,12 +22,19 @@ fieldset input[type=text] { overflow: visible; } -.copyLink{ - display:flex; - .loadSettings{ - flex-grow:1; - width:100%; - background-color:@input-bg; - color:@input-text; +.copyLink { + display: flex; + + .loadSettings { + flex-grow: 1; + width: 100%; + background-color: @input-bg; + color: @input-text; + } +} + +@media(max-width: 350px) { + .hide-xs { + display: none; } } \ No newline at end of file diff --git a/metager/resources/views/index.blade.php b/metager/resources/views/index.blade.php index adbf6076f938fe1538a331e36875df1a7f0ce655..98a193f4144636c5dda0c5aa320db5d83a2b095c 100644 --- a/metager/resources/views/index.blade.php +++ b/metager/resources/views/index.blade.php @@ -11,12 +11,16 @@ </div> <div id="search-content"> <ul id="foki-switcher"> - @foreach(app()->make(\App\Searchengines::class)->available_foki as $fokus) - <li> + @foreach(app()->make(\App\Searchengines::class)->available_foki as $index => $fokus) + <li @if($index > 4) class="hide-xs" @endif> <a href="{{ route('startpage', ['focus' => $fokus]) }}" @if(app(\App\SearchSettings::class)->fokus === $fokus) - class="active" aria-current="page" @endif>@lang("index.foki.$fokus")</a> + class="active" aria-current="page" @endif>@lang("index.foki.$fokus")</a> + </li> + @endforeach + <li class="hide-xs"> + <a href="{{ route('startpage', ['focus' => "maps"]) }}" @if(app(\App\SearchSettings::class)->fokus === "maps") + class="active" aria-current="page" @endif>@lang("index.foki.maps")</a> </li> - @endforeach </ul> <div id="search-wrapper"> <h1 id="startpage-logo"> @@ -33,31 +37,31 @@ @endif @if(app(\App\SearchSettings::class)->self_advertisements) <div id="startpage-quicklinks"> - @if(app(\App\Models\Authorization\Authorization::class)->availableTokens < 0) - <a class="metager-key no-key" href="{{ app(\App\Models\Authorization\Authorization::class)->getAdfreeLink() }}"> - <img src="/img/svg-icons/metager-lock.svg" alt="Key Icon" /> - <span> - @lang("index.adfree") - </span> - </a> - @elseif(!app(\App\Models\Authorization\Authorization::class)->canDoAuthenticatedSearch(false)) - <a class="metager-key" href="{{ app(\App\Models\Authorization\Authorization::class)->getAdfreeLink() }}"> - <img src="/img/svg-icons/key-empty.svg" alt="Key Icon" /> - <span> - @lang("index.key.tooltip.empty") - </span> - </a> -@endif - @if($agent->isMobile() && ($agent->browser() === "Chrome" || $agent->browser() === "Edge")) - <button type="submit" id="plugin-btn" form="searchForm" title="{{ trans('index.plugin-title') }}" - name="chrome-plugin" value="true"><img src="/img/svg-icons/svg-icons/plug-in.svg" alt="+"> - {{ trans('index.plugin') }}</a> - @else - <a id="plugin-btn" - href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), '/plugin') }}" - title="{{ trans('index.plugin-title') }}"><img src="/img/svg-icons/plug-in.svg" alt="+"> - {{ trans('index.plugin') }}</a> -@endif + @if(app(\App\Models\Authorization\Authorization::class)->availableTokens < 0) + <a class="metager-key no-key" href="{{ app(\App\Models\Authorization\Authorization::class)->getAdfreeLink() }}"> + <img src="/img/svg-icons/metager-lock.svg" alt="Key Icon" /> + <span> + @lang("index.adfree") + </span> + </a> + @elseif(!app(\App\Models\Authorization\Authorization::class)->canDoAuthenticatedSearch(false)) + <a class="metager-key" href="{{ app(\App\Models\Authorization\Authorization::class)->getAdfreeLink() }}"> + <img src="/img/svg-icons/key-empty.svg" alt="Key Icon" /> + <span> + @lang("index.key.tooltip.empty") + </span> + </a> + @endif + @if($agent->isMobile() && ($agent->browser() === "Chrome" || $agent->browser() === "Edge")) + <button type="submit" id="plugin-btn" form="searchForm" title="{{ trans('index.plugin-title') }}" + name="chrome-plugin" value="true"><img src="/img/svg-icons/svg-icons/plug-in.svg" alt="+"> + {{ trans('index.plugin') }}</a> + @else + <a id="plugin-btn" + href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), '/plugin') }}" + title="{{ trans('index.plugin-title') }}"><img src="/img/svg-icons/plug-in.svg" alt="+"> + {{ trans('index.plugin') }}</a> + @endif </div> @endif </div> diff --git a/metager/resources/views/parts/foki.blade.php b/metager/resources/views/parts/foki.blade.php index 3804b1539663fd2c61d6f484a42728f6608a6da7..a54cf8e69b2a6a42a253103dc46ed181c35a516b 100644 --- a/metager/resources/views/parts/foki.blade.php +++ b/metager/resources/views/parts/foki.blade.php @@ -3,10 +3,8 @@ <a href="@if($metager->getFokus() === $fokus)#@else{!!$metager->generateSearchLink($fokus)!!}@endif" @if(!empty($metager) && $metager->isFramed())target="_top" @else target="_self"@endif @if($metager->getFokus() === $fokus)aria-current="page"@endif>{{ trans("index.foki.$fokus") }}</a> </div> @endforeach -@if (App\Localization::getLanguage() == "de") <div id="maps"> - <a href="https://maps.metager.de/map/{{ urlencode($metager->getQ()) }}/9.7380161,52.37119740000003,12" @if(!empty($metager) && $metager->isFramed())target="_top" @else target="_blank"@endif> + <a href="https://maps.metager.de/{{ urlencode($metager->getQ()) }}/guess?locale={{ App\Localization::getLanguage() }}" @if(!empty($metager) && $metager->isFramed())target="_top" @else target="_blank"@endif> Maps </a> </div> -@endif \ No newline at end of file diff --git a/metager/resources/views/parts/sidebar.blade.php b/metager/resources/views/parts/sidebar.blade.php index 82f200f5dd8db98d42493a4399fbeb614f938d21..115da5b2a6c6a9cbd25f356651b8a9390b5f5a6d 100644 --- a/metager/resources/views/parts/sidebar.blade.php +++ b/metager/resources/views/parts/sidebar.blade.php @@ -76,14 +76,12 @@ <span>@lang('sidebar.nav25')</span> </a> </li> - @if (App\Localization::getLanguage() === "de") <li> <a href="https://maps.metager.de" target="_blank" > <img src="/img/svg-icons/icon-map.svg" alt="" aria-hidden="true" id="sidebar-img-map"> <span>{{ trans('sidebar.nav27') }}</span> </a> </li> - @endif <hr> <li> <details>