From c6ac3b5bf2a633ed5c97803166e3249c445b8e56 Mon Sep 17 00:00:00 2001 From: creme332 <65414576+creme332@users.noreply.github.com> Date: Thu, 16 May 2024 17:21:28 +0400 Subject: [PATCH] improve form for review submission, show product calories --- public/styles/views/Product.css | 15 ++++++++- src/views/Product.php | 58 ++++++++++++++++++++------------- 2 files changed, 50 insertions(+), 23 deletions(-) diff --git a/public/styles/views/Product.css b/public/styles/views/Product.css index 772c5721..664ce091 100644 --- a/public/styles/views/Product.css +++ b/public/styles/views/Product.css @@ -23,7 +23,7 @@ ul > li { font-size: 15px; } -.fill-star{ +.fill-star { fill: orange; } @@ -33,4 +33,17 @@ article > button { li > ul { padding-left: 5%; /* nesting indentation */ +} + +.review__rating input { + display: none; +} + +.review__rating input:checked ~ label { + color: #aaa; +} + +.review__rating label { + color: orange; + font-size: 2rem; } \ No newline at end of file diff --git a/src/views/Product.php b/src/views/Product.php index 40e83889..89873ac4 100644 --- a/src/views/Product.php +++ b/src/views/Product.php @@ -190,7 +190,6 @@ function printComment(StdClass $comment): void } ?> -
-

360 calories

+

getCalories() ?> calories

getDescription()) ?> @@ -321,33 +320,48 @@ class="close" -

Customer Reviews (getReviews()) ?>)

-
+
+

Rate this product

+

Tell others what you think

+
+ +
+ + + + + + + + + + + + + + + + + +
- -
+

Customer Reviews (getReviews()) ?>)

+
Average Rating