wagtail-enap-designsystem 1.2.1.105__py3-none-any.whl → 1.2.1.107__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.
- enap_designsystem/blocks/__init__.py +6 -1
- enap_designsystem/static/enap_designsystem/blocks/bundle.css +0 -14
- enap_designsystem/static/enap_designsystem/blocks/cards.css +11 -1
- enap_designsystem/static/enap_designsystem/blocks/pages/template_homeI.css +0 -1
- enap_designsystem/static/enap_designsystem/blocks/pages/template_homeII.css +0 -1
- enap_designsystem/static/enap_designsystem/blocks/testimonials_carousel.css +19 -2
- enap_designsystem/templates/enap_designsystem/blocks/navbar/navbar_block.html +1 -1
- enap_designsystem/templates/enap_designsystem/blocks/page/pagenoticias_block.html +136 -168
- enap_designsystem/templates/enap_designsystem/blocks/preview_courses.html +47 -0
- enap_designsystem/templates/enap_designsystem/blocks/suap/suap_courses_block.html +40 -20
- enap_designsystem/templates/enap_designsystem/blocks/suap/suap_events_block.html +32 -36
- enap_designsystem/templates/enap_designsystem/blocks/team_carousel.html +58 -1
- enap_designsystem/templates/enap_designsystem/blocks/testimonials_carousel.html +143 -66
- {wagtail_enap_designsystem-1.2.1.105.dist-info → wagtail_enap_designsystem-1.2.1.107.dist-info}/METADATA +1 -1
- {wagtail_enap_designsystem-1.2.1.105.dist-info → wagtail_enap_designsystem-1.2.1.107.dist-info}/RECORD +18 -18
- {wagtail_enap_designsystem-1.2.1.105.dist-info → wagtail_enap_designsystem-1.2.1.107.dist-info}/WHEEL +0 -0
- {wagtail_enap_designsystem-1.2.1.105.dist-info → wagtail_enap_designsystem-1.2.1.107.dist-info}/licenses/LICENSE +0 -0
- {wagtail_enap_designsystem-1.2.1.105.dist-info → wagtail_enap_designsystem-1.2.1.107.dist-info}/top_level.txt +0 -0
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<h3 class="sub-title">Fique sabendo de tudo o que acontece na Enap</h3>
|
|
10
10
|
</div>
|
|
11
11
|
|
|
12
|
-
<!-- Desktop: Layout Original
|
|
12
|
+
<!-- Desktop: Layout Original -->
|
|
13
13
|
<div class="news-grid-container desktop-only">
|
|
14
14
|
{% for page in pages %}
|
|
15
15
|
{% if forloop.first %}
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
<div class="news-main-overlay">
|
|
36
36
|
<h3 class="news-main-title">{{ page.title }}</h3>
|
|
37
37
|
|
|
38
|
-
{# NOVO: Usa legenda_home com fallbacks inteligentes #}
|
|
39
38
|
{% if page.specific.legenda_home %}
|
|
40
39
|
<p class="news-main-text">{{ page.specific.legenda_home|truncatewords:25 }}</p>
|
|
41
40
|
{% elif page.specific.subtitulo %}
|
|
@@ -55,12 +54,10 @@
|
|
|
55
54
|
</a>
|
|
56
55
|
</div>
|
|
57
56
|
{% else %}
|
|
58
|
-
<!-- Primeira iteração das notícias secundárias -->
|
|
59
57
|
{% if forloop.counter == 2 %}
|
|
60
58
|
<div class="news-grid-secondary">
|
|
61
59
|
{% endif %}
|
|
62
60
|
|
|
63
|
-
<!-- Notícias Secundárias (pequenas) -->
|
|
64
61
|
<div class="news-secondary-item">
|
|
65
62
|
<div class="news-secondary-image">
|
|
66
63
|
{% if page.specific.imagem_externa %}
|
|
@@ -74,7 +71,7 @@
|
|
|
74
71
|
<img class="img-fluid" src="{{ sec_img.url }}" alt="{{ sec_img.title }}">
|
|
75
72
|
</a>
|
|
76
73
|
{% elif page.cover_image %}
|
|
77
|
-
{% image page.cover_image original format-webp
|
|
74
|
+
{% image page.cover_image original format-webp preserve-svg as sec_img %}
|
|
78
75
|
<a href="{% pageurl page %}" title="{{ page.title }}">
|
|
79
76
|
<img class="img-fluid" src="{{ sec_img.url }}" alt="{{ sec_img.title }}">
|
|
80
77
|
</a>
|
|
@@ -88,11 +85,8 @@
|
|
|
88
85
|
</div>
|
|
89
86
|
<a href="{% pageurl page %}">
|
|
90
87
|
<div class="news-secondary-content">
|
|
91
|
-
<h4 class="news-secondary-title">
|
|
92
|
-
{{ page.title }}
|
|
93
|
-
</h4>
|
|
88
|
+
<h4 class="news-secondary-title">{{ page.title }}</h4>
|
|
94
89
|
|
|
95
|
-
{# NOVO: Usa legenda_home com fallbacks inteligentes #}
|
|
96
90
|
{% if page.specific.legenda_home %}
|
|
97
91
|
<p class="news-secondary-text">{{ page.specific.legenda_home|truncatewords:15 }}</p>
|
|
98
92
|
{% elif page.specific.subtitulo %}
|
|
@@ -119,13 +113,12 @@
|
|
|
119
113
|
</div>
|
|
120
114
|
{% endfor %}
|
|
121
115
|
|
|
122
|
-
<!-- Fechar div das notícias secundárias se houver pelo menos 2 notícias -->
|
|
123
116
|
{% if pages|length > 1 %}
|
|
124
117
|
</div>
|
|
125
118
|
{% endif %}
|
|
126
119
|
</div>
|
|
127
120
|
|
|
128
|
-
<!-- Mobile: Carrossel
|
|
121
|
+
<!-- Mobile: Carrossel -->
|
|
129
122
|
<div class="news-carousel-container mobile-only">
|
|
130
123
|
<div class="news-carousel" id="newsCarousel">
|
|
131
124
|
<div class="news-carousel-track" id="carouselTrack">
|
|
@@ -155,7 +148,6 @@
|
|
|
155
148
|
</div>
|
|
156
149
|
<h3 class="news-carousel-title">{{ page.title }}</h3>
|
|
157
150
|
|
|
158
|
-
{# NOVO: Usa legenda_home com fallbacks inteligentes #}
|
|
159
151
|
{% if page.specific.legenda_home %}
|
|
160
152
|
<p class="news-carousel-text">{{ page.specific.legenda_home|truncatewords:20 }}</p>
|
|
161
153
|
{% elif page.specific.subtitulo %}
|
|
@@ -179,16 +171,6 @@
|
|
|
179
171
|
</div>
|
|
180
172
|
</div>
|
|
181
173
|
|
|
182
|
-
<!-- Controles do Carrossel -->
|
|
183
|
-
<div class="carousel-controls" style="display: none;">
|
|
184
|
-
<button class="carousel-btn carousel-prev" id="prevBtn" aria-label="Notícia anterior">
|
|
185
|
-
<i class="fa fa-chevron-left"></i>
|
|
186
|
-
</button>
|
|
187
|
-
<button class="carousel-btn carousel-next" id="nextBtn" aria-label="Próxima notícia">
|
|
188
|
-
<i class="fa fa-chevron-right"></i>
|
|
189
|
-
</button>
|
|
190
|
-
</div>
|
|
191
|
-
|
|
192
174
|
<!-- Indicadores -->
|
|
193
175
|
<div class="carousel-indicators" id="carouselIndicators">
|
|
194
176
|
{% for page in pages %}
|
|
@@ -204,9 +186,8 @@
|
|
|
204
186
|
</div>
|
|
205
187
|
</section>
|
|
206
188
|
|
|
207
|
-
|
|
208
189
|
<style>
|
|
209
|
-
/* === ESTILOS
|
|
190
|
+
/* === ESTILOS BÁSICOS === */
|
|
210
191
|
.btn-todos {
|
|
211
192
|
display: flex;
|
|
212
193
|
align-items: center;
|
|
@@ -221,24 +202,15 @@
|
|
|
221
202
|
font-weight: 600;
|
|
222
203
|
margin: 0 auto;
|
|
223
204
|
width: fit-content;
|
|
205
|
+
transition: all 0.3s ease;
|
|
224
206
|
}
|
|
225
207
|
|
|
226
|
-
.news-secondary-date{
|
|
227
|
-
font-size: 12px;
|
|
228
|
-
color: #525155;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
208
|
.btn-todos:hover {
|
|
232
209
|
color: white;
|
|
233
210
|
background-color: #006969;
|
|
234
211
|
border: 1px solid #006969;
|
|
235
212
|
}
|
|
236
213
|
|
|
237
|
-
.btn-todos:active {
|
|
238
|
-
color: #025257;
|
|
239
|
-
border: 1px solid #025257;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
214
|
.sub-title {
|
|
243
215
|
font-size: 20px;
|
|
244
216
|
font-weight: 400;
|
|
@@ -263,6 +235,7 @@
|
|
|
263
235
|
margin-bottom: 40px;
|
|
264
236
|
}
|
|
265
237
|
|
|
238
|
+
/* === DESKTOP GRID === */
|
|
266
239
|
.news-grid-container {
|
|
267
240
|
display: grid;
|
|
268
241
|
grid-template-columns: 1fr 1fr;
|
|
@@ -270,7 +243,6 @@
|
|
|
270
243
|
margin-bottom: 40px;
|
|
271
244
|
}
|
|
272
245
|
|
|
273
|
-
/* Notícia Principal */
|
|
274
246
|
.news-grid-main {
|
|
275
247
|
position: relative;
|
|
276
248
|
border-radius: 12px;
|
|
@@ -294,7 +266,7 @@
|
|
|
294
266
|
|
|
295
267
|
.news-main-image {
|
|
296
268
|
width: 100%;
|
|
297
|
-
height: 100%;
|
|
269
|
+
height: 100%; /* Altura fixa para Safari */
|
|
298
270
|
overflow: hidden;
|
|
299
271
|
position: relative;
|
|
300
272
|
}
|
|
@@ -304,7 +276,6 @@
|
|
|
304
276
|
height: 100%;
|
|
305
277
|
object-fit: cover;
|
|
306
278
|
transition: transform 0.3s ease;
|
|
307
|
-
min-width: 100%;
|
|
308
279
|
}
|
|
309
280
|
|
|
310
281
|
.news-grid-main:hover .news-main-image img {
|
|
@@ -332,10 +303,15 @@
|
|
|
332
303
|
.news-main-text {
|
|
333
304
|
color: rgba(255, 255, 255, 0.9);
|
|
334
305
|
line-height: 1.6;
|
|
335
|
-
margin: 0;
|
|
306
|
+
margin: 0 0 10px 0;
|
|
336
307
|
font-size: 16px;
|
|
337
308
|
}
|
|
338
309
|
|
|
310
|
+
.news-main-date {
|
|
311
|
+
font-size: 12px;
|
|
312
|
+
color: rgba(255, 255, 255, 0.8);
|
|
313
|
+
}
|
|
314
|
+
|
|
339
315
|
/* Notícias Secundárias */
|
|
340
316
|
.news-grid-secondary {
|
|
341
317
|
display: flex;
|
|
@@ -348,7 +324,7 @@
|
|
|
348
324
|
gap: 15px;
|
|
349
325
|
background: white;
|
|
350
326
|
border-radius: 8px;
|
|
351
|
-
transition: transform 0.3s ease
|
|
327
|
+
transition: transform 0.3s ease;
|
|
352
328
|
}
|
|
353
329
|
|
|
354
330
|
.news-secondary-item:hover {
|
|
@@ -361,8 +337,8 @@
|
|
|
361
337
|
}
|
|
362
338
|
|
|
363
339
|
.news-secondary-image {
|
|
364
|
-
width:150px;
|
|
365
|
-
height: 100%;
|
|
340
|
+
width: 150px;
|
|
341
|
+
height: 100%; /* Altura fixa */
|
|
366
342
|
border-radius: 6px;
|
|
367
343
|
overflow: hidden;
|
|
368
344
|
flex-shrink: 0;
|
|
@@ -372,7 +348,7 @@
|
|
|
372
348
|
width: 100%;
|
|
373
349
|
height: 100%;
|
|
374
350
|
object-fit: cover;
|
|
375
|
-
|
|
351
|
+
transition: transform 0.3s ease;
|
|
376
352
|
}
|
|
377
353
|
|
|
378
354
|
.news-secondary-content {
|
|
@@ -391,20 +367,6 @@
|
|
|
391
367
|
color: #007D7A;
|
|
392
368
|
}
|
|
393
369
|
|
|
394
|
-
.news-secondary-title a {
|
|
395
|
-
color: #007D7A;
|
|
396
|
-
text-decoration: none;
|
|
397
|
-
transition: color 0.3s ease;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
.news-secondary-title p :hover {
|
|
401
|
-
color: #006969;
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
.news-secondary-title a p h4 a:hover {
|
|
405
|
-
color: #006969;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
370
|
.news-secondary-text {
|
|
409
371
|
font-size: 14px;
|
|
410
372
|
color: #525155;
|
|
@@ -412,7 +374,13 @@
|
|
|
412
374
|
margin: 0;
|
|
413
375
|
}
|
|
414
376
|
|
|
415
|
-
|
|
377
|
+
.news-secondary-date {
|
|
378
|
+
font-size: 12px;
|
|
379
|
+
color: #525155;
|
|
380
|
+
margin-top: 5px;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
/* Placeholders */
|
|
416
384
|
.no-image-placeholder {
|
|
417
385
|
display: flex;
|
|
418
386
|
flex-direction: column;
|
|
@@ -459,7 +427,7 @@
|
|
|
459
427
|
font-size: 18px;
|
|
460
428
|
}
|
|
461
429
|
|
|
462
|
-
/* ===
|
|
430
|
+
/* === CARROSSEL MOBILE === */
|
|
463
431
|
.news-carousel-container {
|
|
464
432
|
position: relative;
|
|
465
433
|
margin-bottom: 40px;
|
|
@@ -468,14 +436,14 @@
|
|
|
468
436
|
.news-carousel {
|
|
469
437
|
overflow: hidden;
|
|
470
438
|
margin-bottom: 20px;
|
|
471
|
-
padding: 0
|
|
472
|
-
height: 50vh;
|
|
439
|
+
padding: 0;
|
|
440
|
+
height: 50vh;
|
|
441
|
+
min-height: 300px;
|
|
473
442
|
}
|
|
474
443
|
|
|
475
444
|
.news-carousel-track {
|
|
476
445
|
display: flex;
|
|
477
446
|
transition: transform 0.3s ease;
|
|
478
|
-
will-change: transform;
|
|
479
447
|
height: 100%;
|
|
480
448
|
}
|
|
481
449
|
|
|
@@ -483,6 +451,7 @@
|
|
|
483
451
|
flex: 0 0 70vw;
|
|
484
452
|
position: relative;
|
|
485
453
|
margin-right: 15px;
|
|
454
|
+
height: 100%;
|
|
486
455
|
}
|
|
487
456
|
|
|
488
457
|
.news-carousel-link {
|
|
@@ -490,11 +459,12 @@
|
|
|
490
459
|
position: relative;
|
|
491
460
|
text-decoration: none;
|
|
492
461
|
color: inherit;
|
|
462
|
+
height: 100%;
|
|
493
463
|
}
|
|
494
464
|
|
|
495
465
|
.news-carousel-image {
|
|
496
466
|
width: 100%;
|
|
497
|
-
height:
|
|
467
|
+
height: 100%;
|
|
498
468
|
overflow: hidden;
|
|
499
469
|
position: relative;
|
|
500
470
|
border-radius: 12px;
|
|
@@ -532,8 +502,14 @@
|
|
|
532
502
|
font-size: 14px;
|
|
533
503
|
}
|
|
534
504
|
|
|
505
|
+
.news-carousel-date {
|
|
506
|
+
font-size: 12px;
|
|
507
|
+
color: rgba(255, 255, 255, 0.8);
|
|
508
|
+
margin-bottom: 10px;
|
|
509
|
+
}
|
|
510
|
+
|
|
535
511
|
.carousel-placeholder {
|
|
536
|
-
height:
|
|
512
|
+
height: 100%;
|
|
537
513
|
font-size: 32px;
|
|
538
514
|
background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
|
|
539
515
|
}
|
|
@@ -543,48 +519,6 @@
|
|
|
543
519
|
margin-top: 8px;
|
|
544
520
|
}
|
|
545
521
|
|
|
546
|
-
/* Controles do Carrossel */
|
|
547
|
-
.carousel-controls {
|
|
548
|
-
display: flex;
|
|
549
|
-
justify-content: space-between;
|
|
550
|
-
position: absolute;
|
|
551
|
-
top: 50%;
|
|
552
|
-
left: 0;
|
|
553
|
-
right: 0;
|
|
554
|
-
transform: translateY(-50%);
|
|
555
|
-
padding: 0 15px;
|
|
556
|
-
pointer-events: none;
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
.carousel-btn {
|
|
560
|
-
width: 40px;
|
|
561
|
-
height: 40px;
|
|
562
|
-
border-radius: 50%;
|
|
563
|
-
background: rgba(255, 255, 255, 0.9);
|
|
564
|
-
border: none;
|
|
565
|
-
color: #007D7A;
|
|
566
|
-
font-size: 16px;
|
|
567
|
-
cursor: pointer;
|
|
568
|
-
pointer-events: all;
|
|
569
|
-
transition: all 0.3s ease;
|
|
570
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
|
|
571
|
-
display: flex;
|
|
572
|
-
align-items: center;
|
|
573
|
-
justify-content: center;
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
.carousel-btn:hover {
|
|
577
|
-
background: white;
|
|
578
|
-
transform: scale(1.1);
|
|
579
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
.carousel-btn:disabled {
|
|
583
|
-
opacity: 0.5;
|
|
584
|
-
cursor: not-allowed;
|
|
585
|
-
transform: none;
|
|
586
|
-
}
|
|
587
|
-
|
|
588
522
|
/* Indicadores */
|
|
589
523
|
.carousel-indicators {
|
|
590
524
|
display: flex;
|
|
@@ -610,36 +544,20 @@
|
|
|
610
544
|
|
|
611
545
|
/* === RESPONSIVIDADE === */
|
|
612
546
|
.mobile-only {
|
|
613
|
-
display: none
|
|
547
|
+
display: none;
|
|
614
548
|
}
|
|
615
549
|
|
|
616
550
|
.desktop-only {
|
|
617
551
|
display: grid;
|
|
618
552
|
}
|
|
619
553
|
|
|
620
|
-
/* Força esconder carrossel no desktop */
|
|
621
|
-
.news-carousel-container {
|
|
622
|
-
display: none !important;
|
|
623
|
-
}
|
|
624
|
-
|
|
625
554
|
@media (max-width: 768px) {
|
|
626
555
|
.mobile-only {
|
|
627
|
-
display: block
|
|
556
|
+
display: block;
|
|
628
557
|
}
|
|
629
558
|
|
|
630
559
|
.desktop-only {
|
|
631
|
-
display: none
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
/* Força mostrar carrossel no mobile */
|
|
635
|
-
.news-carousel-container.mobile-only {
|
|
636
|
-
display: block !important;
|
|
637
|
-
height: 55vh;
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
/* Força esconder grid no mobile */
|
|
641
|
-
.news-grid-container.desktop-only {
|
|
642
|
-
display: none !important;
|
|
560
|
+
display: none;
|
|
643
561
|
}
|
|
644
562
|
|
|
645
563
|
.news-section {
|
|
@@ -661,10 +579,19 @@
|
|
|
661
579
|
margin-top: 10px;
|
|
662
580
|
}
|
|
663
581
|
|
|
664
|
-
.news-carousel-
|
|
582
|
+
.news-carousel-container {
|
|
583
|
+
height: 55vh;
|
|
584
|
+
min-height: 320px;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
.news-carousel {
|
|
665
588
|
height: 100%;
|
|
666
589
|
}
|
|
667
590
|
|
|
591
|
+
.news-carousel-slide {
|
|
592
|
+
flex: 0 0 75vw;
|
|
593
|
+
}
|
|
594
|
+
|
|
668
595
|
.news-carousel-title {
|
|
669
596
|
font-size: 16px;
|
|
670
597
|
}
|
|
@@ -672,12 +599,6 @@
|
|
|
672
599
|
.news-carousel-text {
|
|
673
600
|
font-size: 13px;
|
|
674
601
|
}
|
|
675
|
-
|
|
676
|
-
.carousel-btn {
|
|
677
|
-
width: 35px;
|
|
678
|
-
height: 35px;
|
|
679
|
-
font-size: 14px;
|
|
680
|
-
}
|
|
681
602
|
}
|
|
682
603
|
|
|
683
604
|
@media (max-width: 480px) {
|
|
@@ -689,18 +610,58 @@
|
|
|
689
610
|
font-size: 28px;
|
|
690
611
|
}
|
|
691
612
|
|
|
692
|
-
.news-carousel-
|
|
693
|
-
|
|
613
|
+
.news-carousel-slide {
|
|
614
|
+
flex: 0 0 85vw;
|
|
694
615
|
}
|
|
695
616
|
|
|
696
|
-
.carousel-
|
|
697
|
-
|
|
617
|
+
.news-carousel-container {
|
|
618
|
+
height: 45vh;
|
|
619
|
+
min-height: 280px;
|
|
698
620
|
}
|
|
621
|
+
}
|
|
699
622
|
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
623
|
+
/* === CORREÇÕES ESPECÍFICAS PARA SAFARI === */
|
|
624
|
+
|
|
625
|
+
/* Safari iOS - altura do viewport */
|
|
626
|
+
@supports (-webkit-touch-callout: none) {
|
|
627
|
+
.news-carousel {
|
|
628
|
+
height: -webkit-fill-available;
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
/* Safari - prefixos essenciais */
|
|
633
|
+
.news-carousel-track {
|
|
634
|
+
-webkit-transform: translateX(0);
|
|
635
|
+
transform: translateX(0);
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
.btn-todos {
|
|
639
|
+
-webkit-appearance: none;
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
.carousel-indicator {
|
|
643
|
+
-webkit-appearance: none;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
/* Safari - smooth scrolling */
|
|
647
|
+
.news-carousel {
|
|
648
|
+
-webkit-overflow-scrolling: touch;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
/* Fallback para Safari sem object-fit */
|
|
652
|
+
@supports not (object-fit: cover) {
|
|
653
|
+
.news-main-image,
|
|
654
|
+
.news-secondary-image,
|
|
655
|
+
.news-carousel-image {
|
|
656
|
+
background-size: cover;
|
|
657
|
+
background-position: center;
|
|
658
|
+
background-repeat: no-repeat;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
.news-main-image img,
|
|
662
|
+
.news-secondary-image img,
|
|
663
|
+
.news-carousel-image img {
|
|
664
|
+
opacity: 0;
|
|
704
665
|
}
|
|
705
666
|
}
|
|
706
667
|
</style>
|
|
@@ -709,8 +670,6 @@
|
|
|
709
670
|
document.addEventListener('DOMContentLoaded', function() {
|
|
710
671
|
const carousel = document.getElementById('newsCarousel');
|
|
711
672
|
const track = document.getElementById('carouselTrack');
|
|
712
|
-
const prevBtn = document.getElementById('prevBtn');
|
|
713
|
-
const nextBtn = document.getElementById('nextBtn');
|
|
714
673
|
const indicators = document.getElementById('carouselIndicators');
|
|
715
674
|
|
|
716
675
|
if (!carousel || !track) return;
|
|
@@ -728,9 +687,19 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
|
728
687
|
if (slideIndex >= totalSlides) slideIndex = totalSlides - 1;
|
|
729
688
|
|
|
730
689
|
currentSlide = slideIndex;
|
|
731
|
-
|
|
732
|
-
|
|
690
|
+
|
|
691
|
+
// Calcular largura do slide baseado no viewport
|
|
692
|
+
let slideWidth = 70; // padrão desktop
|
|
693
|
+
|
|
694
|
+
if (window.innerWidth <= 480) {
|
|
695
|
+
slideWidth = 85;
|
|
696
|
+
} else if (window.innerWidth <= 768) {
|
|
697
|
+
slideWidth = 75;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
const spacing = 4; // espaçamento em vw
|
|
733
701
|
const translateX = -(slideIndex * (slideWidth + spacing));
|
|
702
|
+
|
|
734
703
|
track.style.transform = `translateX(${translateX}vw)`;
|
|
735
704
|
|
|
736
705
|
// Atualizar indicadores
|
|
@@ -740,19 +709,6 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
|
740
709
|
});
|
|
741
710
|
}
|
|
742
711
|
|
|
743
|
-
// Event listeners para botões
|
|
744
|
-
if (prevBtn) {
|
|
745
|
-
prevBtn.addEventListener('click', () => {
|
|
746
|
-
goToSlide(currentSlide - 1);
|
|
747
|
-
});
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
if (nextBtn) {
|
|
751
|
-
nextBtn.addEventListener('click', () => {
|
|
752
|
-
goToSlide(currentSlide + 1);
|
|
753
|
-
});
|
|
754
|
-
}
|
|
755
|
-
|
|
756
712
|
// Event listeners para indicadores
|
|
757
713
|
if (indicators) {
|
|
758
714
|
indicators.addEventListener('click', (e) => {
|
|
@@ -763,7 +719,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
|
763
719
|
});
|
|
764
720
|
}
|
|
765
721
|
|
|
766
|
-
// Touch/swipe
|
|
722
|
+
// Touch/swipe - SIMPLES E FUNCIONAL
|
|
767
723
|
track.addEventListener('touchstart', (e) => {
|
|
768
724
|
startX = e.touches[0].clientX;
|
|
769
725
|
isDragging = true;
|
|
@@ -775,10 +731,18 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
|
775
731
|
|
|
776
732
|
currentX = e.touches[0].clientX;
|
|
777
733
|
const diffX = currentX - startX;
|
|
778
|
-
|
|
779
|
-
|
|
734
|
+
|
|
735
|
+
// Converter para vw
|
|
736
|
+
const diffXInVw = (diffX / window.innerWidth) * 100;
|
|
737
|
+
|
|
738
|
+
// Calcular posição atual
|
|
739
|
+
let slideWidth = 70;
|
|
740
|
+
if (window.innerWidth <= 480) slideWidth = 85;
|
|
741
|
+
else if (window.innerWidth <= 768) slideWidth = 75;
|
|
742
|
+
|
|
743
|
+
const spacing = 4;
|
|
780
744
|
const currentTranslate = -(currentSlide * (slideWidth + spacing));
|
|
781
|
-
const newTranslate = currentTranslate +
|
|
745
|
+
const newTranslate = currentTranslate + diffXInVw;
|
|
782
746
|
|
|
783
747
|
track.style.transform = `translateX(${newTranslate}vw)`;
|
|
784
748
|
});
|
|
@@ -803,14 +767,6 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
|
803
767
|
}
|
|
804
768
|
});
|
|
805
769
|
|
|
806
|
-
// Auto-play (desabilitado para melhor UX com swipe)
|
|
807
|
-
// Usuário controla totalmente com swipe
|
|
808
|
-
|
|
809
|
-
// Inicializar
|
|
810
|
-
goToSlide(0);
|
|
811
|
-
|
|
812
|
-
// Remover autoplay - usuário controla com swipe
|
|
813
|
-
|
|
814
770
|
// Keyboard navigation
|
|
815
771
|
document.addEventListener('keydown', (e) => {
|
|
816
772
|
if (e.key === 'ArrowLeft') {
|
|
@@ -819,6 +775,18 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
|
819
775
|
goToSlide(currentSlide + 1);
|
|
820
776
|
}
|
|
821
777
|
});
|
|
778
|
+
|
|
779
|
+
// Resize handler
|
|
780
|
+
let resizeTimeout;
|
|
781
|
+
window.addEventListener('resize', () => {
|
|
782
|
+
clearTimeout(resizeTimeout);
|
|
783
|
+
resizeTimeout = setTimeout(() => {
|
|
784
|
+
goToSlide(currentSlide);
|
|
785
|
+
}, 100);
|
|
786
|
+
});
|
|
787
|
+
|
|
788
|
+
// Inicializar
|
|
789
|
+
goToSlide(0);
|
|
822
790
|
});
|
|
823
791
|
</script>
|
|
824
792
|
|
|
@@ -124,6 +124,50 @@
|
|
|
124
124
|
// Reposiciona o carousel na posição atual
|
|
125
125
|
showSlide(currentIndex);
|
|
126
126
|
}
|
|
127
|
+
|
|
128
|
+
// SCROLL FLUIDO com trackpad/mouse wheel
|
|
129
|
+
sliderContainer.addEventListener('wheel', function(e) {
|
|
130
|
+
if (Math.abs(e.deltaX) > 0) {
|
|
131
|
+
e.preventDefault();
|
|
132
|
+
|
|
133
|
+
// Obter posição atual do transform
|
|
134
|
+
const currentTransform = sliderTrack.style.transform;
|
|
135
|
+
const match = currentTransform.match(/translateX\((-?\d*\.?\d*)px\)/);
|
|
136
|
+
let currentOffset = match ? parseFloat(match[1]) : 0;
|
|
137
|
+
|
|
138
|
+
// Movimento proporcional
|
|
139
|
+
const scrollMultiplier = 1.5;
|
|
140
|
+
const newOffset = currentOffset - (e.deltaX * scrollMultiplier);
|
|
141
|
+
|
|
142
|
+
// Limites
|
|
143
|
+
const maxOffset = 0;
|
|
144
|
+
const minOffset = -(maxIndex * (slideWidth + slideMargin));
|
|
145
|
+
|
|
146
|
+
// Resistência nas bordas
|
|
147
|
+
let finalOffset = newOffset;
|
|
148
|
+
if (newOffset > maxOffset) {
|
|
149
|
+
finalOffset = maxOffset + ((newOffset - maxOffset) * 0.3);
|
|
150
|
+
} else if (newOffset < minOffset) {
|
|
151
|
+
finalOffset = minOffset + ((newOffset - minOffset) * 0.3);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// Aplicar posição
|
|
155
|
+
sliderTrack.style.transition = 'none';
|
|
156
|
+
sliderTrack.style.transform = `translateX(${finalOffset}px)`;
|
|
157
|
+
|
|
158
|
+
// Atualizar currentIndex baseado na posição
|
|
159
|
+
const newIndex = Math.round(Math.abs(finalOffset) / (slideWidth + slideMargin));
|
|
160
|
+
currentIndex = Math.max(0, Math.min(newIndex, maxIndex));
|
|
161
|
+
updateNavigationButtons();
|
|
162
|
+
|
|
163
|
+
// Snap quando parar de rolar
|
|
164
|
+
clearTimeout(window.snapTimeout);
|
|
165
|
+
window.snapTimeout = setTimeout(() => {
|
|
166
|
+
sliderTrack.style.transition = 'transform 0.5s ease-in-out';
|
|
167
|
+
showSlide(currentIndex);
|
|
168
|
+
}, 150);
|
|
169
|
+
}
|
|
170
|
+
}, { passive: false });
|
|
127
171
|
|
|
128
172
|
// Função para atualizar a visibilidade dos botões de navegação
|
|
129
173
|
function updateNavigationButtons() {
|
|
@@ -228,6 +272,9 @@
|
|
|
228
272
|
// Inicialização
|
|
229
273
|
updateSlideWidth();
|
|
230
274
|
});
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
231
278
|
</script>
|
|
232
279
|
{% endblock content %}
|
|
233
280
|
{% endblock block_render %}
|