Move inc/ files to compil.php
This commit is contained in:
parent
7dd07f5f86
commit
37bed0c769
52
compil.php
52
compil.php
|
@ -151,7 +151,52 @@ foreach ($pages as $page) {
|
|||
|
||||
ob_start();
|
||||
|
||||
require "inc/debut.php";
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title><?php
|
||||
if (isset($title) AND !is_null($title))
|
||||
echo $title . " · " . $config['siteTitle'];
|
||||
else
|
||||
echo $config['siteTitle'];
|
||||
?></title>
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="robots" content="index, follow">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<?php if ($config['css']) { ?>
|
||||
<link type="text/css" rel="stylesheet" href="/css/<?= CSS_FILENAME ?>">
|
||||
<?php } ?>
|
||||
<?php
|
||||
if (file_exists(SITE . "/head.inc.html"))
|
||||
echo file_get_contents(SITE . "/head.inc.html");
|
||||
?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<?php
|
||||
if ($config['header']) {
|
||||
?>
|
||||
<header>
|
||||
<a id="lienHeader" href="/">
|
||||
<div class="logo">
|
||||
<?php
|
||||
if (file_exists(SITE . "/img/logo.webp"))
|
||||
echo '<img src="img/logo.webp" ' . getimagesize(SITE . "/img/logo.webp")[3] . ' alt="' . $config['siteTitle'] . '" />';
|
||||
else
|
||||
echo $config['siteTitle'];
|
||||
?>
|
||||
</div>
|
||||
</a>
|
||||
</header>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<main>
|
||||
|
||||
<?php
|
||||
if ($config['centerIndex'] AND $pathParts['filename'] === "index") {
|
||||
echo "<div class='centre'>";
|
||||
} else {
|
||||
|
@ -163,7 +208,10 @@ foreach ($pages as $page) {
|
|||
} else {
|
||||
echo "</article>";
|
||||
}
|
||||
require "inc/footer.php";
|
||||
echo "</main>";
|
||||
if (file_exists(SITE . "/end.inc.html"))
|
||||
require SITE . "/end.inc.html";
|
||||
echo "</body></html>";
|
||||
file_put_contents($pathParts['dirname'] . "/" . $pathParts['filename'] . ".html", ob_get_contents());
|
||||
ob_end_clean();
|
||||
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title><?php
|
||||
if (isset($title) AND !is_null($title))
|
||||
echo $title . " · " . $config['siteTitle'];
|
||||
else
|
||||
echo $config['siteTitle'];
|
||||
?></title>
|
||||
<meta name="distribution" content="global">
|
||||
<meta name="robots" content="index, follow">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<?php if ($config['css']) { ?>
|
||||
<link type="text/css" rel="stylesheet" href="/css/<?= CSS_FILENAME ?>">
|
||||
<?php } ?>
|
||||
<?php
|
||||
if (file_exists(SITE . "/head.inc.html"))
|
||||
echo file_get_contents(SITE . "/head.inc.html");
|
||||
?>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<?php
|
||||
if ($config['header']) {
|
||||
?>
|
||||
<header>
|
||||
<a id="lienHeader" href="/">
|
||||
<div class="logo">
|
||||
<?php
|
||||
if (file_exists(SITE . "/img/logo.webp"))
|
||||
echo '<img src="img/logo.webp" ' . getimagesize(SITE . "/img/logo.webp")[3] . ' alt="' . $config['siteTitle'] . '" />';
|
||||
else
|
||||
echo $config['siteTitle'];
|
||||
?>
|
||||
</div>
|
||||
</a>
|
||||
</header>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<main>
|
|
@ -1,10 +0,0 @@
|
|||
|
||||
</main>
|
||||
|
||||
<?php
|
||||
if (file_exists(SITE . "/end.inc.html"))
|
||||
require SITE . "/end.inc.html";
|
||||
?>
|
||||
|
||||
</body>
|
||||
</html>
|
Reference in New Issue