QoL update

This commit is contained in:
Ben Mosley
2026-04-22 22:09:08 -05:00
parent 4d091a15cd
commit 7c9b904985
15 changed files with 449 additions and 291 deletions

View File

@@ -32,11 +32,21 @@
<tbody>
{% for projectpost in projectpost %}
<tr class="border-b border-[rgb(var(--border))] hover:bg-[rgb(var(--card))]/60 transition">
<td class="px-5 py-3 text-[rgb(var(--fg))] font-medium">{{ projectpost.title }}</td>
<td class="px-5 py-3 text-[rgb(var(--fg))] font-medium">
{{ projectpost.title }}
{% if projectpost.draft %}
<span class="ml-2 text-xs font-semibold bg-yellow-500/20 text-yellow-300 border border-yellow-400/40 px-2 py-0.5 rounded-full">Draft</span>
{% endif %}
</td>
<td class="px-5 py-3 text-[rgb(var(--muted))]">{{ projectpost.category }}</td>
<td class="px-5 py-3 flex flex-wrap gap-2">
<a href="{{ url_for('view_project', slug=projectpost.slug) }}" class="btn btn-ghost border-none bg-blue-600 hover:bg-blue-700 text-white">View</a>
<a href="{{ url_for('view_project', slug=projectpost.slug) }}" class="btn btn-ghost border-none bg-blue-600 hover:bg-blue-700 text-white">Preview</a>
<a href="{{ url_for('edit_project', slug=projectpost.slug) }}" class="btn btn-ghost border-none bg-yellow-500 hover:bg-yellow-600 text-white">Edit</a>
{% if projectpost.draft %}
<form action="{{ url_for('publish_project', slug=projectpost.slug) }}" method="POST">
<button type="submit" class="btn btn-ghost border-none bg-green-600 hover:bg-green-700 text-white">Publish</button>
</form>
{% endif %}
<form action="{{ url_for('delete_project', slug=projectpost.slug) }}" method="POST" onsubmit="return confirm('Delete this project?');">
<button type="submit" class="btn btn-ghost border-none bg-red-600 hover:bg-red-700 text-white">Delete</button>
</form>
@@ -74,11 +84,21 @@
<tbody>
{% for blogpost in blogpost %}
<tr class="border-b border-[rgb(var(--border))] hover:bg-[rgb(var(--card))]/60 transition">
<td class="px-5 py-3 text-[rgb(var(--fg))] font-medium">{{ blogpost.title }}</td>
<td class="px-5 py-3 text-[rgb(var(--fg))] font-medium">
{{ blogpost.title }}
{% if blogpost.draft %}
<span class="ml-2 text-xs font-semibold bg-yellow-500/20 text-yellow-300 border border-yellow-400/40 px-2 py-0.5 rounded-full">Draft</span>
{% endif %}
</td>
<td class="px-5 py-3 text-[rgb(var(--muted))]">{{ blogpost.category }}</td>
<td class="px-5 py-3 flex flex-wrap gap-2">
<a href="{{ url_for('view_blog', slug=blogpost.slug) }}" class="btn btn-ghost border-none bg-blue-600 hover:bg-blue-700 text-white">View</a>
<a href="{{ url_for('view_blog', slug=blogpost.slug) }}" class="btn btn-ghost border-none bg-blue-600 hover:bg-blue-700 text-white">Preview</a>
<a href="{{ url_for('edit_blog', slug=blogpost.slug) }}" class="btn btn-ghost border-none bg-yellow-500 hover:bg-yellow-600 text-white">Edit</a>
{% if blogpost.draft %}
<form action="{{ url_for('publish_blog', slug=blogpost.slug) }}" method="POST">
<button type="submit" class="btn btn-ghost border-none bg-green-600 hover:bg-green-700 text-white">Publish</button>
</form>
{% endif %}
<form action="{{ url_for('delete_blog', slug=blogpost.slug) }}" method="POST" onsubmit="return confirm('Delete this post?');">
<button type="submit" class="btn btn-ghost border-none bg-red-600 hover:bg-red-700 text-white">Delete</button>
</form>