Add some nav links

This commit is contained in:
Gabriel Augendre 2020-08-16 18:15:37 +02:00
parent ee52689c1c
commit 514d93788e
2 changed files with 9 additions and 3 deletions

View file

@ -1,10 +1,10 @@
{% extends 'articles/base.html' %}
{% block content %}
<h1>Articles list</h1>
<h1>{{ title }} list</h1>
{% for article in articles %}
<article>
<h2>{{ article.title }}</h2>
<h2><a href="{% url 'article-detail' pk=article.pk %}">{{ article.title }}</a></h2>
<p>{{ article.get_abstract|safe }}</p>
<p><a href="{% url 'article-detail' pk=article.pk %}">Read more</a></p>
</article>

View file

@ -3,10 +3,16 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Gabnotes</title>
<title>Gab's Notes</title>
<link rel="stylesheet" href="{% static 'style.css' %}" type="text/css">
</head>
<body>
<nav>
<a href="{% url 'articles-list' %}">Gab's Notes</a>
{% if user.is_authenticated %}
<a href="{% url 'drafts-list' %}">View drafts</a>
{% endif %}
</nav>
<div class="content">
{% block content %}
{% endblock %}