{% extends 'base.html.twig' %} {% block title %}Promptly — Bibliothèque de prompts{% endblock %} {% block body %} {% set ptColor = tool_color_details['promptly'] %}
{# ================================================================ HERO — titre + description ================================================================ #}

Bibliothèque de prompts

{{ totalItems }} prompt{{ totalItems > 1 ? 's' : '' }} disponibles

{% include '_atoms/button/button.html.twig' with { label: 'Nouveau prompt', variant: 'primary', size: 'md', icon: 'plus', gradientFrom: ptColor.primary, gradientTo: ptColor.secondary, mobileIconOnly: true, mobileBreakpoint: 'sm', href: path('app_promptly_create_page') } only %}
{# ================================================================ RECHERCHE + TRI ================================================================ #} {# Barre de recherche — 2 lignes sur mobile, 1 ligne sur sm+ #}
{# Ligne 1 mobile : recherche + favoris #}
{% include '_atoms/icon/icon.html.twig' with { name: 'search', size: 'sm', color: 'current' } only %}
{# Favoris — visible sur toutes tailles #} {% include '_atoms/icon/icon.html.twig' with { name: 'heart', size: 'sm', color: 'current' } only %}
{# Ligne 2 mobile / suite sur sm+ : tri + filtre IA #}
{# Tri — dropdown custom #} {% set sortOptions = [ { key: 'favorites', label: 'Populaires', icon: 'heart' }, { key: 'uses', label: 'Plus utilisés', icon: 'chart' }, { key: 'recent', label: 'Récents', icon: 'clock' }, { key: 'alpha', label: 'A → Z', icon: 'sort' }, ] %} {% set sortLabel = '' %} {% for o in sortOptions %}{% if o.key == sort %}{% set sortLabel = o.label %}{% endif %}{% endfor %}
{# Filtre IA #} {% if usedAiModels is not empty %}
{% endif %}
{# ================================================================ FILTRES CATÉGORIE ================================================================ #}
{# Pill "Tous" #} Tous {# Pills catégories #} {% for category in categories %} {% set isActive = activeCategory and activeCategory.slug == category.slug %} {% set catCount = categoryCounts[category.slug] ?? 0 %} {{ category.name }} {% if catCount > 0 %} {{ catCount }} {% endif %} {% endfor %}
{# ================================================================ GRILLE ================================================================ #} {% if allItems is empty %} {% if search %}
{% include '_atoms/icon/icon.html.twig' with { name: 'search', size: 'xl', color: 'secondary' } only %}

Aucun résultat pour « {{ search }} »

Essayez d'autres mots-clés ou explorez par catégorie.

Effacer la recherche
{% elseif activeCategory %}
{% include '_atoms/icon/icon.html.twig' with { name: activeCategory.icon, size: 'xl', color: 'current' } only %}

Aucun prompt dans « {{ activeCategory.name }} »

Soyez le premier à contribuer dans cette catégorie !

Voir tous les prompts
{% else %}
{% include '_atoms/icon/icon.html.twig' with { name: 'magic-stick', size: '3xl', color: 'primary' } only %}

La bibliothèque est vide

Créez votre premier prompt ou invitez vos collègues à contribuer.

{% include '_atoms/button/button.html.twig' with { label: 'Créer le premier prompt', variant: 'primary', size: 'md', icon: 'plus', gradientFrom: ptColor.primary, gradientTo: ptColor.secondary, href: path('app_promptly_create_page') } only %}
{% endif %} {% else %}
{% for item in allItems %} {% include '_molecules/promptly-card/promptly-card.html.twig' with { item: item } only %} {% endfor %}
{% endif %} {# ── Cibles Stimulus compatibilité ── #}
{# ================================================================ MODALS PARTAGÉES ================================================================ #} {% include 'promptly/_modals.html.twig' with { categories: categories, aiModels: aiModels } only %}
{% endblock %}