fix indentation in wiki/index.php
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
4d4d893417
commit
073b3e74ad
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue