wagtail-enap-designsystem 1.2.1.121__py3-none-any.whl → 1.2.1.123__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of wagtail-enap-designsystem might be problematic. Click here for more details.

Files changed (26) hide show
  1. enap_designsystem/blocks/__init__.py +4 -0
  2. enap_designsystem/blocks/form.py +101 -6
  3. enap_designsystem/blocks/html_blocks.py +199 -52
  4. enap_designsystem/blocks/semana_inovacao.py +7 -1
  5. enap_designsystem/middleware/aluno_sso.py +16 -0
  6. enap_designsystem/migrations/0382_alter_areaaluno_body_alter_cursoeadpage_curso_and_more.py +51080 -0
  7. enap_designsystem/migrations/0383_alter_areaaluno_body_alter_enapcomponentes_body_and_more.py +50922 -0
  8. enap_designsystem/migrations/0384_alter_areaaluno_body_alter_enapcomponentes_body_and_more.py +51606 -0
  9. enap_designsystem/migrations/0385_alter_areaaluno_body_alter_enapcomponentes_body_and_more.py +51947 -0
  10. enap_designsystem/migrations/0386_alter_areaaluno_body_alter_enapcomponentes_body_and_more.py +51809 -0
  11. enap_designsystem/models.py +0 -27
  12. enap_designsystem/templates/custom_404.html +1 -1
  13. enap_designsystem/templates/enap_designsystem/blocks/apresentacao_block.html +116 -0
  14. enap_designsystem/templates/enap_designsystem/blocks/apresentacao_simple_block.html +236 -0
  15. enap_designsystem/templates/enap_designsystem/form_templates/formulario_page.html +490 -13
  16. enap_designsystem/templates/enap_designsystem/includes/form_field.html +661 -4
  17. enap_designsystem/templates/enap_designsystem/pages/mba_especializacao.html +10 -0
  18. enap_designsystem/templates/enap_designsystem/sistema_votacao_page.html +194 -202
  19. enap_designsystem/urls.py +6 -3
  20. enap_designsystem/views.py +118 -153
  21. enap_designsystem/wagtail_hooks.py +235 -77
  22. {wagtail_enap_designsystem-1.2.1.121.dist-info → wagtail_enap_designsystem-1.2.1.123.dist-info}/METADATA +1 -1
  23. {wagtail_enap_designsystem-1.2.1.121.dist-info → wagtail_enap_designsystem-1.2.1.123.dist-info}/RECORD +26 -18
  24. {wagtail_enap_designsystem-1.2.1.121.dist-info → wagtail_enap_designsystem-1.2.1.123.dist-info}/WHEEL +0 -0
  25. {wagtail_enap_designsystem-1.2.1.121.dist-info → wagtail_enap_designsystem-1.2.1.123.dist-info}/licenses/LICENSE +0 -0
  26. {wagtail_enap_designsystem-1.2.1.121.dist-info → wagtail_enap_designsystem-1.2.1.123.dist-info}/top_level.txt +0 -0
@@ -4061,33 +4061,6 @@ class LiaPage(Page):
4061
4061
 
4062
4062
 
4063
4063
 
4064
- original_serve = Page.serve
4065
-
4066
- def custom_serve(self, request, *args, **kwargs):
4067
- """Override que captura TODOS os 404s do Wagtail"""
4068
- try:
4069
- return original_serve(self, request, *args, **kwargs)
4070
- except Http404:
4071
- print(f"🚨 404 capturado no models.py: {request.path}")
4072
-
4073
- context = {
4074
- 'request': request,
4075
- 'page_title': 'Página não encontrada - ENAP',
4076
- 'requested_path': request.path,
4077
- 'site': getattr(request, 'site', None)
4078
- }
4079
-
4080
- # 👇 AQUI VOCÊ ESCOLHE O TEMPLATE EXATO
4081
- template_name = 'errors/404.html'
4082
-
4083
- return render(request, template_name, context, status=404)
4084
-
4085
- # Substitui o método serve de TODAS as páginas Wagtail
4086
- Page.serve = custom_serve
4087
-
4088
- print("✅ Override de 404 ativado com template customizado!")
4089
-
4090
-
4091
4064
 
4092
4065
 
4093
4066
 
@@ -176,7 +176,6 @@
176
176
  flex-wrap: wrap;
177
177
  }
178
178
 
179
-
180
179
  .btn-primary {
181
180
  background: #007D7A;
182
181
  color: white;
@@ -333,6 +332,7 @@
333
332
 
334
333
  <div class="action-buttons">
335
334
  <a href="/" class="btn btn-primary">
335
+ <span>🏠</span>
336
336
  Página Inicial
337
337
  </a>
338
338
  <button onclick="history.back()" class="btn btn-secondary">
@@ -0,0 +1,116 @@
1
+ <!-- templates/blocks/apresentacao_block.html -->
2
+ {% load wagtailcore_tags %}
3
+
4
+ <section class="apresentacao-secao py-16"
5
+ style="background-color: {{ value.cor_fundo }};">
6
+
7
+ <div class="apresentacao-container mx-auto px-4">
8
+ <div class="apresentacao-wrapper mx-auto text-center">
9
+
10
+ <!-- Título -->
11
+ <h2 class="apresentacao-titulo font-bold mb-8"
12
+ style="color: {{ value.cor_titulo }};">
13
+ {{ value.titulo }}
14
+ </h2>
15
+
16
+ <!-- Quadrado de conteúdo -->
17
+ <div class="apresentacao-conteudo-box rounded-lg mb-8 shadow-lg text-left"
18
+ style="background-color: {{ value.cor_quadrado }};">
19
+ <div class="apresentacao-texto leading-relaxed"
20
+ style="color: {{ value.cor_titulo }};">
21
+ {{ value.conteudo|richtext }}
22
+ </div>
23
+ </div>
24
+
25
+ <!-- Botão -->
26
+ {% if value.botao_texto and value.botao_url %}
27
+ <div class="apresentacao-botao-wrapper flex justify-center">
28
+ <a href="{{ value.botao_url }}"
29
+ class="apresentacao-botao inline-flex items-center justify-center
30
+ px-8 font-semibold rounded-full
31
+ text-white transition-all duration-300"
32
+ style="background-color: {{ value.cor_botao }};"
33
+ onmouseover="this.style.backgroundColor='{{ value.cor_botao_hover }}'"
34
+ onmouseout="this.style.backgroundColor='{{ value.cor_botao }}'">
35
+
36
+ {% if value.botao_icone %}
37
+ <i class="apresentacao-icone {{ value.botao_icone }} mr-2"></i>
38
+ {% endif %}
39
+
40
+ {{ value.botao_texto }}
41
+ </a>
42
+ </div>
43
+ {% endif %}
44
+
45
+ </div>
46
+ </div>
47
+ </section>
48
+
49
+ <style>
50
+ .apresentacao-botao {
51
+ box-shadow: 0 4px 15px rgba(0,0,0,0.2);
52
+ font-size: 1.125rem;
53
+ padding: 12px 16px;
54
+ border-radius: 32px;
55
+ width: 200px;
56
+ gap: 20px;
57
+ }
58
+
59
+ .apresentacao-titulo {
60
+ font-size: 2.25rem;
61
+ margin-bottom: 0px;
62
+ }
63
+
64
+ @media (min-width: 768px) {
65
+ .apresentacao-titulo {
66
+ font-size: 3rem;
67
+ }
68
+ }
69
+
70
+ .apresentacao-container {
71
+ max-width: 1200px;
72
+ }
73
+
74
+ .apresentacao-wrapper {
75
+ max-width: 1142px;
76
+ display: flex;
77
+ flex-direction: column;
78
+ align-items: center;
79
+ gap: 2rem;
80
+ }
81
+
82
+ .apresentacao-conteudo-box {
83
+ padding: 60px 120px;
84
+ }
85
+
86
+ @media (min-width: 768px) {
87
+ .apresentacao-conteudo-box {
88
+ padding: 3rem;
89
+ }
90
+ }
91
+
92
+ .apresentacao-botao:hover {
93
+ transform: translateY(-2px);
94
+ box-shadow: 0 6px 20px rgba(0,0,0,0.3);
95
+ }
96
+
97
+ /* Forçar cores do richtext */
98
+ .apresentacao-secao .apresentacao-texto * {
99
+ color: inherit !important;
100
+ text-align: left;
101
+ }
102
+
103
+ .apresentacao-secao {
104
+ padding: 90px 0;
105
+ }
106
+
107
+ .apresentacao-texto {
108
+ font-size: 1.125rem;
109
+ }
110
+
111
+ .apresentacao-secao .apresentacao-texto p,
112
+ .apresentacao-secao .apresentacao-texto div,
113
+ .apresentacao-secao .apresentacao-texto span {
114
+ color: inherit !important;
115
+ }
116
+ </style>
@@ -0,0 +1,236 @@
1
+ <!-- templates/blocks/apresentacao_simple_block.html -->
2
+ {% load wagtailcore_tags %}
3
+
4
+ <section class="secao-display py-16"
5
+ style="background-color: {{ value.cor_fundo }};">
6
+
7
+ <div class="container mx-auto px-4">
8
+ <div class="max-w-6xl mx-auto">
9
+
10
+ <!-- Título -->
11
+ <h2 class="secao-cabecalho text-center font-bold mb-8"
12
+ style="color: {{ value.cor_titulo }};">
13
+ {{ value.titulo }}
14
+ </h2>
15
+
16
+ <!-- Quadrado de conteúdo -->
17
+ <div class="secao-conteudo-cartoes rounded-lg p-8 mb-12 shadow-lg"
18
+ style="background-color: {{ value.cor_quadrado }};">
19
+ <div class="secao-texto text-lg leading-relaxed"
20
+ style="color: {{ value.cor_texto }};">
21
+ {{ value.conteudo|richtext }}
22
+ </div>
23
+
24
+ <!-- Grid de Cards -->
25
+ {% if value.cards %}
26
+ <div class="secao-cartoes {{ value.grid_tipo }}">
27
+ {% for card_block in value.cards %}
28
+ {% if card_block.block_type == 'card' %}
29
+ <div class="secao-cartao">
30
+ <!-- Ícone -->
31
+ {% if card_block.value.icone %}
32
+ <div class="cartao-simbolo" style="background: {{ value.cor_texto }};">
33
+ <i class="{{ card_block.value.icone }}"></i>
34
+ </div>
35
+ {% endif %}
36
+
37
+ <!-- Título do Card -->
38
+ <h3 class="cartao-cabecalho" style="color: {{ value.cor_texto }};">
39
+ {{ card_block.value.titulo }}
40
+ </h3>
41
+
42
+ <!-- Descrição -->
43
+ <p class="cartao-texto" style="color: {{ value.cor_texto }};">
44
+ {{ card_block.value.descricao }}
45
+ </p>
46
+ </div>
47
+ {% endif %}
48
+ {% endfor %}
49
+ </div>
50
+ {% endif %}
51
+ </div>
52
+ </div>
53
+ </div>
54
+ </section>
55
+
56
+ <style>
57
+ /* Estilos gerais */
58
+ .secao-display {
59
+ padding: 90px 0;
60
+ }
61
+
62
+ .secao-cabecalho {
63
+ font-size: 2.5rem;
64
+ margin-bottom: 2rem;
65
+ }
66
+
67
+ @media (min-width: 768px) {
68
+ .secao-cabecalho {
69
+ font-size: 3.5rem;
70
+ }
71
+ }
72
+
73
+ .secao-conteudo-cartoes {
74
+ max-width: 1142px;
75
+ margin: 0 auto;
76
+ padding: 60px 30px;
77
+ }
78
+
79
+ .secao-texto {
80
+ font-size: 1.125rem;
81
+ line-height: 1.75;
82
+ }
83
+
84
+ /* Forçar cores do richtext */
85
+ .secao-display .secao-texto * {
86
+ color: inherit !important;
87
+ }
88
+
89
+ /* Grid de Cards */
90
+ .secao-cartoes {
91
+ display: grid;
92
+ gap: 2rem;
93
+ margin-top: 3rem;
94
+ }
95
+
96
+ /* Grid responsivo baseado na escolha */
97
+ .cards-grid-1 {
98
+ grid-template-columns: 1fr;
99
+ max-width: 600px;
100
+ margin-left: auto;
101
+ margin-right: auto;
102
+ }
103
+
104
+ .cards-grid-2 {
105
+ grid-template-columns: 1fr;
106
+ max-width: 800px;
107
+ margin-left: auto;
108
+ margin-right: auto;
109
+ }
110
+
111
+ @media (min-width: 768px) {
112
+ .cards-grid-2 {
113
+ grid-template-columns: repeat(2, 1fr);
114
+ }
115
+ }
116
+
117
+ .cards-grid-3 {
118
+ grid-template-columns: 1fr;
119
+ }
120
+
121
+ @media (min-width: 768px) {
122
+ .cards-grid-3 {
123
+ grid-template-columns: repeat(2, 1fr);
124
+ }
125
+ }
126
+
127
+ @media (min-width: 1024px) {
128
+ .cards-grid-3 {
129
+ grid-template-columns: repeat(3, 1fr);
130
+ }
131
+ }
132
+
133
+ .cards-grid-4 {
134
+ grid-template-columns: 1fr;
135
+ }
136
+
137
+ @media (min-width: 768px) {
138
+ .cards-grid-4 {
139
+ grid-template-columns: repeat(2, 1fr);
140
+ }
141
+ }
142
+
143
+ @media (min-width: 1024px) {
144
+ .cards-grid-4 {
145
+ grid-template-columns: repeat(4, 1fr);
146
+ }
147
+ }
148
+
149
+ .cards-grid-5 {
150
+ grid-template-columns: 1fr;
151
+ }
152
+
153
+ @media (min-width: 640px) {
154
+ .cards-grid-5 {
155
+ grid-template-columns: repeat(2, 1fr);
156
+ }
157
+ }
158
+
159
+ @media (min-width: 768px) {
160
+ .cards-grid-5 {
161
+ grid-template-columns: repeat(3, 1fr);
162
+ }
163
+ }
164
+
165
+ @media (min-width: 1024px) {
166
+ .cards-grid-5 {
167
+ grid-template-columns: repeat(4, 1fr);
168
+ }
169
+ }
170
+
171
+ @media (min-width: 1280px) {
172
+ .cards-grid-5 {
173
+ grid-template-columns: repeat(5, 1fr);
174
+ }
175
+ }
176
+
177
+ /* Estilos do Card */
178
+ .secao-cartao {
179
+ text-align: center;
180
+ padding: 1.5rem;
181
+ }
182
+
183
+ .cartao-simbolo {
184
+ margin-bottom: 1.5rem;
185
+ width: 60px;
186
+ height: 60px;
187
+ border-radius: 50%;
188
+ }
189
+
190
+ .cartao-simbolo i {
191
+ font-size: 2rem;
192
+ color: #FFFFFF;
193
+ width: 60px;
194
+ height: 60px;
195
+ border-radius: 50%;
196
+ display: flex;
197
+ align-items: center;
198
+ justify-content: center;
199
+ margin: 0 auto;
200
+ }
201
+
202
+ .cartao-cabecalho {
203
+ font-size: 1.25rem;
204
+ font-weight: 600;
205
+ color: #FFFFFF;
206
+ margin-bottom: 1rem;
207
+ line-height: 1.4;
208
+ text-align: left;
209
+ }
210
+
211
+ .cartao-texto {
212
+ font-size: 0.95rem;
213
+ color: rgba(255, 255, 255, 0.9);
214
+ line-height: 1.6;
215
+ margin: 0;
216
+ text-align: left;
217
+ }
218
+
219
+ /* Responsividade mobile */
220
+ @media (max-width: 767px) {
221
+ .secao-conteudo-cartoes {
222
+ padding: 2rem;
223
+ }
224
+
225
+ .secao-cartoes {
226
+ gap: 2.5rem;
227
+ margin-top: 2rem;
228
+ }
229
+
230
+ .cartao-simbolo i {
231
+ font-size: 2.5rem;
232
+ width: 70px;
233
+ height: 70px;
234
+ }
235
+ }
236
+ </style>