/** * Generate partial output for HTML header * * @access public * @static * @return void */ public function render() { $gravitarHTML = htmlentities($this->currentUser->gravitarUrl()); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title><?php echo htmlspecialchars($this->openGraphObject->title); ?> </title> <?php $this->openGraphObject->htmlRenderMetaTags(); ?> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="generator" content="Camera Life version <?php echo constant('CAMERALIFE_VERSION'); ?> "> <meta name="author" content="<?php echo htmlspecialchars($this->ownerEmail); ?> "> <!-- Le styles --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.3/css/bootstrap.min.css" integrity="sha384-MIwDKRSSImVFAZCVLtU0LMDdON6KVCrZHyVQQj6e8wIEJkW4tvwqXrbMIya1vriY" crossorigin="anonymous"> <link rel="search" href="<?php echo htmlspecialchars($this->openSearchUrl); ?> " type="application/opensearchdescription+xml" title="Content Search"/> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css"> <link rel="stylesheet" href="<?php echo constant('BASE_URL'); ?> /assets/main.css"> <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <?php }
/** * Generate partial output for HTML header * * @access public * @static * @return void */ public function render() { $gravitarHTML = htmlentities($this->currentUser->gravitarUrl()); ?> <nav class="navbar navbar-light bg-faded navbar-static-top" style="margin-bottom:20px;background:rgba(247,249,249,0.90)"> <div class="container"> <button class="navbar-toggler hidden-sm-up" type="button" data-toggle="collapse" data-target="#exCollapsingNavbar2"> ☰ </button> <div class="collapse navbar-toggleable-xs" id="exCollapsingNavbar2"> <a class="navbar-brand" href="<?php echo constant('BASE_URL'); ?> /"><?php echo htmlspecialchars($this->openGraphObject->siteName); ?> </a> <ul class="nav navbar-nav"> <li class="nav-item"> <a href="<?php echo htmlspecialchars($this->favoritesUrl); ?> " class="nav-link"><i class="fa fa-star" style="color:gold"></i> My favorites (<?php echo $this->numFavorites; ?> )</a> </li> <?php if ($this->currentUser->isLoggedIn) { ?> <li class="nav-item"> <a class="dropdown-toggle nav-link" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <img src="<?php echo $gravitarHTML; ?> " height=16 width=16> <?php echo htmlspecialchars($this->currentUser->name); ?> </a> <div class="dropdown-menu" aria-labelledby="dropdownMenu1"> <?php if ($this->currentUser->authorizationLevel >= 5) { ?> <a class="dropdown-item" href="<?php echo htmlspecialchars($this->adminUrl); ?> ">Administer</a> <?php } ?> <a class="dropdown-item" href="<?php echo htmlspecialchars($this->logoutUrl); ?> ">Sign Out</a> </div> </li> <?php } else { ?> <li class="nav-item"> <a href="<?php echo htmlspecialchars($this->loginUrl); ?> " class="nav-link">Login / Free account</a> </li> <?php } ?> </ul> <form class="form-inline navbar-form pull-right" action="<?php echo htmlspecialchars($this->searchUrl); ?> " method="get"> <input class="form-control" type="text" placeholder="Search" name="id"> </form> </div> </div> </nav> <?php }