mirror of
https://github.com/flarum/core.git
synced 2025-08-03 15:07:53 +02:00
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:
@@ -37,7 +37,7 @@ class IndexAction extends HtmlAction
|
|||||||
public function render(Request $request, $params = [])
|
public function render(Request $request, $params = [])
|
||||||
{
|
{
|
||||||
$config = $this->database->table('config')
|
$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');
|
->lists('value', 'key');
|
||||||
$session = [];
|
$session = [];
|
||||||
$alert = $this->session->get('alert');
|
$alert = $this->session->get('alert');
|
||||||
|
@@ -6,6 +6,10 @@
|
|||||||
<title>{{ $title }}</title>
|
<title>{{ $title }}</title>
|
||||||
<meta name="description" content="">
|
<meta name="description" content="">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1">
|
<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)
|
@foreach ($styles as $file)
|
||||||
<link rel="stylesheet" href="{{ str_replace(public_path(), '', $file) }}">
|
<link rel="stylesheet" href="{{ str_replace(public_path(), '', $file) }}">
|
||||||
@endforeach
|
@endforeach
|
||||||
|
Reference in New Issue
Block a user