Files
Mangarr/templates/components/Modal.html.twig
Jérémy Guillot fafff5014c Added:
- Refactor MangaScraperService (not used everywhere now)
- Added JavascriptScraper.php
- Added alternatives slugs in Manga.php
- Improvement in manga edit form
2024-07-21 19:08:46 +02:00

34 lines
1.6 KiB
Twig

{# templates/components/Modal.html.twig #}
<div
{{ attributes }}
data-controller="modal"
data-modal-open-trigger-value="{{ openTrigger }}"
data-modal-close-trigger-value="{{ closeTrigger }}"
{% if modalId is defined %}id="{{ modalId }}"{% endif %}
>
<div data-modal-target="modal" class="fixed inset-0 z-50 overflow-y-auto hidden" aria-labelledby="modal-title" role="dialog" aria-modal="true">
<div class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
{# Backdrop #}
<div data-action="click->modal#close" class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" aria-hidden="true"></div>
{# Centrage vertical trick #}
<span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">&#8203;</span>
{# Modal panel #}
<div class="inline-block align-bottom bg-white rounded-sm text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle {{ modalClass|default('sm:max-w-lg') }} sm:w-full">
<div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
<h3 class="text-lg leading-6 font-medium text-gray-900" id="modal-title">
{{ title }}
</h3>
<div class="mt-2">
{{ block('content') }}
</div>
</div>
<div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse">
{{ block('footer') }}
</div>
</div>
</div>
</div>
</div>