wagtail-enap-designsystem 1.2.1.167__py3-none-any.whl → 1.2.1.169__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.
- enap_designsystem/migrations/0440_capsulaindexpage_capsulapage_alter_areaaluno_body_and_more.py +56561 -0
- enap_designsystem/models.py +513 -0
- enap_designsystem/static/enap_designsystem/blocks/capsulas.css +708 -0
- enap_designsystem/static/enap_designsystem/blocks/pages/page_search.css +6 -11
- enap_designsystem/templates/enap_designsystem/base.html +2 -0
- enap_designsystem/templates/enap_designsystem/blocks/feature_estrutura.html +22 -23
- enap_designsystem/templates/enap_designsystem/pages/capsula_index_page.html +1012 -0
- enap_designsystem/templates/enap_designsystem/pages/capsula_page.html +1164 -0
- enap_designsystem/templates/enap_designsystem/pages/page_search.html +103 -93
- enap_designsystem/templatetags/capsula_tags.py +11 -0
- {wagtail_enap_designsystem-1.2.1.167.dist-info → wagtail_enap_designsystem-1.2.1.169.dist-info}/METADATA +1 -1
- {wagtail_enap_designsystem-1.2.1.167.dist-info → wagtail_enap_designsystem-1.2.1.169.dist-info}/RECORD +15 -10
- {wagtail_enap_designsystem-1.2.1.167.dist-info → wagtail_enap_designsystem-1.2.1.169.dist-info}/WHEEL +0 -0
- {wagtail_enap_designsystem-1.2.1.167.dist-info → wagtail_enap_designsystem-1.2.1.169.dist-info}/licenses/LICENSE +0 -0
- {wagtail_enap_designsystem-1.2.1.167.dist-info → wagtail_enap_designsystem-1.2.1.169.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,1012 @@
|
|
|
1
|
+
{# templates/enap_designsystem/pages/capsula_index_page.html #}
|
|
2
|
+
{% load static wagtailcore_tags capsula_tags %}
|
|
3
|
+
|
|
4
|
+
{% block extra_css %}
|
|
5
|
+
<style>
|
|
6
|
+
/* ============================================ */
|
|
7
|
+
/* VARIÁVEIS E CORES */
|
|
8
|
+
/* ============================================ */
|
|
9
|
+
|
|
10
|
+
:root {
|
|
11
|
+
--primary: #0c5a5a;
|
|
12
|
+
--primary-dark: #094444;
|
|
13
|
+
--primary-light: #0f7070;
|
|
14
|
+
--gray-50: #f9fafb;
|
|
15
|
+
--gray-100: #f3f4f6;
|
|
16
|
+
--gray-200: #e5e7eb;
|
|
17
|
+
--gray-300: #d1d5db;
|
|
18
|
+
--gray-400: #9ca3af;
|
|
19
|
+
--gray-500: #6b7280;
|
|
20
|
+
--gray-600: #4b5563;
|
|
21
|
+
--gray-700: #374151;
|
|
22
|
+
--gray-800: #1f2937;
|
|
23
|
+
--gray-900: #111827;
|
|
24
|
+
--blue-50: #eff6ff;
|
|
25
|
+
--blue-100: #dbeafe;
|
|
26
|
+
--blue-200: #bfdbfe;
|
|
27
|
+
--blue-600: #2563eb;
|
|
28
|
+
--red-50: #fef2f2;
|
|
29
|
+
--red-100: #fecaca;
|
|
30
|
+
--red-600: #dc2626;
|
|
31
|
+
--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
|
32
|
+
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
|
|
33
|
+
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
|
|
34
|
+
--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
|
|
35
|
+
--radius-sm: 6px;
|
|
36
|
+
--radius-md: 8px;
|
|
37
|
+
--radius-lg: 12px;
|
|
38
|
+
--radius-xl: 16px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* ============================================ */
|
|
42
|
+
/* LAYOUT PRINCIPAL */
|
|
43
|
+
/* ============================================ */
|
|
44
|
+
|
|
45
|
+
.capsulas-busca-page {
|
|
46
|
+
background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
|
|
47
|
+
min-height: 100vh;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.capsulas-busca-container {
|
|
51
|
+
max-width: 1400px;
|
|
52
|
+
margin: 0 auto;
|
|
53
|
+
padding: 2.5rem 1.5rem;
|
|
54
|
+
display: grid;
|
|
55
|
+
grid-template-columns: 360px 1fr;
|
|
56
|
+
gap: 2.5rem;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@media (max-width: 968px) {
|
|
60
|
+
.capsulas-busca-container {
|
|
61
|
+
grid-template-columns: 1fr;
|
|
62
|
+
padding: 1.5rem 1rem;
|
|
63
|
+
gap: 1.5rem;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* ============================================ */
|
|
68
|
+
/* SIDEBAR DE BUSCA E FILTROS */
|
|
69
|
+
/* ============================================ */
|
|
70
|
+
|
|
71
|
+
.busca-sidebar {
|
|
72
|
+
position: sticky;
|
|
73
|
+
top: 2rem;
|
|
74
|
+
height: fit-content;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@media (max-width: 968px) {
|
|
78
|
+
.busca-sidebar {
|
|
79
|
+
position: static;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* Campo de busca modernizado */
|
|
84
|
+
.busca-input-wrapper {
|
|
85
|
+
position: relative;
|
|
86
|
+
margin-bottom: 1.5rem;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.busca-icon {
|
|
90
|
+
position: absolute;
|
|
91
|
+
left: 1rem;
|
|
92
|
+
top: 50%;
|
|
93
|
+
transform: translateY(-50%);
|
|
94
|
+
color: var(--gray-400);
|
|
95
|
+
width: 20px;
|
|
96
|
+
height: 20px;
|
|
97
|
+
transition: color 0.2s;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.busca-input {
|
|
101
|
+
width: 100%;
|
|
102
|
+
padding: 1rem 1rem 1rem 3rem;
|
|
103
|
+
border: 2px solid var(--gray-200);
|
|
104
|
+
border-radius: var(--radius-lg);
|
|
105
|
+
font-size: 0.9375rem;
|
|
106
|
+
background: white;
|
|
107
|
+
transition: all 0.2s ease;
|
|
108
|
+
box-shadow: var(--shadow-sm);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.busca-input:hover {
|
|
112
|
+
border-color: var(--gray-300);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.busca-input:focus {
|
|
116
|
+
outline: none;
|
|
117
|
+
border-color: var(--primary);
|
|
118
|
+
box-shadow: 0 0 0 3px rgba(12, 90, 90, 0.1);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.busca-input:focus + .busca-icon {
|
|
122
|
+
color: var(--primary);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* Container de filtros */
|
|
126
|
+
.filtros-avancados {
|
|
127
|
+
background: white;
|
|
128
|
+
border: 2px solid var(--gray-200);
|
|
129
|
+
border-radius: var(--radius-lg);
|
|
130
|
+
overflow: hidden;
|
|
131
|
+
box-shadow: var(--shadow-md);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.filtros-avancados-header {
|
|
135
|
+
padding: 1.25rem 1.5rem;
|
|
136
|
+
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
|
|
137
|
+
border: none;
|
|
138
|
+
display: flex;
|
|
139
|
+
justify-content: space-between;
|
|
140
|
+
align-items: center;
|
|
141
|
+
cursor: pointer;
|
|
142
|
+
user-select: none;
|
|
143
|
+
transition: all 0.2s;
|
|
144
|
+
width: 100%;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.filtros-avancados-header:hover {
|
|
148
|
+
background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.filtros-avancados-titulo {
|
|
152
|
+
display: flex;
|
|
153
|
+
align-items: center;
|
|
154
|
+
gap: 0.625rem;
|
|
155
|
+
font-weight: 600;
|
|
156
|
+
color: white;
|
|
157
|
+
font-size: 1.0625rem;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.filtros-icon {
|
|
161
|
+
width: 22px;
|
|
162
|
+
height: 22px;
|
|
163
|
+
color: white;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.toggle-icon {
|
|
167
|
+
width: 20px;
|
|
168
|
+
height: 20px;
|
|
169
|
+
color: white;
|
|
170
|
+
transition: transform 0.3s ease;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.filtros-avancados-header[aria-expanded="false"] .toggle-icon {
|
|
174
|
+
transform: rotate(-90deg);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.filtros-content {
|
|
178
|
+
padding: 1.75rem 1.5rem;
|
|
179
|
+
max-height: 600px;
|
|
180
|
+
overflow-y: auto;
|
|
181
|
+
scrollbar-width: thin;
|
|
182
|
+
scrollbar-color: var(--gray-300) var(--gray-100);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.filtros-content::-webkit-scrollbar {
|
|
186
|
+
width: 6px;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.filtros-content::-webkit-scrollbar-track {
|
|
190
|
+
background: var(--gray-100);
|
|
191
|
+
border-radius: 3px;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.filtros-content::-webkit-scrollbar-thumb {
|
|
195
|
+
background: var(--gray-300);
|
|
196
|
+
border-radius: 3px;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.filtros-content::-webkit-scrollbar-thumb:hover {
|
|
200
|
+
background: var(--gray-400);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.filtros-content[hidden] {
|
|
204
|
+
display: none;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/* ============================================ */
|
|
208
|
+
/* DROPDOWN MODERNIZADO */
|
|
209
|
+
/* ============================================ */
|
|
210
|
+
|
|
211
|
+
.filtro-grupo {
|
|
212
|
+
border: none;
|
|
213
|
+
padding: 0;
|
|
214
|
+
margin: 0 0 1.5rem;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.filtro-grupo:last-child {
|
|
218
|
+
margin-bottom: 0;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.filtro-dropdown {
|
|
222
|
+
border: 1px solid var(--gray-200);
|
|
223
|
+
border-radius: var(--radius-md);
|
|
224
|
+
overflow: hidden;
|
|
225
|
+
transition: all 0.2s;
|
|
226
|
+
background: var(--gray-50);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.filtro-dropdown:hover {
|
|
230
|
+
border-color: var(--gray-300);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.filtro-dropdown.active {
|
|
234
|
+
border-color: var(--primary);
|
|
235
|
+
box-shadow: 0 0 0 3px rgba(12, 90, 90, 0.08);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.filtro-grupo-header {
|
|
239
|
+
padding: 0.875rem 1rem;
|
|
240
|
+
background: white;
|
|
241
|
+
border: none;
|
|
242
|
+
display: flex;
|
|
243
|
+
justify-content: space-between;
|
|
244
|
+
align-items: center;
|
|
245
|
+
cursor: pointer;
|
|
246
|
+
user-select: none;
|
|
247
|
+
width: 100%;
|
|
248
|
+
transition: all 0.2s;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.filtro-grupo-header:hover {
|
|
252
|
+
background: var(--gray-50);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.filtro-grupo-titulo {
|
|
256
|
+
font-size: 0.9375rem;
|
|
257
|
+
font-weight: 600;
|
|
258
|
+
color: var(--gray-800);
|
|
259
|
+
display: flex;
|
|
260
|
+
align-items: center;
|
|
261
|
+
gap: 0.5rem;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.dropdown-chevron {
|
|
265
|
+
width: 16px;
|
|
266
|
+
height: 16px;
|
|
267
|
+
color: var(--gray-500);
|
|
268
|
+
transition: transform 0.3s ease;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.filtro-grupo-header[aria-expanded="true"] .dropdown-chevron {
|
|
272
|
+
transform: rotate(180deg);
|
|
273
|
+
color: var(--primary);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.filtro-opcoes {
|
|
277
|
+
max-height: 0;
|
|
278
|
+
overflow: hidden;
|
|
279
|
+
transition: max-height 0.3s ease;
|
|
280
|
+
background: white;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.filtro-opcoes.open {
|
|
284
|
+
max-height: 400px;
|
|
285
|
+
border-top: 1px solid var(--gray-100);
|
|
286
|
+
padding: 0.75rem 0.5rem;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
/* Checkbox customizado moderno */
|
|
290
|
+
.filtro-checkbox {
|
|
291
|
+
display: flex;
|
|
292
|
+
align-items: center;
|
|
293
|
+
cursor: pointer;
|
|
294
|
+
padding: 0.5rem 0.75rem;
|
|
295
|
+
border-radius: var(--radius-sm);
|
|
296
|
+
transition: all 0.2s;
|
|
297
|
+
margin: 0.125rem 0;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.filtro-checkbox:hover {
|
|
301
|
+
background: var(--gray-50);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.filtro-checkbox input[type="checkbox"] {
|
|
305
|
+
width: 18px;
|
|
306
|
+
height: 18px;
|
|
307
|
+
cursor: pointer;
|
|
308
|
+
margin-right: 0.75rem;
|
|
309
|
+
flex-shrink: 0;
|
|
310
|
+
accent-color: var(--primary);
|
|
311
|
+
border-radius: 4px;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.checkbox-label {
|
|
315
|
+
font-size: 0.9375rem;
|
|
316
|
+
color: var(--gray-700);
|
|
317
|
+
transition: color 0.2s;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.filtro-checkbox:hover .checkbox-label {
|
|
321
|
+
color: var(--primary);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.filtro-checkbox input[type="checkbox"]:checked + .checkbox-label {
|
|
325
|
+
font-weight: 500;
|
|
326
|
+
color: var(--primary);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/* Badge de contagem */
|
|
330
|
+
.count-badge {
|
|
331
|
+
display: inline-flex;
|
|
332
|
+
align-items: center;
|
|
333
|
+
justify-content: center;
|
|
334
|
+
min-width: 20px;
|
|
335
|
+
height: 20px;
|
|
336
|
+
padding: 0 0.375rem;
|
|
337
|
+
background: var(--primary);
|
|
338
|
+
color: white;
|
|
339
|
+
border-radius: 10px;
|
|
340
|
+
font-size: 0.6875rem;
|
|
341
|
+
font-weight: 600;
|
|
342
|
+
margin-left: auto;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/* ============================================ */
|
|
346
|
+
/* ÁREA DE RESULTADOS */
|
|
347
|
+
/* ============================================ */
|
|
348
|
+
|
|
349
|
+
.resultados-area {
|
|
350
|
+
min-width: 0;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.resultados-header {
|
|
354
|
+
display: flex;
|
|
355
|
+
justify-content: space-between;
|
|
356
|
+
align-items: center;
|
|
357
|
+
margin-bottom: 2rem;
|
|
358
|
+
padding: 1.25rem 1.5rem;
|
|
359
|
+
background: white;
|
|
360
|
+
border-radius: var(--radius-lg);
|
|
361
|
+
box-shadow: var(--shadow-sm);
|
|
362
|
+
border: 2px solid var(--gray-200);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
@media (max-width: 640px) {
|
|
366
|
+
.resultados-header {
|
|
367
|
+
flex-direction: column;
|
|
368
|
+
gap: 1rem;
|
|
369
|
+
align-items: flex-start;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.resultados-count {
|
|
374
|
+
font-size: 1.25rem;
|
|
375
|
+
font-weight: 700;
|
|
376
|
+
color: var(--gray-800);
|
|
377
|
+
display: flex;
|
|
378
|
+
align-items: center;
|
|
379
|
+
gap: 0.5rem;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.resultados-count::before {
|
|
383
|
+
content: '';
|
|
384
|
+
width: 4px;
|
|
385
|
+
height: 24px;
|
|
386
|
+
background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
|
|
387
|
+
border-radius: 2px;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.resultados-sort {
|
|
391
|
+
display: flex;
|
|
392
|
+
align-items: center;
|
|
393
|
+
gap: 0.625rem;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
.sort-label {
|
|
397
|
+
font-size: 0.875rem;
|
|
398
|
+
color: var(--gray-600);
|
|
399
|
+
font-weight: 500;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.sort-select {
|
|
403
|
+
padding: 0.625rem 2.25rem 0.625rem 0.875rem;
|
|
404
|
+
border: 2px solid var(--gray-200);
|
|
405
|
+
border-radius: var(--radius-md);
|
|
406
|
+
font-size: 0.9375rem;
|
|
407
|
+
background: white;
|
|
408
|
+
cursor: pointer;
|
|
409
|
+
appearance: none;
|
|
410
|
+
background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%230c5a5a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
|
411
|
+
background-repeat: no-repeat;
|
|
412
|
+
background-position: right 0.75rem center;
|
|
413
|
+
transition: all 0.2s;
|
|
414
|
+
font-weight: 500;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.sort-select:hover {
|
|
418
|
+
border-color: var(--gray-300);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
.sort-select:focus {
|
|
422
|
+
outline: none;
|
|
423
|
+
border-color: var(--primary);
|
|
424
|
+
box-shadow: 0 0 0 3px rgba(12, 90, 90, 0.1);
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/* ============================================ */
|
|
428
|
+
/* GRID DE CÁPSULAS MODERNIZADO */
|
|
429
|
+
/* ============================================ */
|
|
430
|
+
|
|
431
|
+
.capsulas-grid {
|
|
432
|
+
display: grid;
|
|
433
|
+
grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
|
|
434
|
+
gap: 1.75rem;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
@media (max-width: 768px) {
|
|
438
|
+
.capsulas-grid {
|
|
439
|
+
grid-template-columns: 1fr;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.capsula-card {
|
|
444
|
+
background: white;
|
|
445
|
+
border: 2px solid var(--gray-200);
|
|
446
|
+
border-radius: var(--radius-xl);
|
|
447
|
+
padding: 2rem;
|
|
448
|
+
transition: all 0.3s ease;
|
|
449
|
+
display: flex;
|
|
450
|
+
flex-direction: column;
|
|
451
|
+
position: relative;
|
|
452
|
+
overflow: hidden;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.capsula-card::before {
|
|
456
|
+
content: '';
|
|
457
|
+
position: absolute;
|
|
458
|
+
top: 0;
|
|
459
|
+
left: 0;
|
|
460
|
+
right: 0;
|
|
461
|
+
height: 4px;
|
|
462
|
+
background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
|
|
463
|
+
transform: scaleX(0);
|
|
464
|
+
transition: transform 0.3s ease;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.capsula-card:hover {
|
|
468
|
+
transform: translateY(-4px);
|
|
469
|
+
box-shadow: var(--shadow-xl);
|
|
470
|
+
border-color: var(--primary);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
.capsula-card:hover::before {
|
|
474
|
+
transform: scaleX(1);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
.capsula-card-icon {
|
|
478
|
+
width: 56px;
|
|
479
|
+
height: 56px;
|
|
480
|
+
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
|
|
481
|
+
border-radius: var(--radius-lg);
|
|
482
|
+
display: flex;
|
|
483
|
+
align-items: center;
|
|
484
|
+
justify-content: center;
|
|
485
|
+
margin-bottom: 1.25rem;
|
|
486
|
+
flex-shrink: 0;
|
|
487
|
+
box-shadow: 0 4px 12px rgba(12, 90, 90, 0.2);
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.capsula-card-icon svg {
|
|
491
|
+
width: 28px;
|
|
492
|
+
height: 28px;
|
|
493
|
+
color: white;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
.capsula-card-titulo {
|
|
497
|
+
font-size: 1.1875rem;
|
|
498
|
+
font-weight: 700;
|
|
499
|
+
color: var(--gray-900);
|
|
500
|
+
margin-bottom: 0.875rem;
|
|
501
|
+
line-height: 1.4;
|
|
502
|
+
min-height: 3.2rem;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
.capsula-card-titulo a {
|
|
506
|
+
color: inherit;
|
|
507
|
+
text-decoration: none;
|
|
508
|
+
transition: color 0.2s;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
.capsula-card-titulo a:hover {
|
|
512
|
+
color: var(--primary);
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.capsula-card-descricao {
|
|
516
|
+
font-size: 0.9375rem;
|
|
517
|
+
color: var(--gray-600);
|
|
518
|
+
line-height: 1.7;
|
|
519
|
+
margin-bottom: 1.5rem;
|
|
520
|
+
flex-grow: 1;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
/* Tags de deficiência */
|
|
524
|
+
.capsula-tags-deficiencia {
|
|
525
|
+
display: flex;
|
|
526
|
+
flex-wrap: wrap;
|
|
527
|
+
gap: 0.5rem;
|
|
528
|
+
margin-bottom: 1rem;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
.tag-deficiencia {
|
|
532
|
+
display: inline-flex;
|
|
533
|
+
align-items: center;
|
|
534
|
+
gap: 0.375rem;
|
|
535
|
+
padding: 0.375rem 0.75rem;
|
|
536
|
+
background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
|
|
537
|
+
border: 1px solid #bae6fd;
|
|
538
|
+
border-radius: var(--radius-xl);
|
|
539
|
+
font-size: 0.8125rem;
|
|
540
|
+
color: var(--primary);
|
|
541
|
+
font-weight: 500;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
.tag-deficiencia-icon {
|
|
545
|
+
width: 14px;
|
|
546
|
+
height: 14px;
|
|
547
|
+
flex-shrink: 0;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
/* Badge de prioridade */
|
|
551
|
+
.capsula-badge {
|
|
552
|
+
display: inline-flex;
|
|
553
|
+
align-items: center;
|
|
554
|
+
gap: 0.375rem;
|
|
555
|
+
padding: 0.375rem 0.875rem;
|
|
556
|
+
border-radius: var(--radius-xl);
|
|
557
|
+
font-size: 0.8125rem;
|
|
558
|
+
font-weight: 700;
|
|
559
|
+
margin-bottom: 1rem;
|
|
560
|
+
width: fit-content;
|
|
561
|
+
text-transform: uppercase;
|
|
562
|
+
letter-spacing: 0.5px;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
.capsula-badge-obrigatorio {
|
|
566
|
+
background: linear-gradient(135deg, var(--red-50) 0%, #fee 100%);
|
|
567
|
+
color: var(--red-600);
|
|
568
|
+
border: 2px solid var(--red-100);
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
.capsula-badge-recomendado {
|
|
572
|
+
background: linear-gradient(135deg, var(--blue-50) 0%, #e0f2fe 100%);
|
|
573
|
+
color: var(--blue-600);
|
|
574
|
+
border: 2px solid var(--blue-200);
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
.badge-icon {
|
|
578
|
+
width: 14px;
|
|
579
|
+
height: 14px;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
/* Tags de recurso */
|
|
583
|
+
.capsula-tags-recurso {
|
|
584
|
+
display: flex;
|
|
585
|
+
flex-wrap: wrap;
|
|
586
|
+
gap: 0.5rem;
|
|
587
|
+
margin-bottom: 1.5rem;
|
|
588
|
+
padding-top: 1.25rem;
|
|
589
|
+
border-top: 2px solid var(--gray-100);
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
.tag-recurso {
|
|
593
|
+
display: inline-flex;
|
|
594
|
+
align-items: center;
|
|
595
|
+
gap: 0.375rem;
|
|
596
|
+
padding: 0.375rem 0.75rem;
|
|
597
|
+
background: var(--gray-100);
|
|
598
|
+
border-radius: var(--radius-sm);
|
|
599
|
+
font-size: 0.8125rem;
|
|
600
|
+
color: var(--gray-700);
|
|
601
|
+
font-weight: 500;
|
|
602
|
+
transition: all 0.2s;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
.tag-recurso:hover {
|
|
606
|
+
background: var(--gray-200);
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
.tag-recurso-icon {
|
|
610
|
+
width: 14px;
|
|
611
|
+
height: 14px;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
/* Botão de ação modernizado */
|
|
615
|
+
.capsula-card-btn {
|
|
616
|
+
width: 100%;
|
|
617
|
+
padding: 0.875rem 1.5rem;
|
|
618
|
+
background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
|
|
619
|
+
color: white;
|
|
620
|
+
border: none;
|
|
621
|
+
border-radius: var(--radius-lg);
|
|
622
|
+
font-weight: 700;
|
|
623
|
+
font-size: 0.9375rem;
|
|
624
|
+
cursor: pointer;
|
|
625
|
+
transition: all 0.3s ease;
|
|
626
|
+
text-align: center;
|
|
627
|
+
text-decoration: none;
|
|
628
|
+
display: block;
|
|
629
|
+
box-shadow: 0 4px 12px rgba(12, 90, 90, 0.2);
|
|
630
|
+
position: relative;
|
|
631
|
+
overflow: hidden;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
.capsula-card-btn::before {
|
|
635
|
+
content: '';
|
|
636
|
+
position: absolute;
|
|
637
|
+
top: 0;
|
|
638
|
+
left: -100%;
|
|
639
|
+
width: 100%;
|
|
640
|
+
height: 100%;
|
|
641
|
+
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
|
|
642
|
+
transition: left 0.5s;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
.capsula-card-btn:hover {
|
|
646
|
+
transform: translateY(-2px);
|
|
647
|
+
box-shadow: 0 6px 16px rgba(12, 90, 90, 0.3);
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
.capsula-card-btn:hover::before {
|
|
651
|
+
left: 100%;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
.capsula-card-btn:active {
|
|
655
|
+
transform: translateY(0);
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
.capsula-card-btn:focus {
|
|
659
|
+
outline: none;
|
|
660
|
+
box-shadow: 0 0 0 3px rgba(12, 90, 90, 0.2), 0 6px 16px rgba(12, 90, 90, 0.3);
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
/* Estado vazio */
|
|
664
|
+
.resultados-vazio {
|
|
665
|
+
text-align: center;
|
|
666
|
+
padding: 5rem 2rem;
|
|
667
|
+
background: white;
|
|
668
|
+
border-radius: var(--radius-xl);
|
|
669
|
+
border: 2px dashed var(--gray-300);
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
.resultados-vazio-icon {
|
|
673
|
+
width: 80px;
|
|
674
|
+
height: 80px;
|
|
675
|
+
margin: 0 auto 1.5rem;
|
|
676
|
+
color: var(--gray-300);
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
.resultados-vazio h2 {
|
|
680
|
+
font-size: 1.75rem;
|
|
681
|
+
color: var(--gray-800);
|
|
682
|
+
margin-bottom: 0.75rem;
|
|
683
|
+
font-weight: 700;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
.resultados-vazio p {
|
|
687
|
+
color: var(--gray-600);
|
|
688
|
+
font-size: 1.0625rem;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
.resultados-vazio a {
|
|
692
|
+
color: var(--primary);
|
|
693
|
+
font-weight: 700;
|
|
694
|
+
text-decoration: none;
|
|
695
|
+
transition: color 0.2s;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
.resultados-vazio a:hover {
|
|
699
|
+
color: var(--primary-dark);
|
|
700
|
+
text-decoration: underline;
|
|
701
|
+
}
|
|
702
|
+
</style>
|
|
703
|
+
{% endblock %}
|
|
704
|
+
|
|
705
|
+
{% block content %}
|
|
706
|
+
<div class="capsulas-busca-page">
|
|
707
|
+
<div class="capsulas-busca-container">
|
|
708
|
+
|
|
709
|
+
{# ============================================ #}
|
|
710
|
+
{# SIDEBAR DE BUSCA E FILTROS #}
|
|
711
|
+
{# ============================================ #}
|
|
712
|
+
<aside class="busca-sidebar" role="complementary" aria-label="Busca e filtros">
|
|
713
|
+
|
|
714
|
+
{# Campo de busca #}
|
|
715
|
+
<div class="busca-input-wrapper">
|
|
716
|
+
<svg class="busca-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
717
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path>
|
|
718
|
+
</svg>
|
|
719
|
+
<input
|
|
720
|
+
type="text"
|
|
721
|
+
class="busca-input"
|
|
722
|
+
placeholder="Digite palavras-chave (ex: contraste, legendas)"
|
|
723
|
+
aria-label="Buscar cápsulas">
|
|
724
|
+
</div>
|
|
725
|
+
|
|
726
|
+
{# Filtros avançados #}
|
|
727
|
+
<div class="filtros-avancados">
|
|
728
|
+
<button class="filtros-avancados-header"
|
|
729
|
+
aria-expanded="true"
|
|
730
|
+
aria-controls="filtros-content"
|
|
731
|
+
onclick="toggleFiltros()">
|
|
732
|
+
<div class="filtros-avancados-titulo">
|
|
733
|
+
<svg class="filtros-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
734
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"></path>
|
|
735
|
+
</svg>
|
|
736
|
+
Filtros Avançados
|
|
737
|
+
</div>
|
|
738
|
+
<svg class="toggle-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
739
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
|
|
740
|
+
</svg>
|
|
741
|
+
</button>
|
|
742
|
+
|
|
743
|
+
<div id="filtros-content" class="filtros-content">
|
|
744
|
+
<form method="get" id="filtros-form">
|
|
745
|
+
|
|
746
|
+
{# TIPO DE DEFICIÊNCIA - DROPDOWN #}
|
|
747
|
+
<fieldset class="filtro-grupo">
|
|
748
|
+
<div class="filtro-dropdown" id="dropdown-deficiencia">
|
|
749
|
+
<button type="button"
|
|
750
|
+
class="filtro-grupo-header"
|
|
751
|
+
aria-expanded="false"
|
|
752
|
+
onclick="toggleDropdown('deficiencia')">
|
|
753
|
+
<span class="filtro-grupo-titulo">
|
|
754
|
+
Tipo de Deficiência
|
|
755
|
+
<span class="count-badge" id="count-deficiencia">0</span>
|
|
756
|
+
</span>
|
|
757
|
+
<svg class="dropdown-chevron" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
758
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
|
|
759
|
+
</svg>
|
|
760
|
+
</button>
|
|
761
|
+
<div class="filtro-opcoes" id="opcoes-deficiencia">
|
|
762
|
+
{% for value, label in opcoes_filtros.tipos_deficiencia %}
|
|
763
|
+
<label class="filtro-checkbox">
|
|
764
|
+
<input type="checkbox"
|
|
765
|
+
name="tipo_deficiencia"
|
|
766
|
+
value="{{ value }}"
|
|
767
|
+
{% if value in filtros_ativos.tipo_deficiencia %}checked{% endif %}
|
|
768
|
+
onchange="updateCount('deficiencia'); this.form.submit()">
|
|
769
|
+
<span class="checkbox-label">{{ label }}</span>
|
|
770
|
+
</label>
|
|
771
|
+
{% endfor %}
|
|
772
|
+
</div>
|
|
773
|
+
</div>
|
|
774
|
+
</fieldset>
|
|
775
|
+
|
|
776
|
+
{# FORMATO DE AÇÃO - DROPDOWN #}
|
|
777
|
+
<fieldset class="filtro-grupo">
|
|
778
|
+
<div class="filtro-dropdown" id="dropdown-formato">
|
|
779
|
+
<button type="button"
|
|
780
|
+
class="filtro-grupo-header"
|
|
781
|
+
aria-expanded="false"
|
|
782
|
+
onclick="toggleDropdown('formato')">
|
|
783
|
+
<span class="filtro-grupo-titulo">
|
|
784
|
+
Formato de Ação
|
|
785
|
+
<span class="count-badge" id="count-formato">0</span>
|
|
786
|
+
</span>
|
|
787
|
+
<svg class="dropdown-chevron" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
788
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
|
|
789
|
+
</svg>
|
|
790
|
+
</button>
|
|
791
|
+
<div class="filtro-opcoes" id="opcoes-formato">
|
|
792
|
+
{% for value, label in opcoes_filtros.formatos_acao %}
|
|
793
|
+
<label class="filtro-checkbox">
|
|
794
|
+
<input type="checkbox"
|
|
795
|
+
name="formato_acao"
|
|
796
|
+
value="{{ value }}"
|
|
797
|
+
{% if value in filtros_ativos.formato_acao %}checked{% endif %}
|
|
798
|
+
onchange="updateCount('formato'); this.form.submit()">
|
|
799
|
+
<span class="checkbox-label">{{ label }}</span>
|
|
800
|
+
</label>
|
|
801
|
+
{% endfor %}
|
|
802
|
+
</div>
|
|
803
|
+
</div>
|
|
804
|
+
</fieldset>
|
|
805
|
+
|
|
806
|
+
{# TIPO DE RECURSO - DROPDOWN #}
|
|
807
|
+
<fieldset class="filtro-grupo">
|
|
808
|
+
<div class="filtro-dropdown" id="dropdown-recurso">
|
|
809
|
+
<button type="button"
|
|
810
|
+
class="filtro-grupo-header"
|
|
811
|
+
aria-expanded="false"
|
|
812
|
+
onclick="toggleDropdown('recurso')">
|
|
813
|
+
<span class="filtro-grupo-titulo">
|
|
814
|
+
Tipo de Recurso
|
|
815
|
+
<span class="count-badge" id="count-recurso">0</span>
|
|
816
|
+
</span>
|
|
817
|
+
<svg class="dropdown-chevron" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
818
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
|
|
819
|
+
</svg>
|
|
820
|
+
</button>
|
|
821
|
+
<div class="filtro-opcoes" id="opcoes-recurso">
|
|
822
|
+
{% for value, label in opcoes_filtros.tipos_recurso %}
|
|
823
|
+
<label class="filtro-checkbox">
|
|
824
|
+
<input type="checkbox"
|
|
825
|
+
name="tipo_recurso"
|
|
826
|
+
value="{{ value }}"
|
|
827
|
+
{% if value in filtros_ativos.tipo_recurso %}checked{% endif %}
|
|
828
|
+
onchange="updateCount('recurso'); this.form.submit()">
|
|
829
|
+
<span class="checkbox-label">{{ label }}</span>
|
|
830
|
+
</label>
|
|
831
|
+
{% endfor %}
|
|
832
|
+
</div>
|
|
833
|
+
</div>
|
|
834
|
+
</fieldset>
|
|
835
|
+
|
|
836
|
+
</form>
|
|
837
|
+
</div>
|
|
838
|
+
</div>
|
|
839
|
+
|
|
840
|
+
</aside>
|
|
841
|
+
|
|
842
|
+
{# ============================================ #}
|
|
843
|
+
{# ÁREA DE RESULTADOS #}
|
|
844
|
+
{# ============================================ #}
|
|
845
|
+
<main class="resultados-area" role="main">
|
|
846
|
+
|
|
847
|
+
<div class="resultados-header">
|
|
848
|
+
<div class="resultados-count">
|
|
849
|
+
{{ total_resultados }} cápsula{{ total_resultados|pluralize:",s" }} encontrada{{ total_resultados|pluralize:",s" }}
|
|
850
|
+
</div>
|
|
851
|
+
|
|
852
|
+
<div class="resultados-sort">
|
|
853
|
+
<label for="sort-select" class="sort-label">Ordenar por:</label>
|
|
854
|
+
<select id="sort-select" class="sort-select">
|
|
855
|
+
<option value="relevancia">Relevância</option>
|
|
856
|
+
<option value="recente">Mais recentes</option>
|
|
857
|
+
<option value="titulo">A-Z</option>
|
|
858
|
+
</select>
|
|
859
|
+
</div>
|
|
860
|
+
</div>
|
|
861
|
+
|
|
862
|
+
{% if capsulas %}
|
|
863
|
+
<div class="capsulas-grid">
|
|
864
|
+
{% for capsula in capsulas %}
|
|
865
|
+
<article class="capsula-card">
|
|
866
|
+
<div class="capsula-card-icon">
|
|
867
|
+
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
868
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"></path>
|
|
869
|
+
</svg>
|
|
870
|
+
</div>
|
|
871
|
+
|
|
872
|
+
<h2 class="capsula-card-titulo">
|
|
873
|
+
<a href="{% pageurl capsula %}">{{ capsula.title }}</a>
|
|
874
|
+
</h2>
|
|
875
|
+
|
|
876
|
+
<p class="capsula-card-descricao">
|
|
877
|
+
{{ capsula.resumo_card|default:"Aprenda sobre este importante aspecto da acessibilidade digital." }}
|
|
878
|
+
</p>
|
|
879
|
+
|
|
880
|
+
{# Tags de deficiência #}
|
|
881
|
+
{% if capsula.tipos_deficiencia %}
|
|
882
|
+
<div class="capsula-tags-deficiencia">
|
|
883
|
+
{% for tipo in capsula.get_tipos_deficiencia_display|slice:":2" %}
|
|
884
|
+
<span class="tag-deficiencia">
|
|
885
|
+
<svg class="tag-deficiencia-icon" fill="currentColor" viewBox="0 0 20 20">
|
|
886
|
+
<circle cx="10" cy="10" r="4"></circle>
|
|
887
|
+
</svg>
|
|
888
|
+
{{ tipo }}
|
|
889
|
+
</span>
|
|
890
|
+
{% endfor %}
|
|
891
|
+
</div>
|
|
892
|
+
{% endif %}
|
|
893
|
+
|
|
894
|
+
{# Badge de prioridade #}
|
|
895
|
+
{% if capsula.prioridade %}
|
|
896
|
+
<div class="capsula-badge capsula-badge-{{ capsula.prioridade }}">
|
|
897
|
+
<svg class="badge-icon" fill="currentColor" viewBox="0 0 20 20">
|
|
898
|
+
<path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd"></path>
|
|
899
|
+
</svg>
|
|
900
|
+
{{ capsula.get_prioridade_display }}
|
|
901
|
+
</div>
|
|
902
|
+
{% endif %}
|
|
903
|
+
|
|
904
|
+
{# Tags de recurso #}
|
|
905
|
+
{% if capsula.tipos_recurso %}
|
|
906
|
+
<div class="capsula-tags-recurso">
|
|
907
|
+
{% for recurso in capsula.get_tipos_recurso_display|slice:":3" %}
|
|
908
|
+
<span class="tag-recurso">
|
|
909
|
+
<svg class="tag-recurso-icon" fill="currentColor" viewBox="0 0 20 20">
|
|
910
|
+
<path fill-rule="evenodd" d="M4 3a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2H4zm12 12H4l4-8 3 6 2-4 3 6z" clip-rule="evenodd"></path>
|
|
911
|
+
</svg>
|
|
912
|
+
{{ recurso }}
|
|
913
|
+
</span>
|
|
914
|
+
{% endfor %}
|
|
915
|
+
</div>
|
|
916
|
+
{% endif %}
|
|
917
|
+
|
|
918
|
+
<a href="{% pageurl capsula %}" class="capsula-card-btn">
|
|
919
|
+
Acessar Cápsula
|
|
920
|
+
</a>
|
|
921
|
+
</article>
|
|
922
|
+
{% endfor %}
|
|
923
|
+
</div>
|
|
924
|
+
|
|
925
|
+
{% else %}
|
|
926
|
+
<div class="resultados-vazio">
|
|
927
|
+
<svg class="resultados-vazio-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
928
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.172 16.172a4 4 0 015.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
|
|
929
|
+
</svg>
|
|
930
|
+
<h2>Nenhuma cápsula encontrada</h2>
|
|
931
|
+
<p>Tente ajustar os filtros ou <a href="{{ page.url }}">limpe os filtros</a> para ver todas as cápsulas.</p>
|
|
932
|
+
</div>
|
|
933
|
+
{% endif %}
|
|
934
|
+
|
|
935
|
+
</main>
|
|
936
|
+
|
|
937
|
+
</div>
|
|
938
|
+
</div>
|
|
939
|
+
|
|
940
|
+
<script>
|
|
941
|
+
// Toggle do painel principal de filtros
|
|
942
|
+
function toggleFiltros() {
|
|
943
|
+
const header = document.querySelector('.filtros-avancados-header');
|
|
944
|
+
const content = document.getElementById('filtros-content');
|
|
945
|
+
const expanded = header.getAttribute('aria-expanded') === 'true';
|
|
946
|
+
|
|
947
|
+
header.setAttribute('aria-expanded', !expanded);
|
|
948
|
+
content.hidden = expanded;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
// Toggle dos dropdowns individuais
|
|
952
|
+
function toggleDropdown(tipo) {
|
|
953
|
+
const header = document.querySelector(`#dropdown-${tipo} .filtro-grupo-header`);
|
|
954
|
+
const opcoes = document.getElementById(`opcoes-${tipo}`);
|
|
955
|
+
const dropdown = document.getElementById(`dropdown-${tipo}`);
|
|
956
|
+
const expanded = header.getAttribute('aria-expanded') === 'true';
|
|
957
|
+
|
|
958
|
+
// Fecha outros dropdowns
|
|
959
|
+
document.querySelectorAll('.filtro-dropdown').forEach(dd => {
|
|
960
|
+
if (dd.id !== `dropdown-${tipo}`) {
|
|
961
|
+
dd.classList.remove('active');
|
|
962
|
+
const h = dd.querySelector('.filtro-grupo-header');
|
|
963
|
+
const o = dd.querySelector('.filtro-opcoes');
|
|
964
|
+
h.setAttribute('aria-expanded', 'false');
|
|
965
|
+
o.classList.remove('open');
|
|
966
|
+
}
|
|
967
|
+
});
|
|
968
|
+
|
|
969
|
+
// Toggle do dropdown atual
|
|
970
|
+
header.setAttribute('aria-expanded', !expanded);
|
|
971
|
+
opcoes.classList.toggle('open');
|
|
972
|
+
dropdown.classList.toggle('active');
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
// Atualiza o contador de filtros selecionados
|
|
976
|
+
function updateCount(tipo) {
|
|
977
|
+
const checkboxes = document.querySelectorAll(`#opcoes-${tipo} input[type="checkbox"]:checked`);
|
|
978
|
+
const badge = document.getElementById(`count-${tipo}`);
|
|
979
|
+
const count = checkboxes.length;
|
|
980
|
+
|
|
981
|
+
badge.textContent = count;
|
|
982
|
+
badge.style.display = count > 0 ? 'inline-flex' : 'none';
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
// Inicializa os contadores ao carregar a página
|
|
986
|
+
document.addEventListener('DOMContentLoaded', function() {
|
|
987
|
+
updateCount('deficiencia');
|
|
988
|
+
updateCount('formato');
|
|
989
|
+
updateCount('recurso');
|
|
990
|
+
|
|
991
|
+
// Esconde badges com contador 0
|
|
992
|
+
document.querySelectorAll('.count-badge').forEach(badge => {
|
|
993
|
+
if (badge.textContent === '0') {
|
|
994
|
+
badge.style.display = 'none';
|
|
995
|
+
}
|
|
996
|
+
});
|
|
997
|
+
});
|
|
998
|
+
|
|
999
|
+
// Fecha dropdowns ao clicar fora
|
|
1000
|
+
document.addEventListener('click', function(event) {
|
|
1001
|
+
if (!event.target.closest('.filtro-dropdown')) {
|
|
1002
|
+
document.querySelectorAll('.filtro-dropdown').forEach(dropdown => {
|
|
1003
|
+
dropdown.classList.remove('active');
|
|
1004
|
+
const header = dropdown.querySelector('.filtro-grupo-header');
|
|
1005
|
+
const opcoes = dropdown.querySelector('.filtro-opcoes');
|
|
1006
|
+
header.setAttribute('aria-expanded', 'false');
|
|
1007
|
+
opcoes.classList.remove('open');
|
|
1008
|
+
});
|
|
1009
|
+
}
|
|
1010
|
+
});
|
|
1011
|
+
</script>
|
|
1012
|
+
{% endblock %}
|