vioott commited on
Commit
a204d40
·
1 Parent(s): 8267626

feat: add custom stylesheet for improved UI

Browse files
static/style.css ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ body {
2
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
3
+ background-color: #f0f2f5;
4
+ display: flex;
5
+ justify-content: center;
6
+ align-items: center;
7
+ height: 100vh;
8
+ margin: 0;
9
+ }
10
+
11
+ form {
12
+ background-color: #fff;
13
+ padding: 30px 40px;
14
+ border-radius: 10px;
15
+ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
16
+ max-width: 400px;
17
+ width: 45%;
18
+ }
19
+
20
+ h1 {
21
+ text-align: left;
22
+ color: black;
23
+ margin-bottom: 30px;
24
+ }
25
+
26
+ label {
27
+ font-weight: 500;
28
+ margin-top: 15px;
29
+ display: block;
30
+ }
31
+
32
+ input[type="text"] {
33
+ width: 100%;
34
+ padding: 10px;
35
+ margin-top: 5px;
36
+ border: 1px solid #ccc;
37
+ border-radius: 6px;
38
+ box-sizing: border-box;
39
+ }
40
+
41
+ input[type="checkbox"] {
42
+ margin-right: 6px;
43
+ }
44
+
45
+ .genre-label {
46
+ display: flex;
47
+ align-items: center;
48
+ margin-top: 8px;
49
+ font-size: 15px;
50
+ font-weight: 500;
51
+ }
52
+
53
+ button {
54
+ margin-top: 20px;
55
+ width: 100%;
56
+ padding: 12px;
57
+ background-color: #28a745;
58
+ color: white;
59
+ border: none;
60
+ border-radius: 6px;
61
+ font-size: 16px;
62
+ cursor: pointer;
63
+ }
64
+
65
+ button:hover {
66
+ background-color: #218838;
67
+ }
68
+
69
+ .chat-container {
70
+ display: flex;
71
+ justify-content: center;
72
+ align-items: flex-start;
73
+ gap: 40px;
74
+ }
75
+
76
+ .chat-box,
77
+ .response-box {
78
+ background-color: #fff;
79
+ padding: 25px 30px;
80
+ border-radius: 10px;
81
+ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
82
+ width: 45%;
83
+ font-size: 16px;
84
+ line-height: 1.6;
85
+ }
86
+
87
+ .chat-container:has(.chat-box):not(:has(.response-box)) .chat-box,
88
+ .chat-container:has(.response-box):not(:has(.chat-box)) .response-box {
89
+ width: 100%;
90
+ }
91
+
92
+ .resposta-formatada {
93
+ line-height: 1.6;
94
+ }
templates/chat.html CHANGED
@@ -1,20 +1,29 @@
1
  <!DOCTYPE html>
2
  <html>
3
  <head>
 
4
  <title>Chat com IA</title>
5
  </head>
6
  <body>
7
- <h1>Chat com a IA</h1>
8
- <p><strong>Oi, {{ history.name }}, eu sei tudo sobre livros e estou aqui para te ajudar. O que você deseja saber?</strong></p>
9
- <form method="post">
10
- <label for="question">Sua pergunta:</label><br>
11
- <input type="text" id="question" name="question" required>
12
- <button type="submit">Enviar</button>
13
- </form>
14
 
15
- {% if response %}
16
- <h2>Resposta:</h2>
17
- <p>{{ response }}</p>
18
- {% endif %}
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  </body>
20
  </html>
 
1
  <!DOCTYPE html>
2
  <html>
3
  <head>
4
+ <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
5
  <title>Chat com IA</title>
6
  </head>
7
  <body>
8
+ <div class="chat-container">
9
+ <form method="post" class="chat-box">
 
 
 
 
 
10
 
11
+ <h1>Chat com a IA</h1>
12
+
13
+ <p>Oi, {{ history.name }}, espero que esteja tendo um ótimo dia!<br>
14
+ Eu sei tudo sobre livros e estou aqui para te ajudar.<br>
15
+ O que você deseja saber?</p>
16
+
17
+ <input type="text" id="question" name="question" required>
18
+ <button type="submit">Enviar</button>
19
+ </form>
20
+
21
+ {% if response %}
22
+ <div class="response-box">
23
+ <h3>Resposta:</h3>
24
+ <div class="resposta-formatada">{{ response | safe }}</div>
25
+ </div>
26
+ {% endif %}
27
+ </div>
28
  </body>
29
  </html>
templates/profile.html CHANGED
@@ -1,23 +1,24 @@
1
  <!DOCTYPE html>
2
  <html>
3
  <head>
4
- <title>Perfil do Usuário</title>
 
5
  </head>
6
  <body>
7
- <h1>Bem-vindo, usuário {{ user_id }}</h1>
8
 
9
- <form method="POST">
10
- <label for="name">Seu nome:</label><br>
11
- <input type="text" id="name" name="name" value="{{ history.get('name', '') }}"><br><br>
12
 
13
- <p>Quais gêneros de livros você gosta?</p>
14
- {% for genre in ['ficção', 'não ficção', 'ciência', 'fantasia'] %}
15
- <input type="checkbox" id="{{ genre }}" name="preferences" value="{{ genre }}"
16
- {% if genre in history.get('preferences', []) %}checked{% endif %}>
17
- <label for="{{ genre }}">{{ genre.title() }}</label><br>
18
- {% endfor %}
19
 
20
- <br><button type="submit">Salvar preferências</button>
21
- </form>
22
  </body>
23
  </html>
 
1
  <!DOCTYPE html>
2
  <html>
3
  <head>
4
+ <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
5
+ <title>Perfil do Usuário</title>
6
  </head>
7
  <body>
8
+ <h1>Bem-vindo, usuário {{ user_id }}</h1>
9
 
10
+ <form method="POST">
11
+ <label for="name">Seu nome:</label><br>
12
+ <input type="text" id="name" name="name" value="{{ history.get('name', '') }}"><br><br>
13
 
14
+ <p>Quais gêneros de livros você gosta?</p>
15
+ {% for genre in ['ficção', 'não ficção', 'ciência', 'fantasia'] %}
16
+ <input type="checkbox" id="{{ genre }}" name="preferences" value="{{ genre }}"
17
+ {% if genre in history.get('preferences', []) %}checked{% endif %}>
18
+ <label for="{{ genre }}">{{ genre.title() }}</label><br>
19
+ {% endfor %}
20
 
21
+ <br><button type="submit">Salvar preferências</button>
22
+ </form>
23
  </body>
24
  </html>
templates/start.html CHANGED
@@ -1,21 +1,28 @@
1
  <!DOCTYPE html>
2
  <html>
3
  <head>
4
- <title>Bem-vindo!</title>
 
5
  </head>
6
  <body>
7
- <h1>Crie seu perfil</h1>
8
- <form method="POST">
9
- <label for="name">Seu nome:</label><br>
10
- <input type="text" id="name" name="name" required><br><br>
 
11
 
12
- <p>Quais gêneros de livros você gosta?</p>
13
- {% for genre in ['ficção', 'não ficção', 'ciência', 'fantasia'] %}
14
- <input type="checkbox" id="{{ genre }}" name="preferences" value="{{ genre }}">
15
- <label for="{{ genre }}">{{ genre.title() }}</label><br>
16
- {% endfor %}
 
 
 
 
 
 
 
17
 
18
- <br><button type="submit">Começar</button>
19
- </form>
20
  </body>
21
  </html>
 
1
  <!DOCTYPE html>
2
  <html>
3
  <head>
4
+ <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
5
+ <title>Bem-vindo!</title>
6
  </head>
7
  <body>
8
+
9
+ <form method="POST">
10
+ <h1>Vamos criar seu perfil?</h1>
11
+ <label for="name">Seu nome:</label>
12
+ <input type="text" id="name" name="name" required><br><br>
13
 
14
+ <p>Quais gêneros de livros você gosta?</p>
15
+
16
+ {% for genre in ['ficção', 'não-ficção', 'ciência', 'fantasia'] %}
17
+ <label class="genre-label" for="{{ genre }}">
18
+ <input type="checkbox" id="{{ genre }}" name="preferences" value="{{ genre }}">
19
+ {{ genre.title() }}
20
+ </label>
21
+ {% endfor %}
22
+
23
+ <br>
24
+ <button type="submit">Começar</button>
25
+ </form>
26
 
 
 
27
  </body>
28
  </html>