aboutsummaryrefslogtreecommitdiff
path: root/templates/base.html
blob: f403d4128470f7b910e2e6a42970968d09cadb84 (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!DOCTYPE html>
<html lang="fr">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Budget — {% block title %}{% endblock title %}</title>
    <link rel="stylesheet" href="{{ assets | get(key="main.css") }}" />
    <link rel="icon" href="{{ assets | get(key="icon.png") }}">
  </head>

  <body>

    <header class="g-Header">

      <div class="g-Header__Primary">
        <div class="g-Header__Title">Budget</div>
        {% if connected_user %}
          <form action="/logout" method="POST">
            {{ connected_user.name }}
            <input class="g-Header__Logout" type="submit" value="(Déconnexion)" />
          </form>
        {% endif %}
      </div>

      {% if connected_user %}
        <div class="g-Header__Secondary">

          <a
            href="/"
            class="
              g-Header__Link
              {% if header == "Payments" %} g-Header__Link--Current {% endif %}
            "
          >
            Paiements
          </a>

          <a
            href="/incomes"
            class="
              g-Header__Link
              {% if header == "Incomes" %} g-Header__Link--Current {% endif %}
            "
          >
            Revenus
          </a>

          <a
            href="/categories"
            class="
              g-Header__Link
              {% if header == "Categories" %} g-Header__Link--Current {% endif %}
            "
          >
            Catégories
          </a>

          <a
            href="/balance"
            class="
              g-Header__Link
              {% if header == "Balance" %} g-Header__Link--Current {% endif %}
            "
          >
            Équilibre
          </a>

          <a
            href="/statistics"
            class="
              g-Header__Link
              {% if header == "Statistics" %} g-Header__Link--Current {% endif %}
            "
          >
            Statistiques
          </a>

        </div>
      {% endif %}

    </header>

    <main class="g-Main">
      {% block main %}{% endblock main %}
    </main>

    <script src="{{ assets | get(key="main.js") }}">
    </script>

  </body>
</html>