Skip to content
Snippets Groups Projects
Commit 49835b79 authored by Alexander Jason's avatar Alexander Jason
Browse files

fix: design

parent a7b28a6c
No related merge requests found
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<img src="<?= BASE_URL ?>/icon/close.svg" alt="Close menu" width="3%" id="btn"> <img src="<?= BASE_URL ?>/icon/close.svg" alt="Close menu" width="3%" id="btn">
<img src="<?= BASE_URL ?>/icon/menu.svg" alt="menu icon" width="3%" id="open"> <img src="<?= BASE_URL ?>/icon/menu.svg" alt="menu icon" width="3%" id="open">
</label> </label>
<div class="sidebar"> <div class="sidebar closed">
<div class="top"> <div class="top">
<img src="<?= BASE_URL ?>/images/white-logo.svg" alt="White Logo" width="80%"> <img src="<?= BASE_URL ?>/images/white-logo.svg" alt="White Logo" width="80%">
</div> </div>
......
...@@ -38,6 +38,9 @@ ...@@ -38,6 +38,9 @@
<!-- check ownership --> <!-- check ownership -->
<?php <?php
if(isset($this->data['username'])):
if(isset($this->data['own'])):
$bookIdToCheck = $this->data['book_id']; $bookIdToCheck = $this->data['book_id'];
$found = false; $found = false;
...@@ -54,6 +57,8 @@ ...@@ -54,6 +57,8 @@
Your browser does not support the audio element. Your browser does not support the audio element.
</audio> </audio>
<?php endif; ?> <?php endif; ?>
<?php endif; ?>
<?php endif; ?>
</div> </div>
<?php else : ?> <?php else : ?>
<h2 class="info">Can't find the book you're looking for!</h2> <h2 class="info">Can't find the book you're looking for!</h2>
......
...@@ -80,6 +80,8 @@ ...@@ -80,6 +80,8 @@
</div> </div>
<div class="button-container"> <div class="button-container">
<?php <?php
if(isset($this->data['username'])):
if(isset($this->data['own'])):
$bookIdToCheck = $book['book_id']; $bookIdToCheck = $book['book_id'];
$found = false; $found = false;
...@@ -90,7 +92,7 @@ ...@@ -90,7 +92,7 @@
} }
} }
if (isset($this->data['username']) && $this->data['role'] == 'customer' && !$found): if ($this->data['role'] == 'customer' && !$found):
?> ?>
<form action= "/book/buy/<?=$book['book_id']?>" method="POST"> <form action= "/book/buy/<?=$book['book_id']?>" method="POST">
<input type="submit" class="button green-reverse-button" value="Buy"></input> <input type="submit" class="button green-reverse-button" value="Buy"></input>
...@@ -107,7 +109,8 @@ ...@@ -107,7 +109,8 @@
> >
Delete Delete
</a> </a>
<?php endif;?>
<?php endif;?>
<?php endif;?> <?php endif;?>
<a type="button" class="button yellow-reverse-button" href="/book/details/<?=$book['book_id']?>">Details</a> <a type="button" class="button yellow-reverse-button" href="/book/details/<?=$book['book_id']?>">Details</a>
</div> </div>
......
...@@ -80,6 +80,10 @@ ul li:hover a img { ...@@ -80,6 +80,10 @@ ul li:hover a img {
margin-right: 4rem; margin-right: 4rem;
} }
.sidebar.closed {
left: -15vw;
}
#check { #check {
display: none; display: none;
} }
...@@ -103,18 +107,18 @@ label #open { ...@@ -103,18 +107,18 @@ label #open {
label #btn { label #btn {
z-index: 1111; z-index: 1111;
left: 15vw; left: -15vw;
color: #000000; color: #000000;
padding: 4px; padding: 4px;
transition: all 0.5s ease; transition: all 0.5s ease;
} }
#check:checked~.sidebar { #check:checked~.sidebar {
left: -15vw; left: 0vw;
} }
#check:checked~label #btn { #check:checked~label #btn {
left: -195px; left: 15vw;
} }
.section { .section {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment