Removed old wip

This commit is contained in:
flash 2024-03-26 20:43:32 +00:00
parent 5d1fe28723
commit 40819d76cf
2 changed files with 0 additions and 44 deletions

View file

@ -1,43 +0,0 @@
<?php
namespace Makai\Blog;
use Index\Routing\Route;
use Index\Routing\RouteHandler;
use Sasae\SasaeEnvironment;
use Makai\Contacts\Contacts;
use Makai\Projects\Projects;
class BlogRoutes extends RouteHandler {
public function __construct(
private SasaeEnvironment $templating,
private Contacts $contacts,
private Projects $projects
) {}
#[Route('GET', '/_blog')]
public function getIndex($response, $request) {
$projectInfos = $this->projects->getProjects(
featuredOnly: true,
deleted: false,
take: 3,
random: true,
);
$projects = [];
foreach($projectInfos as $projectInfo)
$projects[] = [
'info' => $projectInfo,
'colour' => $projectInfo->hasColour() ? $projectInfo->getColour() : $this->projects->getProjectColour($projectInfo),
];
$contacts = $this->contacts->getContacts(
homePageOnly: true,
take: 3,
);
return $this->templating->render('dev/index', [
'projects' => $projects,
'contacts' => $contacts,
]);
}
}

View file

@ -94,7 +94,6 @@ final class MakaiContext {
$routingCtx->register(new DeveloperRoutes($this->templating, $this->contacts, $this->projects)); $routingCtx->register(new DeveloperRoutes($this->templating, $this->contacts, $this->projects));
$routingCtx->register(new AssetsRoutes($this->siteInfo)); $routingCtx->register(new AssetsRoutes($this->siteInfo));
$routingCtx->register(new Blog\BlogRoutes($this->templating, $this->contacts, $this->projects));
$routingCtx->register(new Whois\WhoisRoutes($this->templating, $this->csrfp)); $routingCtx->register(new Whois\WhoisRoutes($this->templating, $this->csrfp));
$routingCtx->register(new SSHKeys\SSHKeysRoutes($this->sshKeys)); $routingCtx->register(new SSHKeys\SSHKeysRoutes($this->sshKeys));
$routingCtx->register(new Tools\AsciiRoutes($this->templating)); $routingCtx->register(new Tools\AsciiRoutes($this->templating));