공지사항관리 기능 분리 및 개선
All checks were successful
Build And Test / build-and-push (push) Successful in 4m23s
All checks were successful
Build And Test / build-and-push (push) Successful in 4m23s
This commit is contained in:
31
blog/templates/blog/post_detail_default.html
Normal file
31
blog/templates/blog/post_detail_default.html
Normal file
@ -0,0 +1,31 @@
|
||||
{% extends "components/base.html" %}
|
||||
{% block title %}Post{% endblock %}
|
||||
|
||||
{% block main_area %}
|
||||
<!-- Title -->
|
||||
<h1 class="mt-4">{{ post.title }}</h1>
|
||||
{% if post.summary %}
|
||||
<h5 class="text-muted">{{ post.summary }}</h5>
|
||||
{% endif %}
|
||||
<!-- Author -->
|
||||
<div class="text-muted fst-italic mb-2">{{ post.created_at }}
|
||||
<br>
|
||||
by.
|
||||
{{ post.author | upper }}</div>
|
||||
<div>
|
||||
{{ post.render_markdown|safe }}
|
||||
</div>
|
||||
<hr>
|
||||
{% if post.tags.exists %}
|
||||
<i class="fa-solid fa-tags"></i>
|
||||
{% for tag in post.tags.all %}
|
||||
<span class="badge bg-primary">{{ tag }}</span>
|
||||
{% endfor %}
|
||||
<br/>
|
||||
<br/>
|
||||
{% endif %}
|
||||
<a href="{% url 'blog:post_list' %}" class="btn btn-secondary mt-3">List</a>
|
||||
{% if request.user == post.author %}
|
||||
<a href="{% url 'blog:update_post' post.pk %}" class="btn btn-warning">Edit</a>
|
||||
{% endif %}
|
||||
{% endblock %}
|
Reference in New Issue
Block a user