feat: Implement basic markdown rendering for post content and user-based visibility for private posts.
This commit is contained in:
@@ -12,17 +12,30 @@
|
||||
</head>
|
||||
|
||||
<body bgcolor="#FFFFFF" text="#000000" link="#0000EE" vlink="#551A8B" alink="#FF0000">
|
||||
<div style="text-align: right;">
|
||||
{% if let Some(u) = user %}
|
||||
Logged in as: <b>{{ u.username }}</b> | <form action="/__dungeon/logout" method="post" style="display: inline;">
|
||||
<input type="submit" value="Logout">
|
||||
</form>
|
||||
{% else %}
|
||||
Not logged in | <a href="/__dungeon/login">Login</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<h1>blog</h1>
|
||||
<p>Welcome to my corner of the web.</p>
|
||||
<hr size="1">
|
||||
|
||||
<h2>Public Posts</h2>
|
||||
<h2>Posts</h2>
|
||||
{% if posts.is_empty() %}
|
||||
<p>No public posts available yet.</p>
|
||||
<p>No posts available yet.</p>
|
||||
{% else %}
|
||||
{% for (post, author) in posts %}
|
||||
<p>
|
||||
<b><a href="/post/{{ post.id }}">{{ post.title }}</a></b><br>
|
||||
<b><a href="/post/{{ post.id }}">{{ post.title }}</a></b>
|
||||
{% if post.visibility == "private" %}
|
||||
<span style="background-color: #ffff00; color: #000000; padding: 0 4px; font-size: 0.8em;">PRIVATE</span>
|
||||
{% endif %}
|
||||
<br>
|
||||
<i>Posted by {{ author }} on {{ post.formatted_created_at() }}</i><br>
|
||||
{% if !post.categories.is_empty() %}
|
||||
Categories: {{ post.categories }}<br>
|
||||
|
||||
Reference in New Issue
Block a user