fix indentation in wiki/index.php

master
Ben Harris 5 months ago
parent 4d4d893417
commit 073b3e74ad
  1. 32
      wiki/index.php

@ -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[] = [
"title" => $yaml["title"],
"description" => $yaml["description"],
"name" => basename($page, ".md"),
];
}
usort($pages, function($a, $b) { return $a["title"] <=> $b["title"]; });
$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"]; });
// 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>

Loading…
Cancel
Save