wagtail-enap-designsystem 1.2.1.173__py3-none-any.whl → 1.2.1.175__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.

@@ -732,6 +732,16 @@ class APISuapCourseBlock(StructBlock):
732
732
  label="Posição do Título",
733
733
  required=False
734
734
  )
735
+ estilo_cards = blocks.ChoiceBlock(
736
+ choices=[
737
+ ('eventos', 'Eventos'),
738
+ ('cursos', 'Cursos'),
739
+ ],
740
+ default='eventos',
741
+ help_text="Escolha o tipo dos cards",
742
+ label="Tipo dos cards",
743
+ required=True
744
+ )
735
745
  description = CharBlock(required=False, label="Descrição")
736
746
  cor_description = CharBlock(required=False, label="Cor da Descrição em HEX (opcional)")
737
747
  button = CharBlock(required=False, label="Titulo do Botão")
@@ -741,7 +751,7 @@ class APISuapCourseBlock(StructBlock):
741
751
  label="URL da API",
742
752
  help_text="URL da API para buscar os cursos/eventos"
743
753
  )
744
- num_items = blocks.IntegerBlock(default=3, label=_("Máximo de cursos apresentados"))
754
+ num_items = blocks.IntegerBlock(default=3, label=_("Máximo de cards apresentados"))
745
755
 
746
756
  def get_context(self, value, parent_context=None):
747
757
  context = super().get_context(value, parent_context)
@@ -3972,9 +3982,9 @@ class TextoImagemBlock(blocks.StructBlock):
3972
3982
 
3973
3983
  estilo_botao = blocks.ChoiceBlock(
3974
3984
  choices=[
3975
- ('primary', 'Primário (destaque)'),
3976
- ('secondary', 'Secundário'),
3977
- ('terciary', 'Terciário'),
3985
+ ('primary', 'Tipo primário'),
3986
+ ('secondary', 'Tipo secundário'),
3987
+ ('terciary', 'Tipo terciário'),
3978
3988
  ],
3979
3989
  default='primario',
3980
3990
  required=False,
@@ -3982,6 +3992,18 @@ class TextoImagemBlock(blocks.StructBlock):
3982
3992
  verbose_name="Estilo do botão"
3983
3993
  )
3984
3994
 
3995
+ tamanho_botao = blocks.ChoiceBlock(
3996
+ choices=[
3997
+ ('small', 'Pequeno'),
3998
+ ('medium', 'Médio'),
3999
+ ('large', 'Grande'),
4000
+ ('extra-large', 'Extra grande'),
4001
+ ],
4002
+ default='large',
4003
+ help_text="Escolha o tamanho do botão",
4004
+ label="Tamanho"
4005
+ )
4006
+
3985
4007
  # Coluna de imagem
3986
4008
  imagem = ImageChooserBlock(
3987
4009
  required=True,
@@ -2957,6 +2957,7 @@ class Template001(Page):
2957
2957
 
2958
2958
  class HolofotePage(Page):
2959
2959
  """Template Holofote"""
2960
+ subpage_types = ['HolofotePage']
2960
2961
 
2961
2962
  template = "enap_designsystem/pages/template_holofote.html"
2962
2963
 
@@ -12,10 +12,9 @@ a{
12
12
  justify-content: center;
13
13
  gap: 8px;
14
14
  text-decoration: none;
15
+ margin: 20px 0;
15
16
  }
16
17
 
17
-
18
-
19
18
  .content-richtext a {
20
19
  display: inline-flex;
21
20
  align-items: center;
@@ -41,30 +40,32 @@ a{
41
40
  color: white;
42
41
  }
43
42
 
44
-
45
-
46
-
47
43
  .small{
48
- height: 32px;
44
+ height: 32px !important;
49
45
  border-radius: 32px;
50
46
  }
51
47
 
52
48
  .medium{
53
- height: 40px;
49
+ height: 40px !important;
54
50
  border-radius: 32px;
55
51
  }
56
52
 
57
53
  .large{
58
- height: 48px;
54
+ height: 48px !important;
59
55
  border-radius: 32px;
60
56
  }
61
57
 
62
- .small:disabled, .medium:disabled, .large:disabled{
58
+ .extra-large{
59
+ height: 60px !important;
60
+ border-radius: 32px;
61
+ }
62
+
63
+ .small:disabled, .medium:disabled, .large:disabled, .extra-large:disabled{
63
64
  background-color: #C8D1E0;
64
65
  }
65
66
 
66
67
  .primary{
67
- padding: 8px 14px;
68
+ padding: 0 16px;
68
69
  background-color: #007D7A;
69
70
  border: none;
70
71
  color: white;
@@ -84,10 +85,6 @@ a{
84
85
  color: white;
85
86
  }
86
87
 
87
- .btn:hover{
88
-
89
- }
90
-
91
88
  .btn:active{
92
89
  color: #025257;
93
90
  }
@@ -98,7 +95,7 @@ a{
98
95
  }
99
96
 
100
97
  .secondary{
101
- padding: 8px 14px;
98
+ padding: 12px 16px;
102
99
  border: 1px solid #007D7A;
103
100
  background: white;
104
101
  color: #007D7A;
@@ -118,7 +115,7 @@ a{
118
115
  border: none;
119
116
  background: transparent;
120
117
  color: #007D7A;
121
- padding: 0 10px;
118
+ padding: 12px 16px;
122
119
  }
123
120
 
124
121
  .terciary:hover {
@@ -128,6 +125,6 @@ a{
128
125
  }
129
126
 
130
127
  .terciary:active {
131
- color: #025257;
132
- background-color: transparent;
128
+ color: #025257;
129
+ background-color: transparent;
133
130
  }
@@ -1,8 +1,8 @@
1
1
  <!-- enap_designsystem/blocks/suap/suap_courses_block.html -->
2
2
  {% load wagtailcore_tags wagtailimages_tags %}
3
3
  {% load static %}
4
-
5
- <section class="container suap-courses-section">
4
+ <div style="width:100%;display: flex;justify-content: center;">
5
+ <section style="width: fit-content" class="section-curso-cards-suap">
6
6
  <div class="suap-wrapper-texts">
7
7
  {% if bloco_suap.title %}
8
8
  <h2 style="color: {{value.cor_title}}" class="suap-h2-title">{{ bloco_suap.title }}</h2>
@@ -14,7 +14,8 @@
14
14
  </div>
15
15
 
16
16
  {% if cursos_suap %}
17
- <div class="suap-wrapper">
17
+ {% if value.estilo_cards == "eventos" %}
18
+ <div class="container suap-courses-section">
18
19
  <div class="suap-courses-carousel-container" id="suap-courses-carousel-container">
19
20
  <div class="suap-courses-carousel-items" id="suap-courses-carousel-items">
20
21
  {% for curso in cursos_suap %}
@@ -84,7 +85,7 @@
84
85
  <h3 class="suap-courses-title">{{ curso.descricao }}</h3>
85
86
  {% endif %}
86
87
  {% if curso.breve_descricao %}
87
- <p class="card-text">{{ curso.breve_descricao|truncatewords:10 }}</p>
88
+ <p class="suap-card-text">{{ curso.breve_descricao|truncatewords:10 }}</p>
88
89
  {% endif %}
89
90
 
90
91
  <!-- Status de inscrições -->
@@ -113,14 +114,54 @@
113
114
  </div>
114
115
  {% endfor %}
115
116
  </div>
116
- <button class="suap-courses-carousel-control suap-courses-carousel-control-prev">
117
- <img style="width: 40px; height: 40px;" src="{% static 'enap_designsystem/icons/iconleft.svg' %}" alt="Passar pro lado esquerdo">
117
+ <button class="carousel-control-curso-suap carousel-control-curso-suap-prev" style="left: 0px;">
118
+ <span class="visually-hidden">Rolar para esquerda</span>
119
+ <span class="material-symbols-outlined setas seta-esquerda">chevron_left</span>
120
+ </button>
121
+ <button class="carousel-control-curso-suap carousel-control-curso-suap-next" style="right: 0px;">
122
+ <span class="visually-hidden">Rolar para direita</span>
123
+ <span class="material-symbols-outlined setas seta-direita">chevron_right</span>
124
+ </button>
125
+ </div>
126
+ </div>
127
+ {% elif value.estilo_cards == "cursos" %}
128
+ <div class="wrapper-carousel-container01">
129
+ <div class="carousel-container01">
130
+ <div class="carousel-items01" id="cursos-suap-carousel">
131
+ {% for curso in cursos_suap %}
132
+ <a href="{{curso.url}}" class="btn1">
133
+ <div class="carousel-item-wrapper-suap">
134
+ <div class="carousel-item-curso-suap">
135
+ <div class="image-curso">
136
+ <h3 title="{{ curso.titulo }}">
137
+ <img class="img-fluid" src="{% static 'enap_designsystem/blocks/suap/default_2.png' %}" alt="Imagem padrão com logo da Enap e fundo verde" width="236" height="140" loading="lazy">
138
+ </h3>
139
+ </div>
140
+ <div class="content-curso">
141
+ <div class="card-body">
142
+ <div class="tag">Curso</div>
143
+ <h3 class="h3-card" style=" display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; ">{{ curso.descricao }}</h3>
144
+ <p class="card-text-text" style=" display: -webkit-box; color: #434A54; font-size: 16px; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; ">{{ curso.breve_descricao }}</p>
145
+ </div>
146
+ </div>
147
+ </div>
148
+ </div>
149
+ </a>
150
+ {% endfor %}
151
+ </div>
152
+
153
+ <button class="carousel-control-curso-suap carousel-control-curso-suap-prev">
154
+ <span class="visually-hidden">Rolar para esquerda</span>
155
+ <span class="material-symbols-outlined setas seta-esquerda">chevron_left</span>
118
156
  </button>
119
- <button class="suap-courses-carousel-control suap-courses-carousel-control-next">
120
- <img style="width: 40px; height: 40px;" src="{% static 'enap_designsystem/icons/iconrig.svg' %}" alt="Passar pro lado direito">
157
+ <button class="carousel-control-curso-suap carousel-control-curso-suap-next">
158
+ <span class="visually-hidden">Rolar para direita</span>
159
+ <span class="material-symbols-outlined setas seta-direita">chevron_right</span>
121
160
  </button>
161
+
122
162
  </div>
123
163
  </div>
164
+ {% endif %}
124
165
  {% if bloco_suap.url_button %}
125
166
  <a class="suap-btn-todos" href="{{ bloco_suap.url_button }}">{{ bloco_suap.button }}</a>
126
167
  {% endif %}
@@ -133,8 +174,11 @@
133
174
  {% endif %}
134
175
  {% endif %}
135
176
  </section>
136
-
177
+ </div>
137
178
  <style>
179
+ .carousel-item-curso-suap{
180
+ background-color: #FFFFFF;
181
+ }
138
182
  .suap-course-inscricoes {
139
183
  margin: 8px 0;
140
184
  font-size: 14px;
@@ -378,6 +422,10 @@
378
422
  font-style: italic;
379
423
  }
380
424
 
425
+ .carousel-control-curso-suap {
426
+ display: block;
427
+ }
428
+
381
429
  /* Estilos responsivos */
382
430
  @media (max-width: 992px) {
383
431
  .suap-courses-section {
@@ -468,215 +516,171 @@
468
516
 
469
517
  <script>
470
518
  document.addEventListener('DOMContentLoaded', function() {
471
- // Selecionar elementos do DOM
472
- const container = document.getElementById('suap-courses-carousel-container');
473
- const carouselItems = document.getElementById('suap-courses-carousel-items');
474
- const prevBtn = document.querySelector('.suap-courses-carousel-control-prev');
475
- const nextBtn = document.querySelector('.suap-courses-carousel-control-next');
476
- const items = carouselItems.querySelectorAll('.suap-courses-carousel-item');
477
-
478
- // Variáveis de controle
479
- let currentIndex = 0;
480
- let startX, moveX, initialPosition;
481
- let isDragging = false;
482
-
483
- // Dimensões fixas dos itens - IMPORTANTE para alinhamento correto
484
- const itemWidth = 364; // Largura do item
485
- const itemGap = 25; // Espaçamento entre itens
486
- const itemTotalWidth = itemWidth + itemGap; // Largura total de cada item + gap
487
-
488
- // Adicionar padding ao contêiner para garantir alinhamento correto dos cards
489
- container.style.paddingLeft = '0px';
490
- container.style.paddingRight = '0px';
491
-
492
- // Verifica se é dispositivo móvel
493
- function isMobile() {
494
- return window.innerWidth <= 768;
495
- }
496
-
497
- // Determina quantos itens são visíveis na viewport atual
498
- function getVisibleItems() {
499
- const containerWidth = container.offsetWidth;
500
- return Math.max(1, Math.floor(containerWidth / itemTotalWidth));
501
- }
502
-
503
- // Calcula o índice máximo possível
504
- function getMaxIndex() {
505
- return Math.max(0, items.length - getVisibleItems());
506
- }
507
-
508
- // Define quantos itens devem ser rolados de cada vez
509
- function getScrollAmount() {
510
- return isMobile() ? 1 : 3; // 1 no mobile, 3 no desktop
511
- }
512
-
513
- // Exibe o slide no índice especificado com alinhamento perfeito
514
- function showSlide(index) {
515
- // Garante que o índice esteja dentro dos limites válidos
516
- const maxIndex = getMaxIndex();
517
- currentIndex = Math.max(0, Math.min(index, maxIndex));
518
-
519
- // Calcula o offset preciso baseado no índice atual
520
- const offset = Math.round(currentIndex * itemTotalWidth);
521
-
522
- // Aplica a transformação com valor inteiro para evitar problemas de subpixel
523
- carouselItems.style.transform = `translateX(-${offset}px)`;
524
-
525
- // Atualiza a visibilidade dos botões de navegação
526
- updateButtons(maxIndex);
527
- }
528
-
529
- // Atualiza a visibilidade dos botões de navegação
530
- function updateButtons(maxIndex) {
531
- // Primeiro slide: esconde botão anterior
532
- if (currentIndex <= 0) {
533
- prevBtn.style.display = 'none';
534
- nextBtn.style.display = items.length > getVisibleItems() ? 'block' : 'none';
535
- }
536
- // Último slide: esconde botão próximo
537
- else if (currentIndex >= maxIndex) {
538
- prevBtn.style.display = 'block';
539
- nextBtn.style.display = 'none';
540
- }
541
- // Slides intermediários: mostra ambos os botões
542
- else {
543
- prevBtn.style.display = 'block';
544
- nextBtn.style.display = 'block';
519
+ // Função genérica para inicializar um carrossel
520
+ function initCarousel({
521
+ containerSelector,
522
+ itemsSelector,
523
+ prevBtnSelector,
524
+ nextBtnSelector,
525
+ itemWidth,
526
+ itemGap,
527
+ useItemsAsContainer = false // NOVO: permite usar o próprio items como container
528
+ }) {
529
+ const container = document.querySelector(containerSelector);
530
+ const carouselItems = container ? container.querySelector(itemsSelector) : null;
531
+ const prevBtn = container ? container.querySelector(prevBtnSelector) : null;
532
+ const nextBtn = container ? container.querySelector(nextBtnSelector) : null;
533
+ if (!container || !carouselItems || !prevBtn || !nextBtn) return;
534
+ const items = carouselItems.querySelectorAll(':scope > *');
535
+ let currentIndex = 0;
536
+ let startX, moveX, initialPosition;
537
+ let isDragging = false;
538
+ const itemTotalWidth = itemWidth + itemGap;
539
+
540
+ function isMobile() {
541
+ return window.innerWidth <= 768;
545
542
  }
546
- }
547
-
548
- // Configurar eventos de botões de navegação
549
- prevBtn.addEventListener('click', () => {
550
- // Número de itens a retroceder depende do dispositivo
551
- const amount = getScrollAmount();
552
- const step = Math.min(amount, currentIndex);
553
- showSlide(currentIndex - step);
554
- });
555
-
556
- nextBtn.addEventListener('click', () => {
557
- // Número de itens a avançar depende do dispositivo
558
- const amount = getScrollAmount();
559
- const maxIndex = getMaxIndex();
560
- const step = Math.min(amount, maxIndex - currentIndex);
561
- showSlide(currentIndex + step);
562
- });
563
-
564
- // Eventos de toque para mobile
565
- carouselItems.addEventListener('touchstart', handleStart, { passive: true });
566
- carouselItems.addEventListener('touchmove', handleMove, { passive: false });
567
- carouselItems.addEventListener('touchend', handleEnd, { passive: true });
568
-
569
- // Eventos de mouse para desktop
570
- carouselItems.addEventListener('mousedown', handleStart);
571
- carouselItems.addEventListener('mousemove', handleMove);
572
- carouselItems.addEventListener('mouseup', handleEnd);
573
- carouselItems.addEventListener('mouseleave', handleEnd);
574
-
575
- // Inicia o arrasto do carousel
576
- function handleStart(e) {
577
- isDragging = true;
578
- startX = e.type === 'touchstart' ? e.touches[0].clientX : e.clientX;
579
- initialPosition = currentIndex * itemTotalWidth;
580
-
581
- // Remove transição para resposta imediata
582
- carouselItems.style.transition = 'none';
583
- }
584
-
585
- // Processa o movimento durante o arrasto
586
- function handleMove(e) {
587
- if (!isDragging) return;
588
-
589
- moveX = e.type === 'touchmove' ? e.touches[0].clientX : e.clientX;
590
- const diff = moveX - startX;
591
-
592
- // Aplica o movimento com efeito elástico nos limites
593
- const maxIndex = getMaxIndex();
594
-
595
- if (currentIndex === 0 && diff > 50) {
596
- // Limite inicial com efeito elástico
597
- carouselItems.style.transform = `translateX(${diff / 3 - initialPosition}px)`;
598
- } else if (currentIndex >= maxIndex && diff < -50) {
599
- // Limite final com efeito elástico
600
- carouselItems.style.transform = `translateX(${diff / 3 - initialPosition}px)`;
601
- } else {
602
- // Movimento normal
603
- carouselItems.style.transform = `translateX(${diff - initialPosition}px)`;
543
+ function getVisibleItems() {
544
+ // Use o próprio items como container se necessário
545
+ const base = useItemsAsContainer ? carouselItems : container;
546
+ const containerWidth = base.offsetWidth;
547
+ return Math.max(1, Math.floor(containerWidth / itemTotalWidth));
604
548
  }
605
-
606
- // Previne o scroll da página durante o arrasto horizontal
607
- if (Math.abs(diff) > 10 && e.type === 'touchmove') {
608
- e.preventDefault();
549
+ function getMaxIndex() {
550
+ return Math.max(0, items.length - getVisibleItems());
609
551
  }
610
- }
611
-
612
- // Finaliza o arrasto do carousel
613
- function handleEnd() {
614
- if (!isDragging) return;
615
- isDragging = false;
616
-
617
- // Restaura a transição suave
618
- carouselItems.style.transition = 'transform 0.3s ease-in-out';
619
-
620
- // Determina se o movimento foi significativo para mudar o slide
621
- const diff = moveX - startX;
622
- const threshold = itemWidth / 4; // 25% da largura do item
623
-
624
- if (diff > threshold) {
625
- // Swipe para direita (voltar)
552
+ function getScrollAmount() {
553
+ return isMobile() ? 1 : 3;
554
+ }
555
+ function showSlide(index) {
556
+ const maxIndex = getMaxIndex();
557
+ currentIndex = Math.max(0, Math.min(index, maxIndex));
558
+ const offset = Math.round(currentIndex * itemTotalWidth);
559
+ carouselItems.style.transform = `translateX(-${offset}px)`;
560
+ updateButtons(maxIndex);
561
+ }
562
+ function updateButtons(maxIndex) {
563
+ if (currentIndex <= 0) {
564
+ prevBtn.style.display = 'none';
565
+ nextBtn.style.display = items.length > getVisibleItems() ? 'block' : 'none';
566
+ } else if (currentIndex >= maxIndex) {
567
+ prevBtn.style.display = 'block';
568
+ nextBtn.style.display = 'none';
569
+ } else {
570
+ prevBtn.style.display = 'block';
571
+ nextBtn.style.display = 'block';
572
+ }
573
+ }
574
+ prevBtn.addEventListener('click', () => {
626
575
  const amount = getScrollAmount();
627
576
  const step = Math.min(amount, currentIndex);
628
577
  showSlide(currentIndex - step);
629
- } else if (diff < -threshold) {
630
- // Swipe para esquerda (avançar)
578
+ });
579
+ nextBtn.addEventListener('click', () => {
631
580
  const amount = getScrollAmount();
632
581
  const maxIndex = getMaxIndex();
633
582
  const step = Math.min(amount, maxIndex - currentIndex);
634
583
  showSlide(currentIndex + step);
635
- } else {
636
- // Movimento pequeno, volta à posição atual
637
- showSlide(currentIndex);
638
- }
639
- }
640
-
641
- // Previne cliques em links durante arrasto
642
- const links = carouselItems.querySelectorAll('a');
643
- links.forEach(link => {
644
- link.addEventListener('click', function(e) {
645
- if (isDragging || (moveX && Math.abs(moveX - startX) > 10)) {
646
- e.preventDefault();
647
- }
648
584
  });
649
- });
650
-
651
- // Adapta o carousel quando a janela é redimensionada
652
- window.addEventListener('resize', function() {
653
- // Força uma pausa antes de recalcular para garantir medidas corretas
654
- setTimeout(function() {
655
- // Recalcula índices e posição
585
+ carouselItems.addEventListener('touchstart', handleStart, { passive: true });
586
+ carouselItems.addEventListener('touchmove', handleMove, { passive: false });
587
+ carouselItems.addEventListener('touchend', handleEnd, { passive: true });
588
+ carouselItems.addEventListener('mousedown', handleStart);
589
+ carouselItems.addEventListener('mousemove', handleMove);
590
+ carouselItems.addEventListener('mouseup', handleEnd);
591
+ carouselItems.addEventListener('mouseleave', handleEnd);
592
+
593
+ function handleStart(e) {
594
+ isDragging = true;
595
+ startX = e.type === 'touchstart' ? e.touches[0].clientX : e.clientX;
596
+ initialPosition = currentIndex * itemTotalWidth;
597
+ carouselItems.style.transition = 'none';
598
+ }
599
+ function handleMove(e) {
600
+ if (!isDragging) return;
601
+ moveX = e.type === 'touchmove' ? e.touches[0].clientX : e.clientX;
602
+ const diff = moveX - startX;
656
603
  const maxIndex = getMaxIndex();
657
- if (currentIndex > maxIndex) {
658
- currentIndex = maxIndex;
604
+ if (currentIndex === 0 && diff > 50) {
605
+ carouselItems.style.transform = `translateX(${diff / 3 - initialPosition}px)`;
606
+ } else if (currentIndex >= maxIndex && diff < -50) {
607
+ carouselItems.style.transform = `translateX(${diff / 3 - initialPosition}px)`;
608
+ } else {
609
+ carouselItems.style.transform = `translateX(${diff - initialPosition}px)`;
659
610
  }
660
-
661
- // Restaura transição para animação suave
662
- carouselItems.style.transition = 'transform 0.3s ease-in-out';
663
-
664
- // Atualiza a exibição
665
- showSlide(currentIndex);
666
- }, 100);
667
- });
668
-
669
- // Aguardar que todas as imagens carreguem para inicializar corretamente
670
- window.addEventListener('load', function() {
671
- // Inicializa com um pequeno delay para garantir medidas corretas
672
- setTimeout(function() {
673
- // Certificar que os estilos estão aplicados antes de inicializar
611
+ if (Math.abs(diff) > 10 && e.type === 'touchmove') {
612
+ e.preventDefault();
613
+ }
614
+ }
615
+ function handleEnd() {
616
+ if (!isDragging) return;
617
+ isDragging = false;
674
618
  carouselItems.style.transition = 'transform 0.3s ease-in-out';
675
- showSlide(0);
676
- }, 100);
677
- });
678
-
679
- // Inicializa o carousel (também será inicializado no evento load)
680
- showSlide(0);
619
+ const diff = moveX - startX;
620
+ const threshold = itemWidth / 4;
621
+ if (diff > threshold) {
622
+ const amount = getScrollAmount();
623
+ const step = Math.min(amount, currentIndex);
624
+ showSlide(currentIndex - step);
625
+ } else if (diff < -threshold) {
626
+ const amount = getScrollAmount();
627
+ const maxIndex = getMaxIndex();
628
+ const step = Math.min(amount, maxIndex - currentIndex);
629
+ showSlide(currentIndex + step);
630
+ } else {
631
+ showSlide(currentIndex);
632
+ }
633
+ }
634
+ const links = carouselItems.querySelectorAll('a');
635
+ links.forEach(link => {
636
+ link.addEventListener('click', function(e) {
637
+ if (isDragging || (moveX && Math.abs(moveX - startX) > 10)) {
638
+ e.preventDefault();
639
+ }
640
+ });
641
+ });
642
+ window.addEventListener('resize', function() {
643
+ setTimeout(function() {
644
+ const maxIndex = getMaxIndex();
645
+ if (currentIndex > maxIndex) {
646
+ currentIndex = maxIndex;
647
+ }
648
+ carouselItems.style.transition = 'transform 0.3s ease-in-out';
649
+ showSlide(currentIndex);
650
+ }, 100);
651
+ });
652
+ window.addEventListener('load', function() {
653
+ setTimeout(function() {
654
+ carouselItems.style.transition = 'transform 0.3s ease-in-out';
655
+ showSlide(0);
656
+ }, 100);
657
+ });
658
+ showSlide(0);
659
+ }
660
+
661
+ // Inicializa carrossel de eventos (cards grandes)
662
+ if (document.getElementById('suap-courses-carousel-container')) {
663
+ initCarousel({
664
+ containerSelector: '#suap-courses-carousel-container',
665
+ itemsSelector: '#suap-courses-carousel-items',
666
+ prevBtnSelector: '.carousel-control-curso-suap-prev',
667
+ nextBtnSelector: '.carousel-control-curso-suap-next',
668
+ itemWidth: 364,
669
+ itemGap: 25
670
+ });
671
+ }
672
+
673
+ // Inicializa carrossel de cursos (cards pequenos) - usa items como container base
674
+ if (document.querySelector('.carousel-container01')) {
675
+ initCarousel({
676
+ containerSelector: '.carousel-container01',
677
+ itemsSelector: '.carousel-items01',
678
+ prevBtnSelector: '.carousel-control-curso-suap-prev',
679
+ nextBtnSelector: '.carousel-control-curso-suap-next',
680
+ itemWidth: 268,
681
+ itemGap: 25,
682
+ useItemsAsContainer: true // NOVO: corrige cálculo de largura
683
+ });
684
+ }
681
685
  });
682
686
  </script>
@@ -13,7 +13,7 @@
13
13
  {% if value.incluir_botao and value.texto_botao %}
14
14
  <div class="texto-imagem-block__botao-container">
15
15
  <a href="{{ value.link_botao|default:'#' }}"
16
- class="btn {% if value.estilo_botao == 'primary' %} primary {% elif value.estilo_botao == 'secondary' %}secondary {% elif value.estilo_botao == 'terciary' %}terciary {% endif %}"
16
+ class="btn {{ value.estilo_botao }} {{ value.tamanho_botao }}"
17
17
  {% if value.link_botao and value.link_botao|slice:':4' == 'http' %}
18
18
  target="_blank" rel="noopener noreferrer"
19
19
  {% endif %}>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wagtail-enap-designsystem
3
- Version: 1.2.1.173
3
+ Version: 1.2.1.175
4
4
  Summary: Módulo de componentes utilizado nos portais ENAP, desenvolvido com Wagtail + CodeRedCMS
5
5
  Author: Renan Campos
6
6
  Author-email: renan.oliveira@enap.gov.br
@@ -1,7 +1,7 @@
1
1
  enap_designsystem/__init__.py,sha256=_SM5n--8zkHIEZfCoc7wEfm6hQT8cuATZSRlLdrD7Rg,68
2
2
  enap_designsystem/apps.py,sha256=qLaEaNoK_iuWGUwut_EUhD5TBcQfscyX-HF9GS-h9vY,233
3
3
  enap_designsystem/context_processors.py,sha256=Fsr9kDuSST3zz-8u7LLBeKcp7olG3hDpSVqwLFdACt0,1521
4
- enap_designsystem/models.py,sha256=qzjEh6FMeVsdlez2-0uoXQ8ZAcFgXYSGpPdE8AnphGU,214305
4
+ enap_designsystem/models.py,sha256=IqWTDFrIEYSKPwgkhuMRgrM2hzbXdEtzpt5lwmPG1yU,214340
5
5
  enap_designsystem/settings.py,sha256=YOAFLP9Wuja2kW_ZXU00k7vnLxy3q4fG5MTubnQJSPs,1021
6
6
  enap_designsystem/signals.py,sha256=tCKx_OUC1o54u5mnsGdUdE7-jySD6Q3r2uPYM-OX56g,2026
7
7
  enap_designsystem/urls.py,sha256=IdlporQMZtb9x0x0fU7VDz39holLQnRbNF5-yLHcnLI,2267
@@ -12,7 +12,7 @@ enap_designsystem/blocks/base_blocks.py,sha256=b031o3daCCIHpxyzfdtOWlK1HA5yrsc4O
12
12
  enap_designsystem/blocks/chatbot_blocks.py,sha256=SWBb-2pqBHu8GEIRHq7ZdAwo_1k88mmu2I20OD9shPg,1171
13
13
  enap_designsystem/blocks/content_blocks.py,sha256=QbCgUaASO3Zh8dFGMmnljx7VA97w_H3N4uD1ypmUPlY,17558
14
14
  enap_designsystem/blocks/form.py,sha256=twWHRhZDRVohSHadR-4cuL3mrdteg4gKREyehi7ozwc,91299
15
- enap_designsystem/blocks/html_blocks.py,sha256=3OQRqkK8-ct6SckAQ32PLFmkIGTCjEal2qg8RYZXOlM,269693
15
+ enap_designsystem/blocks/html_blocks.py,sha256=BPJ-N1J6WNeuk7hx8wmTZYoDGe5XdPEu5wm_D7yCcu4,270244
16
16
  enap_designsystem/blocks/layout_blocks.py,sha256=57ka8gu0r0qULwcGNu10n_Bm6aut84g3qChy-uTuo20,23805
17
17
  enap_designsystem/blocks/security.py,sha256=9v_bEZHYAMJF4enlyMB_sQ9G2mElO9L7oDyufw2Usw4,2160
18
18
  enap_designsystem/blocks/semana_blocks.py,sha256=BMcySmNzsq5ABnlYzRQOOm6UwYitc6dCZuyh2WGxwcM,73097
@@ -503,7 +503,7 @@ enap_designsystem/static/enap_designsystem/blocks/banner.css,sha256=4_b1yUGXftYr
503
503
  enap_designsystem/static/enap_designsystem/blocks/banner_search_block.css,sha256=yEjnQfZG1BzN2Jd87Gh6Nsl59NL3IrqigcYeOHq1_CY,6386
504
504
  enap_designsystem/static/enap_designsystem/blocks/banner_topicos_block.css,sha256=zNEX8EIn6e8T3VEtxIARDuzCs47EGtWztGfvpchL3sQ,2480
505
505
  enap_designsystem/static/enap_designsystem/blocks/breadcrumbs.css,sha256=4cmmjDhslcQt3K1wDiLcLVywCWglX71CkEW40wBh1sk,926
506
- enap_designsystem/static/enap_designsystem/blocks/btn.css,sha256=fo2I3wF60_fr3Ss9qg1yW2j9oxn7QsPnooC_QR06TXU,2059
506
+ enap_designsystem/static/enap_designsystem/blocks/btn.css,sha256=OHrEJMD-Wv6IjFiWVaKtyNmWw_moGil_ogzdpwLsgC0,2188
507
507
  enap_designsystem/static/enap_designsystem/blocks/bundle.css,sha256=WfNheI7_3rQNDQb9PPsaMvTeiPa5zWlcWN6yDmbFhEg,39700
508
508
  enap_designsystem/static/enap_designsystem/blocks/buttongroup.css,sha256=nH5d9b-nb7MClXCaAgUC3lGoXQj7uW9UIcZAiHvkHes,1252
509
509
  enap_designsystem/static/enap_designsystem/blocks/capsulas.css,sha256=AgBQ0vjx6fO1VSW83chfSAlqjZoq7TNRIuIGvqM03y8,13754
@@ -785,7 +785,7 @@ enap_designsystem/templates/enap_designsystem/blocks/tags.html,sha256=WQGgrer9NG
785
785
  enap_designsystem/templates/enap_designsystem/blocks/team_carousel.html,sha256=OL1by26xTmjvfZ010s_723zG0IMZhZf-aCLrsEkyZhE,13136
786
786
  enap_designsystem/templates/enap_designsystem/blocks/team_modern.html,sha256=h2JV0_Wxm6F67TfY8vxqw58y473p6Lu74fd2w1_vEW0,7125
787
787
  enap_designsystem/templates/enap_designsystem/blocks/testimonials_carousel.html,sha256=kuxwjm0aDcg4ftNS7EoWt8HlnpTfUsh77CyYWj15Onc,16517
788
- enap_designsystem/templates/enap_designsystem/blocks/texto_imagem.html,sha256=saVQP6Tjc3SasLPXJQYgTI86-Xw7v43qfRZ3SGhOgjE,2206
788
+ enap_designsystem/templates/enap_designsystem/blocks/texto_imagem.html,sha256=VP5-ndeHymzyCjp7AWiYrqX-INBbhowHLlbh_YNXTUU,2090
789
789
  enap_designsystem/templates/enap_designsystem/blocks/timeline.html,sha256=56kvz_2qCTmKTJjMCI0cBiaaV-EYQbj6d9mjI-wHwq4,17248
790
790
  enap_designsystem/templates/enap_designsystem/blocks/timeline_container.html,sha256=BdpgxrnQW2f4RACCpDIjG-_vW7oftVHJ_7gj3DjlsSE,6792
791
791
  enap_designsystem/templates/enap_designsystem/blocks/timeline_etapa.html,sha256=9cqu1pOnqv6VcgQnH7cxWOdQjnHbF3Ko6-AA7x9zQ3U,12328
@@ -803,7 +803,7 @@ enap_designsystem/templates/enap_designsystem/blocks/page/pagelist_block.html,sh
803
803
  enap_designsystem/templates/enap_designsystem/blocks/page/pagenoticias_block.html,sha256=kePUcD7ju4ZtfG8WXgRSFozHKKD-YChiREz1mH5Eiog,26811
804
804
  enap_designsystem/templates/enap_designsystem/blocks/rps/apirps_busca_block.html,sha256=pgAJNLXwXKlWSEeQZ8FeDU7w8VhXtl_1ItrgI-oDfek,7341
805
805
  enap_designsystem/templates/enap_designsystem/blocks/rps/apirps_ultima_block.html,sha256=GhfD9G1qeFEtBpYDiZM6KrDsMloyjKL6c8bjwqYgp2o,3064
806
- enap_designsystem/templates/enap_designsystem/blocks/suap/apisuap_courses_block.html,sha256=h_a2woVAM5jD06pr1gR8GwH4xLl6aEhc39zt5mX7ce4,25459
806
+ enap_designsystem/templates/enap_designsystem/blocks/suap/apisuap_courses_block.html,sha256=-pc_h8SZqB-vGZH54uEJ9hxqsmcgRmdfU-wEYBmjWBM,27009
807
807
  enap_designsystem/templates/enap_designsystem/blocks/suap/suap_courses_block.html,sha256=M7WIp4_K21sPr5wSCQPms_OFCCOWzEDfDF4ZjPTcpp4,16367
808
808
  enap_designsystem/templates/enap_designsystem/blocks/suap/suap_events_block.html,sha256=9YhZE6Xa1OP-kIUalbuoQjNmgxNzMDuMidVUplQLZ_s,20800
809
809
  enap_designsystem/templates/enap_designsystem/form_templates/form_report.html,sha256=RiGeNzPItCZ15QDBQM9AR7-d-wllkENax81FtEvR7uA,16667
@@ -907,8 +907,8 @@ enap_designsystem/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
907
907
  enap_designsystem/utils/decorators.py,sha256=bfBsglT3OtsTYliQnjAXsebL2b7QPWgr0f3uaN69aUY,344
908
908
  enap_designsystem/utils/services.py,sha256=2pKUs1US9Ldr602XWiUslK07TfyAd60yoY92VlphgTU,5988
909
909
  enap_designsystem/utils/sso.py,sha256=4RhBPfL2HH-WRqUbptO0MkQtD2rtDpodjlTFoaLj2jI,1186
910
- wagtail_enap_designsystem-1.2.1.173.dist-info/licenses/LICENSE,sha256=uAClLHfIrJJKFrvTQTb-KHf0d--sHqoa968MNnA9iWY,1077
911
- wagtail_enap_designsystem-1.2.1.173.dist-info/METADATA,sha256=PSL7iNd5DzrRRKqVT1ip459pylM32rh6Lr6_jwcI8p0,3783
912
- wagtail_enap_designsystem-1.2.1.173.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
913
- wagtail_enap_designsystem-1.2.1.173.dist-info/top_level.txt,sha256=RSFgMASxoA-hVftm5i4Qd0rArlX4Dq08lLv5G4sYD-g,18
914
- wagtail_enap_designsystem-1.2.1.173.dist-info/RECORD,,
910
+ wagtail_enap_designsystem-1.2.1.175.dist-info/licenses/LICENSE,sha256=uAClLHfIrJJKFrvTQTb-KHf0d--sHqoa968MNnA9iWY,1077
911
+ wagtail_enap_designsystem-1.2.1.175.dist-info/METADATA,sha256=R1WJv4FRVt9q0mMCfanS_hW2RAa8pxwLWqdOunaFYhQ,3783
912
+ wagtail_enap_designsystem-1.2.1.175.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
913
+ wagtail_enap_designsystem-1.2.1.175.dist-info/top_level.txt,sha256=RSFgMASxoA-hVftm5i4Qd0rArlX4Dq08lLv5G4sYD-g,18
914
+ wagtail_enap_designsystem-1.2.1.175.dist-info/RECORD,,