mirror of
https://github.com/perstarkse/minne.git
synced 2026-04-22 16:58:32 +02:00
feat: show content and wip editing
This commit is contained in:
40
templates/content/content_list.html
Normal file
40
templates/content/content_list.html
Normal file
@@ -0,0 +1,40 @@
|
||||
<div class="grid sm:grid-cols-2 lg:grid-cols-3 gap-4" id="text_content_cards">
|
||||
{% for text_content in text_contents %}
|
||||
<div class="card min-w-72 bg-base-100 shadow">
|
||||
<div class="card-body">
|
||||
<div class="flex items-center space-x-2">
|
||||
<div class="flex-shrink-0">
|
||||
{% if text_content.url %}
|
||||
{% include "icons/globe_icon.html" %}
|
||||
{% elif text_content.file_info %}
|
||||
{% include "icons/document_icon.html" %}
|
||||
{% else %}
|
||||
{% include "icons/chat_icon.html" %}
|
||||
{% endif %}
|
||||
</div>
|
||||
<h2 class="card-title truncate">
|
||||
{{ text_content.text }}
|
||||
</h2>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<p class="text-xs opacity-60">
|
||||
{{ text_content.created_at | datetimeformat(format="short", tz=user.timezone) }}
|
||||
</p>
|
||||
<div class="flex gap-2">
|
||||
<button hx-get="/content/{{ text_content.id }}" hx-target="#modal" hx-swap="innerHTML"
|
||||
class="btn btn-square btn-ghost btn-sm">
|
||||
{% include "icons/edit_icon.html" %}
|
||||
</button>
|
||||
<button hx-delete="/content/{{ text_content.id }}" hx-target="#text_content_cards" hx-swap="outerHTML"
|
||||
class="btn btn-square btn-ghost btn-sm">
|
||||
{% include "icons/delete_icon.html" %}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<p class="mt-2">
|
||||
{{ text_content.instructions }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
Reference in New Issue
Block a user