Initial plant reference and basic login
This commit is contained in:
parent
a2dba58fe4
commit
cada3c7357
31 changed files with 637 additions and 0 deletions
55
templates/base.html
Normal file
55
templates/base.html
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
{% load static %}
|
||||
{#
|
||||
|
||||
TODO:
|
||||
- fix head_content block links
|
||||
|
||||
#}
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="stylesheet" href="{% static 'style.css' %}">
|
||||
<title>{% block head_title %}Verdure: How Does Your Garden Grow{% endblock head_title %}</title>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
{% block head_content %}
|
||||
<h1>Verdure</h1>
|
||||
{% endblock head_content %}
|
||||
{% if request.user.is_authenticated %}
|
||||
<span>Hi {{ request.user.username | title }}</span>
|
||||
<a href="{% url 'planner:logout' %}">Logout</a>
|
||||
{% else %}
|
||||
<a href="{% url 'planner:login' %}">Login</a>
|
||||
<a href="{% url 'planner:register' %}">Register</a>
|
||||
{% endif %}
|
||||
<ul>
|
||||
<li><a href="{% url 'planner:index' %}">Plan</a></li>
|
||||
<li><a href="{% url 'planterteque:index' %}">Plant Library</a></li>
|
||||
</ul>
|
||||
</header>
|
||||
<main>
|
||||
{% if messages %}
|
||||
<div class="messages">
|
||||
{% for message in messages %}
|
||||
<div class="alert {% if message.tags %}alert-{{ message.tags }}"{% endif %}>
|
||||
{{ message }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% autoescape off %}
|
||||
{% block content %}
|
||||
{% endblock content %}
|
||||
{% endautoescape %}
|
||||
</main>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue