Commit 11b14be6 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

Merge branch 'development' into 'MetaGer-Redesign'

Development

See merge request !1067
parents c0e37f35 f141d4ec
...@@ -20,3 +20,5 @@ langfiles.zip ...@@ -20,3 +20,5 @@ langfiles.zip
/public/js/utility.js /public/js/utility.js
**/*.map **/*.map
/.buildpath
/.project
/org.eclipse.core.resources.prefs
/org.eclipse.wst.validation.prefs
...@@ -6,6 +6,7 @@ use App; ...@@ -6,6 +6,7 @@ use App;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Jenssegers\Agent\Agent; use Jenssegers\Agent\Agent;
use Response; use Response;
use LaravelLocalization;
class StartpageController extends Controller class StartpageController extends Controller
{ {
...@@ -15,20 +16,14 @@ class StartpageController extends Controller ...@@ -15,20 +16,14 @@ class StartpageController extends Controller
* @param int $id * @param int $id
* @return Response * @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) public function loadStartPage(Request $request)
{ {
$focusPages = []; $focusPages = [];
$theme = "default"; $theme = "default";
foreach ($request->all() as $key => $value) { 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); $focusPages[] = str_replace('param_', '', $key);
} }
if ($key === 'param_theme') { if ($key === 'param_theme') {
...@@ -36,6 +31,11 @@ class StartpageController extends Controller ...@@ -36,6 +31,11 @@ class StartpageController extends Controller
} }
} }
$lang = LaravelLocalization::getCurrentLocale();
if ($lang === 'de') {
$lang = 'all';
}
return view('index') return view('index')
->with('title', trans('titles.index')) ->with('title', trans('titles.index'))
->with('homeIcon') ->with('homeIcon')
...@@ -46,7 +46,7 @@ class StartpageController extends Controller ...@@ -46,7 +46,7 @@ class StartpageController extends Controller
->with('autocomplete', $request->input('param_autocomplete', 'on')) ->with('autocomplete', $request->input('param_autocomplete', 'on'))
->with('foki', $this->loadFoki()) ->with('foki', $this->loadFoki())
->with('focus', $request->input('focus', 'web')) ->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('resultCount', $request->input('param_resultCount', '20'))
->with('time', $request->input('param_time', '1500')) ->with('time', $request->input('param_time', '1500'))
->with('sprueche', $request->input('param_sprueche', 'on')) ->with('sprueche', $request->input('param_sprueche', 'on'))
......
...@@ -264,7 +264,7 @@ class Result ...@@ -264,7 +264,7 @@ class Result
* dass von jedem Host maximal 3 Links angezeigt werden. * dass von jedem Host maximal 3 Links angezeigt werden.
* Diese Überprüfung führen wir unter bestimmten Bedingungen nicht durch. * 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, "ncbi.nlm.nih.gov") === false &&
strpos($this->strippedHost, "twitter.com") === false && strpos($this->strippedHost, "twitter.com") === false &&
strpos($this->strippedHost, "www.ladenpreis.net") === false && strpos($this->strippedHost, "www.ladenpreis.net") === false &&
......
...@@ -21,7 +21,7 @@ $(document).ready(function () { ...@@ -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' return location.pathname.substr(1, location.pathname.indexOf('/meta', 0) - 1) || 'de'
} }
*/ */
...@@ -658,6 +658,7 @@ function createQuicktips (quicktips, sprueche) { ...@@ -658,6 +658,7 @@ function createQuicktips (quicktips, sprueche) {
} else { } else {
headlineElem.text(quicktip.title); headlineElem.text(quicktip.title);
} }
headlineElem.append('<i class="quicktip-extender fa fa-chevron-circle-down" aria-hidden="true"></i>');
summaryElem summaryElem
.append(headlineElem) .append(headlineElem)
.append('<p>' + quicktip.summary + '</p>'); .append('<p>' + quicktip.summary + '</p>');
......
...@@ -681,9 +681,22 @@ a { ...@@ -681,9 +681,22 @@ a {
* </...> * </...>
*/ */
@keyframes quicktip-extender-turn {
from {
transform: rotate(0deg);
}
to {
transform: rotate(180deg);
}
}
#quicktips { #quicktips {
display: flex; 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 { .quicktip {
margin: 10px 0px; margin: 10px 0px;
padding-left: 10px; padding-left: 10px;
...@@ -699,6 +712,13 @@ a { ...@@ -699,6 +712,13 @@ a {
h1 { h1 {
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
display: flex;
justify-content: space-between;
.quicktip-extender {
margin-left: 10px;
color: #777;
font-size: 20px;
}
} }
p { p {
font-size: 16px; font-size: 16px;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment