A free open source IT asset/license management system
Use css variable
snipe772c29791af0
diff --git a/resources/lang/en-US/admin/settings/general.php b/resources/lang/en-US/admin/settings/general.phpindex 9f51fffb39..8a4230ab71 100644--- a/resources/lang/en-US/admin/settings/general.php+++ b/resources/lang/en-US/admin/settings/general.php@@ -79,7 +79,7 @@ return ['generate_backup' => 'Generate Backup','google_workspaces' => 'Google Workspaces','header_color' => 'Primary Theme Color',- 'header_color_help' => 'Selecting a new color here will let you preview the color with your logo selection (if you have a site logo uploaded) in the header, however it will not be saved until you click the Save button.',+ 'header_color_help' => 'Selecting a new color here will let you preview the color with your logo selection (if you have a site logo uploaded) in the header, however it will not be saved until you click the Save button. Keep in mind that very dark or very light headers might make links and other themed items unreadable in dark vs light mode.','info' => 'These settings let you customize certain aspects of your installation.','label_logo_size' => 'Square logos look best - will be displayed in the top right of each asset label. ','laravel' => 'Laravel Version',diff --git a/resources/views/layouts/basic.blade.php b/resources/views/layouts/basic.blade.phpindex bea80ff77c..f68f787cb9 100644--- a/resources/views/layouts/basic.blade.php+++ b/resources/views/layouts/basic.blade.php@@ -1,5 +1,5 @@<!DOCTYPE html>-<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">+<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" dir="{{ Helper::determineLanguageDirection() }}" data-theme="light"><head>diff --git a/resources/views/layouts/default.blade.php b/resources/views/layouts/default.blade.phpindex d5964e8d34..4ee2cff96c 100644--- a/resources/views/layouts/default.blade.php+++ b/resources/views/layouts/default.blade.php@@ -26,7 +26,7 @@<meta name="language" content="{{ Helper::mapBackToLegacyLocale(app()->getLocale()) }}"><meta name="language-direction" content="{{ Helper::determineLanguageDirection() }}"><meta name="baseUrl" content="{{ config('app.url') }}/">- <meta name="theme-color" content="{{ $snipeSettings->header_color }}">+ <meta name="theme-color" content="{{ $snipeSettings->header_color ?? '#5fa4cc' }}"><script nonce="{{ csrf_token() }}">window.Laravel = {csrfToken: '{{ csrf_token() }}'};@@ -42,7 +42,7 @@<style>:root {- --main-theme-color: {{ $snipeSettings->header_color }};+ --main-theme-color: {{ $snipeSettings->header_color ?? '#5fa4cc' }};--sidenav-text-hover-color: #fff;--sidenav-text-nohover-color: #b8c7ce;--search-highlight: #e9d15b;@@ -113,6 +113,20 @@}+ a,+ a:link,+ a:visited+ {+ color: var(--link-color);+ }++ a:hover,+ a:focus+ {+ color: hsl(from var(--link-hover) h s calc(l + 25)) !important;+ }++.btn-theme {background-color: var(--btn-theme-base);color: contrast-color(var(--btn-theme-base)) !important;@@ -489,14 +503,13 @@.dropdown-menu,.dropdown-menu > li{- {{--background-color: {{ $snipeSettings->header_color }};--}}- background-color: hsl(from {{ $snipeSettings->header_color }} h s calc(l - 5));- border-color: hsl(from {{ $snipeSettings->header_color }} h s calc(l - 10));+ background-color: hsl(from var(--main-theme-color) h s calc(l - 5));+ border-color: hsl(from var(--main-theme-color) h s calc(l - 10));color: contrast-color(var(--main-theme-color)) !important;}.main-header .navbar .nav>.active>a {- background-color: hsl(from {{ $snipeSettings->header_color }} h s calc(l - 5));+ background-color: hsl(from var(--main-theme-color) h s calc(l - 5));color: contrast-color(var(--main-theme-color)) !important;}