battles/classes/Template.php

35 lines
666 B
PHP
Raw Normal View History

<?php
# Date: 30.09.2020 (09:42)
2020-09-30 10:53:39 +00:00
class Template
{
2020-09-30 10:53:39 +00:00
/**
* Template constructor.
*/
public function __construct()
{
}
2020-09-30 11:12:39 +00:00
/**
* @param string|null $title
* @param int|null $return
*
* @return false|string
*/
public static function header(string $title = null, int $return = null)
{
2020-09-30 11:12:39 +00:00
$head = <<<HTML_HEADER
<!doctype html>
<html lang="ru">
<meta charset="utf-8">
<link href="/css/main.css" rel="stylesheet">
<link href="/css/btn.css" rel=stylesheet >
<title>$title</title>
HTML_HEADER;
2020-09-30 11:12:39 +00:00
if (!$return) {
echo $head;
return false;
}
return $head;
}
}