feat(templates): add HTMX, Chart.js, EasyMDE, Quill, and DeleteModal component
The changes introduce client‑side interactivity and richer UI components, enabling markdown editing, data visualization, drag‑and‑drop, and a standardized delete confirmation flow. - New Features - Added HTMX, SortableJS, and Chart.js scripts for dynamic behavior and charts - Integrated EasyMDE CSS/JS for markdown editing - Added Quill CSS/JS for rich text editing - Created delete_modal.html component with confirmation modal - Enhancements - Updated base template to load new static assets via tailwind_cli - Improved UI consistency with Tailwind classes and styling- Bug Fixes - None
This commit is contained in:
2 files changed
+24
No files matched your search
@@ -8,6 +8,10 @@
|
||||
<script src="https://unpkg.com/htmx.org@1.9.12"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/sortablejs@1.15.0/Sortable.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.0/dist/chart.umd.min.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/easymde@2.18.0/dist/easymde.min.css">
|
||||
<script src="https://cdn.jsdelivr.net/npm/easymde@2.18.0/dist/easymde.min.js"></script>
|
||||
<link href="https://cdn.jsdelivr.net/npm/quill@2.0.2/dist/quill.snow.css" rel="stylesheet">
|
||||
<script src="https://cdn.jsdelivr.net/npm/quill@2.0.2/dist/quill.min.js"></script>
|
||||
{% load static tailwind_cli %}
|
||||
{% tailwind_css %}
|
||||
<style>[x-cloak] { display: none !important; }</style>
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<input type="checkbox" id="{{ modal_id }}" class="modal-toggle" />
|
||||
<div class="modal" role="dialog">
|
||||
<div class="modal-box text-center">
|
||||
<div class="w-16 h-16 rounded-full bg-red-100 flex items-center justify-center mx-auto mb-4">
|
||||
<svg class="w-8 h-8 text-red-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<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>
|
||||
</div>
|
||||
<h3 class="font-bold text-lg mb-2">{{ title|default:"Confirm Delete" }}</h3>
|
||||
<p class="py-4 text-gray-500">{{ message|default:"Are you sure you want to delete this item? This action cannot be undone." }}</p>
|
||||
<form method="post" action="{{ delete_url }}">
|
||||
{% csrf_token %}
|
||||
<div class="flex gap-3 justify-center">
|
||||
<button type="submit" class="btn bg-red-600 text-white hover:bg-red-700 border-0">Delete</button>
|
||||
<label for="{{ modal_id }}" class="btn btn-ghost">Cancel</label>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<label class="modal-backdrop" for="{{ modal_id }}"></label>
|
||||
</div>
|
||||
Reference in new issue
Block a user