Skip to content
Snippets Groups Projects
Commit 48e32ea6 authored by Davide's avatar Davide
Browse files

fixed dark mode cookie awareness

parent 3f9f52c3
No related branches found
No related tags found
3 merge requests!1739Development,!1717Resolve "Major Startpage Redesign",!1713Resolve "Add setting to enable darkmode"
......@@ -53,8 +53,7 @@ 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('darkmode', Cookie::get('dark_mode'));
->with('pluginmodal', $request->input('plugin-modal', 'off'));
}
public function loadPage($subpage)
......
......@@ -23,7 +23,7 @@
<link type="text/css" rel="stylesheet" href="{{ mix('css/fontawesome.css') }}" />
<link type="text/css" rel="stylesheet" href="{{ mix('css/fontawesome-solid.css') }}" />
@if($darkmode === "2")
@if(Cookie::get('dark_mode') === "2")
<link type="text/css" rel="stylesheet" href="{{ mix('css/themes/metager-dark.css') }}" title="MetaGer Dark"/>
@else
<link type="text/css" rel="stylesheet" href="{{ mix('css/themes/metager.css') }}" title="MetaGer"/>
......
......@@ -27,7 +27,7 @@
<link rel="search" type="application/opensearchdescription+xml" title="{{ trans('staticPages.opensearch') }}" href="{{ LaravelLocalization::getLocalizedURL(LaravelLocalization::getCurrentLocale(), action('StartpageController@loadPlugin', ['key' => Cookie::get('key')])) }}">
@endif
@if($darkmode === "2")
@if(Cookie::get('dark_mode') === "2")
<link type="text/css" rel="stylesheet" href="{{ mix('css/themes/metager-dark.css') }}" title="MetaGer Dark"/>
@else
<link type="text/css" rel="stylesheet" href="{{ mix('css/themes/metager.css') }}" title="MetaGer"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment