Commit 2c33df0e authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

added possibility for subpages darkmode styles

parent 31898737
......@@ -53,7 +53,8 @@ class StartpageController extends Controller
->with('request', $request->input('request', 'GET'))
->with('option_values', $option_values)
->with('autocomplete', $autocomplete)
->with('pluginmodal', $request->input('plugin-modal', 'off'));
->with('pluginmodal', $request->input('plugin-modal', 'off'))
->with('darkcss', [mix('css/themes/startpage-only-dark.css')]);
}
public function loadPage($subpage)
......@@ -88,8 +89,9 @@ class StartpageController extends Controller
}
$response = Response::make(
view('plugin')
->with('link', $link)
, "200");
->with('link', $link),
"200"
);
$response->header('Content-Type', "application/opensearchdescription+xml");
return $response;
}
......
......@@ -33,8 +33,10 @@
@endif
@if(Cookie::get('dark_mode') === "2")
<link type="text/css" rel="stylesheet" href="{{ mix('css/themes/metager-dark.css') }}"/>
@if(isset($page) && $page === 'startpage')
<link type="text/css" rel="stylesheet" href="{{ mix('css/themes/startpage-only-dark.css') }}"/>
@if(!empty($darkcss) && is_array($darkcss))
@foreach($darkcss as $css)
<link rel="stylesheet" type="text/css" href="{{ $css }}" />
@endforeach
@endif
@elseif(Cookie::get('dark_mode') === "1")
<link type="text/css" rel="stylesheet" href="{{ mix('css/themes/metager.css') }}"/>
......@@ -43,8 +45,10 @@
@endif
@else
<link type="text/css" rel="stylesheet" media="(prefers-color-scheme:dark)" href="{{ mix('css/themes/metager-dark.css') }}"/>
@if(isset($page) && $page === 'startpage')
<link type="text/css" rel="stylesheet" media="(prefers-color-scheme:dark)" href="{{ mix('css/themes/startpage-only-dark.css') }}"/>
@if(!empty($darkcss) && is_array($darkcss))
@foreach($darkcss as $css)
<link rel="stylesheet" type="text/css" media="(prefers-color-scheme:dark)" href="{{ $css }}" />
@endforeach
@endif
@endif
<link type="text/css" rel="stylesheet" href="{{ mix('css/utility.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