Added search bar to header.
This commit is contained in:
@ -28,15 +28,15 @@ function printPublicHead(array $settings, string $page = "home", string $title =
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src \'none\'; script-src \'self\'; connect-src \'self\' ' . $settings['mdVersion'] . '; img-src \'self\' ' . $settings['mdVersion'] . '; style-src \'self\' \'unsafe-inline\'; font-src \'self\';" />
|
||||
|
||||
<title>' . $title . '</title>
|
||||
<link rel="stylesheet" type="text/css" href="themes/default/default.css">
|
||||
<link rel="stylesheet" type="text/css" href="themes/imports.css">
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8">';
|
||||
<link rel="stylesheet" type="text/css" href="themes/default/default.css" />
|
||||
<link rel="stylesheet" type="text/css" href="themes/imports.css" />
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8" />';
|
||||
|
||||
$output .= $additional;
|
||||
|
||||
if ($icon) {
|
||||
$output .= '
|
||||
<link rel="shortcut icon" sizes="16x16 32x32" href="' . $icon . '" />
|
||||
<link rel="shortcut icon" href="' . $icon . '" />
|
||||
';
|
||||
}
|
||||
|
||||
@ -74,6 +74,8 @@ function printPublicHeader(string $title = "Home"):string {
|
||||
|
||||
<h1>' . $title . '</h1>
|
||||
|
||||
' . generateSearchBar() . '
|
||||
|
||||
</header>
|
||||
';
|
||||
|
||||
@ -190,4 +192,21 @@ function generatePublicNav($pages):string {
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function for printing the search bar.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function generateSearchBar():string {
|
||||
|
||||
$output = '
|
||||
<form action="search.php" method="GET">
|
||||
<input type="search" name="q" />
|
||||
</form>
|
||||
';
|
||||
|
||||
return $output;
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
Reference in New Issue
Block a user