From 652b74bf1fa3041e69b0e5ec9acb3631019fdcad Mon Sep 17 00:00:00 2001 From: malika1234m Date: Tue, 2 Sep 2025 18:43:36 +0530 Subject: [PATCH] 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, 105 insertions(+), 183 deletions(-) diff --git a/app/controllers/AuthController.php b/app/controllers/AuthController.php index eb493d2..f314a37 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->view('auth/login'); + return $this->viewWithoutLayout('auth/login'); } /** @@ -33,7 +33,7 @@ public function login(Request $request): Response */ public function signup(Request $request): Response { - return $this->view('auth/signup'); + return $this->viewWithoutLayout('auth/signup'); } /** diff --git a/app/controllers/BaseController.php b/app/controllers/BaseController.php index 2457119..a9e557a 100644 --- a/app/controllers/BaseController.php +++ b/app/controllers/BaseController.php @@ -46,4 +46,22 @@ 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 e045916..3307119 100644 --- a/app/views/auth/login.php +++ b/app/views/auth/login.php @@ -1,9 +1,13 @@ - - + + + + + + Login - GoPlay Sports Platform + + + +
@@ -100,3 +104,5 @@ class="form-input"
+ + diff --git a/app/views/auth/signup.php b/app/views/auth/signup.php index 2391a50..35d0a0d 100644 --- a/app/views/auth/signup.php +++ b/app/views/auth/signup.php @@ -1,9 +1,13 @@ - - + + + + + + Sign Up - GoPlay Sports Platform + + + +
@@ -150,14 +154,7 @@ class="form-input"
-
- -
+
- +
@@ -326,4 +309,6 @@ 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 70bbdd3..6c2fb59 100644 --- a/app/views/booking/book-coach.php +++ b/app/views/booking/book-coach.php @@ -9,11 +9,11 @@