Added overwrite for default color scheme

Overwrites default theme regardless of preference defined by the operating system, unless manually overwritten by user.

Either "dark" or "light".
This commit is contained in:
Julian Prieber 2022-06-08 17:09:24 +02:00
parent 8639c44fa8
commit a36e985bfc
7 changed files with 26 additions and 4 deletions

View File

@ -40,6 +40,10 @@
<link rel="stylesheet" href="{{ asset('littlelink/css/skeleton-dark.css') }}">
@elseif ($color_scheme_override == 'light')
<link rel="stylesheet" href="{{ asset('littlelink/css/skeleton-light.css') }}">
@elseif (Config::get('meta.theme') == 'dark')
<link rel="stylesheet" href="{{ asset('littlelink/css/skeleton-dark.css') }}">
@elseif (Config::get('meta.theme') == 'light')
<link rel="stylesheet" href="{{ asset('littlelink/css/skeleton-light.css') }}">
@else
<link rel="stylesheet" href="{{ asset('littlelink/css/skeleton-auto.css') }}">
@endif

View File

@ -47,7 +47,7 @@
<?php // loads dark mode CSS if dark mode detected
$color_scheme = isset($_COOKIE["color_scheme"]) ? $_COOKIE["color_scheme"] : false;
$color_scheme_override = isset($_COOKIE["color_scheme_override"]) ? $_COOKIE["color_scheme_override"] : false; ?>
@if ($color_scheme == 'dark' and $color_scheme_override != 'light' or $color_scheme_override == 'dark')
@if ($color_scheme == 'dark' and $color_scheme_override != 'light' or $color_scheme_override == 'dark' or Config::get('meta.theme') == 'dark')
<link rel="stylesheet" href="{{ asset('css/app-dark.css') }}">
@endif
<!-- end dark mode detection -->

View File

@ -44,6 +44,9 @@
<!-- switch the two <link> Tags below to default to dark mode if cookie detection fails -->
<link rel="stylesheet" href="{{ asset('/studio/css/bootstrap.min-dark.css') }}">
<link rel="stylesheet" href="{{ asset('/studio/css/style-dashboard-dark.css') }}">
@elseif(Config::get('meta.theme') == 'dark')
<link rel="stylesheet" href="{{ asset('/studio/css/bootstrap.min-dark.css') }}">
<link rel="stylesheet" href="{{ asset('/studio/css/style-dashboard-dark.css') }}">
@else
<link rel="stylesheet" href="{{ asset('/studio/css/bootstrap.min.css') }}">
<link rel="stylesheet" href="{{ asset('/studio/css/style-dashboard.css') }}">

View File

@ -32,6 +32,10 @@
<link rel="stylesheet" href="{{ asset('littlelink/css/skeleton-dark.css') }}">
@elseif ($color_scheme_override == 'light')
<link rel="stylesheet" href="{{ asset('littlelink/css/skeleton-light.css') }}">
@elseif (Config::get('meta.theme') == 'dark')
<link rel="stylesheet" href="{{ asset('littlelink/css/skeleton-dark.css') }}">
@elseif (Config::get('meta.theme') == 'light')
<link rel="stylesheet" href="{{ asset('littlelink/css/skeleton-light.css') }}">
@else
<link rel="stylesheet" href="{{ asset('littlelink/css/skeleton-auto.css') }}">
@endif

View File

@ -16,7 +16,7 @@
@endif
@if(env('CUSTOM_META_TAGS') == 'true')
@include('layouts.meta')
@include('layouts.meta')
@else
<meta name="description" content="{{ $userinfo->littlelink_description }}">
<meta name="author" content="{{ $userinfo->name }}">
@ -90,6 +90,10 @@
<link rel="stylesheet" href="{{ asset('littlelink/css/skeleton-dark.css') }}">
@elseif ($color_scheme_override == 'light')
<link rel="stylesheet" href="{{ asset('littlelink/css/skeleton-light.css') }}">
@elseif (Config::get('meta.theme') == 'dark')
<link rel="stylesheet" href="{{ asset('littlelink/css/skeleton-dark.css') }}">
@elseif (Config::get('meta.theme') == 'light')
<link rel="stylesheet" href="{{ asset('littlelink/css/skeleton-light.css') }}">
@else
<link rel="stylesheet" href="{{ asset('littlelink/css/skeleton-auto.css') }}">
@endif

View File

@ -50,6 +50,10 @@
@if ($color_scheme == 'dark' and $color_scheme_override != 'light' or $color_scheme_override == 'dark')
<!-- switch the two <link> Tags below to default to dark mode if cookie detection fails -->
<link rel="stylesheet" href="{{ asset('littlelink/css/skeleton-dark.css') }}">
@elseif (Config::get('meta.theme') == 'dark')
<link rel="stylesheet" href="{{ asset('littlelink/css/skeleton-dark.css') }}">
@elseif (Config::get('meta.theme') == 'light')
<link rel="stylesheet" href="{{ asset('littlelink/css/skeleton-light.css') }}">
@else
<link rel="stylesheet" href="{{ asset('littlelink/css/skeleton-light.css') }}">
@endif

View File

@ -34,6 +34,9 @@
<!-- switch the two <link> Tags below to default to dark mode if cookie detection fails -->
<link rel="stylesheet" href="{{ asset('/studio/css/bootstrap.min-dark.css') }}">
<link rel="stylesheet" href="{{ asset('/studio/css/style-dashboard-dark.css') }}">
@elseif(Config::get('meta.theme') == 'dark')
<link rel="stylesheet" href="{{ asset('/studio/css/bootstrap.min-dark.css') }}">
<link rel="stylesheet" href="{{ asset('/studio/css/style-dashboard-dark.css') }}">
@else
<link rel="stylesheet" href="{{ asset('/studio/css/bootstrap.min.css') }}">
<link rel="stylesheet" href="{{ asset('/studio/css/style-dashboard.css') }}">