Add ability to hide posts from unregistered users.

This commit is contained in:
2026-09-01 19:10:33 +03:00
parent 5dc1b28ffd
commit 9c4c506168
9 changed files with 85 additions and 20 deletions
+1 -1
View File
@@ -13,7 +13,7 @@
<div class="post-grid">
{% for post in posts %}
<article class="post-card">
<div class="post-meta"><span>{{ post.category }}</span><time datetime="{{ post.created_at }}">{{ post.created_at[:10] }}</time></div>
<div class="post-meta"><span>{{ post.category }}{% if post.is_hidden %} / MEMBERS{% endif %}</span><time datetime="{{ post.created_at }}">{{ post.created_at[:10] }}</time></div>
<h2><a href="{{ url_for('post', slug=post.slug) }}">{{ post.title }}</a></h2>
<p>{{ post.excerpt }}</p>
<div class="post-foot"><span>BY {{ post.real_name or post.username }}</span><a href="{{ url_for('post', slug=post.slug) }}" aria-label="Read {{ post.title }}">→</a></div>