From 907ee86058b3348ea0eed665d37c6dfa845cab4f Mon Sep 17 00:00:00 2001 From: Ravindu Lakshan Weerasinghe Date: Mon, 8 Sep 2025 22:34:15 +0530 Subject: [PATCH] Revert "change the colour to blue" --- app/controllers/AuthController.php | 4 +-- app/controllers/BaseController.php | 18 ----------- app/views/auth/login.php | 18 ++++------- app/views/auth/signup.php | 45 ++++++++++++++++++---------- app/views/booking/book-coach.php | 28 +++++++++++++---- app/views/booking/book-ground.php | 28 +++++++++++++---- app/views/booking/ground-details.php | 8 ++--- app/views/components/footer.php | 8 ++--- app/views/components/navbar.php | 6 ++-- app/views/home/index.php | 41 ++++++++++++++++++------- app/views/shop-owner/profile.php | 4 +-- app/views/shop/shop.php | 29 ++++++++++++++---- public/css/components/navbar.css | 6 ++-- public/css/pages/book-ground.css | 25 +++++++++++++--- public/css/pages/login.css | 10 +++---- public/css/pages/signup.css | 10 +++---- 16 files changed, 183 insertions(+), 105 deletions(-) diff --git a/app/controllers/AuthController.php b/app/controllers/AuthController.php index f314a37..eb493d2 100644 --- a/app/controllers/AuthController.php +++ b/app/controllers/AuthController.php @@ -25,7 +25,7 @@ public function __construct() */ public function login(Request $request): Response { - return $this->viewWithoutLayout('auth/login'); + return $this->view('auth/login'); } /** @@ -33,7 +33,7 @@ public function login(Request $request): Response */ public function signup(Request $request): Response { - return $this->viewWithoutLayout('auth/signup'); + return $this->view('auth/signup'); } /** diff --git a/app/controllers/BaseController.php b/app/controllers/BaseController.php index a9e557a..2457119 100644 --- a/app/controllers/BaseController.php +++ b/app/controllers/BaseController.php @@ -46,22 +46,4 @@ protected function redirect(string $url): Response $response->setHeader('Location', $url); return $response; } - - protected function viewWithoutLayout(string $view, array $data = []): Response - { - extract($data); - - ob_start(); - - $viewFile = APP_PATH . '/views/' . str_replace('.', '/', $view) . '.php'; - - if (!file_exists($viewFile)) { - throw new \Exception("View file not found: {$viewFile}"); - } - - include $viewFile; - $content = ob_get_clean(); - - return new Response($content); - } } \ No newline at end of file diff --git a/app/views/auth/login.php b/app/views/auth/login.php index 3307119..e045916 100644 --- a/app/views/auth/login.php +++ b/app/views/auth/login.php @@ -1,13 +1,9 @@ - - - - - - Login - GoPlay Sports Platform - - - - + +
@@ -104,5 +100,3 @@ class="form-input"
- - diff --git a/app/views/auth/signup.php b/app/views/auth/signup.php index 35d0a0d..2391a50 100644 --- a/app/views/auth/signup.php +++ b/app/views/auth/signup.php @@ -1,13 +1,9 @@ - - - - - - Sign Up - GoPlay Sports Platform - - - - + +
@@ -154,7 +150,14 @@ class="form-input"
- +
+ +
- +
@@ -309,6 +326,4 @@ function showToast(message, type = 'info') { setTimeout(() => toast.remove(), 300); }, 4000); } - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/views/booking/book-coach.php b/app/views/booking/book-coach.php index 6c2fb59..70bbdd3 100644 --- a/app/views/booking/book-coach.php +++ b/app/views/booking/book-coach.php @@ -9,11 +9,11 @@