add public view

This commit is contained in:
2025-12-02 14:41:31 +01:00
parent 674ad5f06f
commit 6acb633c2e
4 changed files with 297 additions and 0 deletions

View File

@@ -0,0 +1,76 @@
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Calendriers de l'Avent Publics</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet" />
<style>
body {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
.card {
transition: transform 0.3s;
}
.card:hover {
transform: translateY(-10px);
}
</style>
</head>
<body>
<div class="container py-5">
<div class="text-center mb-5">
<h1 class="display-3 fw-bold mb-3">🎄 Calendriers de l'Avent publics 🎄</h1>
<p class="lead">Découvrez tous les calendriers disponibles</p>
</div>
<div class="row g-4">
{% for project in projects %}
<div class="col-md-6 col-lg-4">
<div class="card h-100 text-center text-white bg-dark bg-opacity-75 border-0 shadow-lg">
<div class="card-body p-4">
{% if project.image_url %}
<img src="{{ project.image_url }}" alt="{{ project.name }}" class="card-img-top rounded mb-3" style="max-height: 200px; object-fit: cover;" />
{% else %}
<div class="bg-secondary rounded-circle mx-auto mb-3 d-flex align-items-center justify-content-center" style="width: 120px; height: 120px;">
<i class="fas fa-gift fa-3x"></i>
</div>
{% endif %}
<h3 class="card-title mb-2">{{ project.name }}</h3>
{% if project.description %}
<p class="card-text text-light mb-3">{{ project.description }}</p>
{% endif %}
<div class="d-flex justify-content-center mb-3">
<span class="badge bg-success fs-6 px-3 py-2">
<i class="fas fa-calendar-days me-1"></i>{{ project.total_days }} jours
</span>
</div>
<a href="{{ url_for('public_project_view', project_id=project.id) }}" class="btn btn-warning btn-lg w-100">
<i class="fas fa-eye me-2"></i> Voir le calendrier
</a>
</div>
</div>
</div>
{% else %}
<div class="col-12 text-center py-5">
<i class="fas fa-calendar-times fa-5x text-muted mb-4"></i>
<h3 class="text-muted">Aucun calendrier disponible</h3>
</div>
{% endfor %}
</div>
<div class="text-center mt-5">
<a href="{{ url_for('login') }}" class="btn btn-outline-light btn-lg">
<i class="fas fa-cog me-2"></i>Administration (connexion)
</a>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>