diff --git a/.gitignore b/.gitignore index 31ef0b58ceb1b067d07a9830007a1008239b977f..a43552418fdae52a0a64d542f70739c8d9719e26 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,5 @@ langfiles.zip /public/js/utility.js **/*.map +/.buildpath +/.project diff --git a/.settings/.gitignore b/.settings/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..f0f7c9f22d715ac10ca5a978ec67434a7183af5d --- /dev/null +++ b/.settings/.gitignore @@ -0,0 +1,2 @@ +/org.eclipse.core.resources.prefs +/org.eclipse.wst.validation.prefs diff --git a/app/Http/Controllers/StartpageController.php b/app/Http/Controllers/StartpageController.php index 51d8dc60135b927b18cf322c91b9e8ac2aeb9920..65cc6dab750986e93d84a55e1de35a4ad20a90e1 100644 --- a/app/Http/Controllers/StartpageController.php +++ b/app/Http/Controllers/StartpageController.php @@ -6,6 +6,7 @@ use App; use Illuminate\Http\Request; use Jenssegers\Agent\Agent; use Response; +use LaravelLocalization; class StartpageController extends Controller { @@ -15,20 +16,14 @@ class StartpageController extends Controller * @param int $id * @return Response */ - /* public function loadStartPage($locale = "de") - { - \App::setLocale($locale); - return view('index', [ - 'title' => 'MetaGer: Sicher suchen & finden, Privatsphäre schützen', - 'homeIcon']); - } */ public function loadStartPage(Request $request) { $focusPages = []; $theme = "default"; + foreach ($request->all() as $key => $value) { - if ($value === 'on' && $key != 'param_sprueche' && $key != 'param_newtab' && $key !== 'param_maps' && $key !== 'param_autocomplete') { + if ($value === 'on' && $key != 'param_sprueche' && $key != 'param_newtab' && $key !== 'param_maps' && $key !== 'param_autocomplete' && $key !== 'param_lang') { $focusPages[] = str_replace('param_', '', $key); } if ($key === 'param_theme') { @@ -36,6 +31,11 @@ class StartpageController extends Controller } } + $lang = LaravelLocalization::getCurrentLocale(); + if ($lang === 'de') { + $lang = 'all'; + } + return view('index') ->with('title', trans('titles.index')) ->with('homeIcon') @@ -46,7 +46,7 @@ class StartpageController extends Controller ->with('autocomplete', $request->input('param_autocomplete', 'on')) ->with('foki', $this->loadFoki()) ->with('focus', $request->input('focus', 'web')) - ->with('lang', $request->input('param_lang', 'all')) + ->with('lang', $request->input('param_lang', $lang)) ->with('resultCount', $request->input('param_resultCount', '20')) ->with('time', $request->input('param_time', '1500')) ->with('sprueche', $request->input('param_sprueche', 'on')) diff --git a/app/Models/Result.php b/app/Models/Result.php index 4da2b07ae78f405bec5c4c00665e85c92be1cb74..7ffc3150945cd4944986eebe3bf62a92e64f75f7 100644 --- a/app/Models/Result.php +++ b/app/Models/Result.php @@ -264,7 +264,7 @@ class Result * dass von jedem Host maximal 3 Links angezeigt werden. * Diese Überprüfung führen wir unter bestimmten Bedingungen nicht durch. */ - if ($metager->getSite() === "" && + if (($metager->getSite() === "" || $metager->getSite() === null) && strpos($this->strippedHost, "ncbi.nlm.nih.gov") === false && strpos($this->strippedHost, "twitter.com") === false && strpos($this->strippedHost, "www.ladenpreis.net") === false && diff --git a/resources/assets/js/scriptResultPage.js b/resources/assets/js/scriptResultPage.js index e3b4d68d2fde3e56a460994cc3b61f0b76ebb5cd..49fa40b9daced079ac04dff2ca7d8696a0bb3818 100644 --- a/resources/assets/js/scriptResultPage.js +++ b/resources/assets/js/scriptResultPage.js @@ -21,7 +21,7 @@ $(document).ready(function () { }); /* -function readLocaleFromUrl(defaultLocale) { +function readLocaleFromUrl (defaultLocale) { return location.pathname.substr(1, location.pathname.indexOf('/meta', 0) - 1) || 'de' } */ @@ -658,6 +658,7 @@ function createQuicktips (quicktips, sprueche) { } else { headlineElem.text(quicktip.title); } + headlineElem.append('<i class="quicktip-extender fa fa-chevron-circle-down" aria-hidden="true"></i>'); summaryElem .append(headlineElem) .append('<p>' + quicktip.summary + '</p>'); diff --git a/resources/assets/less/metager/result-page.less b/resources/assets/less/metager/result-page.less index 6315205e4fb595d6e1f60df5ecb4265593d9870b..361fb1b495e183f310eabe7a274efcd4cf0e4671 100644 --- a/resources/assets/less/metager/result-page.less +++ b/resources/assets/less/metager/result-page.less @@ -681,9 +681,22 @@ a { * </...> */ +@keyframes quicktip-extender-turn { + from { + transform: rotate(0deg); + } + to { + transform: rotate(180deg); + } +} + #quicktips { display: flex; - flex-direction: column; // border: 2px solid #ccc; + flex-direction: column; + details[open=""] .quicktip-extender { + animation-name: quicktip-extender-turn; + animation-fill-mode: forwards; + } .quicktip { margin: 10px 0px; padding-left: 10px; @@ -699,6 +712,13 @@ a { h1 { font-size: 18px; font-weight: bold; + display: flex; + justify-content: space-between; + .quicktip-extender { + margin-left: 10px; + color: #777; + font-size: 20px; + } } p { font-size: 16px;