set front

This commit is contained in:
jleroy2023
2024-11-18 14:41:52 +01:00
parent 9bdde39dde
commit 8f75b8a125
30 changed files with 2650 additions and 18 deletions

View File

@@ -0,0 +1,90 @@
<div class="transition-all duration-150 flex px-4 py-6 w-80 ">
<div class="flex flex-col items-stretch min-h-full min-w-full pb-4 mb-6 transition-all duration-150 rounded-lg shadow-xl hover:shadow-2xl overflow-hidden bg-light-card dark:bg-dark-card">
<div class="md:flex-shrink-0">
<img src="{{ outing.getPoster() ? asset('uploads/' ~ outing.getPoster()) | imagine_filter('outings') : asset('placeholder.png') | imagine_filter('outings') }}" alt="" class="object-cover w-full rounded-lg rounded-b-none md:h-56"/>
</div>
<div class="flex items-center justify-between px-4 py-2 overflow-hidden">
<div>
{% if outing.status.label == 'Annulée' %}
<span class="text-xs font-medium text-light-danger dark:text-dark-danger uppercase">
Sortie annulée
</span>
{% elseif outing.organizer == app.user %}
<span class="text-xs font-medium text-light-success dark:text-dark-success uppercase">
Je suis l'organisateur
</span>
{% elseif outing.isUserRegistered(app.user) %}
<span class="text-xs font-medium text-light-success dark:text-dark-success uppercase">
Je suis inscrit
</span>
{% elseif outing.canRegister() %}
<span class="text-xs font-medium text-light-info dark:text-dark-success uppercase">
Inscriptions ouvertes
</span>
{% elseif outing.registrations.count == outing.registrationsMax %}
<span class="text-xs font-medium text-light-danger dark:text-dark-danger uppercase">
Sortie complète
</span>
{% elseif outing.status.label == 'Activité en cours'%}
<span class="text-xs font-medium text-light-warning dark:text-dark-warning uppercase">
Activité en cours
</span>
{% elseif outing.status.label == 'Passée' or outing.startDate|date("Y-m-d H:i:s") > "now"|date("Y-m-d H:i:s") %}
<span class="text-xs font-medium text-light-warning dark:text-dark-warning uppercase">
Sortie passée
</span>
{% else %}
<span class="text-xs font-medium text-light-danger dark:text-dark-danger uppercase">
Inscriptions fermées
</span>
{% endif %}
{% if outing.canRegister() %}
<div class="flex flex-row items-center text-light-primary dark:text-dark-primary">
<span class="text-xs font-medium uppercase">
Inscription : {{ outing.registrations.count }}/{{ outing.registrationsMax }}
</span>
</div>
{% endif %}
</div>
<div class="flex items-center">
<span class="text-xs font-medium text-light-primary dark:text-light-font uppercase">
{{ outing.startDate|date("d/m/Y") }} à {{ outing.startDate|date("H:i") }}
</span>
</div>
</div>
<hr class="border-light-primary dark:border-dark-primary"/>
<div class="flex flex-wrap items-center flex-1 px-4 py-1 text-center mx-auto overflow-hidden">
<a href="{{ path('outing_preview', {'id': outing.id}) }}" class="hover:underline">
<h2 class="text-2xl font-bold tracking-normal text-light-primary dark:text-dark-primary line-clamp-3 truncate">
{{ outing.title }}
</h2>
</a>
</div>
<hr class="border-light-primary dark:border-dark-primary"/>
<p class="line-clamp-3 w-full px-4 my-2 overflow-hidden text-sm text-justify text-light-primary dark:text-light-font">
{{ outing.description }}
</p>
<hr class="border-light-primary dark:border-dark-primary"/>
<section class="px-4 py-2 mt-2">
<div class="flex items-center justify-between">
<div class="flex items-center flex-1 overflow-hidden">
<a href="{{ path('user_show', {'pseudo':outing.organizer.pseudo}) }}" class="w-10 h-10 min-w-fit">
<img
class="object-cover rounded-full min-w-full min-h-full w-10 h-10"
src="{{ outing.organizer.getProfilePicture() ? asset('uploads/' ~ outing.organizer.getProfilePicture()) | imagine_filter('profile_navbar') : asset('profilDefault.png') | imagine_filter('profile_navbar') }}"
alt="Avatar"
/>
</a>
<div class="flex flex-col mx-2 overflow-hidden">
<a href="{{ path('user_show', {'pseudo':outing.organizer.pseudo}) }}" class="font-semibold text-light-primary dark:text-light-font hover:underline truncate" title="{{ outing.organizer.pseudo }} ({{ outing.organizer.site.name }})">
{{ outing.organizer.pseudo }}
</a>
</div>
</div>
<a href="{{ path('outing_preview', {'id':outing.id}) }}" class="font-medium text-light-primary dark:text-dark-primary hover:underline">En savoir
plus</a>
</div>
</section>
</div>
</div>