]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/frio/php/default.php
Cleanup /format pre-move
[friendica.git] / view / theme / frio / php / default.php
index 56118cc90e0401c0b283ed6a25ce9c6f69a3e187..a0a71bc2252058a349fa35b69d71bdcb338dccf7 100644 (file)
@@ -4,34 +4,51 @@
  * @brief The default site template
  */
 ?>
-
 <!DOCTYPE html >
-
-<?php 
+<?php
        require_once('view/theme/frio/php/frio_boot.php');
 
 //     $minimal = is_modal();
 
 ?>
-
 <html>
 <head>
        <title><?php if(x($page,'title')) echo $page['title'] ?></title>
-       <meta request="<?php echo htmlspecialchars($_REQUEST['pagename']) ?> ">
+       <meta request="<?php echo htmlspecialchars($_REQUEST['pagename']) ?>">
        <script>var baseurl="<?php echo App::get_baseurl() ?>";</script>
        <script>var frio="<?php echo "view/theme/frio"; ?>";</script>
        <?php $baseurl = App::get_baseurl(); ?>
        <?php $frio = "view/theme/frio"; ?>
-       <?php 
+       <?php
                // Because we use minimal for modals the header and the included js stuff should be only loaded
                // if the page is an standard page (so we don't have it twice for modals)
-               // 
+               //
                /// @todo Think about to move js stuff in the footer
                if(!$minimal) {
                        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
@@ -90,7 +107,6 @@ else
                                        ";
                                }
 ?>
-               
                        </div><!--row-->
                </div><!-- container -->