mirror of
https://github.com/Rushilwiz/NewViewsNews.git
synced 2025-04-18 10:30:16 -04:00
23 lines
1.0 KiB
HTML
23 lines
1.0 KiB
HTML
{% extends "news/base.html" %}
|
|
{% block content %}
|
|
<article class="media content-section">
|
|
<img class="rounded-circle article-img" src="{{ object.author.profile.profile_pic.url}}" alt="Profile Picture">
|
|
<div class="media-body">
|
|
<div class="article-metadata">
|
|
<a class="mr-2" href="{% url 'user-articles' object.author.username %}">{{ object.author.get_full_name }}</a>
|
|
<small class="text-muted">@{{ object.author }} · {{ object.date_published }}</small>
|
|
|
|
{% if object.author == user %}
|
|
<div>
|
|
<a class="btn btn-secondary btn-sm mt-1 mb-1" href="{% url 'article-update' object.id %}">Edit article</a>
|
|
<a class="btn btn-danger btn-sm mt-1 mb-1" href="{% url 'article-delete' object.id %}">Delete article</a>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<img class="img-fluid" src="{{ object.header.url }}">
|
|
<p class="article-content font-weight-light">{{ article.content|safe }}</p>
|
|
</div>
|
|
</article>
|
|
{% endblock content %}
|