Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
MetaGer
Commits
2c33df0e
Commit
2c33df0e
authored
Nov 05, 2020
by
Dominik Hebeler
Browse files
added possibility for subpages darkmode styles
parent
31898737
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/StartpageController.php
View file @
2c33df0e
...
...
@@ -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
;
}
...
...
resources/views/layouts/staticPages.blade.php
View file @
2c33df0e
...
...
@@ -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') }}"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment