Manage posts on dashboard and templates fixes

This commit is contained in:
Alphonse Paix
2025-10-03 19:18:15 +02:00
parent ce8c602ddb
commit af9cbdcafb
9 changed files with 65 additions and 55 deletions

View File

@@ -10,16 +10,16 @@
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
</svg>
Posts management
<span>Posts management ({{ posts_count }})</span>
</h2>
<p class="text-sm text-gray-600 mt-1">View and manage all published posts.</p>
</div>
</div>
</div>
<div id="posts-list" class="py-6 space-y-6">
<div id="posts-list" class="space-y-6">
{% block posts %}
{% if posts.is_empty() %}
<div class="bg-gray-50 rounded-lg p-8 border-2 border-dashed border-gray-300 text-center">
<div class="p-8 text-center">
<div class="w-16 h-16 bg-gray-200 rounded-full flex items-center justify-center mx-auto mb-4">
<svg class="w-8 h-8 text-gray-500"
fill="none"
@@ -29,8 +29,8 @@
d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
</svg>
</div>
<h3 class="text-lg font-medium text-gray-900 mb-2">No posts yet</h3>
<p class="text-gray-600">Published posts will appear here.</p>
<h3 class="text-lg font-medium text-gray-900 mb-2">No data to display</h3>
<p class="text-gray-600">The request did not return any data.</p>
</div>
{% else %}
<div class="divide-y divide-gray-200">
@@ -39,7 +39,7 @@
{% endfor %}
</div>
{% endif %}
<div class="flex items-center justify-center space-x-2">
<div class="flex items-center justify-center space-x-2 mb-6">
<button hx-get="/admin/posts?page={{ posts_current_page - 1 }}"
hx-target="#posts-list"
hx-swap="innerHTML"