summaryrefslogtreecommitdiff
path: root/views/http/base.twig
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-01-02 20:42:01 +0100
committerDaniel Weipert <git@mail.dweipert.de>2024-01-05 12:33:59 +0100
commitb21316248572cb27ed1f504529ad6680a473022e (patch)
treef8a2f81258cae3b1d2429fb7df5a3287954b683a /views/http/base.twig
parentf621d95f89ded05a2e916c5ee363bfe75ea37482 (diff)
gemini
Diffstat (limited to 'views/http/base.twig')
-rw-r--r--views/http/base.twig32
1 files changed, 32 insertions, 0 deletions
diff --git a/views/http/base.twig b/views/http/base.twig
new file mode 100644
index 0000000..15ddafd
--- /dev/null
+++ b/views/http/base.twig
@@ -0,0 +1,32 @@
+{% extends 'root.twig' %}
+
+{% block body %}
+<div class="wrap">
+ <header>
+ <nav>
+ <a href="/villages">Overview</a>
+ <a href="/logout">Logout</a>
+ </nav>
+ <span>Logged in as {{ session.user.username }}</span>
+ </header>
+
+ <main>
+ {% block main %}{% endblock %}
+ </main>
+
+ <footer></footer>
+
+ <div class="global-timer"></div>
+ <script>
+ const timer = document.querySelectorAll('.global-timer');
+ function setTime () {
+ const now = new Date();
+ for (const t of timer) {
+ t.innerHTML = now;
+ }
+ }
+ setTime();
+ setInterval(setTime, 1000);
+ </script>
+</div>
+{% endblock %}