/**
  * Build and print the header.
  *
  * @param $fixed [optional] True if footer needs to be fixed, false if not.
  */
 public function build($fixed = false)
 {
     // TODO: Remove coloring from OVRally
     // Define the footer background
     $teamColor = null;
     $footerDivStyle = '';
     /*if(SessionManager::isLoggedIn() && SessionManager::getLoggedInTeam()->hasColorHex()) {
           $teamColor = SessionManager::getLoggedInTeam()->getColorHex();
           $footerDivStyle .= 'background: #' . $teamColor . ';';
       }*/
     // Determine the footer text color
     $footerColor = '333333';
     $footerColorShadow = 'EEEEEE';
     $footerShadow = 'CCCCCC';
     if ($teamColor != null) {
         $footerShadow = ColorUtils::adjustHexBrightness($teamColor, -25);
     }
     if ($teamColor != null && ColorUtils::getHexBrightness($teamColor) < 150) {
         $footerColor = 'F8F8F8';
         $footerColorShadow = '333333';
     }
     // Set the footer shadow/border
     $footerDivStyle .= 'border-color: #' . $footerShadow . ';';
     // Print div opening tag, of the header
     echo '<div data-role="footer" style="' . $footerDivStyle . '"' . ($fixed ? 'data-position="fixed"' : '') . '>';
     // Print the title
     echo '<h1 style="color: #' . $footerColor . '; text-shadow: 0 1px 0 #' . $footerColorShadow . ';">' . static::$FOOTER_TITLE_DEFAULT . '</h1>';
     // Print div closing tag
     echo '</div>';
     // TODO: Implement this!
     //echo '<center><p style="font-size: 80%; color: darkgray; padding: 16px 0;">KvK: 123.45.678</p></center>';
 }
 /**
  * Build and print the header.
  *
  * @param $connectionIndicator [optional] True to show a connection indicator, false if not.
  */
 public function build($connectionIndicator = false)
 {
     // TODO: Remove coloring from OVRally
     // Define the header background
     $teamColor = null;
     $headerDivStyle = '';
     /*if(SessionManager::isLoggedIn() && SessionManager::getLoggedInTeam()->hasColorHex()) {
           $teamColor = SessionManager::getLoggedInTeam()->getColorHex();
           $headerDivStyle .= 'background: #' . $teamColor . ';';
       }*/
     // Determine the header text color
     $headerColor = '333333';
     $headerColorShadow = 'EEEEEE';
     $headerShadow = 'CCCCCC';
     if ($teamColor != null) {
         $headerShadow = ColorUtils::adjustHexBrightness($teamColor, -35);
     }
     if ($teamColor != null && ColorUtils::getHexBrightness($teamColor) < 150) {
         $headerColor = 'F8F8F8';
         $headerColorShadow = '333333';
     }
     // Remove the border from the top of the header and set the header shadow/border
     $headerDivStyle .= 'border-top: none;';
     $headerDivStyle .= 'border-bottom: 1px solid #' . $headerShadow . ';';
     // Print div opening tag, of the header
     echo '<div id="header" data-role="header" style="' . $headerDivStyle . '"' . ($this->isFixed() ? ' data-position="fixed"' : '') . '>';
     // Show a back button if set
     if ($this->hasBackButton()) {
         echo '<a href="' . $this->getBackButton() . '" data-rel="back" class="ui-btn ui-corner-all ui-icon-back ui-btn-icon-left" data-direction="reverse">' . __('navigation', 'back') . '</a>';
     }
     // Show the menu button if set
     if ($this->hasMenuButton()) {
         echo '<a id="menu-button" href="#main-panel" class="ui-btn ui-corner-all ui-btn-icon-notext ui-icon-bars">' . __('general', 'menu') . '</a>';
         // TODO: This is temporary
         echo '<a id="start-tutorial" href="#" class="ui-btn ui-corner-all ui-btn-icon-notext ui-icon-info">Start test tutorial</a>';
     }
     // Add a connection indicator
     if ($connectionIndicator) {
         // The indicator
         echo '<div id="connection-indicator" class="none"></div>';
     }
     // Show the menu button if set
     if ($this->hasCloseButton()) {
         echo '<a href="" class="ui-btn ui-corner-all ui-btn-icon-notext ui-icon-delete" data-rel="back">' . __('general', 'menu') . '</a>';
     }
     // Print the prefix
     if ($this->hasPrefix()) {
         echo $this->getPrefix();
     }
     // Determine and print the title
     $headerTitle = static::HEADER_TITLE_DEFAULT;
     if ($this->hasTitle()) {
         $headerTitle = $this->getTitle();
     }
     echo '<h1 style="color: #' . $headerColor . '; text-shadow: 0 1px 0 #' . $headerColorShadow . ';"><a href="index.php" data-ajax="false" title="Refresh app">' . $headerTitle . '</a></h1>';
     // Print the suffix
     if ($this->hasSuffix()) {
         echo $this->getSuffix();
     }
     // Print div closing tag
     echo '</div>';
 }