Commit b0a351b7 authored by Phil Höfer's avatar Phil Höfer

neue Designauswahl intern implementiert(es fehlen noch themes und GUI)

parent 5fe8560e
......@@ -27,10 +27,14 @@ class StartpageController extends Controller
public function loadStartPage(Request $request)
{
$focusPages = [];
$theme = "none";
foreach ($request->all() as $key => $value) {
if ($value === 'on' && $key != 'param_sprueche' && $key != 'param_tab') {
$focusPages[] = str_replace('param_', '', $key);
}
if ($key === 'param_theme') {
$theme = str_replace('param_', '', $key);
}
}
$agent = new Agent();
......@@ -48,6 +52,7 @@ class StartpageController extends Controller
->with('focusPages', $focusPages)
->with('browser', $browser)
->with('navbarFocus', 'suche')
->with('theme', $theme)
->with('css', 'index.css');
}
......
......@@ -750,6 +750,8 @@ class MetaGer
} else {
$this->sprueche = false;
}
# Theme
$this->theme = preg_replace("/[^[:alnum:][:space:]]/u", '', $request->input('theme', 'none'));
# Ergebnisse pro Seite:
$this->resultCount = $request->input('resultCount', '20');
# Manchmal müssen wir Parameter anpassen um den Sucheinstellungen gerecht zu werden:
......
......@@ -191,6 +191,7 @@
@foreach ($focusPages as $fp)
<input type="hidden" name={{ $fp }} value="on">
@endforeach
<input type="hidden" name="theme" value={{ $theme }}>
@elseif( !App::isLocale('de') )
<input type="hidden" name="lang" value="{{ App::getLocale() }}">
@else
......
......@@ -16,7 +16,9 @@
<meta content="{{ $eingabe }}" name="q" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="search" type="application/opensearchdescription+xml" title="{!! trans('resultPage.opensearch') !!}" href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), action('StartpageController@loadPlugin', ['params' => base64_encode(serialize(Request::all()))])) }}">
@if( isset($metager->theme) && $metager->theme != "none" )
<link type="text/css" rel="stylesheet" href="/css/themes/{{ $metager->theme }}.css" />
@endif
<link type="text/css" rel="stylesheet" href="/css/lightslider.css" />
......
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