Massively improved styling of product pages

This commit is contained in:
2024-02-08 20:38:35 +00:00
parent b1ee09e35a
commit c55fdde3fc
3 changed files with 30 additions and 30 deletions

View File

@ -1,7 +1,8 @@
<link rel="stylesheet" href="{{ url_for('static', filename='css/products.css') }}">
<div class="product-container">
{% if products != None %}
{% if products != None %}
<p>Showing results for {{products|count}} products</p>
<div class="product-container">
{% for product in products %}
<a href="/products/{{product.id}}" class="product product-link">
<div class="product-title">{{product.name}}</div>
@ -16,5 +17,7 @@
<input type="submit" class="product-add-to-cart" value="Add to Cart" />
</a>
{% endfor %}
{% endif %}
</div>
</div>
{% else %}
<p>Sorry... We have nothing to show here!</p>
{% endif %}

View File

@ -14,28 +14,26 @@
{% endif %}
</div>
</nav>
<centre>
{% if user != None and user.role == "Seller" %}
<div class="categories">
{# List all available seller tools #}
<a href="{{url_for('main.products.display_add_product')}}" class="category">Create Products</a>
<a href="{{url_for('main.products.display_own_products')}}" class="category">View My Products</a>
<a href="{{url_for('main.stats.index')}}" class="category">View Seller Stats</a>
</div>
{% endif %}
{% if user != None and user.role == "Seller" %}
<div class="categories">
{# List all categories and ensure the selected one is highlighted #}
{% for c in categories %}
{% if category == c.name %}
<a style="color: cyan" href="{{url_for('main.products.category', category=c.name)}}" class="category">{{c.name}}</a>
{% else %}
<a href="{{url_for('main.products.category', category=c.name)}}" class="category">{{c.name}}</a>
{% endif %}
{% endfor %}
{# List all available seller tools #}
<a href="{{url_for('main.products.display_add_product')}}" class="category">Create Products</a>
<a href="{{url_for('main.products.display_own_products')}}" class="category">View My Products</a>
<a href="{{url_for('main.stats.index')}}" class="category">View Seller Stats</a>
</div>
</centre>
{% endif %}
<div class="categories">
{# List all categories and ensure the selected one is highlighted #}
{% for c in categories %}
{% if category == c.name %}
<a style="color: cyan" href="{{url_for('main.products.category', category=c.name)}}" class="category">{{c.name}}</a>
{% else %}
<a href="{{url_for('main.products.category', category=c.name)}}" class="category">{{c.name}}</a>
{% endif %}
{% endfor %}
</div>
</div>
{% with messages = get_flashed_messages(with_categories=true)%}