ojuso-map/ojusomap/templates/base.html
2017-10-09 17:37:33 +01:00

64 lines
2.2 KiB
HTML

{% spaceless %}
{% load flatpages %}
{% load i18n %}
{% load leaflet_tags %}
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<title>{% block page_title %}Ojuso{% endblock %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<script src="{% static 'map/bundle.js'%}"></script>
{# Additional Stylesheets #}
{% block stylesheets %}
<style>
.navbar-brand {padding: 5px 15px;}
.navbar-brand > img {height: 40px;}
</style>
{% endblock %}
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="{% url 'index' %}">
<img src="{% static 'map/images/ojuso-logo-black.png' %}" height="40px"/>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="#">Map <span class="sr-only">(current)</span></a>
</li>
{% get_flatpages as flatpages %}
{% for page in flatpages %}
<li class="nav-item"><a class="nav-link" href="{{page.url}}">{{page.title}}</a></li>
{% endfor %}
</ul>
</div>
{% if user.is_authenticated %}
<span>{{user}}</span>
<a class="btn btn-primary" href={% url 'auth_logout' %}>Logout</a>
{% else %}
<a style="margin: 5px;" class="btn btn-primary" href={% url 'auth_login' %}>Login</a>
<a style="margin: 5px;" class="btn btn-info" href={% url 'registration_register' %}>Register</a>
{% endif %}
</nav>
{% block content %}
{% endblock %}
</body>
{# CDN Javascript #}
<script src="//code.jquery.com/jquery-3.2.1.min.js"
integrity="sha384-xBuQ/xzmlsLoJpyjoggmTEz8OWUFM0/RC5BsqQBDX2v5cMvDHcMakNTNrHIW2I5f"
crossorigin="anonymous">
</script>
{% block scripts %}{% endblock %}
</html>
{% endspaceless %}