Files
blogsite/blog/templates/post_detail.html
T

33 lines
1.2 KiB
HTML

{% extends "base.html" %}
{% load static %}
{% block title %}{{ post.title }} - 人,是一根会思考的芦苇{% endblock %}
{% block content %}
<article>
<h1>{{ post.title }}</h1>
<div class="article-meta">
<span>{{ post.published_at|date:"Y年m月d日 H:i" }}</span>
{% if post.category %}
<span><a href="/category/{{ post.category.slug }}/" style="color: var(--text-muted); text-decoration: none;">{{ post.category.name }}</a></span>
{% endif %}
</div>
<div class="post-body">
{{ post.content|safe }}
</div>
{% if post.tags.all %}
<div class="tags">
🏷
{% for tag in post.tags.all %}
<a href="/tag/{{ tag.slug }}/">{{ tag.name }}</a>
{% endfor %}
</div>
{% endif %}
<div style="margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--text-muted); font-family: -apple-system, 'Noto Sans SC', sans-serif;">
<a href="/" style="color: var(--text-light); text-decoration: none;">← 返回首页</a>
</div>
</article>
{% endblock %}