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