Skip to content

Commit

Permalink
Utilise JINJA2 template for unauthenticated pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Putt authored and Robert Putt committed Jan 7, 2023
1 parent cc0fb26 commit afa497d
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 86 deletions.
48 changes: 5 additions & 43 deletions hw_diag/templates/login_form.html
Original file line number Diff line number Diff line change
@@ -1,32 +1,7 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Nebra Hotspot &middot; Login</title>
<!-- Bootstrap core CSS -->
<link href="/static/css/bootstrap.min.css" rel="stylesheet">
<link rel="shortcut icon" href="/static/images/favicon.ico">
<meta name="theme-color" content="#03a9f4">
<meta name="robots" content="noindex, nofollow">
</head>
<body>
<header class="bg-white mb-4 d-flex justify-content-center">
<a href="#" class="p-3 text-center">
<img src="/static/images/nebra-logo.svg" height="32" alt="Nebra Logo" />
</a>
</header>
<section class="container pb-4">
<div class="text-center pb-4 mb-4 border-bottom border-light">
<h1>Hotspot Management</h1>
<br />
<h3>
{% if not diagnostics.AN %}
Animal Name Unavailable
{% else %}
{{ diagnostics.AN }}
{% endif %}
</h3>
{% extends 'template.html' %}
{% block title %}Login{% endblock %}

{% block body %}
<div class="row mb-4">
<div class="col-12 col-lg-3 mb-4 mb-lg-0"></div>
<div class="col-12 col-lg-6 mb-4 mb-lg-0" style="padding:20px">
Expand Down Expand Up @@ -54,17 +29,4 @@ <h3>
</div>
<div class="col-12 col-lg-3 mb-4 mb-lg-0"></div>
</div>
</div>
<div class="text-center">
{% if diagnostics.last_updated %}
<p>Last Updated: {{ diagnostics.last_updated }}</p>
{% else %}
<p>Last Updated: Never</p>
{% endif %}
<p>To get support please visit <a href="https://nebra.io/helium-support">https://nebra.io/helium-support</a></p>
<p><a href="/json">Download Diagnostics Info for Support</a></p>
<p>&copy; Nebra LTD. 2020-{{ now.year }}<p>
</div>
</section>
</body>
</html>
{% endblock %}
48 changes: 5 additions & 43 deletions hw_diag/templates/password_reset.html
Original file line number Diff line number Diff line change
@@ -1,32 +1,7 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Nebra Hotspot &middot; Login</title>
<!-- Bootstrap core CSS -->
<link href="/static/css/bootstrap.min.css" rel="stylesheet">
<link rel="shortcut icon" href="/static/images/favicon.ico">
<meta name="theme-color" content="#03a9f4">
<meta name="robots" content="noindex, nofollow">
</head>
<body>
<header class="bg-white mb-4 d-flex justify-content-center">
<a href="#" class="p-3 text-center">
<img src="/static/images/nebra-logo.svg" height="32" alt="Nebra Logo" />
</a>
</header>
<section class="container pb-4">
<div class="text-center pb-4 mb-4 border-bottom border-light">
<h1>Hotspot Management</h1>
<br />
<h3>
{% if not diagnostics.AN %}
Animal Name Unavailable
{% else %}
{{ diagnostics.AN }}
{% endif %}
</h3>
{% extends 'template.html' %}
{% block title %}Password Reset{% endblock %}

{% block body %}
<div class="row mb-4">
<div class="col-12 col-lg-3 mb-4 mb-lg-0"></div>
<div class="col-12 col-lg-6 mb-4 mb-lg-0" style="padding:20px">
Expand Down Expand Up @@ -76,17 +51,4 @@ <h3>
</div>
<div class="col-12 col-lg-3 mb-4 mb-lg-0"></div>
</div>
</div>
<div class="text-center">
{% if diagnostics.last_updated %}
<p>Last Updated: {{ diagnostics.last_updated }}</p>
{% else %}
<p>Last Updated: Never</p>
{% endif %}
<p>To get support please visit <a href="https://nebra.io/helium-support">https://nebra.io/helium-support</a></p>
<p><a href="/json">Download Diagnostics Info for Support</a></p>
<p>&copy; Nebra LTD. 2020-{{ now.year }}<p>
</div>
</section>
</body>
</html>
{% endblock %}
46 changes: 46 additions & 0 deletions hw_diag/templates/unauthenticated_template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Nebra Hotspot &middot; {% block title %}{% endblock %}</title>
<!-- Bootstrap core CSS -->
<link href="/static/css/bootstrap.min.css" rel="stylesheet">
<link rel="shortcut icon" href="/static/images/favicon.ico">
<meta name="theme-color" content="#03a9f4">
<meta name="robots" content="noindex, nofollow">
</head>
<body>
<header class="bg-white mb-4 d-flex justify-content-center">
<a href="#" class="p-3 text-center">
<img src="/static/images/nebra-logo.svg" height="32" alt="Nebra Logo" />
</a>
</header>
<section class="container pb-4">
<div class="text-center pb-4 mb-4 border-bottom border-light">
<h1>Hotspot Management</h1>
<br />
<h3>
{% if not diagnostics.AN %}
Animal Name Unavailable
{% else %}
{{ diagnostics.AN }}
{% endif %}
</h3>

{% block body %}{% endblock %}

</div>
<div class="text-center">
{% if diagnostics.last_updated %}
<p>Last Updated: {{ diagnostics.last_updated }}</p>
{% else %}
<p>Last Updated: Never</p>
{% endif %}
<p>To get support please visit <a href="https://nebra.io/helium-support">https://nebra.io/helium-support</a></p>
<p><a href="/json">Download Diagnostics Info for Support</a></p>
<p>&copy; Nebra LTD. 2020-{{ now.year }}<p>
</div>
</section>
</body>
</html>

0 comments on commit afa497d

Please sign in to comment.