48 lines
1.6 KiB
HTML
48 lines
1.6 KiB
HTML
<!DOCTYPE html>
|
|
{% load static %}
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>
|
|
{% block title %}
|
|
Django App
|
|
{% endblock %}
|
|
</title>
|
|
<link rel="stylesheet" href="{% static 'css/style.css' %}">
|
|
<script src="{% static 'js/main.js' %}" defer></script>
|
|
</head>
|
|
<body>
|
|
<nav>
|
|
<a href="/">
|
|
<span role="img" aria-label="Home" title="Home">🏠</span>
|
|
</a> |
|
|
<a href="/about">
|
|
<span role="img" aria-label="About" title="About">😀</span>
|
|
</a> |
|
|
<a href="{% url 'post:list' %}">
|
|
<span role="img" aria-label="Posts" title="Posts">📰</span>
|
|
</a> |
|
|
{% if user.is_authenticated %}
|
|
<a href="{% url 'post:new-post' %}">
|
|
<span role="img" aria-label="New Post" title="New Post">🆕</span>
|
|
</a> |
|
|
<form class="logout" action="{% url 'users:logout' %}" method="post">
|
|
{% csrf_token %}
|
|
<button class="logout-button" aria-label="User Logout" title="User Logout">👋</button>
|
|
</form>
|
|
{% else %}
|
|
<a href="{% url 'users:register' %}">
|
|
<span role="img" aria-label="User Registration" title="User Registration">🚀</span>
|
|
</a> |
|
|
<a href="{% url 'users:login' %}">
|
|
<span role="img" aria-label="User Login" title="User Login">🔏</span>
|
|
</a>
|
|
{% endif %}
|
|
</nav>
|
|
<main>
|
|
{% block content %}
|
|
{% endblock %}
|
|
</main>
|
|
</body>
|
|
</html> |