ciclos

ref: configuration

src/templates/layout.html


 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
<!doctype html>
<html lang="pt-br">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    {% block title %}
    <title>{{ title or "Feira Virtual Bem da Terra" }}</title>
    {% endblock %}
  
    <link href="/static/stylesheet.css" rel="stylesheet" />
  </head>

  <body>
    <nav class="navbar container">
      <a href="{{ url_for('basic.index') }}">Bem da Terra</a>
      <ul>
        <li> <a class="mr-5" href="{{ url_for('basic.about') }}">Sobre</a> </li>
        <li> <a class="mr-5" href="#">Contato</a> </li>
      
        {% if current_user.is_authenticated %}
          <li> <a class="mr-5" href="{{ url_for('orders.index') }}">Seus Pedidos</a> </li>
          <li> <a class="mr-5" href="{{ url_for('cycles.index') }}">Ciclos</a></li>
          {% if current_user.is_admin() %}
            <li> <a class="mr-5" href="#">Relatórios</a></li>
          {% endif %}
        {% endif %}
      </ul>

      <div class="login">
        {% if current_user.is_authenticated %}
          <span>
            Logado como {{ current_user.username }} — <a href="{{ url_for('auth.logout') }}">Sair</a>
          </span>
        {% else %}
          <a href="{{ url_for('auth.login') }}">Entrar</a><a href="{{ url_for('auth.sign_up') }}">Cadastrar</a>
        {% endif %}
      </div>
    </nav>

    <div class='container container-content'>
      {% block body %}
        
      {% endblock %}
    </div>
  </body>

</html>