File size: 862 Bytes
2962f9a
 
 
a204d40
 
2962f9a
 
a204d40
2962f9a
a204d40
 
 
2962f9a
a204d40
 
 
 
 
 
2962f9a
a204d40
 
2962f9a
 
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
<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
    <title>Perfil do Usuário</title>
</head>
<body>
    <h1>Bem-vindo, usuário {{ user_id }}</h1>

    <form method="POST">
        <label for="name">Seu nome:</label><br>
        <input type="text" id="name" name="name" value="{{ history.get('name', '') }}"><br><br>

        <p>Quais gêneros de livros você gosta?</p>
        {% for genre in ['ficção', 'não ficção', 'ciência', 'fantasia'] %}
        <input type="checkbox" id="{{ genre }}" name="preferences" value="{{ genre }}"
            {% if genre in history.get('preferences', []) %}checked{% endif %}>
        <label for="{{ genre }}">{{ genre.title() }}</label><br>
        {% endfor %}

        <br><button type="submit">Salvar preferências</button>
    </form>
</body>
</html>