summaryrefslogtreecommitdiff
path: root/views/base.twig
blob: 94e5037b24d78725da8295b77feef22cf5d2d497 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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 %}