feat: restructure project, implement askama templating

This commit is contained in:
t.lettermann
2024-07-23 20:08:45 +02:00
parent b1cafda669
commit 83cee11e65
50 changed files with 536 additions and 572 deletions

View File

@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<title>{% block title %}{{ title }}{% endblock %}</title>
<script src="/assets/js/htmx.min.js.js"></script>
{% block head %}{% endblock %}
</head>
<body>
{% block body %}{% endblock %}
</body>
</html>

View File

@ -0,0 +1 @@
<div>Hello {{name}}!</div>

View File

@ -0,0 +1,23 @@
{% extends "base.html" %}
{% block title %}Phrama Libre{% endblock %}
{% block body %}
<div>
<header>
<h1>Pharma Libre</h1>
</header>
<main>
<div
id="hello"
hx-get="/hello"
hx-target="this"
hx-trigger="load"
hx-swap="outerHTML"
>
Loading...
</div>
</main>
</div>
{% endblock %}