2024-01-05 21:16:02 +00:00
|
|
|
<div class="navbar">
|
|
|
|
<nav>
|
|
|
|
<a href="/"><img src="{{url_for('static', filename='assets/img/wmgzon.png')}}" id="logo" class="not-required" alt="WMGZON Logo"></a>
|
2024-01-15 21:47:18 +00:00
|
|
|
<form action="" method="get">
|
2024-01-05 21:16:02 +00:00
|
|
|
<input type="text" name="search" placeholder="Find your favourite products" class="search-bar">
|
|
|
|
<input type="submit" class="search-button">
|
|
|
|
</form>
|
|
|
|
{% if user != None: %}
|
|
|
|
<a href="/logout">Welcome, {{ user }}</a>
|
|
|
|
{% else %}
|
|
|
|
<a href="/login">Login/Signup</a>
|
|
|
|
{% endif %}
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
<centre>
|
|
|
|
<div class="categories">
|
2024-01-06 01:14:20 +00:00
|
|
|
{# List all categories and ensure the selected one is highlighted #}
|
|
|
|
{% for c in categories %}
|
|
|
|
{% if category == c.name %}
|
|
|
|
<a style="color: cyan" href="/products/{{c.name}}" class="category">{{c.name}}</a>
|
|
|
|
{% else %}
|
|
|
|
<a href="/products/{{c.name}}" class="category">{{c.name}}</a>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
2024-01-05 21:16:02 +00:00
|
|
|
</div>
|
2024-01-05 21:40:32 +00:00
|
|
|
</centre>
|
|
|
|
</div>
|
2023-12-31 16:59:53 +00:00
|
|
|
|
2024-01-05 21:40:32 +00:00
|
|
|
{% with messages = get_flashed_messages()%}
|
|
|
|
{% if messages %}
|
|
|
|
{% for message in messages %}
|
|
|
|
<label>
|
|
|
|
<input type="checkbox" class="alertCheckbox" autocomplete="off" />
|
|
|
|
<div class="alert error">
|
|
|
|
<span class="alertClose">X</span>
|
|
|
|
<span class="alertText">{{message}}
|
|
|
|
<br class="clear"/></span>
|
|
|
|
</div>
|
|
|
|
</label>
|
|
|
|
{% endfor%}
|
|
|
|
{% endif %}
|
|
|
|
{% endwith %}
|