- toolbar and fixes
This commit is contained in:
Jérémy Guillot
2024-06-29 14:51:10 +02:00
parent b04055ec22
commit 858a5bed06
20 changed files with 404 additions and 68 deletions

View File

@@ -1,31 +1,49 @@
{% extends 'base.html.twig' %}
{% block toolbar %}
<div class="bg-gray-800 p-3 min-h-14">
<div class="flex flex-row items-center justify-between">
<div class="flex mr-2 items-center">
<twig:ToolBarButton icon="sync-alt" text="Tout actualiser"/>
<twig:ToolBarButton icon="rss" text="Synchro RSS"/>
<div class="min-h-14 mx-4 border-r opacity-50 border-green-500"></div>
<twig:ToolBarButton icon="search" text="Rechercher tout"/>
<twig:ToolBarButton icon="user-plus" text="Importation manuelle"/>
<div class="min-h-14 mx-4 border-r opacity-50 border-green-500"></div>
<twig:ToolBarButton icon="wrench" text="Modifier Mangas"/>
</div>
<div class="flex mr-2 items-center">
<twig:ToolBarButton icon="th-large" text="Options"/>
<div class="min-h-14 mx-4 border-r opacity-50 border-green-500"></div>
<twig:ToolBarButton icon="eye" text="Vue"/>
<twig:ToolBarButton icon="sort" text="Trier"/>
<twig:ToolBarButton icon="filter" text="Filtre"/>
</div>
</div>
</div>
{% set left_group %}
<twig:ToolBarButton icon="sync-alt" text="Tout actualiser" action="refresh"/>
<twig:ToolBarButton icon="rss" text="Synchro RSS" action="syncRss"/>
<twig:Divider/>
<twig:ToolBarButton icon="search" text="Rechercher tout" action="search"/>
<twig:ToolBarButton icon="user-plus" text="Importation manuelle" action="import"/>
<twig:Divider/>
<twig:ToolBarButton icon="wrench" text="Modifier Mangas" action="editMangas"/>
{% endset %}
{% set right_group %}
<twig:ToolBarButton icon="th-large" text="Options" action="showOptions"/>
<twig:DropdownMenu
icon="eye"
text="Vue"
items="{{ toolbarItems.viewOptions }}"
/>
<twig:Divider/>
<twig:DropdownMenu
icon="sort"
text="Trier"
items="{{ toolbarItems.sortItems }}"
/>
<twig:DropdownMenu
icon="filter"
text="Filtre"
items="{{ toolbarItems.filterItems }}"
/>
{% endset %}
<twig:Toolbar
left_group="{{ left_group }}"
right_group="{{ right_group }}"
data-action="click@window->toolbar#clickOutside"
/>
{% endblock %}
{% block body %}
<div class="w-full p-4 grid sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-8 2xl:grid-cols-12 gap-4">
{% for manga in mangas %}
<div class="bg-white overflow-hidden border border-gray-200 hover:shadow-2xl hover:border-gray-400 transition-all duration-300 flex flex-col">
<a href="{{ path('app_manga_show', { 'mangaSlug': manga.slug }) }}" class="block relative w-full pb-[150%] overflow-hidden">
<div
class="bg-white overflow-hidden border border-gray-200 hover:shadow-2xl hover:border-gray-400 transition-all duration-300 flex flex-col">
<a href="{{ path('app_manga_show', { 'mangaSlug': manga.slug }) }}"
class="block relative w-full pb-[150%] overflow-hidden">
<img src="{{ manga.imageUrl ?? 'https://placehold.co/150x220' }}" alt="{{ manga.title }}"
class="absolute top-0 left-0 w-full h-full object-cover">
</a>