ojuso-map/ojusomap/templates/base.html

141 lines
5.4 KiB
HTML
Raw Normal View History

{% spaceless %}
{% load avatar_tags %}
{% load flatpages %}
{% load i18n %}
{% load leaflet_tags %}
{% load static %}
<!DOCTYPE html>
2018-03-27 04:30:56 +00:00
<html>
<meta charset="utf-8">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Noto+Sans" />
<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"/>
<title>{% block page_title %}Ojuso{% endblock %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
{# Additional Stylesheets #}
{% block stylesheets %}
<style>
.navbar-brand { padding: 5px 15px; }
.navbar-brand > img { height: 40px; }
.dropdown-menu > li > a.no-hover:hover, .dropdown-menu > li > a.no-hover:focus {
background: red;
}
.footer {
background-color: #444;
color: #ddd;
padding-top: 1em;
margin-top: 5em;
}
.linklist {
list-style-type: none;
text-align: right;
margin-left: 0;
padding-left: 0;
}
.linklist a {
color: #ddd;
text-decoration: underline;
}
.linklist a:hover {
color: #bbb;
}
.linklist-item--spacer {
margin-top: 1em;
}
}
</style>
2018-03-27 04:30:56 +00:00
{% endblock %}
<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 %}
<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 %}
{% block footer %}
<footer class="footer">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<ul class="linklist">
<li><a href="{% url 'index' %}">Map of all case studies</a>
<li><a href="/about">About us</a>
<li class="linklist-item--spacer">&copy; Ojuso 2018
</ul>
</div>
</div>
</div>
</footer>
{% endblock %}
2018-03-27 04:30:56 +00:00
{# CDN Javascript #}
<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/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
{% block scripts %}{% endblock %}
</html>
{% endspaceless %}