fix indentation in wiki/index.php
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Ben Harris 2022-07-12 12:47:00 -04:00
parent 4d4d893417
commit 073b3e74ad
1 changed files with 15 additions and 15 deletions

View File

@ -27,18 +27,18 @@ if (!isset($_GET["page"]) || !file_exists("pages/{$_GET['page']}.md")) {
";
include __DIR__.'/../header.php';
$pages = [];
foreach (glob("pages/*.md") as $page) {
$yaml = $parser->parse(file_get_contents($page))->getYAML();
if (!$yaml["published"]) continue;
$pages = [];
foreach (glob("pages/*.md") as $page) {
$yaml = $parser->parse(file_get_contents($page))->getYAML();
if (!$yaml["published"]) continue;
$pages[] = [
"title" => $yaml["title"],
"description" => $yaml["description"],
"name" => basename($page, ".md"),
];
}
usort($pages, function($a, $b) { return $a["title"] <=> $b["title"]; });
$pages[] = [
"title" => $yaml["title"],
"description" => $yaml["description"],
"name" => basename($page, ".md"),
];
}
usort($pages, function($a, $b) { return $a["title"] <=> $b["title"]; });
// render wiki index ?>
@ -53,7 +53,7 @@ if (!isset($_GET["page"]) || !file_exists("pages/{$_GET['page']}.md")) {
<hr>
<h2>pages:</h2>
<table class="table table-responsive table-hover table-striped">
<table class="table table-responsive table-hover table-striped">
<thead>
<tr>
<th>title</th>
@ -63,9 +63,9 @@ if (!isset($_GET["page"]) || !file_exists("pages/{$_GET['page']}.md")) {
<tbody>
<?php foreach ($pages as $page) { ?>
<tr>
<td><a href="<?=$page["name"]?>"><?=$page["title"]?></a></td>
<td><?=$page["description"] ?? ""?></td>
</tr>
<td><a href="<?=$page["name"]?>"><?=$page["title"]?></a></td>
<td><?=$page["description"] ?? ""?></td>
</tr>
<?php } ?>
</tbody>
</table>