34 lines
2.0 KiB
HTML
34 lines
2.0 KiB
HTML
<div id="subscriber-{{ subscriber.id }}"
|
|
class="block py-4 hover:bg-gray-50 -mx-6 px-6 transition-colors group {% if subscriber.confirmed() %}border-l-4 border-l-green-500{% else %}border-l-4 border-l-yellow-500{% endif %}">
|
|
<div class="flex items-start justify-between">
|
|
<div class="flex-1 min-w-0">
|
|
<h3 class="text-sm font-medium text-gray-900 group-hover:text-blue-600 transition-colors mb-1 break-all">
|
|
{{ subscriber.email }}</h3>
|
|
<div class="flex items-center text-sm text-gray-500">
|
|
<svg class="w-4 h-4 mr-1.5"
|
|
fill="none"
|
|
viewBox="0 0 24 24"
|
|
stroke="currentColor">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
|
d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"/>
|
|
</svg>
|
|
<time datetime="{{ subscriber.subscribed_at }}">
|
|
{{ subscriber.formatted_date() }}
|
|
</time>
|
|
</div>
|
|
</div>
|
|
<button hx-delete="/admin/subscribers/{{ subscriber.id }}"
|
|
hx-target="#subscriber-{{ subscriber.id }}"
|
|
hx-swap="outerHTML"
|
|
hx-confirm="Are you sure you want to delete this subscriber?"
|
|
class="inline-flex items-center p-2 text-sm font-medium text-red-500 bg-red-50 border-2 border-dashed border-red-300 rounded-md hover:bg-red-100 hover:border-red-400 hover:text-red-600 transition-all duration-200 flex-shrink-0 ml-4">
|
|
<svg class="w-4 h-4 group-hover:scale-110 transition-transform"
|
|
fill="none"
|
|
viewBox="0 0 24 24"
|
|
stroke="currentColor">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
|
d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"/>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
</div> |