init
This commit is contained in:
44
app/templates/category.html
Normal file
44
app/templates/category.html
Normal file
@@ -0,0 +1,44 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ title }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section class="information-section">
|
||||
<h2>Information</h2>
|
||||
{% if contact_info.information %}
|
||||
<p>{{ contact_info.information }}</p>
|
||||
{% endif %}
|
||||
<p><strong>Email:</strong> {{ contact_info.email }}</p>
|
||||
{% if contact_info.signal %}
|
||||
<p><strong>Signal:</strong> {{ contact_info.signal }}</p>
|
||||
{% endif %}
|
||||
{% if contact_info.donation_link %}
|
||||
<p><strong>Donations:</strong> <a href="{{ contact_info.donation_link }}" target="_blank">Support us</a></p>
|
||||
{% endif %}
|
||||
</section>
|
||||
|
||||
<h2>{{ category.name }}</h2>
|
||||
<p><a href="{{ url_for('main.index') }}">← Back to all categories</a></p>
|
||||
|
||||
<div class="items-grid">
|
||||
{% for item in items %}
|
||||
<div class="item-card">
|
||||
{% if item.image_filename %}
|
||||
<img src="{{ url_for('static', filename='uploads/' + item.image_filename) }}" alt="{{ item.title }}" class="item-image">
|
||||
{% else %}
|
||||
<div class="item-image" style="background-color: #eee; display: flex; align-items: center; justify-content: center;">
|
||||
<span>No Image</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
<h3 class="item-title">{{ item.title }}</h3>
|
||||
<p class="item-price">${{ "%.2f"|format(item.price) }}</p>
|
||||
<p class="item-status status-{{ item.status|lower|replace(' ', '-') }}">{{ item.status }}</p>
|
||||
<p>{{ item.description|truncate(100) }}</p>
|
||||
</div>
|
||||
{% else %}
|
||||
<p>No items in this category</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user