1
0
mirror of https://koodu.h-i.works/projects/thebadspace synced 2025-06-25 16:04:37 -05:00

Front End Templating

Began the process of getting the front end together by adding about and
listing pages and applied some light styling to it doesn't look like
garbage.

Still need to turn on the indivial instance display pages, so that will
be next.
This commit is contained in:
Ro
2023-01-12 15:43:54 -08:00
parent 5ad29f78f6
commit e897453664
15 changed files with 199 additions and 67 deletions

View File

@ -11,26 +11,42 @@ use Symfony\Component\Routing\Annotation\Route;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use App\Service\Auth;
use App\Service\Render;
use App\Service\HandleLocations;
class Index extends AbstractController
{
/**
* @Route("/", name="index")
*/
public function showIndex(Request $request, Auth $auth, Render $render): Response
public function showIndex(Request $request, Auth $auth, Render $render, HandleLocations $locations): Response
{
$check = $auth->status();
return $render->page([], "This is The Bad Space", "front/index.twig");
$list = $locations->getActiveLocations();
return $render->page(["count" => count($list)], "This is The Bad Space", "front/index.twig");
}
/**
* @Route("/knockknock", name="access")
* @Route("/about", name="about")
*/
public function access(Request $request): Response
{
return $this->render("front/knock.twig", [
"title" => "Wipe Your feet",
]);
public function showAbout(
Request $request,
Auth $auth,
Render $render,
HandleLocations $locations
): Response {
return $render->page([], "About The Bad Space", "front/about.twig");
}
/**
* @Route("/listings/page/{pageNum}", name="listings")
*/
public function showListing(
Request $request,
Auth $auth,
Render $render,
HandleLocations $locations,
string $pageNum
): Response {
$list = $locations->getLocationsPage($pageNum, "true");
return $render->page(["list" => $list, "page" => $pageNum], "About The Bad Space", "front/listing.twig");
}
}