2013-11-06 04:02:37 +01:00

158 lines
7.9 KiB
HTML

{% load static from staticfiles %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="nsupdate.info team">
<title>{% block title %}{{ WWW_HOST }}{% endblock %}</title>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.1/css/bootstrap.min.css" rel="stylesheet">
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.2/css/font-awesome.min.css" rel="stylesheet">
<link href="{% static 'css/nsupdate.css' %}" rel="stylesheet">
<link rel="icon" type="image/png" href="{% static 'favicon.png' %}" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
{% include "includes/base_head.html" %}
{% block html_head %}{% endblock %}
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{% url 'home' %}"><span style="color: #00ba00">&#x2B25;</span> {{ WWW_HOST }}</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li{% if nav_home %} class="active"{% endif %}>
<a href="{% url 'home' %}">Home</a>
</li>
{% if request.user.is_authenticated %}
<li{% if nav_overview %} class="active"{% endif %}>
<a href="{% url 'overview' %}">Hosts</a>
</li>
<li{% if nav_domain_overview %} class="active"{% endif %}>
<a href="{% url 'domain_overview' %}">Domains</a>
</li>
<li{% if nav_status %} class="active"{% endif %}>
<a href="{% url 'status' %}">Status</a>
</li>
{% endif %}
<li{% if nav_about %} class="active"{% endif %}>
<a href="{% url 'about' %}">About</a>
</li>
<li>
<a href="http://nsupdateinfo.readthedocs.org/"
class="navbar-link" title="Open docs in new window" target="_blank">Documentation</a>
</li>
</ul>
<ul class="nav navbar-nav pull-right">
{% if not request.user.is_authenticated %}
<li{% if nav_register %} class="active"{% endif %}><a href="{% url 'registration_register' %}">Register</a></li>
<li{% if nav_login %} class="active"{% endif %}><a href="{% url 'auth_login' %}">Login</a></li>
{% else %}
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ request.user.username }} <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="{% url 'account_profile' %}">Profile</a></li>
<li><a href="{% url 'password_change' %}">Change password</a></li>
{% if request.user.is_staff %}
<li><a href="/admin/">Admin</a></li>
{% endif %}
<li><a href="{% url 'auth_logout' %}?next={% url 'auth_login' %}">Logout</a></li>
</ul>
</li>
{% endif %}
</ul>
</div>
</div>
</div>
{% block header %}{% endblock %}
<div class="container content wrap">
<div class="row">
<div class="col-lg-12">
<div id="message_box">
{% if not request.is_secure %}
<div class="alert alert-danger">
<button type="button" class="close" data-dismiss="alert">&times;</button>
Your (http) connection is unencrypted and thus insecure.
{% if WE_HAVE_SSL %}
Please use our <a href="https://{{ WWW_HOST }}/">secure https site</a>.
{% endif %}
{% if COOKIE_SECURE %}
At least some of the required cookies will only work on the secure https site,
expect malfunctioning on the http site.
{% endif %}
</div>
{% endif %}
{% if messages %}
{% for message in messages %}
<div class="alert {{ message.tags }}">
<button type="button" class="close" data-dismiss="alert">&times;</button>
{{ message }}
</div>
{% endfor %}
{% endif %}
</div>
</div>
</div>
{% block content %}
Here goes the content.
{% endblock %}
</div>
<div class="footer">
<div class="container">
<p class="text-muted credit">
<a href="{% url 'legal' %}">Legal notice</a>
&nbsp;|&nbsp;
<a href="http://validator.w3.org/check/referer">Valid HTML</a>
&nbsp;|&nbsp;
<a href="http://jigsaw.w3.org/css-validator/check/referer">Valid CSS</a>
</p>
</div>
</div>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.1/js/bootstrap.min.js"></script>
<div id="ip_detection" style="display: none">
{% if not request.session.ipv4 %}
<script type="text/javascript">
function insert_img_ipv4() {
$('#ip_detection').add(
'<img src="//{{ WWW_IPV4_HOST }}/detectip/{{ request.session.session_key }}/" >');
}
$(setTimeout("insert_img_ipv4()", 1000));
</script>
{% endif %}
{% if not request.session.ipv6 %}
<script type="text/javascript">
function insert_img_ipv6() {
$('#ip_detection').add(
'<img src="//{{ WWW_IPV6_HOST }}/detectip/{{ request.session.session_key }}/" >');
}
$(setTimeout("insert_img_ipv6()", 1000));
</script>
{% endif %}
{% if not request.session.ipv4 or not request.session.ipv6 %}
<script type="text/javascript">
function insert_ips() {
$.getJSON("{% url 'ajax_get_ips' %}")
.done(function(data) {
$('#ipv4').text(data['ipv4']);
$('#ipv6').text(data['ipv6']);
});
}
$(setTimeout("insert_ips()", 2000));
</script>
{% endif %}
</div>
{% include "includes/base_body.html" %}
</body>
</html>