Support Chrome's theme-color

This commit is contained in:
Pig Fang 2019-06-02 23:30:10 +08:00
parent ad7f885235
commit e9c326e61e
5 changed files with 17 additions and 0 deletions

View File

@ -8,6 +8,7 @@
<!-- Tell the browser to be responsive to screen width -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="csrf-token" content="{{ csrf_token() }}">
@include('common.theme-color')
<!-- App Styles -->
@include('common.dependencies.style')

View File

@ -7,6 +7,7 @@
@include('common.favicon')
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="csrf-token" content="{{ csrf_token() }}">
@include('common.theme-color')
@include('common.seo-meta-tags')
<!-- App Styles -->
@include('common.dependencies.style')

View File

@ -0,0 +1,13 @@
@php
$colors = [
'blue' => '#3c8dbc',
'yellow' => '#f39c12',
'green' => '#00a65a',
'purple' => '#605ca8',
'red' => '#dd4b39',
'black' => '#ffffff',
];
preg_match('/skin-(\w+)?(?:-light)?/', option('color_scheme'), $matches);
@endphp
<meta name="theme-color" content="{{ $colors[$matches[1]] }}">

View File

@ -8,6 +8,7 @@
<!-- Tell the browser to be responsive to screen width -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="csrf-token" content="{{ csrf_token() }}">
@include('common.theme-color')
@include('common.seo-meta-tags')
<!-- App Styles -->
@include('common.dependencies.style')

View File

@ -8,6 +8,7 @@
<!-- Tell the browser to be responsive to screen width -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="csrf-token" content="{{ csrf_token() }}">
@include('common.theme-color')
<!-- App Styles -->
@include('common.dependencies.style')