refactor: renamed instructions to context

This commit is contained in:
Per Stark
2025-05-09 16:00:52 +02:00
parent 463c562ba7
commit 6ed49f7155
22 changed files with 111 additions and 123 deletions

View File

@@ -1,7 +1,7 @@
<div class="grid sm:grid-cols-2 lg:grid-cols-3 gap-4" id="text_content_cards">
<div class="columns-1 lg:columns-2 2xl:columns-3 gap-4" id="text_content_cards">
{% for text_content in text_contents %}
<div class="card min-w-72 bg-base-100 shadow" hx-get="/content/{{ text_content.id }}/read" hx-target="#modal"
hx-swap="innerHTML">
<div class="card cursor-pointer min-w-72 mb-4 bg-base-100 shadow break-inside-avoid-column"
hx-get="/content/{{ text_content.id }}/read" hx-target="#modal" hx-swap="innerHTML">
{% if text_content.url_info %}
<figure>
<img src="/file/{{text_content.url_info.image_id}}" alt="website screenshot" />
@@ -24,10 +24,10 @@
{{ text_content.created_at | datetimeformat(format="short", tz=user.timezone) }}
</p>
<div class="badge badge-soft badge-secondary mr-2">{{ text_content.category }}</div>
<div class="flex gap-2">
<div class="flex gap-2" hx-on:click="event.stopPropagation()">
{% if text_content.url_info %}
<button class="btn-btn-square btn-ghost btn-sm">
<a href="{{text_content.url_info.url}}">
<a href="{{text_content.url_info.url}}" target="_blank" rel="noopener noreferrer">
{% include "icons/globe_icon.html" %}
</a>
</button>

View File

@@ -15,8 +15,8 @@ class="flex flex-col flex-1 h-full"
<h3 class="text-lg font-bold">Edit Content</h3>
<div class="form-control">
<label class="floating-label">
<span class="label-text">Instructions</span>
<input type="text" name="instructions" value="{{ text_content.instructions }}" class="w-full input input-bordered">
<span class="label-text">Context</span>
<input type="text" name="context" value="{{ text_content.context }}" class="w-full input input-bordered">
</label>
</div>
<div class="form-control">