feat: article page
This commit is contained in:
@@ -15,14 +15,16 @@
|
||||
</div>
|
||||
<div class="archive">
|
||||
{% for post in posts %}
|
||||
<div class="one-post">
|
||||
<h2 class="post-title">{{ post.title }}</h2>
|
||||
<div class="article-info">
|
||||
<strong class="article-author">{{ post.author.first_name }}</strong>
|
||||
<div class="article-created-date">{{ post.created_date }}</div>
|
||||
<a class="post-link" href="/article/{{ post.id }}">
|
||||
<div class="one-post">
|
||||
<h2 class="post-title">{{ post.title }}</h2>
|
||||
<div class="article-info">
|
||||
<strong class="article-author">{{ post.author.first_name }}</strong>
|
||||
<div class="article-created-date">{{ post.created_date }}</div>
|
||||
</div>
|
||||
<p class="article-text">{{ post.get_excerpt }}</p>
|
||||
</div>
|
||||
<p class="article-text">{{ post.get_excerpt }}</p>
|
||||
</div>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</body>
|
||||
|
||||
29
articles/templates/article.html
Normal file
29
articles/templates/article.html
Normal file
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ post.title }}</title>
|
||||
{% load static %}
|
||||
<link rel="stylesheet" href="{% static 'index.css' %}">
|
||||
<link rel="shortcut icon" type="image/png" href="{% static 'favicon.ico' %}"/>
|
||||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<img src="{% static 'logo.svg' %}" />
|
||||
<h1>Всё про IT</h1>
|
||||
</div>
|
||||
<h1 class="article-header">{{ post.title }}</h1>
|
||||
|
||||
<div class="article-meta">
|
||||
<p>{{ post.author.first_name }}</p>
|
||||
<p>{{ post.created_date }}</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{{ post.text|linebreaks }}
|
||||
</div>
|
||||
|
||||
<p><a href="/">← Назад к списку статей</a></p>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user