Adds landing page at root URL (/) that displays all active products with links to feedback submission forms. This replaces the requirement for users to know direct product URLs. Changes: - Added Product.load_active() method to filter and sort active products alphabetically - Created landing route blueprint with error handling and structured logging - Registered landing blueprint in app factory, replacing old index route - Created landing page template with product list and empty state - Added comprehensive contract tests (6 tests) covering active products, filtering, sorting, XSS prevention - Added integration test for complete user flow from landing page to submission form All 7 tests pass. User Story 1 (P1 - MVP) complete. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
38 lines
1.4 KiB
HTML
38 lines
1.4 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Select Product - Reklamator{% endblock %}
|
|
|
|
{% block content %}
|
|
<h1>Submit Feedback</h1>
|
|
|
|
{% if products %}
|
|
<p>Select a product to share your feedback, report issues, or suggest improvements.</p>
|
|
|
|
<div style="margin-top: 30px;">
|
|
{% for product in products %}
|
|
<div style="background-color: #f8f9fa; padding: 20px; border-radius: 4px; margin-bottom: 15px; border-left: 4px solid #3498db;">
|
|
<h2 style="margin-top: 0; margin-bottom: 10px; font-size: 1.3em;">
|
|
{{ product.name }}
|
|
</h2>
|
|
|
|
{% if product.description %}
|
|
<p style="color: #666; margin-bottom: 15px;">{{ product.description }}</p>
|
|
{% endif %}
|
|
|
|
<a href="{{ url_for('submission.form', product_slug=product.submission_url_slug) }}"
|
|
class="btn"
|
|
style="display: inline-block;">
|
|
Submit Feedback
|
|
</a>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% else %}
|
|
<div style="background-color: #fff3cd; padding: 20px; border-radius: 4px; border-left: 4px solid #ffc107; margin-top: 20px;">
|
|
<p style="margin: 0; color: #856404;">
|
|
No products are currently accepting feedback. Please check back later.
|
|
</p>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|