File size: 1,217 Bytes
2962f9a
 
 
a204d40
 
2962f9a
 
a204d40
2962f9a
a204d40
 
 
2962f9a
a204d40
b797ec7
 
 
 
 
2962f9a
b797ec7
 
 
 
 
 
 
 
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
26
27
28
29
30
31
32
33
<!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>
        {% set genres = [
            'aventura', 'autoajuda', 'biografia', 'ciência', 'drama', 'educação',
            'espiritualidade', 'fantasia', 'ficção', 'filosofia', 'história', 'humor',
            'mistério', 'negócios', 'não-ficção', 'poesia', 'romance', 'tecnologia', 'terror'
        ] %}

        <div class="genre-grid">
            {% for genre in genres %}
                <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 %}
        </div>
        
        <br><button type="submit">Salvar preferências</button>
    </form>
</body>
</html>