Skip to main content

max / makenotwork

1.7 KB · 45 lines History Blame Raw
1 <div class="tab-docs"><a href="/docs/blog">Docs: Blog &rarr;</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 well">
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" data-tone="{{ post.status_tone }}">{{ 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 {{ crate::quasi::blog_delete_act::html(post.id.to_string().as_str())|safe }}
38 </div>
39 </td>
40 </tr>
41 {% endfor %}
42 </tbody>
43 </table>
44 {% endif %}
45