feat: integrate with htmx
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
<div id="ajax-modal"
|
||||
class="fixed inset-0 w-full h-full z-50 hidden"
|
||||
{{ stimulus_controller('ajax-modal') }}
|
||||
>
|
||||
<div class="absolute inset-0 w-full h-full bg-black/80" {{ stimulus_action('ajax-modal', 'hide', 'click') }}></div>
|
||||
<div class="absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 px-4 w-full max-w-2xl">
|
||||
<div class="bg-white p-8 rounded-md">
|
||||
<div class="flex justify-between pb-4">
|
||||
<div class="text-2xl font-bold" {{ stimulus_target('ajax-modal', 'title') }}></div>
|
||||
<button type="button"
|
||||
class="inline-block"
|
||||
{{ stimulus_action('ajax-modal', 'hide') }}>
|
||||
{{ icon('close', 'w-6 h-6')}}
|
||||
</button>
|
||||
</div>
|
||||
<div class="hidden" {{ stimulus_target('ajax-modal', 'content') }}></div>
|
||||
<div {{ stimulus_target('ajax-modal', 'spinner') }}>
|
||||
{% include '_partials/_spinner.html.twig' with { 'class': 'w-8 h-8 mx-auto'} %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,28 +0,0 @@
|
||||
<div id="confirmation-modal"
|
||||
class="fixed top-0 left-0 z-50 inset-0 hidden"
|
||||
{{ stimulus_controller('confirmation-modal') }}
|
||||
>
|
||||
<div class="absolute top-0 left-0 inset-0 bg-black/80" {{ stimulus_action('confirmation-modal', 'hide', 'click') }}></div>
|
||||
<div class="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-white p-8 w-full max-w-3xl rounded-md">
|
||||
<div class="flex justify-between border-b border-gray-200 pb-2 mb-4">
|
||||
<div class="flex items-center space-x-2">
|
||||
{{ icon('alert', 'w-8 h-8') }}
|
||||
<span class="text-xl font-bold" {{ stimulus_target('confirmation-modal', 'title') }}></span>
|
||||
</div>
|
||||
<button class="inline-block" {{ stimulus_action('confirmation-modal', 'hide') }}>
|
||||
{{ icon('close', 'w-8 h-8') }}
|
||||
</button>
|
||||
</div>
|
||||
<form method="post" {{ stimulus_target('confirmation-modal', 'form') }}>
|
||||
<div {{ stimulus_target('confirmation-modal', 'content') }}></div>
|
||||
<div class="mt-6 flex items-center justify-between">
|
||||
<button type="submit" class="btn bg-red-500">
|
||||
Ja
|
||||
</button>
|
||||
<button type="button" class="btn" {{ stimulus_action('confirmation-modal', 'hide') }}>
|
||||
Abbrechen
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user