Implement Android theme color support

As requested in the forums.
http://updates.html5rocks.com/2014/11/Support-for-theme-color-in-Chrome-39-for-Android
This commit is contained in:
Franz Liedke 2015-06-26 23:11:13 +02:00
parent 150b8d7cd3
commit 64e8a0abf3
2 changed files with 5 additions and 1 deletions

View File

@ -37,7 +37,7 @@ class IndexAction extends HtmlAction
public function render(Request $request, $params = [])
{
$config = $this->database->table('config')
->whereIn('key', ['base_url', 'api_url', 'forum_title', 'welcome_title', 'welcome_message'])
->whereIn('key', ['base_url', 'api_url', 'forum_title', 'welcome_title', 'welcome_message', 'theme_primary_color'])
->lists('value', 'key');
$session = [];
$alert = $this->session->get('alert');

View File

@ -6,6 +6,10 @@
<title>{{ $title }}</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1">
<!-- Theme color for Android phones -->
<meta name="theme-color" content="{{ $config['theme_primary_color'] }}">
@foreach ($styles as $file)
<link rel="stylesheet" href="{{ str_replace(public_path(), '', $file) }}">
@endforeach