ojuso-map/ojusomap/templates/base.html

97 lines
5.0 KiB
HTML
Raw Normal View History

{% spaceless %}
{% load avatar_tags %}
{% 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">
2017-11-18 16:54:44 +00:00
<link rel="stylesheet" href="{% static 'map/bootstrap/css/bootstrap.min.css' %}" />
<link rel="stylesheet" href="{% static 'map/bootstrap/css/bootstrap-theme.min.css' %}" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous"/>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Sans" />
{# Additional Stylesheets #}
{% block stylesheets %}
<style>
.navbar-brand {padding: 5px 15px;}
.navbar-brand > img {height: 40px;}
2017-11-18 16:54:44 +00:00
.dropdown-menu>li>a.no-hover:hover, .dropdown-menu>li>a.no-hover:focus {
background: red;
}
</style>
{% endblock %}
2017-11-18 16:54:44 +00:00
</head>
<body>
2017-11-18 16:54:44 +00:00
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{% url 'index' %}">
<img src="{% static 'map/images/ojuso-logo-black.png' %}" height="15px"/>
</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a href="{% url 'index' %}">{% trans 'Map' %}</a></li>
{% get_flatpages as flatpages %}
{% for page in flatpages %}
<li><a class="nav-link" href="{{page.url}}">{{page.title}}</a></li>
{% endfor %}
</ul>
<ul class="nav navbar-nav navbar-right">
{% if user.is_authenticated %}
<a class="btn btn-primary navbar-btn" href="{% url 'create' %}"><i class="fa fa-plus" aria-hidden="true"></i> New Case Study</a>
2017-11-18 16:54:44 +00:00
<li class="dropdown">
<a style="margin:-10px 0 -10px 0" class="dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<img src="{% avatar_url user %}" class="img-circle" width="40" height="40" style="position:relative;margin-right:5px"/><span>{{user}}</span>
</a>
<ul class="dropdown-menu dropdown-menu-right" style="padding-bottom:0px" aria-labelledby="navbarDropdown">
<li><a href="{% url 'avatar_change' %}"><i class="fa fa-cog" aria-hidden="true"></i> Change Avatar</a></li>
<li><a href="{% url 'profile:detail' %}"><i class="fa fa-cog" aria-hidden="true"></i> Profile</a></li>
<li role="separator" style="margin-bottom:0px"></li>
<li><a class="dropdown-item no-hover" style="background-color:red;color:white;padding:0.5rem 1.5rem" href="{% url 'auth_logout' %}"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> {% trans 'Logout' %}</a></li>
</ul>
</li>
2017-11-18 16:54:44 +00:00
{% else %}
<a style="margin: 5px;" class="btn btn-primary navbar-btn" href="{% url 'auth_login' %}">{% trans 'Login' %}</a></li>
<a style="margin: 5px;" class="btn btn-info navbar-btn" href="{% url 'registration_register' %}">{% trans 'Register' %}</a></li>
{% endif %}
</ul>
</div>
</div>
</nav>
{% if messages %}
{% for message in messages %}
2017-11-18 16:54:44 +00:00
<div class="alert alert-{{ message.tags }} alert-dismissible" role="alert">
{{ message }}
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
{% endfor %}
{% endif %}
2017-11-18 16:54:44 +00:00
{% block content %}
{% endblock %}
</body>
{# CDN Javascript #}
2017-11-18 16:54:44 +00:00
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.min.js" integrity="sha256-JmvOoLtYsmqlsWxa7mDSLMwa6dZ9rrIdtrrVYRnDRH0=" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js" integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ" crossorigin="anonymous"></script>
2017-11-18 16:54:44 +00:00
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
{% block scripts %}{% endblock %}
</html>
{% endspaceless %}