forked from Public/pics
MainTemplate: clean up HTML head; remove unused inline CSS function
This commit is contained in:
parent
07bc784859
commit
daf6b6b264
@ -25,14 +25,22 @@ class MainTemplate extends Template
|
|||||||
echo '<!DOCTYPE html>
|
echo '<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>', $this->title, '</title>', !empty($this->canonical_url) ? '
|
<title>', $this->title, '</title>';
|
||||||
<link rel="canonical" href="' . $this->canonical_url . '">' : '', '
|
|
||||||
|
if (!empty($this->canonical_url))
|
||||||
|
echo '
|
||||||
|
<link rel="canonical" href="', $this->canonical_url, '">';
|
||||||
|
|
||||||
|
echo '
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">';
|
||||||
|
|
||||||
|
echo '
|
||||||
|
<link rel="stylesheet" href="', BASEURL, '/vendor/twbs/bootstrap/dist/css/bootstrap.min.css">
|
||||||
|
<link rel="stylesheet" href="', BASEURL, '/vendor/twbs/bootstrap-icons/font/bootstrap-icons.css">
|
||||||
<link type="text/css" rel="stylesheet" href="', BASEURL, '/css/default.css">
|
<link type="text/css" rel="stylesheet" href="', BASEURL, '/css/default.css">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<script type="text/javascript" src="', BASEURL, '/js/main.js"></script>'
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">', !empty($this->css) ? '
|
, $this->header_html, '
|
||||||
<style type="text/css">' . $this->css . '
|
|
||||||
</style>' : '', $this->header_html, '
|
|
||||||
<script type="text/javascript" src="', BASEURL, '/js/main.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
<body', !empty($this->classes) ? ' class="' . implode(' ', $this->classes) . '"' : '', '>
|
<body', !empty($this->classes) ? ' class="' . implode(' ', $this->classes) . '"' : '', '>
|
||||||
<header>
|
<header>
|
||||||
@ -84,11 +92,6 @@ class MainTemplate extends Template
|
|||||||
</html>';
|
</html>';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function appendCss($css)
|
|
||||||
{
|
|
||||||
$this->css .= $css;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function appendHeaderHtml($html)
|
public function appendHeaderHtml($html)
|
||||||
{
|
{
|
||||||
$this->header_html .= "\n\t\t" . $html;
|
$this->header_html .= "\n\t\t" . $html;
|
||||||
|
Loading…
Reference in New Issue
Block a user