Templates update
All checks were successful
Rust / Test (push) Successful in 6m12s
Rust / Rustfmt (push) Successful in 21s
Rust / Clippy (push) Successful in 1m36s
Rust / Code coverage (push) Successful in 4m55s

This commit is contained in:
Alphonse Paix
2025-10-06 02:51:52 +02:00
parent 04c2d2b7f5
commit da590fb7c6
11 changed files with 119 additions and 140 deletions

View File

@@ -2,7 +2,7 @@
class="block py-4 hover:bg-gray-50 px-6 transition-colors group">
<div class="flex items-start justify-between">
<div class="flex-1 min-w-0">
<div class="flex items-center space-x-2 mb-2">
<div class="mb-1">
<span class="text-sm font-medium text-gray-900">
{% if let Some(name) = comment.author %}
{{ name }}
@@ -10,14 +10,9 @@
Anonymous
{% endif %}
</span>
<span class="text-gray-400"></span>
<span class="text-xs text-gray-500">on</span>
<a href="/posts/{{ comment.post_id }}" class="text-sm text-blue-600 hover:underline truncate">
#{{ comment.post_id.to_string()[..8] }}
</a>
</div>
<p class="text-sm text-gray-700 mb-2 line-clamp-2">{{ comment.content }}</p>
<div class="flex items-center text-sm text-gray-500">
<div class="flex items-center text-xs text-gray-500 mb-1">
<svg class="w-4 h-4 mr-1.5"
fill="none"
viewBox="0 0 24 24"
@@ -29,6 +24,12 @@
{{ comment.formatted_date() }}
</time>
</div>
<div class="flex items-center text-xs text-gray-500">
<span class="mr-1">on</span>
<a href="/posts/{{ comment.post_id }}" class="text-blue-600 hover:underline truncate">
#{{ comment.post_id }}
</a>
</div>
</div>
<button hx-delete="/admin/comments/{{ comment.comment_id }}"
hx-target="#comment-{{ comment.comment_id }}"

View File

@@ -1,4 +1,4 @@
<div class="bg-white rounded-lg shadow-md border border-gray-200 mb-8">
<div class="bg-white rounded-lg shadow-md border border-gray-200">
<div class="p-6 border-b border-gray-200">
<div class="flex flex-col sm:flex-row sm:items-center sm:justify-between">
<div>
@@ -10,7 +10,7 @@
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"/>
</svg>
<span>Comments management ({{ comments_count }})</span>
<span>Comments ({{ comments_count }})</span>
</h2>
<p class="text-sm text-gray-600 mt-1">View and moderate all comments.</p>
</div>