| 1 |
<div class="tab-docs"><a href="/docs/blog">Docs: Blog →</a></div> |
| 2 |
|
| 3 |
<div class="content-header"> |
| 4 |
<h2 class="subsection-title">Blog Posts</h2> |
| 5 |
<a href="/dashboard/project/{{ project_slug }}/blog/new"> |
| 6 |
<button class="btn-primary">New Post</button> |
| 7 |
</a> |
| 8 |
</div> |
| 9 |
|
| 10 |
{% if posts.is_empty() %} |
| 11 |
<div class="empty-state blog-empty-state"> |
| 12 |
<p>No blog posts yet. Start writing to engage your audience.</p> |
| 13 |
<p class="blog-empty-hint">Share behind-the-scenes updates, release notes, or stories. Posts appear on your project page and in your RSS feed, bringing fans back to your storefront.</p> |
| 14 |
</div> |
| 15 |
{% else %} |
| 16 |
<table class="data-table"> |
| 17 |
<thead> |
| 18 |
<tr> |
| 19 |
<th class="col-45">Title</th> |
| 20 |
<th class="col-15">Status</th> |
| 21 |
<th class="col-20">Published</th> |
| 22 |
<th class="col-20">Actions</th> |
| 23 |
</tr> |
| 24 |
</thead> |
| 25 |
<tbody> |
| 26 |
{% for post in posts %} |
| 27 |
<tr id="post-row-{{ post.id }}"> |
| 28 |
<td> |
| 29 |
<a href="/p/{{ project_slug }}/blog/{{ post.slug }}" class="blog-post-title-link">{{ post.title }}</a> |
| 30 |
</td> |
| 31 |
<td><span class="badge {{ post.status|lowercase }}">{{ post.status }}</span></td> |
| 32 |
<td>{{ post.published_at }}</td> |
| 33 |
<td> |
| 34 |
<div class="blog-post-actions"> |
| 35 |
<a href="/p/{{ project_slug }}/blog/{{ post.slug }}" class="btn-secondary small">View</a> |
| 36 |
<a href="/dashboard/project/{{ project_slug }}/blog/new?post={{ post.id }}" class="btn-secondary small">Edit</a> |
| 37 |
<button class="btn-secondary small danger-text" |
| 38 |
hx-delete="/api/blog/{{ post.id }}" |
| 39 |
hx-target="#post-row-{{ post.id }}" |
| 40 |
hx-swap="outerHTML" |
| 41 |
hx-confirm="Delete this blog post?">Delete</button> |
| 42 |
</div> |
| 43 |
</td> |
| 44 |
</tr> |
| 45 |
{% endfor %} |
| 46 |
</tbody> |
| 47 |
</table> |
| 48 |
{% endif %} |
| 49 |
|