diff options
Diffstat (limited to 'views/base.twig')
-rw-r--r-- | views/base.twig | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/views/base.twig b/views/base.twig new file mode 100644 index 0000000..94e5037 --- /dev/null +++ b/views/base.twig @@ -0,0 +1,26 @@ +{% extends 'root.twig' %} + +{% block body %} +<div class="wrap"> + <header></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 %} |