Projekt-Pracownia_Programow.../templates/displayCategory.html

73 lines
1.7 KiB
HTML
Raw Normal View History

2023-02-01 20:00:08 +01:00
<!DOCTYPE HTML>
<html>
<head>
<title>Kategorie: {{categoryName}}</title>
<link rel="stylesheet" href={{ url_for('static', filename='css/home.css') }} />
<link rel="stylesheet" href={{ url_for('static', filename='css/topStyle.css') }} />
</head>
<body>
<div id="title">
<a href="/">
<img id="logo" src= {{ url_for('static', filename='images/logo.png') }} />
</a>
<form>
<input id="searchBox" type="text" name="searchQuery">
<input id="searchButton" type="submit" value="Search">
</form>
<div id="kart">
<a class="link" href="/koszyk">
<img src={{url_for('static', filename='images/koszyk_zakupowy.png')}} id="koszykIcon" />
{{noOfItems}}
</a>
</div>
{% if not loggedIn %}
<div id="signInButton">
<a class="link" href="/loginForm">Zaloguj się</a>
</div>
{% else %}
<div class="dropdown">
<button class="dropbtn">Cześć, <br>{{firstName}}</button>
<div class="dropdown-content">
<a href="/account/orders">Twoje zamówienie</a>
<a href="/account/profile">Twój Profil</a>
<hr>
<a href="/logout">Wyloguj się</a>
</div>
</div>
{% endif %}
</div>
<div>
<h2>Produkty z Kategorii {{categoryName}}:</h2>
{% for itemData in data %}
<table>
<tr id="productName">
{% for row in itemData %}
<td>
{{row[1]}}
</td>
{% endfor %}
</tr>
<tr id="productImage">
{% for row in itemData %}
<td>
<a href="/productDescription?productId={{row[0]}}">
<img src={{ url_for('static', filename='uploads/' + row[3]) }} id="itemImage" />
</a>
</td>
{% endfor %}
</tr>
<tr id="productPrice">
{% for row in itemData %}
<td>
${{row[2]}}
</td>
{% endfor %}
</tr>
</table>
{% endfor %}
</div>
</body>
</html>