wagtail-enap-designsystem 1.2.1.192__py3-none-any.whl → 1.2.1.194__py3-none-any.whl

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

Potentially problematic release.


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

Files changed (25) hide show
  1. enap_designsystem/blocks/content_blocks.py +11 -0
  2. enap_designsystem/blocks/semana_inovacao.py +1 -1
  3. enap_designsystem/migrations/0465_alter_areaaluno_body_alter_cursoeadpage_curso_and_more.py +64768 -0
  4. enap_designsystem/migrations/0466_carouselresponsivo_largura_container.py +29 -0
  5. enap_designsystem/models.py +2 -2
  6. enap_designsystem/static/enap_designsystem/blocks/banner_topicos_block.css +1 -1
  7. enap_designsystem/static/enap_designsystem/blocks/btn.css +23 -2
  8. enap_designsystem/static/enap_designsystem/blocks/capsulas.css +222 -74
  9. enap_designsystem/static/enap_designsystem/blocks/carousel_images.css +3 -1
  10. enap_designsystem/static/enap_designsystem/blocks/carousel_responsive.css +9 -27
  11. enap_designsystem/static/enap_designsystem/blocks/carousel_responsivo_snippet.css +19 -27
  12. enap_designsystem/static/enap_designsystem/blocks/semana.css +0 -1
  13. enap_designsystem/static/enap_designsystem/blocks/texto_imagem.css +0 -1
  14. enap_designsystem/templates/enap_designsystem/base.html +0 -4
  15. enap_designsystem/templates/enap_designsystem/blocks/carousel_responsivo_snippet.html +90 -54
  16. enap_designsystem/templates/enap_designsystem/blocks/legislacao_block.html +1 -1
  17. enap_designsystem/templates/enap_designsystem/blocks/richtext_block.html +116 -48
  18. enap_designsystem/templates/enap_designsystem/pages/capsula_index_page.html +62 -54
  19. enap_designsystem/templates/enap_designsystem/pages/capsula_page.html +213 -50
  20. enap_designsystem/views.py +2 -2
  21. {wagtail_enap_designsystem-1.2.1.192.dist-info → wagtail_enap_designsystem-1.2.1.194.dist-info}/METADATA +1 -1
  22. {wagtail_enap_designsystem-1.2.1.192.dist-info → wagtail_enap_designsystem-1.2.1.194.dist-info}/RECORD +25 -23
  23. {wagtail_enap_designsystem-1.2.1.192.dist-info → wagtail_enap_designsystem-1.2.1.194.dist-info}/WHEEL +0 -0
  24. {wagtail_enap_designsystem-1.2.1.192.dist-info → wagtail_enap_designsystem-1.2.1.194.dist-info}/licenses/LICENSE +0 -0
  25. {wagtail_enap_designsystem-1.2.1.192.dist-info → wagtail_enap_designsystem-1.2.1.194.dist-info}/top_level.txt +0 -0
@@ -10,7 +10,7 @@
10
10
  margin-bottom: 2rem;
11
11
  font-size: 2rem;
12
12
  font-weight: 700;
13
- color: var(--enap-primary-color, #1976d2);
13
+ color: var(--enap-primary-color, #024248);
14
14
  }
15
15
 
16
16
  .carousel-responsivo__container {
@@ -18,8 +18,6 @@
18
18
  width: 100%;
19
19
  height: var(--carousel-height-mobile);
20
20
  overflow: hidden;
21
- border-radius: 0.5rem;
22
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
23
21
  }
24
22
 
25
23
  @media (min-width: 768px) {
@@ -66,20 +64,6 @@
66
64
  object-position: center;
67
65
  }
68
66
 
69
- .carousel-responsivo__overlay {
70
- position: absolute;
71
- top: 0;
72
- left: 0;
73
- width: 100%;
74
- height: 100%;
75
- background: linear-gradient(
76
- 135deg,
77
- rgba(0, 0, 0, 0.6) 0%,
78
- rgba(0, 0, 0, 0.3) 50%,
79
- rgba(0, 0, 0, 0.1) 100%
80
- );
81
- z-index: 2;
82
- }
83
67
 
84
68
  .carousel-responsivo__content {
85
69
  position: relative;
@@ -179,29 +163,27 @@
179
163
  position: absolute;
180
164
  top: 50%;
181
165
  transform: translateY(-50%);
182
- width: 48px;
183
- height: 48px;
184
- background: rgba(255, 255, 255, 0.9);
166
+ width: 40px;
167
+ height: 40px;
168
+ background: #006969;
185
169
  border: none;
186
170
  border-radius: 50%;
187
- color: var(--enap-primary-color, #1976d2);
188
- font-size: 24px;
171
+ color: white;
172
+ font-size: 30px;
189
173
  font-weight: bold;
190
174
  cursor: pointer;
191
- transition: all 0.3s ease;
192
175
  z-index: 4;
193
176
  display: flex;
194
177
  align-items: center;
195
178
  justify-content: center;
196
179
  backdrop-filter: blur(10px);
180
+ border: 2px solid white;
197
181
  }
198
182
 
199
183
  .carousel-responsivo__nav:hover,
200
184
  .carousel-responsivo__nav:focus {
201
- background: white;
202
- transform: translateY(-50%) scale(1.1);
203
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
204
- outline: 2px solid var(--enap-primary-color, #1976d2);
185
+ background: 025257;
186
+ outline: 2px solid var(--enap-primary-color, #024248);
205
187
  outline-offset: 2px;
206
188
  }
207
189
 
@@ -9,7 +9,7 @@
9
9
  margin-bottom: 2rem;
10
10
  font-size: 2rem;
11
11
  font-weight: 700;
12
- color: var(--enap-primary-color, #1976d2);
12
+ color: var(--enap-primary-color, #024248);
13
13
  }
14
14
 
15
15
  .carousel-responsivo__container {
@@ -17,8 +17,6 @@
17
17
  width: 100%;
18
18
  height: var(--carousel-height-mobile);
19
19
  overflow: hidden;
20
- border-radius: 0.5rem;
21
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
22
20
  }
23
21
 
24
22
  @media (min-width: 768px) {
@@ -80,20 +78,6 @@
80
78
  object-position: center;
81
79
  }
82
80
 
83
- .carousel-responsivo__overlay {
84
- position: absolute;
85
- top: 0;
86
- left: 0;
87
- width: 100%;
88
- height: 100%;
89
- background: linear-gradient(
90
- 135deg,
91
- rgba(0, 0, 0, 0.6) 0%,
92
- rgba(0, 0, 0, 0.3) 50%,
93
- rgba(0, 0, 0, 0.1) 100%
94
- );
95
- z-index: 2;
96
- }
97
81
 
98
82
  .carousel-responsivo__content {
99
83
  position: relative;
@@ -184,29 +168,27 @@
184
168
  position: absolute;
185
169
  top: 50%;
186
170
  transform: translateY(-50%);
187
- width: 48px;
188
- height: 48px;
189
- background: rgba(255, 255, 255, 0.9);
171
+ width: 40px;
172
+ height: 40px;
173
+ background: #006969;
190
174
  border: none;
191
175
  border-radius: 50%;
192
- color: var(--enap-primary-color, #1976d2);
193
- font-size: 24px;
176
+ color: white;
177
+ font-size: 30px;
194
178
  font-weight: bold;
195
179
  cursor: pointer;
196
- transition: all 0.3s ease;
197
180
  z-index: 4;
198
181
  display: flex;
199
182
  align-items: center;
200
183
  justify-content: center;
201
184
  backdrop-filter: blur(10px);
185
+ border: 2px solid white;
202
186
  }
203
187
 
204
188
  .carousel-responsivo__nav:hover,
205
189
  .carousel-responsivo__nav:focus {
206
- background: white;
207
- transform: translateY(-50%) scale(1.1);
208
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
209
- outline: 2px solid var(--enap-primary-color, #1976d2);
190
+ background: 025257;
191
+ outline: 2px solid var(--enap-primary-color, #024248);
210
192
  outline-offset: 2px;
211
193
  }
212
194
 
@@ -276,6 +258,16 @@
276
258
  }
277
259
  }
278
260
 
261
+ @media (max-width: 480px) {
262
+ .container-out {
263
+ padding: 0 2rem;
264
+ }
265
+
266
+ .carousel-responsivo__nav {
267
+ top: 90%;
268
+ }
269
+ }
270
+
279
271
  /* Temas de cores */
280
272
  .carousel-responsivo__slide--primary {
281
273
  --theme-color: var(--enap-primary-color, #1976d2);
@@ -637,7 +637,6 @@
637
637
  position: relative;
638
638
  z-index: 2;
639
639
  margin: 0 auto;
640
- padding: 0 20px;
641
640
  }
642
641
 
643
642
  .faq-titulo {
@@ -6,7 +6,6 @@
6
6
  .texto-imagem-block__container {
7
7
  max-width: 1142px;
8
8
  margin: 0 auto;
9
- padding: 0 1rem;
10
9
  display: grid;
11
10
  grid-template-columns: 1fr 1fr;
12
11
  gap: 2rem;
@@ -303,10 +303,6 @@
303
303
  link.setAttribute('aria-label', 'Link sem texto - ' + (link.href || 'destino desconhecido'));
304
304
  }
305
305
 
306
- // Estilização
307
- link.style.textDecoration = 'none';
308
-
309
-
310
306
  });
311
307
 
312
308
  // Estilizar parágrafos
@@ -1,21 +1,21 @@
1
1
  <!-- templates/blocks/carousel_responsivo_snippet.html -->
2
2
  {% load wagtailcore_tags wagtailimages_tags %}
3
3
 
4
- <section class="carousel-responsivo"
4
+ {% with carousel_id="carousel-snippet-unique" %}
5
+ <section class="carousel-responsivo{% if value.largura_container == 'limitador' %} carousel-responsivo--limitado{% endif %}"
5
6
  data-autoplay="{{ value.autoplay }}"
6
7
  data-interval="{{ value.intervalo_autoplay }}"
7
8
  data-efeito="{{ value.efeito_transicao }}"
8
9
  style="--carousel-height-desktop: {{ value.altura_desktop }}; --carousel-height-mobile: {{ value.altura_mobile }};">
9
10
 
10
11
  {% if value.titulo_secao %}
11
- <div class="container">
12
+ <div class="{% if value.largura_container == 'limitador' %} {% endif %}">
12
13
  <h2 class="carousel-responsivo__title">{{ value.titulo_secao }}</h2>
13
14
  </div>
14
15
  {% endif %}
15
16
 
16
- <!-- CORREÇÃO #1: ID único para snippet -->
17
- <div class="carousel-responsivo__container"
18
- id="carousel-snippet-{{ value.id|default:block.id|default:forloop.counter|default:'snippet' }}"
17
+ <div class="carousel-responsivo__container{% if value.largura_container == 'limitador' %} {% endif %}"
18
+ id="{{ carousel_id }}"
19
19
  data-carousel-type="snippet">
20
20
 
21
21
  <!-- Slides -->
@@ -58,7 +58,7 @@
58
58
 
59
59
  <!-- Conteúdo -->
60
60
  <div class="carousel-responsivo__content">
61
- <div class="container">
61
+ <div class="container-out">
62
62
  <div class="carousel-responsivo__text-wrapper">
63
63
  {% if slide.titulo %}
64
64
  <h3 class="carousel-responsivo__slide-title">{{ slide.titulo }}</h3>
@@ -74,28 +74,32 @@
74
74
  </div>
75
75
  {% endif %}
76
76
 
77
- <!-- CORREÇÃO #2: Links com melhor acessibilidade -->
78
77
  {% if slide.link_texto %}
79
- {% if slide.link_interno %}
80
- {% with link_url=slide.link_interno.url %}
81
- {% elif slide.link_url %}
82
- {% with link_url=slide.link_url %}
78
+ {% if slide.link_interno %}
79
+ {% with link_url=slide.link_interno.url %}
80
+ <div class="carousel-responsivo__slide-actions">
81
+ <a href="{{ link_url }}"
82
+ class="carousel-responsivo__slide-button"
83
+ aria-label="{{ slide.link_texto }}">
84
+ {{ slide.link_texto }}
85
+ <span class="carousel-responsivo__slide-button-icon" aria-hidden="true">→</span>
86
+ </a>
87
+ </div>
88
+ {% endwith %}
89
+ {% elif slide.link_url %}
90
+ {% with link_url=slide.link_url %}
91
+ <div class="carousel-responsivo__slide-actions">
92
+ <a href="{{ link_url }}"
93
+ class="carousel-responsivo__slide-button"
94
+ target="_blank" rel="noopener noreferrer"
95
+ aria-label="{{ slide.link_texto }} (abre em nova aba)">
96
+ {{ slide.link_texto }}
97
+ <span class="carousel-responsivo__slide-button-icon" aria-hidden="true">→</span>
98
+ </a>
99
+ </div>
100
+ {% endwith %}
101
+ {% endif %}
83
102
  {% endif %}
84
-
85
- {% if link_url %}
86
- <div class="carousel-responsivo__slide-actions">
87
- <a href="{{ link_url }}"
88
- class="carousel-responsivo__slide-button"
89
- {% if slide.link_url %}target="_blank" rel="noopener noreferrer"{% endif %}
90
- aria-label="{{ slide.link_texto }}{% if slide.link_url %} (abre em nova aba){% endif %}">
91
- {{ slide.link_texto }}
92
- <span class="carousel-responsivo__slide-button-icon" aria-hidden="true">→</span>
93
- </a>
94
- </div>
95
- {% endif %}
96
-
97
- {% endwith %}
98
- {% endif %}
99
103
  </div>
100
104
  </div>
101
105
  </div>
@@ -105,23 +109,23 @@
105
109
  {% endfor %}
106
110
  </div>
107
111
 
108
- <!-- CORREÇÃO #3: Navegação com melhor acessibilidade -->
112
+ <!-- Navegação com melhor acessibilidade -->
109
113
  {% if value.mostrar_navegacao and value.slides|length > 1 %}
110
114
  <button class="carousel-responsivo__nav carousel-responsivo__nav--prev"
111
115
  type="button"
112
116
  aria-label="Ir para o slide anterior"
113
- aria-controls="carousel-snippet-{{ value.id|default:block.id|default:forloop.counter|default:'snippet' }}">
117
+ aria-controls="{{ carousel_id }}">
114
118
  <span aria-hidden="true">‹</span>
115
119
  </button>
116
120
  <button class="carousel-responsivo__nav carousel-responsivo__nav--next"
117
121
  type="button"
118
122
  aria-label="Ir para o próximo slide"
119
- aria-controls="carousel-snippet-{{ value.id|default:block.id|default:forloop.counter|default:'snippet' }}">
123
+ aria-controls="{{ carousel_id }}">
120
124
  <span aria-hidden="true">›</span>
121
125
  </button>
122
126
  {% endif %}
123
127
 
124
- <!-- CORREÇÃO #4: Indicadores com IDs únicos -->
128
+ <!-- Indicadores com IDs únicos -->
125
129
  {% if value.mostrar_indicators and value.slides|length > 1 %}
126
130
  <div class="carousel-responsivo__indicators"
127
131
  role="tablist"
@@ -130,9 +134,9 @@
130
134
  <button class="carousel-responsivo__indicator"
131
135
  type="button"
132
136
  role="tab"
133
- id="carousel-snippet-tab-{{ value.id|default:block.id|default:forloop.parentloop.counter|default:'snippet' }}-{{ forloop.counter }}"
137
+ id="{{ carousel_id }}-tab-{{ forloop.counter }}"
134
138
  aria-label="Ir para slide {{ forloop.counter }}{% if slide.block_type == 'slide' and slide.value.titulo %}: {{ slide.value.titulo }}{% endif %}"
135
- aria-controls="carousel-snippet-{{ value.id|default:block.id|default:forloop.parentloop.counter|default:'snippet' }}"
139
+ aria-controls="{{ carousel_id }}"
136
140
  data-slide="{{ forloop.counter0 }}"
137
141
  {% if forloop.first %}aria-selected="true" tabindex="0"{% else %}aria-selected="false" tabindex="-1"{% endif %}>
138
142
  <span class="sr-only">Slide {{ forloop.counter }}{% if slide.block_type == 'slide' and slide.value.titulo %}: {{ slide.value.titulo }}{% endif %}</span>
@@ -141,22 +145,40 @@
141
145
  </div>
142
146
  {% endif %}
143
147
 
144
- <!-- CORREÇÃO #5: Live region para anúncios -->
148
+ <!-- Live region para anúncios -->
145
149
  <div class="sr-only"
146
150
  aria-live="polite"
147
151
  aria-atomic="true"
148
- id="carousel-snippet-status-{{ value.id|default:block.id|default:forloop.counter|default:'snippet' }}">
152
+ id="{{ carousel_id }}-status">
149
153
  Slide 1 de {{ value.slides|length }}{% if value.slides.0.block_type == 'slide' and value.slides.0.value.titulo %}: {{ value.slides.0.value.titulo }}{% endif %}
150
154
  </div>
151
155
  </div>
152
156
  </section>
153
157
 
158
+ <style>
159
+ .carousel-responsivo--limitado {
160
+ max-width: 1142px;
161
+ margin-left: auto;
162
+ margin-right: auto;
163
+ border-radius: 20px;
164
+ }
165
+
166
+ .carousel-responsivo--limitado .carousel-responsivo__container {
167
+ width: 100%;
168
+ border-radius: 20px;
169
+ }
170
+
171
+ .container-out{
172
+ max-width: 1142px;
173
+ margin: 0 auto;
174
+ padding: 0 5rem;
175
+ }
154
176
  .carousel-responsivo__title {
155
177
  text-align: center;
156
178
  margin-bottom: 2rem;
157
179
  font-size: 2rem;
158
180
  font-weight: 700;
159
- color: var(--enap-primary-color, #1976d2);
181
+ color: var(--enap-primary-color, #024248);
160
182
  }
161
183
 
162
184
  .carousel-responsivo__container {
@@ -164,8 +186,6 @@
164
186
  width: 100%;
165
187
  height: var(--carousel-height-mobile);
166
188
  overflow: hidden;
167
- border-radius: 0.5rem;
168
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
169
189
  }
170
190
 
171
191
  @media (min-width: 768px) {
@@ -200,7 +220,7 @@
200
220
  gap: 0.5rem;
201
221
  padding: 0.75rem 1.5rem;
202
222
  background: rgba(255, 255, 255, 0.9);
203
- color: var(--enap-primary-color, #1976d2);
223
+ color: var(--enap-primary-color, #024248);
204
224
  text-decoration: none;
205
225
  border-radius: 0.375rem;
206
226
  font-weight: 600;
@@ -213,7 +233,7 @@
213
233
  background: white;
214
234
  transform: translateY(-2px);
215
235
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
216
- outline: 2px solid var(--enap-primary-color, #1976d2);
236
+ outline: 2px solid var(--enap-primary-color, #024248);
217
237
  outline-offset: 2px;
218
238
  }
219
239
 
@@ -221,35 +241,42 @@
221
241
  position: absolute;
222
242
  top: 50%;
223
243
  transform: translateY(-50%);
224
- width: 48px;
225
- height: 48px;
226
- background: rgba(255, 255, 255, 0.9);
244
+ width: 40px;
245
+ height: 40px;
246
+ background: #006969;
227
247
  border: none;
228
248
  border-radius: 50%;
229
- color: var(--enap-primary-color, #1976d2);
230
- font-size: 24px;
249
+ color: white;
250
+ font-size: 30px;
231
251
  font-weight: bold;
232
252
  cursor: pointer;
233
- transition: all 0.3s ease;
234
253
  z-index: 4;
235
254
  display: flex;
236
255
  align-items: center;
237
256
  justify-content: center;
238
257
  backdrop-filter: blur(10px);
258
+ border: 2px solid white;
259
+ }
260
+
261
+ .carousel-responsivo__nav:hover {
262
+ background: #025257;
263
+ transform: translateY(-50%) scale(1.05);
264
+ box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
239
265
  }
240
266
 
241
- .carousel-responsivo__nav:hover,
267
+ /* Estado de foco (selecionado com tab) */
242
268
  .carousel-responsivo__nav:focus {
243
- background: white;
244
- transform: translateY(-50%) scale(1.1);
245
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
246
- outline: 2px solid var(--enap-primary-color, #1976d2);
247
- outline-offset: 2px;
269
+ background: #006969;
270
+ }
271
+
272
+ /* Estado de pressing (botão sendo pressionado) */
273
+ .carousel-responsivo__nav:active {
274
+ background: #024248;
248
275
  }
249
276
 
250
277
  /* Temas de cores */
251
278
  .carousel-responsivo__slide--primary {
252
- --theme-color: var(--enap-primary-color, #1976d2);
279
+ --theme-color: var(--enap-primary-color, #024248);
253
280
  }
254
281
 
255
282
  .carousel-responsivo__slide--secondary {
@@ -263,7 +290,15 @@
263
290
  .carousel-responsivo__slide--dark {
264
291
  --theme-color: #1a1a1a;
265
292
  }
266
- <style>
293
+ @media (max-width: 480px) {
294
+ .container-out {
295
+ padding: 0 2rem;
296
+ }
297
+
298
+ .carousel-responsivo__nav {
299
+ top: 90%;
300
+ }
301
+ }
267
302
 
268
303
  </style>
269
304
 
@@ -447,4 +482,5 @@ document.addEventListener('DOMContentLoaded', function() {
447
482
  startAutoplay();
448
483
  });
449
484
  });
450
- </script>
485
+ </script>
486
+ {% endwith %}
@@ -46,7 +46,7 @@
46
46
  display: flex;
47
47
  flex-direction: column;
48
48
  gap: 16px;
49
- max-width: 1200px;
49
+ max-width: 1142px;
50
50
  margin: 0 auto;
51
51
  }
52
52
 
@@ -1,55 +1,123 @@
1
1
  {% load wagtailcore_tags %}
2
2
 
3
3
  <style>
4
- .content-richtext a {
5
- display: inline-flex;
6
- align-items: center;
7
- padding: 0px 10px;
8
- background-color: transparent;
9
- border: none;
10
- color: #007D7A;
11
- gap: 8px;
12
- width: auto;
13
- text-decoration: none;
14
- border-radius: 32px;
15
- }
16
-
17
- .content-richtext a:hover {
18
- background-color: #006562;
19
- }
20
-
21
-
22
- .content-richtext p {
23
- margin-bottom: 1.2em;
24
- line-height: 1.6;
25
- }
26
-
27
- .content-richtext h2 {
28
- font-size: 1.5em;
29
- margin-top: 1em;
30
- color: #333;
31
- }
32
-
33
- .content-richtext ul,
34
- .content-richtext ol {
35
- margin-left: 1.5em;
36
- margin-bottom: 1em;
37
- }
38
-
39
- .content-richtext blockquote {
40
- border-left: 3px solid #007D7A;
41
- padding-left: 1em;
42
- margin-left: 0;
43
- color: #555;
44
- }
45
-
46
- .content-richtext img {
47
- max-width: 100%;
48
- height: auto;
49
- margin: 1em 0;
50
- }
4
+ .content-richtext a {
5
+ display: inline-flex;
6
+ align-items: center;
7
+ padding: 0;
8
+ background-color: transparent;
9
+ border: none;
10
+ color: #007D7A;
11
+ gap: 8px;
12
+ width: auto;
13
+ border-radius: 32px;
14
+ font-weight: 900;
15
+ position: relative;
16
+ padding-right: 15px;
17
+ }
18
+
19
+ /* Ícone apenas para links externos */
20
+ .content-richtext a[target="_blank"]::after {
21
+ content: "";
22
+ width: 12px;
23
+ height: 12px;
24
+ position: absolute;
25
+ right: 0;
26
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='12' height='12' fill='none' stroke='%23007D7A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E");
27
+ background-repeat: no-repeat;
28
+ background-size: contain;
29
+ opacity: 0.7;
30
+ transition: transform 0.2s ease, opacity 0.2s ease;
31
+ }
32
+
33
+ .content-richtext a:hover::after,
34
+ .content-richtext a:focus::after {
35
+ transform: translateX(2px) translateY(-2px);
36
+ opacity: 1;
37
+ }
38
+
39
+ .content-richtext a:hover,
40
+ .content-richtext a:focus {
41
+ color: #006562;
42
+ text-decoration: underline;
43
+ outline: 2px solid transparent; /* Para acessibilidade de foco */
44
+ }
45
+
46
+ /* Adiciona foco visível */
47
+ .content-richtext a:focus-visible {
48
+ outline: 2px solid #006562;
49
+ outline-offset: 2px;
50
+ }
51
+
52
+ /* Restante do CSS permanece o mesmo */
53
+ .content-richtext p {
54
+ margin-bottom: 1.2em;
55
+ line-height: 1.6;
56
+ }
57
+
58
+ .content-richtext h2 {
59
+ font-size: 1.5em;
60
+ margin-top: 1em;
61
+ color: #333;
62
+ }
63
+
64
+ .content-richtext ul,
65
+ .content-richtext ol {
66
+ margin-left: 1.5em;
67
+ margin-bottom: 1em;
68
+ }
69
+
70
+ .content-richtext blockquote {
71
+ border-left: 3px solid #007D7A;
72
+ padding-left: 1em;
73
+ margin-left: 0;
74
+ color: #555;
75
+ }
76
+
77
+ .content-richtext img {
78
+ max-width: 100%;
79
+ height: auto;
80
+ margin: 1em 0;
81
+ }
82
+
83
+ /* Classe auxiliar para esconder visualmente texto, mas manter disponível para leitores de tela */
84
+ .sr-only {
85
+ position: absolute;
86
+ width: 1px;
87
+ height: 1px;
88
+ padding: 0;
89
+ margin: -1px;
90
+ overflow: hidden;
91
+ clip: rect(0, 0, 0, 0);
92
+ white-space: nowrap;
93
+ border-width: 0;
94
+ }
51
95
  </style>
52
96
 
53
97
  <div class="content-richtext">
54
98
  {% block block_render %}{{ self|richtext }}{% endblock %}
55
- </div>
99
+ </div>
100
+
101
+ <script>
102
+ document.addEventListener('DOMContentLoaded', function() {
103
+ const links = document.querySelectorAll('.content-richtext a');
104
+ links.forEach(function(link) {
105
+ // Verifica se o link não é interno
106
+ const href = link.getAttribute('href');
107
+ if (href && !href.startsWith('#') && !href.startsWith('/')) {
108
+ // Adiciona atributos para nova aba
109
+ link.setAttribute('target', '_blank');
110
+ link.setAttribute('rel', 'noopener noreferrer');
111
+
112
+ // Adiciona texto de acessibilidade (invisível visualmente, mas lido pelos leitores de tela)
113
+ const srText = document.createElement('span');
114
+ srText.classList.add('sr-only');
115
+ srText.textContent = ' (abre em nova aba)';
116
+ link.appendChild(srText);
117
+
118
+ // Adiciona atributos para tecnologias assistivas
119
+ link.setAttribute('aria-describedby', 'new-window-' + Math.random().toString(36).substr(2, 9));
120
+ }
121
+ });
122
+ });
123
+ </script>