Set up base template

This commit is contained in:
Joscha 2023-08-05 14:22:31 +02:00
parent feb73c96c4
commit e17483b4d6
6 changed files with 73 additions and 44 deletions

19
templates/base.html Normal file
View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>{% block title %}{% endblock %}</title>
<link rel="icon" href="/logo.svg">
<link rel="stylesheet" href="{{ base }}/base.css" />
{% block head %}{% endblock %}
</head>
<body>
<nav>
<a href="{{ base }}/"><img src="{{ base }}/logo.svg"> {{ repo_name }}</a>
</nav>
{% block body %}{% endblock %}
</body>
</html>

View file

@ -1,16 +1,5 @@
<!DOCTYPE html>
<html>
{% extends "base.html" %}
<head>
<meta charset="utf-8" />
<title>index</title>
<script type="module" src="main.js"></script>
</head>
<body>
<h1>Hello</h1>
<p>The number from the DB is {{ number }}, yay!</p>
<button id="button">Click me!</button>
</body>
</html>
{% block body %}
<h1>{{ repo_name }}</h1>
{% endblock %}