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:
@ -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");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user