bornhack-website/src/templates/base.html
Thomas Steen Rasmussen 519b85ee6a add token
2020-08-14 18:35:50 +02:00

154 lines
6.5 KiB
HTML

{% load static %}
{% load bootstrap3 %}
{% load menubutton %}
{% static "" as baseurl %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>{% block title %}BornHack{% endblock %}</title>
<!-- Bootstrap core CSS -->
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
<!-- FontAwesome CSS -->
<link href="{% static 'css/fontawesome-all-5.0.13.min.css' %}" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="{% static 'css/bornhack.css' %}" rel="stylesheet">
<!-- https://datatables.net/ -->
<link href="{% static 'css/jquery.dataTables.1.10.20.min.css' %}" rel="stylesheet">
{% bootstrap_javascript jquery=1 %}
<!-- https://datatables.net/ -->
<script src="{% static "js/jquery.dataTables.1.10.20.min.js" %}"></script>
<script src="{% static "js/moment.2.8.4.min.js" %}"></script>
<script src="{% static "js/jquery.dataTables.datatime-moment.js" %}"></script>
<!-- misc. bornhack javascript bits we want on all pages -->
<script src="{% static 'js/bornhack.js' %}"></script>
<!-- favicon.ico stuff -->
<link rel="apple-touch-icon" sizes="180x180" href="{% static 'img/favicon/apple-touch-icon.png' %}">
<link rel="icon" type="image/png" sizes="32x32" href="{% static 'img/favicon/favicon-32x32.png' %}">
<link rel="icon" type="image/png" sizes="16x16" href="{% static 'img/favicon/favicon-16x16.png' %}">
<link rel="manifest" href="{% static 'img/favicon/site.webmanifest' %}">
<link rel="mask-icon" href="{% static 'img/favicon/safari-pinned-tab.svg' %}" color="#000000">
<link rel="shortcut icon" href="{% static 'img/favicon/favicon.ico' %}">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="{% static 'img/favicon/browserconfig.xml' %}">
<meta name="theme-color" content="#000000">
<!-- Ab0bM9pRGrYRlvHuidAN6KTODwWjobAk -->
{% block extra_head %}
{% endblock %}
</head>
<body class="no-js">
{% block body %}
<div id="main" class="container container-fluid">
<nav class="navbar navbar-fixed-top">
<div class="container container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#top-navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
{% if request.resolver_match.kwargs.camp_slug and camp %}
<a class="navbar-brand" href="{% url 'camp_detail' camp_slug=camp.slug %}">
<img src="{% static camp.logo_small %}" width="200" alt="bornhack" class="img-responsive">
</a>
{% else %}
<a class="navbar-brand" href="/">
<img src="{% static 'img/logo-small.png' %}" alt="bornhack" class="img-responsive" width="200">
</a>
{% endif %}
</div>
<div id="top-navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="{% url 'news:index' %}">News</a></li>
<li><a href="{% url 'shop:index' %}">Shop</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Camps<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="{% url 'camp_detail' camp_slug='bornhack-2020' %}">BornHack 2020</a></li>
<li><a href="{% url 'camp_detail' camp_slug='bornhack-2019' %}">BornHack 2019</a></li>
<li role="separator" class="divider"></li>
<li><a href="{% url 'camp_list' %}">Camp List</a></li>
</ul>
</li>
<li><a href="{% url 'contact' %}">Contact</a></li>
<li><a href="{% url 'people' %}">People</a></li>
<li><a href="{% url 'wish_list_redirect' %}">Wishlist</a></li>
{% if request.user.is_staff %}
<li><a href="{% url 'admin:index' %}">Admin</a></li>
{% endif %}
</ul>
<ul class="nav navbar-nav navbar-right">
{% if user.is_authenticated %}
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Account<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="{% url 'profiles:detail' %}">Profile</a></li>
{% if user.orders.exists %}
{% url 'shop:order_list' as orders_list_url %}
<li><a href="{{ orders_list_url }}">Orders</a></li>
{% url 'tickets:shopticket_list' as ticket_list_url %}
<li><a href="{{ ticket_list_url }}">Tickets</a></li>
{% if user.creditnotes.exists %}
{% url 'shop:creditnote_list' as creditnote_list_url %}
<li><a href="{{ creditnote_list_url }}">Credit Notes</a></li>
{% endif %}
{% endif %}
<li role="separator" class="divider"></li>
<li><a href="{% url 'account_logout' %}">Logout</a></li>
</ul>
</li>
{% else %}
<li><a href="{% url 'account_login' %}">Login</a></li>
{% endif %}
</ul>
</div>
</div>
</nav>
{% if camp %}
<div class="row">
<div class="btn-group btn-group-justified hidden-xs">
{% include 'includes/menuitems.html' %}
</div>
<div class="btn-group-vertical visible-xs">
{% include 'includes/menuitems.html' %}
</div>
<p>
</div>
{% endif %}
{% bootstrap_messages %}
{% block content %}{% endblock %}
</div>
<footer>
<div class="col-sm-12 col-md-12 col-lg-12">
{% block footer %}
<a href="{% url 'general-terms' %}">General Terms &amp; Conditions</a> |
<a href="{% url 'conduct' %}">Code of Conduct</a> |
<a href="{% url 'privacy-policy' %}">Privacy Policy</a> |
<a href="{% url 'contact' %}">Contact</a>
{% endblock %}
</div>
</footer>
{% endblock body %}
</body>
</html>