feat: add base webmaster dash, some cleanup

This commit is contained in:
Aidan 2025-04-26 19:15:12 -04:00
parent 52a8699363
commit d3fb369aee
7 changed files with 45 additions and 2 deletions

View File

@ -5,6 +5,8 @@ $uri = $_SERVER['REQUEST_URI'];
if ($uri === '/' || $uri === '/index.php') {
(new \Aidan\Tinytalk\Controller\HomeController())->index();
} elseif ($uri === '/webmaster' || $uri === '/webmaster/index.php') {
(new \Aidan\Tinytalk\Controller\WebmasterController())->index();
} else {
http_response_code(404);
echo "404 Not Found";

View File

@ -0,0 +1,8 @@
<?php
namespace Aidan\Tinytalk\Controller;
class WebmasterController {
public function index() {
include __DIR__ . '/../../templates/webmaster.php';
}
}

View File

@ -0,0 +1,8 @@
<div class="w-full border-b border-black bg-gray-100 p-4">
<h1 class="text-3xl font-bold mb-1 italic">webmaster</h1>
<div class="flex gap-2">
<a href="/admin" class="text-blue-500 underline text-sm">overview</a>
<a href="/admin/posts" class="text-blue-500 underline text-sm">posts</a>
<a href="/admin/categories" class="text-blue-500 underline text-sm">categories</a>
</div>
</div>

View File

@ -3,6 +3,6 @@
<div class="flex gap-2">
<a href="/login" class="text-blue-500 underline text-sm">posts</a>
<a href="/register" class="text-blue-500 underline text-sm">categories</a>
<a href="/register" class="text-blue-500 underline text-sm">webmaster</a>
<a href="/webmaster" class="text-blue-500 underline text-sm">webmaster</a>
</div>
</div>

View File

@ -0,0 +1,9 @@
<div id="categories">
<div class="w-full border-b border-black py-0.5 px-4">
<h1 class="font-bold">quick stats</h1>
</div>
<div class="w-full px-4 my-2 flex flex-col">
<p>Total Posts: 100</p>
<p>Total Categories: 100</p>
</div>
</div>

16
templates/webmaster.php Normal file
View File

@ -0,0 +1,16 @@
<?php
include_once __DIR__ . '/../templates/elements/html-header.php';
include_once __DIR__ . '/../templates/elements/admin/header.php';
?>
<div class="w-full flex">
<div class="w-1/5 border-r border-b border-black bg-gray-100">
<?php
include_once __DIR__ . '/../templates/sidebar/admin/stats.php';
?>
</div>
<div class="w-4/5 border-b border-black p-4">
<h1 class="text-3xl font-bold italic">overview</h1>
</div>
</div>
</body>
</html>