Moved login / logout links and greeting into header.

This commit is contained in:
Marcus Scholz 2020-08-04 23:16:45 +02:00
parent 66404eea87
commit c20e9c866d
2 changed files with 24 additions and 16 deletions

View File

@ -10,23 +10,40 @@
{% block title %}Urban Exploration{% endblock %}
</title>
</head>
<body>
<header class="LP-Header">
<div class="LP-Header__Logo">
<a class="LP-Link" href="#">
<img class="LP-Logo" src="{% static 'logo.png' %}" />
<a class="LP-Link" href="/">
<img src="{% static 'logo.png' %}" class="LP-Image" />
</a>
</div>
<div class="LP-Header__UserInformation">
<span class="LP-Paragraph">
{% if user.is_authenticated %}
Hi {{ user.username }}!
<a class="LP-Link" href="{% url 'logout' %}"><span class="LP-Link__Text">logout</span></a></p>
{% else %}
<p>Du bist nicht eingeloggt.</p>
<a class="LP-Link" href="{% url 'login' %}"><span class="LP-Link__Text">login</span></a> |
<a class="LP-Link" href="{% url 'signup' %}"><span class="LP-Link__Text">signup</span></a>
{% endif %}
</span>
</div>
<div class="LP-Header__Navigation">
<nav class="LP-Menu">
<nav class="LP-Menu LP-Menu">
<ul class="LP-Menu__List">
<li class="LP-Menu__Item"><a href="" class="LP-Link"><span class="LP-Link__Text">Home</span></a></li>
<li class="LP-Menu__Item"><a href="" class="LP-Link"><span class="LP-Link__Text">About</span></a></li>
<li class="LP-Menu__Item"><a href="" class="LP-Link"><span class="LP-Link__Text">Contact</span></a></li>
<li class="LP-Menu__Item"><a href="/" class="LP-Link">
<span class="LP-Link__Text">Home</span></a></li>
<li class="LP-Menu__Item"><a href="" class="LP-Link">
<span class="LP-Link__Text">About</span></a></li>
<li class="LP-Menu__Item"><a href="" class="LP-Link">
<span class="LP-Link__Text">Contact</span></a></li>
</ul>
</nav>
</div>
</header>
<article class="LP-MainContainer">
{% block maincontent %}

View File

@ -5,15 +5,6 @@
{% block maincontent %}
{% if user.is_authenticated %}
Hi {{ user.username }}!
<p><a href="{% url 'logout' %}">logout</a></p>
{% else %}
<p>Du bist nicht eingeloggt.</p>
<a href="{% url 'login' %}">login</a> |
<a href="{% url 'signup' %}">signup</a>
{% endif %}
<div class="LP-PlaceGrid">
<h1 class="LP-Headline LP-Headline">Explore the latest locations</h1>
<ul class="LP-PlaceGrid__Grid">