summaryrefslogtreecommitdiff
path: root/src/templates
diff options
context:
space:
mode:
authoruser <user@node5.net>2024-03-24 00:11:00 +0100
committeruser <user@node5.net>2024-03-24 00:11:00 +0100
commitf8c85565396ee7d027fd3096c598e200037b3733 (patch)
tree0f315a00803021e2e1cfb6ac8f58730b80a5eb12 /src/templates
parent5995864720f7c6b1e53196b500e6727011b99a7c (diff)
dedicated /chart page
Diffstat (limited to 'src/templates')
-rw-r--r--src/templates/base.html18
-rw-r--r--src/templates/chart_page.html4
-rw-r--r--src/templates/index.html18
3 files changed, 25 insertions, 15 deletions
diff --git a/src/templates/base.html b/src/templates/base.html
new file mode 100644
index 0000000..93bd5e2
--- /dev/null
+++ b/src/templates/base.html
@@ -0,0 +1,18 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <title>SSH login attempts</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <link rel="stylesheet" href="/bootstrap-5.3.3-dist/css/bootstrap.min.css">
+ <script src="/chartjs/chart.umd.js" defer></script>
+ <script type="module" src="/histogram.js" defer></script>
+</head>
+<body>
+
+{% block content %}
+{% endblock %}
+
+</body>
+</html>
diff --git a/src/templates/chart_page.html b/src/templates/chart_page.html
new file mode 100644
index 0000000..0fb3028
--- /dev/null
+++ b/src/templates/chart_page.html
@@ -0,0 +1,4 @@
+{% extends 'base.html' %}
+{% block content %}
+{% include 'chart.html' %}
+{% endblock %} \ No newline at end of file
diff --git a/src/templates/index.html b/src/templates/index.html
index 8b2d0c0..698ca6b 100644
--- a/src/templates/index.html
+++ b/src/templates/index.html
@@ -1,17 +1,6 @@
-<!doctype html>
-<html lang="en">
-<head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <title>SSH login attempts</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <link rel="stylesheet" href="/bootstrap-5.3.3-dist/css/bootstrap.min.css">
- <script src="/chartjs/chart.umd.js" defer></script>
- <script type="module" src="/histogram.js" defer></script>
-</head>
-<body>
-
+{% extends 'base.html' %}
+{% block content %}
<div class="container">
<h1>SSH bots login attempts</h1>
@@ -55,5 +44,4 @@
as your next password</p>
</div>
-</body>
-</html> \ No newline at end of file
+{% endblock %} \ No newline at end of file