]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #3333 from Rudloff/feature/theme-color
authorrabuzarus <rabuzarus@t-online.de>
Mon, 17 Apr 2017 11:51:37 +0000 (13:51 +0200)
committerGitHub <noreply@github.com>
Mon, 17 Apr 2017 11:51:37 +0000 (13:51 +0200)
theme-color meta

view/theme/frio/php/default.php

index 87ccf3dc1a85114da47094bf9c7066cced5f36e7..c56f63d9e33fcba28ae2c4342d40616b9956472b 100644 (file)
                        if(x($page,'htmlhead')) echo $page['htmlhead'];
                }
        ?>
+       <?php
+               // Add the theme color meta
+               // It makes mobile Chrome UI match Frio's top bar color.
+               $uid = $a->profile_uid;
+               if (is_null($uid)) {
+                       $uid = get_theme_uid();
+               }
+               $schema = get_pconfig($uid, 'frio', 'schema');
+               if (($schema) && ($schema != '---')) {
+                       if (file_exists('view/theme/frio/schema/'.$schema.'.php')) {
+                               $schemefile = 'view/theme/frio/schema/'.$schema.'.php';
+                               require_once($schemefile);
+                       }
+               } else {
+                       $nav_bg = get_pconfig($uid, 'frio', 'nav_bg');
+               }
+               if (!$nav_bg) {
+                       $nav_bg = "#708fa0";
+               }
+               echo '<meta name="theme-color" content="'.$nav_bg.'" />';
+       ?>
+
 </head>
 <?php
 if(($_SERVER['REQUEST_URI'] != "/register") && ($_SERVER['REQUEST_URI'] != "/lostpass") && ($_SERVER['REQUEST_URI'] != "/login"))