diff --git a/app/controller/order/OrderUsecase.php b/app/controller/order/OrderUsecase.php index 2ba2463938f4feb9654430cbef1604d0bb92d737..1fc3a45e9fe4223ae0249d849be581568bc83c99 100644 --- a/app/controller/order/OrderUsecase.php +++ b/app/controller/order/OrderUsecase.php @@ -16,6 +16,7 @@ $data = [ "orders" => $orders, ]; + render('history.php', $data); } diff --git a/app/view/bookDetail.php b/app/view/bookDetail.php index 0a292db1d3318a17f6a24c1aeb6a8eceb08b9b8f..d0e964e847c8d718e0f11c539b1cfea4c71c29eb 100644 --- a/app/view/bookDetail.php +++ b/app/view/bookDetail.php @@ -25,18 +25,38 @@ </div> </div> <div class="kanan"> - <img src="/static/img/contoh_buku.png" class="book-image"><br> + <div class="justify-content-center"> + <img src="/static/img/contoh_buku.png" class="book-image"> + </div> + <div class="rating-detail justify-content-center"> + <div class="star-rating"> + <?php + $rating = $books[0]->rating; + + for ($i = 0; $i < 5; $i++) { + if ($rating > 0) { + echo("<img src=\"/static/img/full_star.png\" class=\"book-rating\">"); + $rating--; + } else { + echo("<img src=\"/static/img/starhole.png\" class=\"book-rating\">"); + } + } + ?> + </div> + <?php + $rating = $books[0]->rating; + echo(" + <div class=\"rating-number\"> + <h1> + $rating/5.0 + </h1> + </div>") + ?> + </div> + </div> </div> - <br> - <img src="/static/img/starhole.png" class="book-rating"> - <img src="/static/img/starfull.png" class="book-rating"> - <img src="/static/img/starfull.png" class="book-rating"> - <img src="/static/img/starfull.png" class="book-rating"> - <img src="/static/img/starfull.png" class="book-rating"> - - <br><h2 id="subtitle">Order</h2> Jumlah: <select id="banyak-jumlah"> diff --git a/app/view/review.php b/app/view/review.php index 2e74c76329cf2603d930bc3d64839eb8641abaeb..041fd78a59d3e531295c577bee6c8ff0bd95dd51 100644 --- a/app/view/review.php +++ b/app/view/review.php @@ -22,6 +22,7 @@ </h2> </div> <img + class="book-img" src="/static/img/contoh_buku.png" /> </div> diff --git a/public/static/css/base.css b/public/static/css/base.css index c7e1e45b0f3a6e9f04513280b780d5fee0adb9e5..8d459c1514de44a73b3fe6de50ddfd9a8e29210e 100644 --- a/public/static/css/base.css +++ b/public/static/css/base.css @@ -5,7 +5,7 @@ body { } .title { - font-size: 55px; + font-size: 40px; color: #f26600; } diff --git a/public/static/css/book_detail.css b/public/static/css/book_detail.css index 01cf0112c6a4fcb90f3cfb110af8527c845adfc2..be4ca300d62f403ab579be928e0359c4bc1476a9 100644 --- a/public/static/css/book_detail.css +++ b/public/static/css/book_detail.css @@ -13,10 +13,7 @@ body { } .kiri { - flex-grow: 5; -} - -.kanan { + width: 80%; flex-grow: 5; } @@ -36,14 +33,6 @@ body { margin-left: 5px; } -.book-image { - margin-top: 20px; - float:right; - width:160px; - border: 1px solid black; - margin-right: 20px; -} - .submit-button { font-size: 1.5em; color: white; @@ -110,5 +99,36 @@ body { .book-rating { width: 40px; + height: 40px; + float: right; + margin-top: 10px; +} + +.kanan { + display: flex; + flex-direction: column; +} + +.book-image { + margin-top: 20px; + float:right; + width:160px; + height: 160px; + margin-right: 20px; +} + +.rating-number { float: right; + display: block; + text-align: center; +} + +.rating-detail { + display: flex; + flex-direction: column; +} + +.star-rating { + display: flex; + flex-direction: row; } \ No newline at end of file diff --git a/public/static/css/review.css b/public/static/css/review.css index 6b509dbd8d784e27c4b6ef4f65cedb6a3f51b95c..33f62de055e362d8e876b74ea7f540d850123d3b 100644 --- a/public/static/css/review.css +++ b/public/static/css/review.css @@ -4,6 +4,10 @@ padding-right: 40px; } +.review-title { + width: 70%; +} + .review-title h1 { margin-bottom: 0px; } @@ -27,6 +31,11 @@ margin-right: 5px; } +.book-img { + width: 300px; + height: 300px; +} + .review-comment { width: 100%; }