74 lines
2.0 KiB
HTML
74 lines
2.0 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>{{ post.title }} - Blog</title>
|
|
<style>
|
|
* {
|
|
font-family: monospace !important;
|
|
}
|
|
|
|
code {
|
|
background-color: #f0f0f0;
|
|
padding: 2px 4px;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
pre {
|
|
background-color: #f8f8f8;
|
|
padding: 10px;
|
|
border: 1px solid #ddd;
|
|
border-radius: 4px;
|
|
overflow-x: auto;
|
|
display: block;
|
|
margin: 1em 0;
|
|
}
|
|
|
|
pre code {
|
|
background-color: transparent;
|
|
padding: 0;
|
|
border-radius: 0;
|
|
}
|
|
</style>
|
|
</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>
|
|
<p><a href="/">[Back to Home]</a></p>
|
|
<hr size="1">
|
|
|
|
<h1>{{ post.title }}</h1>
|
|
<p><i>Posted by {{ author_username }} on {{ post.formatted_created_at() }}</i></p>
|
|
|
|
{% if !post.categories.is_empty() %}
|
|
<p>Categories: {{ post.categories }}</p>
|
|
{% endif %}
|
|
{% if !post.tags.is_empty() %}
|
|
<p>Tags: {{ post.tags }}</p>
|
|
{% endif %}
|
|
|
|
{% if post.visibility == "password_protected" %}
|
|
<p><b>[This post is password protected. In a full implementation, you'd enter a password here.]</b></p>
|
|
<hr size="1">
|
|
{% else if post.visibility == "private" && user.is_none() %}
|
|
<p><b>[This post is private and only visible to authorized users.]</b></p>
|
|
<hr size="1">
|
|
{% else %}
|
|
<hr size="1">
|
|
{{ post.rendered_content()|safe }}
|
|
<hr size="1">
|
|
{% endif %}
|
|
|
|
<p><a href="/">[Back to Home]</a></p>
|
|
</body>
|
|
|
|
</html> |