78091f900f
the img tags we had were not valid due to (at first) missing src attribute (that was dynamically added by js later). new method now inserts the complete img tag, so no invalid tag is present at first and what is inserted later is a valid tag.
147 lines
7.2 KiB
HTML
147 lines
7.2 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.0/css/bootstrap.min.css" rel="stylesheet">
|
|
<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.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>
|
|
</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">⬥</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>
|
|
{% 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">×</button>
|
|
Your connection is unsecure, please use our <a href="https://{{ WWW_HOST }}/">secure https site</a>.
|
|
</div>
|
|
{% endif %}
|
|
{% if messages %}
|
|
{% for message in messages %}
|
|
<div class="alert alert-{{ message.tags }}">
|
|
<button type="button" class="close" data-dismiss="alert">×</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>
|
|
|
|
|
<a href="http://validator.w3.org/check/referer">Valid HTML</a>
|
|
|
|
|
<a href="http://jigsaw.w3.org/css-validator/check/referer">Valid CSS</a>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
|
|
<div id="ip_detection" style="display: none">
|
|
{% if not request.session.ipv4 %}
|
|
<script type="text/javascript">
|
|
function insert_src_v4() {
|
|
$('#ip_detection').add(
|
|
'<img src="//{{ WWW_IPV4_HOST }}/detectip/{{ request.session.session_key }}/" >');
|
|
};
|
|
$(setTimeout("insert_src_v4()", 1000));
|
|
function insert_ip_v4() {
|
|
$.getJSON("{% url 'ajax_get_ips' %}")
|
|
.done(function(data) {
|
|
$('#ipv4').text(data['ipv4']);
|
|
});
|
|
};
|
|
$(setTimeout("insert_ip_v4()", 2000));
|
|
</script>
|
|
{% endif %}
|
|
{% if not request.session.ipv6 %}
|
|
<script type="text/javascript">
|
|
function insert_src_v6() {
|
|
$('#ip_detection').add(
|
|
'<img src="//{{ WWW_IPV6_HOST }}/detectip/{{ request.session.session_key }}/" >');
|
|
};
|
|
$(setTimeout("insert_src_v6()", 1000));
|
|
function insert_ip_v6() {
|
|
$.getJSON("{% url 'ajax_get_ips' %}")
|
|
.done(function(data) {
|
|
$('#ipv6').text(data['ipv6']);
|
|
});
|
|
};
|
|
$(setTimeout("insert_ip_v6()", 2000));
|
|
</script>
|
|
{% endif %}
|
|
</div>
|
|
</body>
|
|
</html>
|