Skip to content
Snippets Groups Projects
Commit df1e06e9 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Merge branch '1323-enable-maps-for-all-locales' into 'development'

Resolve "Enable maps for all locales"

Closes #1323

See merge request !2222
parents 796316a5 c5e094e6
No related branches found
No related tags found
2 merge requests!2224Translated using Weblate (German),!2222Resolve "Enable maps for all locales"
...@@ -41,7 +41,7 @@ class MetaGerSearch extends Controller ...@@ -41,7 +41,7 @@ class MetaGerSearch extends Controller
$settings = app(SearchSettings::class); $settings = app(SearchSettings::class);
if ($settings->fokus === "maps") { 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?locale=' . Localization::getLanguage());
} }
# If there is no query parameter we redirect to the startpage # If there is no query parameter we redirect to the startpage
......
...@@ -56,7 +56,7 @@ class SearchSettings ...@@ -56,7 +56,7 @@ class SearchSettings
$this->user_settings = []; $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"; $this->fokus = "web";
} }
......
...@@ -6,26 +6,27 @@ return [ ...@@ -6,26 +6,27 @@ return [
'fokus' => 'Skip to search focus selection', 'fokus' => 'Skip to search focus selection',
], ],
'lang' => 'wwitch language', 'lang' => 'wwitch language',
'plugin' => 'Install MetaGer', 'plugin' => 'Install MetaGer',
'plugin-title' => 'Add MetaGer to your browser', 'plugin-title' => 'Add MetaGer to your browser',
'key' => [ 'key' => [
'placeholder' => 'Enter member key', 'placeholder' => 'Enter member key',
'tooltip' => [ 'tooltip' => [
'nokey' => 'Set up ad-free search', 'nokey' => 'Set up ad-free search',
'empty' => 'Token used up. Recharge now.', 'empty' => 'Token used up. Recharge now.',
'low' => 'Token soon used up. Recharge now.', 'low' => 'Token soon used up. Recharge now.',
'full' => 'Ad-free search enabled.', 'full' => 'Ad-free search enabled.',
], ],
], ],
'placeholder' => 'MetaGer: Privacy Protected Search & Find', 'placeholder' => 'MetaGer: Privacy Protected Search & Find',
'searchbutton' => 'Start MetaGer-Search', 'searchbutton' => 'Start MetaGer-Search',
'searchreset' => 'delete search query input', 'searchreset' => 'delete search query input',
'foki' => [ 'foki' => [
'web' => 'Web', 'web' => 'Web',
'bilder' => 'Images', 'bilder' => 'Images',
'nachrichten' => 'News', 'nachrichten' => 'News',
'science' => 'Science', 'science' => 'Science',
'produkte' => 'Products', 'produkte' => 'Products',
'maps' => 'Maps'
], ],
'adfree' => 'Use MetaGer ad-free', 'adfree' => 'Use MetaGer ad-free',
]; ];
...@@ -22,12 +22,19 @@ fieldset input[type=text] { ...@@ -22,12 +22,19 @@ fieldset input[type=text] {
overflow: visible; overflow: visible;
} }
.copyLink{ .copyLink {
display:flex; display: flex;
.loadSettings{
flex-grow:1; .loadSettings {
width:100%; flex-grow: 1;
background-color:@input-bg; width: 100%;
color:@input-text; background-color: @input-bg;
color: @input-text;
}
}
@media(max-width: 350px) {
.hide-xs {
display: none;
} }
} }
\ No newline at end of file
...@@ -11,12 +11,16 @@ ...@@ -11,12 +11,16 @@
</div> </div>
<div id="search-content"> <div id="search-content">
<ul id="foki-switcher"> <ul id="foki-switcher">
@foreach(app()->make(\App\Searchengines::class)->available_foki as $fokus) @foreach(app()->make(\App\Searchengines::class)->available_foki as $index => $fokus)
<li> <li @if($index > 4) class="hide-xs" @endif>
<a href="{{ route('startpage', ['focus' => $fokus]) }}" @if(app(\App\SearchSettings::class)->fokus === $fokus) <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> </li>
@endforeach
</ul> </ul>
<div id="search-wrapper"> <div id="search-wrapper">
<h1 id="startpage-logo"> <h1 id="startpage-logo">
...@@ -33,31 +37,31 @@ ...@@ -33,31 +37,31 @@
@endif @endif
@if(app(\App\SearchSettings::class)->self_advertisements) @if(app(\App\SearchSettings::class)->self_advertisements)
<div id="startpage-quicklinks"> <div id="startpage-quicklinks">
@if(app(\App\Models\Authorization\Authorization::class)->availableTokens < 0) @if(app(\App\Models\Authorization\Authorization::class)->availableTokens < 0)
<a class="metager-key no-key" href="{{ app(\App\Models\Authorization\Authorization::class)->getAdfreeLink() }}"> <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" /> <img src="/img/svg-icons/metager-lock.svg" alt="Key Icon" />
<span> <span>
@lang("index.adfree") @lang("index.adfree")
</span> </span>
</a> </a>
@elseif(!app(\App\Models\Authorization\Authorization::class)->canDoAuthenticatedSearch(false)) @elseif(!app(\App\Models\Authorization\Authorization::class)->canDoAuthenticatedSearch(false))
<a class="metager-key" href="{{ app(\App\Models\Authorization\Authorization::class)->getAdfreeLink() }}"> <a class="metager-key" href="{{ app(\App\Models\Authorization\Authorization::class)->getAdfreeLink() }}">
<img src="/img/svg-icons/key-empty.svg" alt="Key Icon" /> <img src="/img/svg-icons/key-empty.svg" alt="Key Icon" />
<span> <span>
@lang("index.key.tooltip.empty") @lang("index.key.tooltip.empty")
</span> </span>
</a> </a>
@endif @endif
@if($agent->isMobile() && ($agent->browser() === "Chrome" || $agent->browser() === "Edge")) @if($agent->isMobile() && ($agent->browser() === "Chrome" || $agent->browser() === "Edge"))
<button type="submit" id="plugin-btn" form="searchForm" title="{{ trans('index.plugin-title') }}" <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="+"> name="chrome-plugin" value="true"><img src="/img/svg-icons/svg-icons/plug-in.svg" alt="+">
{{ trans('index.plugin') }}</a> {{ trans('index.plugin') }}</a>
@else @else
<a id="plugin-btn" <a id="plugin-btn"
href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), '/plugin') }}" href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), '/plugin') }}"
title="{{ trans('index.plugin-title') }}"><img src="/img/svg-icons/plug-in.svg" alt="+"> title="{{ trans('index.plugin-title') }}"><img src="/img/svg-icons/plug-in.svg" alt="+">
{{ trans('index.plugin') }}</a> {{ trans('index.plugin') }}</a>
@endif @endif
</div> </div>
@endif @endif
</div> </div>
......
...@@ -3,10 +3,8 @@ ...@@ -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> <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> </div>
@endforeach @endforeach
@if (App\Localization::getLanguage() == "de")
<div id="maps"> <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 Maps
</a> </a>
</div> </div>
@endif
\ No newline at end of file
...@@ -76,14 +76,12 @@ ...@@ -76,14 +76,12 @@
<span>@lang('sidebar.nav25')</span> <span>@lang('sidebar.nav25')</span>
</a> </a>
</li> </li>
@if (App\Localization::getLanguage() === "de")
<li> <li>
<a href="https://maps.metager.de" target="_blank" > <a href="https://maps.metager.de?locale={{ App\Localization::getLanguage() }}" target="_blank" >
<img src="/img/svg-icons/icon-map.svg" alt="" aria-hidden="true" id="sidebar-img-map"> <img src="/img/svg-icons/icon-map.svg" alt="" aria-hidden="true" id="sidebar-img-map">
<span>{{ trans('sidebar.nav27') }}</span> <span>{{ trans('sidebar.nav27') }}</span>
</a> </a>
</li> </li>
@endif
<hr> <hr>
<li> <li>
<details> <details>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment