From 430d1b38c043a01b512cf732a55b00ac23d714ef Mon Sep 17 00:00:00 2001 From: Illia Hromovoi Date: Wed, 2 Jul 2025 10:57:26 +0200 Subject: [PATCH] =?UTF-8?q?styles=20f=C3=BCr=20register-=20und=20loginform?= =?UTF-8?q?=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CSS/Element/button.css | 6 +++ CSS/Element/form.css | 23 +++++++++ CSS/style.css | 4 ++ Controller/UserController.php | 10 ++-- Views/User/showUserLoginConfirmation.phtml | 25 ++++++---- Views/User/showUserLoginForm.phtml | 53 ++++++++++---------- Views/User/showUserRegisterForm.phtml | 56 +++++++++++----------- 7 files changed, 110 insertions(+), 67 deletions(-) diff --git a/CSS/Element/button.css b/CSS/Element/button.css index 34d3ebd..9f9edea 100644 --- a/CSS/Element/button.css +++ b/CSS/Element/button.css @@ -13,6 +13,7 @@ color: var(--brand-white); display: flex; flex-direction: row; + justify-content: center; align-items: center; cursor: pointer; } @@ -22,6 +23,11 @@ border-radius: 3px; } +.btn-secondary{ + background: var(--fullblock); + border-radius: 3px; +} + .btn-user { border-radius: 9999px; color: var(--brand-primary); diff --git a/CSS/Element/form.css b/CSS/Element/form.css index 3036e98..a1f9344 100644 --- a/CSS/Element/form.css +++ b/CSS/Element/form.css @@ -64,3 +64,26 @@ input, textarea { margin-top: 5px; } +.form-user{ + justify-content: center!important; + grid-template-columns: auto!important; +} + +/* fix radio buttons registration */ +.input:nth-child(5){ + flex-direction: row; + justify-content: space-between; + max-width: 290px; + align-items: center; +} + +.input:nth-child(5) label{ + display: flex; + flex-direction: row; + align-items: center; + gap: 10px; +} + +.input:nth-child(5) label input{ + margin-top: 0; +} diff --git a/CSS/style.css b/CSS/style.css index 3634670..fcb7762 100644 --- a/CSS/style.css +++ b/CSS/style.css @@ -107,3 +107,7 @@ main { text-decoration: none; } +.paragraph{ + font-size: var(--font-size-smalltext); + color: var(--brand-white); +} diff --git a/Controller/UserController.php b/Controller/UserController.php index 4904508..b9e1104 100644 --- a/Controller/UserController.php +++ b/Controller/UserController.php @@ -87,17 +87,19 @@ class UserController{ public function showUserLoginConfirmation(){ $userId = $this->getCurrentUserId(); $user = null; - var_dump($user . "user"); if($userId){ $user = $this->db->getUserById($userId); } - include 'Views/User/showUserLoginConfirmation.phtml'; + + $path = "Views/User/showUserLoginConfirmation.phtml"; + if(file_exists($path)){ + include $path; + } } public function register(){ $this->db->createUser($_POST); - $this->view->setDoMethodName("showUserRegisterConfirmation"); - $this->showUserRegisterConfirmation(); + $this->login(); } public function login(){ diff --git a/Views/User/showUserLoginConfirmation.phtml b/Views/User/showUserLoginConfirmation.phtml index d5289c1..004dbc1 100644 --- a/Views/User/showUserLoginConfirmation.phtml +++ b/Views/User/showUserLoginConfirmation.phtml @@ -2,16 +2,23 @@ include dirname(__DIR__).'/header.phtml'; ?> - -

Hallo, !

- -

Benutzerdaten konnten nicht geladen werden.

- +
+
+
+

Erfolgreiche Anmeldung!

-

Sie haben sich erfolgreich angemeldet

+ +

Hallo, !

+ + +

Benutzerdaten konnten nicht geladen werden.

+ - +
+
+
diff --git a/Views/User/showUserLoginForm.phtml b/Views/User/showUserLoginForm.phtml index 73dbada..f087019 100644 --- a/Views/User/showUserLoginForm.phtml +++ b/Views/User/showUserLoginForm.phtml @@ -2,32 +2,33 @@ include dirname(__DIR__).'/header.phtml'; ?> -

Als Benutzer anmelden

+
+
+
+

Als Benutzer anmelden

-
+ + $label): ?> +
+ + + + + + + + - $label): ?> -
- - - - - - - - + +
+ +
+ - -
- -
- - - - - - - - - -
+ + + + +
+
+
\ No newline at end of file diff --git a/Views/User/showUserRegisterForm.phtml b/Views/User/showUserRegisterForm.phtml index 00c5175..f2802b8 100644 --- a/Views/User/showUserRegisterForm.phtml +++ b/Views/User/showUserRegisterForm.phtml @@ -2,36 +2,36 @@ include dirname(__DIR__).'/header.phtml'; ?> -

Benutzer erstellen

+
+
+
+

Benutzer erstellen

-
+ - $label): ?> -
- - - - - - - - - + $label): ?> +
+ + + + + + + + + - -
- -
- + +
+ +
+ - - + + - -
- - - - + + +
+
+