feat: templates
This commit is contained in:
parent
7045e377fb
commit
8cddba74b5
8 changed files with 91 additions and 42 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
||||||
.venv
|
.venv
|
||||||
|
__pycache__
|
||||||
|
|
27
app.py
27
app.py
|
@ -1,13 +1,22 @@
|
||||||
from flask import Flask, render_template, redirect, url_for
|
#!/usr/bin/env python3
|
||||||
|
from flask import Flask, render_template, redirect, url_for
|
||||||
|
import os
|
||||||
|
|
||||||
|
services = ("httpd", "nsd", "pf", "ntp")
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
navigation = {"Imprint":"imprint"}
|
||||||
|
@app.route("/imprint")
|
||||||
|
|
||||||
@app.route("/" or "/index.html")
|
|
||||||
def root():
|
def root():
|
||||||
return render_template("template.html",page = "Page")
|
return render_template("imprint.html")
|
||||||
|
|
||||||
@app.route("/imprint.html")
|
@app.route("/about")
|
||||||
def imprint():
|
def about():
|
||||||
return render_template("template.html",page = "Imprint")
|
return render_template("about.html")
|
||||||
|
|
||||||
|
@app.route("/")
|
||||||
|
def homepage():
|
||||||
|
return render_template("homepage.html")
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
app.run(debug=True)
|
||||||
|
|
21
templates/about.html
Normal file
21
templates/about.html
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{% extends "base.html" %}
|
||||||
|
{% block title %}About{% endblock %}
|
||||||
|
{% block head %}
|
||||||
|
{{ super() }}
|
||||||
|
{% endblock %}
|
||||||
|
{% block content %}
|
||||||
|
<p>Profession: Linux Systems Engineer</p>
|
||||||
|
<p>Name: Adrian Erik Hoemann</p><p>Experience: 3Y</p>
|
||||||
|
<p>Languages: German, English</p>
|
||||||
|
<p>Programming languages: Python, Bash, POSIX Shell</p>
|
||||||
|
<p>Markup languages: HTML, MD</p>
|
||||||
|
<p>Structure languages: JSON, XML, YAML, TOML</p>
|
||||||
|
<p>Query languages: SQL</p>
|
||||||
|
<p>Services managed: SSH, DNS, DHCP, PF, UFW, NF-Tables,
|
||||||
|
RDP(XRDP, Microsoft RDP), Webserver(Apache24, Nginx, OpenBSD-httpd,
|
||||||
|
Caddy), SMB, NFS, FTP, WebDAV, Hypervisors(VMWare ESXi,
|
||||||
|
libvirt(QEMU/KVM), QEMU, Hyper-V), Kubernetes, Containers(LXD, Docker,
|
||||||
|
Podman, Jails)</p>
|
||||||
|
<p>Operating systems managed: Debian, Ubuntu, RangeeOS, FreeBSD, OPNSense, OpenBSD, NixOS</p>
|
||||||
|
{% endblock %}
|
||||||
|
|
31
templates/base.html
Normal file
31
templates/base.html
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
{% block head %}
|
||||||
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||||
|
<meta name="description" content="the main Adrianux page">
|
||||||
|
<link rel="canonical" href="https://adrianux.net/">
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css" />
|
||||||
|
<title>{% block title %}{% endblock %} - Adrianux.net</title>
|
||||||
|
{% endblock %}
|
||||||
|
</head>
|
||||||
|
<nav class="container">
|
||||||
|
<ul>
|
||||||
|
<li><a href="/">Homepage</a></li>
|
||||||
|
<li><a href="imprint">Imprint</a></li>
|
||||||
|
<li><a href="about">About</a></li>
|
||||||
|
<li><a href="https://git.adrianux.net/ahoemann">Git</a></li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<body>
|
||||||
|
<main class="container">
|
||||||
|
<h1>{{ self.title() }}</h1>
|
||||||
|
<article>{% block content %}{% endblock %}</article>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer class="container">
|
||||||
|
<p><a href="mailto:ahoemann@proton.me">ahoemann@proton.me</a></p>
|
||||||
|
© Copyright 2024 by <a href="https://adrianux.net/">Adrian Hoemann</a>.
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
8
templates/homepage.html
Normal file
8
templates/homepage.html
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{% extends "base.html" %}
|
||||||
|
{% block title %}About{% endblock %}
|
||||||
|
{% block head %}
|
||||||
|
{{ super() }}
|
||||||
|
{% endblock %}
|
||||||
|
{% block content %}
|
||||||
|
<p>This is Adrian's homepage, checkout this servers list of running services <a href="monitoring">here</a></p>
|
||||||
|
{% endblock %}
|
9
templates/imprint.html
Normal file
9
templates/imprint.html
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{% extends "base.html" %}
|
||||||
|
{% block title %}Imprint{% endblock %}
|
||||||
|
{% block head %}
|
||||||
|
{{ super() }}
|
||||||
|
{% endblock %}
|
||||||
|
{% block content %}
|
||||||
|
<p>This is a website for personal use and is not subject to German Digital Services Act §5. If you have any inquiries feel free to contact the author of this site.</p>
|
||||||
|
{% endblock %}
|
||||||
|
|
3
templates/robots.txt
Normal file
3
templates/robots.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
User-Agent: *
|
||||||
|
Disallow: /about
|
||||||
|
Disallow: /imprint
|
|
@ -1,33 +0,0 @@
|
||||||
<html lang="en" id="project-main" data-lt-installed="true"><head>
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>Adrianux.net</title>
|
|
||||||
<meta name="description" content="the main Adrianux page">
|
|
||||||
<link rel="canonical" href="https://adrianux.net/">
|
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<main>
|
|
||||||
<header>{{ page }}</header>
|
|
||||||
<nav>
|
|
||||||
<ul>
|
|
||||||
<li><a href="index.html">Homepage</a></li>
|
|
||||||
<li><a href="https://github.com/BonzaiBrains">GitHub</a></li>
|
|
||||||
<li><a href="about.html">About</a></li>
|
|
||||||
<li><a href="monit">Monitoring</a></li>
|
|
||||||
<li><a href="imprint.html">Imprint</a></li>
|
|
||||||
<li><a href="manuals.html">Manuals</a></li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
<header>Homepage</header>
|
|
||||||
<article>
|
|
||||||
Welcome to the Adrianux.net homepage, Adrian's website, feel free to check out what this VPS is currently serving. <a href="monit">here</a> or under Monitoring.
|
|
||||||
</article>
|
|
||||||
</main>
|
|
||||||
<footer>
|
|
||||||
<p>Author: Adrian Erik Hoemann</p>
|
|
||||||
<p><a href="mailto:ahoemann@proton.me">ahoemann@proton.me</a></p>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
|
|
||||||
</body></html>
|
|
Loading…
Reference in a new issue