Merge footer and header into a single file (layout.php)
This commit is contained in:
parent
de8133b7ee
commit
bd477be736
@ -1,3 +0,0 @@
|
|||||||
</section>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -3,12 +3,12 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width">
|
<meta name="viewport" content="width=device-width">
|
||||||
<link rel="icon" type="image/png" href="./assets/img/favicon.png">
|
<link rel="icon" type="image/png" href="assets/img/favicon.png">
|
||||||
<link rel="shortcut icon" href="favicon.ico">
|
<link rel="shortcut icon" href="favicon.ico">
|
||||||
<link rel="apple-touch-icon" href="./assets/img/touch-icon-iphone.png">
|
<link rel="apple-touch-icon" href="assets/img/touch-icon-iphone.png">
|
||||||
<link rel="apple-touch-icon" sizes="72x72" href="./assets/img/touch-icon-ipad.png">
|
<link rel="apple-touch-icon" sizes="72x72" href="assets/img/touch-icon-ipad.png">
|
||||||
<link rel="apple-touch-icon" sizes="114x114" href="./assets/img/touch-icon-iphone-retina.png">
|
<link rel="apple-touch-icon" sizes="114x114" href="assets/img/touch-icon-iphone-retina.png">
|
||||||
<link rel="apple-touch-icon" sizes="144x144" href="./assets/img/touch-icon-ipad-retina.png">
|
<link rel="apple-touch-icon" sizes="144x144" href="assets/img/touch-icon-ipad-retina.png">
|
||||||
<title><?= isset($title) ? Helper\escape($title) : 'miniflux' ?></title>
|
<title><?= isset($title) ? Helper\escape($title) : 'miniflux' ?></title>
|
||||||
<link href="<?= Helper\css() ?>" rel="stylesheet" media="screen">
|
<link href="<?= Helper\css() ?>" rel="stylesheet" media="screen">
|
||||||
<script type="text/javascript" src="assets/js/app.js?version=<?= filemtime('assets/js/app.js') ?>" defer></script>
|
<script type="text/javascript" src="assets/js/app.js?version=<?= filemtime('assets/js/app.js') ?>" defer></script>
|
||||||
@ -41,4 +41,8 @@
|
|||||||
</header>
|
</header>
|
||||||
<section class="page">
|
<section class="page">
|
||||||
<?= Helper\flash('<div class="alert alert-success">%s</div>') ?>
|
<?= Helper\flash('<div class="alert alert-success">%s</div>') ?>
|
||||||
<?= Helper\flash_error('<div class="alert alert-error">%s</div>') ?>
|
<?= Helper\flash_error('<div class="alert alert-error">%s</div>') ?>
|
||||||
|
<?= $content_for_layout ?>
|
||||||
|
</section>
|
||||||
|
</body>
|
||||||
|
</html>
|
8
vendor/PicoTools/Template.php
vendored
8
vendor/PicoTools/Template.php
vendored
@ -45,11 +45,7 @@ function load()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function layout($template_name, array $template_args = array())
|
function layout($template_name, array $template_args = array(), $layout_name = 'layout')
|
||||||
{
|
{
|
||||||
$output = load('app_header', $template_args);
|
return load($layout_name, $template_args + array('content_for_layout' => load($template_name, $template_args)));
|
||||||
$output .= load($template_name, $template_args);
|
|
||||||
$output .= load('app_footer', $template_args);
|
|
||||||
|
|
||||||
return $output;
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user