Changes all images to bmp and updated tests

This commit is contained in:
Luke Else 2024-01-29 22:35:46 +00:00
parent d6d9a1479e
commit fa76e11f83
7 changed files with 22 additions and 9 deletions

View File

@ -74,7 +74,6 @@ def id(id: int):
flash(f"No Product available with id {id}", "warning") flash(f"No Product available with id {id}", "warning")
return redirect("/") return redirect("/")
print(product.name)
return render_template( return render_template(
'index.html', 'index.html',
content='product.html', content='product.html',

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

BIN
static/assets/img/cart.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 977 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

@ -86,11 +86,22 @@ nav form {
top: -2rem; top: -2rem;
} }
.vert-align {
display: flex;
align-items: center;
gap: 1rem;
}
#logo { #logo {
width: 8rem; width: 10rem;
height: auto; height: auto;
} }
#cart {
height: 4rem;
width: auto;
}
*::-webkit-scrollbar, *::-webkit-scrollbar,
*::-webkit-scrollbar-thumb { *::-webkit-scrollbar-thumb {
width: 26px; width: 26px;

View File

@ -1,15 +1,18 @@
<div class="navbar"> <div class="navbar">
<nav> <nav>
<a href="/"><img src="{{url_for('static', filename='assets/img/wmgzon.png')}}" id="logo" class="not-required" alt="WMGZON Logo"></a> <a href="/"><img src="{{url_for('static', filename='assets/img/wmgzon.bmp')}}" id="logo" class="not-required" alt="WMGZON Logo"></a>
<form action="" method="get"> <form action="" method="get">
<input type="text" name="search" placeholder="Find your favourite products" class="search-bar"> <input type="text" name="search" placeholder="Find your favourite products" class="search-bar">
<input type="submit" class="search-button"> <input type="submit" class="search-button">
</form> </form>
<div class="vert-align">
<a href="/"><img src="{{url_for('static', filename='assets/img/cart.bmp')}}" id="cart" alt="Shopping Cart"></a>
{% if user != None: %} {% if user != None: %}
<a href="/logout">Welcome, {{ user.username }}</a> <a href="/logout">Welcome, {{ user.username }}</a>
{% else %} {% else %}
<a href="/login">Login/Signup</a> <a href="/login">Login/Signup</a>
{% endif %} {% endif %}
</div>
</nav> </nav>
<centre> <centre>

View File

@ -6,7 +6,7 @@ from models.products.product import Product
product = Product( product = Product(
"product", "product",
"image.png", "brake-disk.bmp",
"description", "description",
10.00, 10.00,
1, 1,