Commit ccf2b538 authored by Jakob Moser's avatar Jakob Moser
Browse files

Add index template and main blueprint

parent 0a41271d
Loading
Loading
Loading
Loading

clams/main.py

0 → 100644
+15 −0
Original line number Diff line number Diff line
from flask import Blueprint, render_template

bp = Blueprint("main", __name__)


@bp.get("/", defaults={"_": ""})
@bp.get("/<path:_>")
def index(_):
    """
    Serve the index page at /*, i.e. at any path below / and at / itself.

    We completely ignore the provided path (hence the argument name "_" and not
    something useful), because only the client-side JavaScript code will process it.
    """
    return render_template("index.html")
+11 −0
Original line number Diff line number Diff line
<!doctype html>
<html lang="de">
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <title>Assistant</title>
    </head>
    <body>
        <h1>Assistant</h1>
    </body>
</html>