Commit 0ed73d34 authored by Phil Höfer's avatar Phil Höfer
Browse files

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

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