feat: add base webmaster dash, some cleanup
This commit is contained in:
parent
52a8699363
commit
d3fb369aee
@ -5,6 +5,8 @@ $uri = $_SERVER['REQUEST_URI'];
|
|||||||
|
|
||||||
if ($uri === '/' || $uri === '/index.php') {
|
if ($uri === '/' || $uri === '/index.php') {
|
||||||
(new \Aidan\Tinytalk\Controller\HomeController())->index();
|
(new \Aidan\Tinytalk\Controller\HomeController())->index();
|
||||||
|
} elseif ($uri === '/webmaster' || $uri === '/webmaster/index.php') {
|
||||||
|
(new \Aidan\Tinytalk\Controller\WebmasterController())->index();
|
||||||
} else {
|
} else {
|
||||||
http_response_code(404);
|
http_response_code(404);
|
||||||
echo "404 Not Found";
|
echo "404 Not Found";
|
||||||
|
8
src/Controller/WebmasterController.php
Normal file
8
src/Controller/WebmasterController.php
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
namespace Aidan\Tinytalk\Controller;
|
||||||
|
|
||||||
|
class WebmasterController {
|
||||||
|
public function index() {
|
||||||
|
include __DIR__ . '/../../templates/webmaster.php';
|
||||||
|
}
|
||||||
|
}
|
8
templates/elements/admin/header.php
Normal file
8
templates/elements/admin/header.php
Normal 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>
|
@ -3,6 +3,6 @@
|
|||||||
<div class="flex gap-2">
|
<div class="flex gap-2">
|
||||||
<a href="/login" class="text-blue-500 underline text-sm">posts</a>
|
<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">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>
|
||||||
</div>
|
</div>
|
9
templates/sidebar/admin/stats.php
Normal file
9
templates/sidebar/admin/stats.php
Normal 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
16
templates/webmaster.php
Normal 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>
|
Loading…
x
Reference in New Issue
Block a user