Better indentation
This commit is contained in:
parent
3ece3cbb71
commit
afe82852f5
|
@ -4,7 +4,7 @@ mkht.php is a PHP script for building Gemini, Markdown and HTML/CSS sites from s
|
|||
|
||||
Place your pages tree in `/src/*/*.(gmi|md)`.
|
||||
|
||||
Optionnal files:
|
||||
Optional files:
|
||||
* `/config.ini`
|
||||
* `/style.less`
|
||||
* `/logo.png`
|
||||
|
|
27
mkht.php
27
mkht.php
|
@ -182,10 +182,13 @@ foreach ($pages as $page) {
|
|||
echo "<title>" . $config['siteTitle'] . "</title>";
|
||||
?>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<?php if ($config['css']) { ?>
|
||||
<link rel="stylesheet" media="screen" href="<?= $relativePathToRoot ?>css/<?= CSS_FILENAME ?>">
|
||||
<?php } ?>
|
||||
<?php
|
||||
if ($config['css']) {
|
||||
?>
|
||||
<link rel="stylesheet" media="screen" href="<?= $relativePathToRoot ?>css/<?= CSS_FILENAME ?>">
|
||||
<?php
|
||||
}
|
||||
|
||||
if (file_exists(SITE . "/head.inc.html"))
|
||||
echo file_get_contents(SITE . "/head.inc.html");
|
||||
?>
|
||||
|
@ -207,23 +210,15 @@ foreach ($pages as $page) {
|
|||
</header>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ($config['centerIndex'] AND $pathParts['filename'] === "index") {
|
||||
echo '<div class="centered">';
|
||||
} else {
|
||||
echo "<main>";
|
||||
}
|
||||
echo $pageContent;
|
||||
if ($config['centerIndex'] AND $pathParts['filename'] === "index") {
|
||||
echo "</div>";
|
||||
} else {
|
||||
echo "</main>";
|
||||
}
|
||||
if ($config['centerIndex'] AND $pathParts['filename'] === "index")
|
||||
echo '<div class="centered">' . $pageContent . "</div>";
|
||||
else
|
||||
echo "<main>" . $pageContent . "</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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue