Um erro ocorreu enquanto processava o modelo.
The following has evaluated to null or missing: ==> cardData.urlNews [in template "20099#20135#10700480" at line 5611, column 67] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${cardData.urlNews} [in template "20099#20135#10700480" in macro "renderCard" at line 5611, column 65] - Reached through: @renderCard cardData [in template "20099#20135#10700480" at line 5896, column 25] ----
1<#-- Conteúdo Web -> Templates: Site de Crise - Include de templates-->
2<#-- include "${templatesPath}/1975602" -->
3
4<#-- Conteúdo Web -> Templates: Site de Crise - Funções gerais-->
5<#include "${templatesPath}/1975398" />
6
7<#-- Conteúdo Web -> Templates: Busca pelas imagens do tipo de noticia -->
8<#include "${templatesPath}/18598756" />
9
10<#assign POST_TYPES_CATEGORIES = getPostTypeImages()!default([]) />
11
12<#-- Conteúdo Web -> Templates: Site de Crise - Notícia - Extrair dados de Notícias -->
13<#--include "${templatesPath}/7762031" -->
14
15<#-- Conteúdo Web -> Templates: Site de Crise - Notícia - Título -->
16<#-- include "${templatesPath}/7761976" -->
17
18<#-- Conteúdo Web -> Templates: Site de Crise - Notícia - Redes sociais e data de publicação -->
19<#--include "${templatesPath}/7762069" -->
20
21<#-- Conteúdo Web -> Templates: Site de Crise - Notícia - Áudios do conteúdo da notícia -->
22<#-- include "${templatesPath}/7761972" -->
23<#function getNodesByLabel fieldList parentNode label>
24 <#assign result = []/>
25 <#attempt>
26 <#assign groupId = getIdFromFieldName(fieldList, label) />
27 <#assign xSeletorCaminho = saxReaderUtil.createXPath("dynamic-element[@name='${groupId}' ]") />
28 <#assign result = xSeletorCaminho.selectNodes(parentNode) />
29 <#return result />
30 <#recover>
31 <#return result />
32 </#attempt>
33</#function>
34
35<#function findVocabulary vocabularyName vocabularies>
36 <#assign vocabularyNameLowerCase = vocabularyName?lower_case>
37 <#list vocabularies as vocabulary>
38 <#if vocabulary.name?lower_case == vocabularyNameLowerCase>
39 <#return vocabulary>
40 </#if>
41 </#list>
42 <#return {}>
43</#function>
44
45<#-- ############# Conteúdo Web -> Templates: Site de Crise - Include de templates #################################### -->
46<#function getSiteUrl>
47 <#assign portalUtil = staticUtil["com.liferay.portal.kernel.util.PortalUtil"]>
48 <#if layout?? && layout?has_content>
49 <#return portalUtil.getLayoutFriendlyURL(layout, themeDisplay)?replace(layout.getFriendlyURL(), "")>
50 </#if>
51 <#return portalUtil.getLayoutFriendlyURL(layout, themeDisplay)>
52</#function>
53
54<#function getSiteName>
55 <#return layout.getGroup().getDescriptiveName(locale)>
56</#function>
57
58<#function mountUrlToPage targetPage>
59 <#assign baseUrl = getSiteUrl()>
60 <#assign trimmedUrl = baseUrl?replace("/w/", "/")>
61 <#assign trimmedUrl = trimmedUrl?substring(0, trimmedUrl?last_index_of("/"))>
62 <#return trimmedUrl + "/" + targetPage>
63</#function>
64<#-- ################################################################################################################## -->
65
66
67<#assign
68 journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")
69 assetVocabularyService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService")
70 assetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")
71 vocabularies = assetVocabularyService.getGroupVocabularies(groupId)
72 tagsLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetTagLocalService")
73 tagVocabulary = findVocabulary("Tag", vocabularies)
74 flagVocabulary = findVocabulary("Flag", vocabularies)
75 tagCategoryTitles = extractVocabularyTitles(tagVocabulary)
76 flagCategoryTitles = extractVocabularyTitles(flagVocabulary)
77 assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")
78 fileEntryService = staticUtil["com.liferay.document.library.kernel.service.DLFileEntryLocalServiceUtil"]
79 layoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService")
80 PortalUtil = staticUtil["com.liferay.portal.kernel.util.PortalUtil"]
81 AssetEntryQueryService = objectUtil("com.liferay.asset.kernel.service.AssetEntryLocalServiceUtil").getService()
82 AssetEntryQuery = objectUtil('com.liferay.asset.kernel.service.persistence.AssetEntryQuery')
83/>
84
85<#-- Nome das midias adaptativas de imagem para desktop e mobile -->
86<#assign adaptativeMediaDesktopResolutionName = "Preview-1000x0" />
87<#assign adaptativeMediaMobileResolutionName = "Thumbnail-300x300" />
88
89<#assign typeOfNewsVocabulary = findVocabulary("Tipo de Notícia", vocabularies)/>
90<#assign ourEnergyVocabulary = findVocabulary("Nossa Energia", vocabularies)/>
91
92<#assign newsJournalArticle = "">
93<#assign assetEntry = getAssetEntryFromRequest(assetEntryLocalService)>
94<#if assetEntry?? && assetEntry?has_content>
95 <#assign newsJournalArticle = journalArticleLocalService.fetchLatestArticle(assetEntry.classPK)/>
96</#if>
97
98<#function getSingleNode name root>
99 <#attempt>
100 <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='${name}']/dynamic-content[@language-id='${locale}']") />
101 <#return xPathSelector.selectSingleNode( root ) />
102 <#recover>
103 <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='${name}']") />
104 <#return xPathSelector.selectSingleNode( root ) />
105 </#attempt>
106</#function>
107
108<#-- Função para obter a primeira categoria associonada a um Vocabulário o qual está associado a um Jornal Article -->
109<#function getFirstCategoryOfVocabulary journalArticle vocabulary >
110 <#attempt>
111 <#assign categories = assetCategoryLocalService.getCategories("com.liferay.journal.model.JournalArticle", journalArticle.getClassPK()) />
112 <#list categories as category>
113 <#if vocabulary.getVocabularyId() == category.getVocabularyId()>
114 <#return category.getName()>
115 </#if>
116 </#list>
117 <#return "">
118
119 <#recover>
120 <#return "" />
121 </#attempt>
122</#function>
123
124<#function getFirstCategoryObjectOfVocabulary journalArticle vocabulary >
125 <#attempt>
126 <#assign categories = assetCategoryLocalService.getCategories("com.liferay.journal.model.JournalArticle", journalArticle.getClassPK()) />
127 <#list categories as category>
128 <#if vocabulary.getVocabularyId() == category.getVocabularyId()>
129 <#return category>
130 </#if>
131 </#list>
132 <#return "">
133
134 <#recover>
135 <#return "" />
136 </#attempt>
137</#function>
138
139<#-- Função para obter todas os ids das categorias associonadas a um Vocabulário o qual está associado a um Jornal Article -->
140<#function getAllCategoryIdOfVocabulary journalArticle vocabulary >
141 <#attempt>
142 <#assign categoriesIds = [] />
143 <#assign categories = assetCategoryLocalService.getCategories("com.liferay.journal.model.JournalArticle", journalArticle.getClassPK()) />
144 <#list categories as category>
145 <#if vocabulary.getVocabularyId() == category.getVocabularyId()>
146 <#assign categoriesIds = categoriesIds + [category.getCategoryId()] />
147 </#if>
148 </#list>
149 <#return categoriesIds>
150
151 <#recover>
152 <#return [] />
153 </#attempt>
154</#function>
155
156<#if newsJournalArticle?? && newsJournalArticle?has_content>
157
158 <div class="breadcrumb-breakpoint breakpoint">
159 <div class="breadcrumb-col col-2-11 md-col-1-8 sm-col-1-4">
160 <#assign homeURL = "/" />
161
162 <#if currentURL?contains('webserver')>
163 <#assign homeURL = "/web/nossa-energia" />
164 </#if>
165
166 <a href="${homeURL}" class="breadcrumb-page text previous-page paragraph-micro-regular" tabindex="0">
167 <span class="breadcrumb-text-truncate" original-text="Home">Home</span>
168 <div class="icon"></div>
169 </a>
170
171 <#assign currentUrl = getSiteUrl()>
172
173 <#assign lastIndex = currentUrl?last_index_of("/")>
174 <#assign urlWithoutLastSegment = currentUrl?substring(0, lastIndex+1)>
175 <#assign urlWithoutW = urlWithoutLastSegment?replace("/w/", "/")>
176
177 <#assign breadcrumbOurEnergyCategory = getFirstCategoryObjectOfVocabulary(assetEntry, ourEnergyVocabulary) />
178 <#assign categoryURL = urlWithoutW/>
179 <a href="${categoryURL}" class="breadcrumb-page text previous-page paragraph-micro-regular" tabindex="0">
180 <span class="breadcrumb-text-truncate" original-text="${breadcrumbOurEnergyCategory.getTitle(locale)}">${breadcrumbOurEnergyCategory.getTitle(locale)}</span>
181 <div class="icon"></div>
182 </a>
183
184 <span original-text="${newsJournalArticle.getTitle(locale)}" class="breadcrumb-page text active-page active paragraph-micro-bold">${newsJournalArticle.getTitle(locale)}</span>
185 </div>
186 </div>
187
188 <div class="ptb-news__read-news">
189 <div class="ptb-news__read-news-post ">
190 <div class="ptb-news__read-content">
191
192 <#assign
193 ddmStructure = newsJournalArticle.getDDMStructure()
194 fieldList = getFieldListByStructure(ddmStructure)
195 xmlArticle = newsJournalArticle.getDocument().getRootElement()
196 >
197
198 <#assign
199 <#-- Título principal da notícia -->
200 mainHeadlineOfTheNews = newsJournalArticle.getTitle(locale, true)
201 <#-- Título de destaque da notícia -->
202 featuredNewsHeadline = extractFeaturedNewsHeadline(fieldList, xmlArticle)
203 <#-- Sumário da notícia -->
204 newsSummary = extractNewsSummary(fieldList, xmlArticle)
205 <#-- Data de publicação da notícia -->
206 lastPublishDate = extractPublishDate(newsJournalArticle)
207 <#-- Data de criação da notícia -->
208 createDate = newsJournalArticle.getCreateDate()
209 >
210
211 <#-- Flag da notícia ---------------------------------------------------------------------------------->
212 <#assign flag = getFirstCategoryTitle(newsJournalArticle, flagCategoryTitles, assetCategoryLocalService)>
213
214 <#-- Url amigável da notícia para visualização em DisplayPage ----------------------------------------->
215 <#assign newsJournalArticleFriendlyUrl = themeDisplay.getPortalURL() + themeDisplay.getPathFriendlyURLPublic() + layout.getGroup().friendlyURL + "/w/" + newsJournalArticle.getUrlTitle()>
216
217 <#-- Conteúdo da notícia ------------------------------------------------------------------------------>
218 <#assign newsContent = getFieldValue(fieldList, xmlArticle, "Corpo da notícia")>
219
220 <#assign WEB_STORIES_FIELD_SET_FIELD_REF = "Fieldset91054335" />
221 <#assign WEB_STORIES_IDENTIFICATION_FIELD_LABEL = "Identificador do Carousel" />
222 <#assign WEB_STORIES_TITLE_FIELD_LABEL = "Título do carrossel" />
223
224 <#assign webStoriesCarouselsIds = [] />
225 <#assign webStoriesCarouselsTitles = [] />
226 <#assign webStoriesCarouselsIdsFieldSetList = getNodes(WEB_STORIES_FIELD_SET_FIELD_REF, xmlArticle) />
227
228 <#list webStoriesCarouselsIdsFieldSetList as webStoriesFieldSet>
229 <#assign webStoriesCarouselsIds = webStoriesCarouselsIds + [ getFieldValue(fieldList, webStoriesFieldSet, WEB_STORIES_IDENTIFICATION_FIELD_LABEL) ] />
230 <#assign webStoriesCarouselsTitles = webStoriesCarouselsTitles + [ getFieldValue(fieldList, webStoriesFieldSet, WEB_STORIES_TITLE_FIELD_LABEL) ] />
231 </#list>
232
233 <#assign wsCarouselContent = '
234 <div id="[CAROUSEL_ID]" class="ws-carousel">
235 <div class="ws-carousel-header">
236 <h1 class="h2">
237 [CAROUSEL_TITLE]
238 </h1>
239 <div class="nav-buttons">
240 <svg class="nav-arrow left-arrow inactive" width="33" height="33" viewBox="0 0 33 33" fill="none" xmlns="http://www.w3.org/2000/svg">
241 <path d="M1 16C1 7.16344 8.16344 0 17 0C25.8366 0 33 7.16344 33 16C33 24.8366 25.8366 32 17 32C8.16344 32 1 24.8366 1 16Z" stroke="#bababa"/>
242 <path d="M11.5 16H22.5M22.5 16L18 11.5M22.5 16L18 20.5" stroke="#bababa" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
243 </svg>
244 <svg class="nav-arrow right-arrow active" width="33" height="33" viewBox="0 0 33 33" fill="none" xmlns="http://www.w3.org/2000/svg">
245 <path d="M1 16C1 7.16344 8.16344 0 17 0C25.8366 0 33 7.16344 33 16C33 24.8366 25.8366 32 17 32C8.16344 32 1 24.8366 1 16Z" stroke="#008542"/>
246 <path d="M11.5 16H22.5M22.5 16L18 11.5M22.5 16L18 20.5" stroke="#008542" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
247 </svg>
248 </div>
249 </div>
250 <div class="ws-carousel-body">
251 <div class="ws-container">
252 </div>
253 </div>
254 </div>' />
255
256 <#list webStoriesCarouselsIds as item >
257 <#assign carouselDiv = wsCarouselContent?replace("[CAROUSEL_ID]", item)?replace("[CAROUSEL_TITLE]", webStoriesCarouselsTitles[item?index]) />
258 <#assign newsContent = newsContent?replace("<p>#[${item}]</p>", carouselDiv) />
259 </#list>
260
261
262 <#assign WEB_STORIES_FIELD_SET_FIELD_REF = "Fieldset91054335" />
263 <#assign WEB_STORIES_IDENTIFICATION_FIELD_LABEL = "Identificador do Carousel" />
264 <#assign WEB_STORIES_TITLE_FIELD_LABEL = "Título do carrossel" />
265
266 <#assign webStoriesCarouselsIds = [] />
267 <#assign webStoriesCarouselsTitles = [] />
268 <#assign webStoriesCarouselsIdsFieldSetList = getNodes(WEB_STORIES_FIELD_SET_FIELD_REF, xmlArticle) />
269
270 <#list webStoriesCarouselsIdsFieldSetList as webStoriesFieldSet>
271 <#assign webStoriesCarouselsIds = webStoriesCarouselsIds + [ getFieldValue(fieldList, webStoriesFieldSet, WEB_STORIES_IDENTIFICATION_FIELD_LABEL) ] />
272 <#assign webStoriesCarouselsTitles = webStoriesCarouselsTitles + [ getFieldValue(fieldList, webStoriesFieldSet, WEB_STORIES_TITLE_FIELD_LABEL) ] />
273 </#list>
274
275 <#assign wsCarouselContent = '
276 <div id="[CAROUSEL_ID]" class="ws-carousel">
277 <div class="ws-carousel-header">
278 <h1 class="h2">
279 [CAROUSEL_TITLE]
280 </h1>
281 <div class="nav-buttons">
282 <svg class="nav-arrow left-arrow inactive" width="33" height="33" viewBox="0 0 33 33" fill="none" xmlns="http://www.w3.org/2000/svg">
283 <path d="M1 16C1 7.16344 8.16344 0 17 0C25.8366 0 33 7.16344 33 16C33 24.8366 25.8366 32 17 32C8.16344 32 1 24.8366 1 16Z" stroke="#bababa"/>
284 <path d="M11.5 16H22.5M22.5 16L18 11.5M22.5 16L18 20.5" stroke="#bababa" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
285 </svg>
286 <svg class="nav-arrow right-arrow active" width="33" height="33" viewBox="0 0 33 33" fill="none" xmlns="http://www.w3.org/2000/svg">
287 <path d="M1 16C1 7.16344 8.16344 0 17 0C25.8366 0 33 7.16344 33 16C33 24.8366 25.8366 32 17 32C8.16344 32 1 24.8366 1 16Z" stroke="#008542"/>
288 <path d="M11.5 16H22.5M22.5 16L18 11.5M22.5 16L18 20.5" stroke="#008542" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
289 </svg>
290 </div>
291 </div>
292 <div class="ws-carousel-body">
293 <div class="ws-container">
294 </div>
295 </div>
296 </div>' />
297
298 <#list webStoriesCarouselsIds as item >
299 <#assign carouselDiv = wsCarouselContent?replace("[CAROUSEL_ID]", item)?replace("[CAROUSEL_TITLE]", webStoriesCarouselsTitles[item?index]) />
300 <#assign newsContent = newsContent?replace("<p>#[${item}]</p>", carouselDiv) />
301 </#list>
302
303
304 <#-- Seção do áudio para o conteúdo da notícia -------------------------------------------------------->
305 <#assign audios = []
306 audioIdentifierFieldSetList = getNodes("Fieldset65862311", xmlArticle)
307 >
308 <#list audioIdentifierFieldSetList as audioIdentifierFieldSet>
309 <#assign
310 <#-- Grupo com as informações de url e legenda do áudio -->
311 audioInfoFieldSet = getGroupNode("Fieldset24035689",audioIdentifierFieldSet)>
312 <#assign
313 externalAudioUrl = getFieldValue(fieldList, audioInfoFieldSet, "URL externa do áudio")
314 internalAudioUrl = getFileFromXML("DocumentLibrary24170668", audioInfoFieldSet, fileEntryService)
315 audioLegend = getFieldValue(fieldList, audioInfoFieldSet, "Legenda do áudio")>
316
317 <#if externalAudioUrl?has_content || internalAudioUrl.url?has_content >
318 <#assign audios += [{
319 "id": getFieldValue(fieldList, audioIdentifierFieldSet, "Identificador de Áudio"),
320 "externalUrl" : externalAudioUrl,
321 "internalUrl" : internalAudioUrl,
322 "legend" : audioLegend
323 }]>
324 </#if>
325 </#list>
326
327
328 <#-- Seção de vídeo para o conteúdo da notícia -------------------------------------------------------->
329 <#assign videos = []
330 videoIdentifierFieldSetList = getNodes("Fieldset24460782", xmlArticle)
331 >
332 <#list videoIdentifierFieldSetList as videoIdentifierFieldSet>
333 <#assign
334 <#-- Grupo com as informações de url e legenda do áudio -->
335 videoInfoFieldSet = getGroupNode("Fieldset51040010",videoIdentifierFieldSet)
336
337 videos += [{
338 "id": getFieldValue(fieldList,videoIdentifierFieldSet, "Identificador de Vídeo"),
339 "youtubeID" : getFieldValue(fieldList, videoInfoFieldSet, "ID do vídeo do YouTube"),
340 "internalUrl" : getFileFromXML("DocumentLibrary15265409", videoInfoFieldSet, fileEntryService),
341 "legend" : getFieldValue(fieldList, videoInfoFieldSet, "Legenda do vídeo")
342 }]
343 >
344 </#list>
345
346
347 <#-- Seção de links para o conteúdo da notícia -------------------------------------------------------->
348 <#assign
349 links = []
350 linksFieldSetList = getNodes("Fieldset37770113", xmlArticle)
351 >
352 <#list linksFieldSetList as linksFieldSet>
353 <#assign linkFieldSetList = getNodes("Fieldset10524367", linksFieldSet)>
354
355 <#list linkFieldSetList as linkFieldSet>
356 <#assign
357 linkId = getFieldValue(fieldList, linkFieldSet, "Identificador do link")
358
359 <#-- Grupo com as informações de url e legenda do áudio -->
360 linkInfoFieldSeet = getGroupNode("Fieldset86037074", linkFieldSet)
361
362 iconType = getFieldValue(fieldList, linkInfoFieldSeet, "Ícone do link")
363 links += [{
364 "id": linkId,
365 "externalLink" : getFieldValue(fieldList, linkInfoFieldSeet, "Link externo"),
366 "pageLink" : getPageLayoutLinkFromXML("LinkToLayout77941175", linkInfoFieldSeet, layoutLocalService),
367 "file" : getFileFromXML("DocumentLibrary34820760", linkInfoFieldSeet, fileEntryService),
368 "title" : getFieldValue(fieldList, linkInfoFieldSeet, "Título do link"),
369 "iconType" : iconType
370 }]
371 >
372 </#list>
373 </#list>
374
375
376
377 <#assign galleryItems = []/>
378
379 <#assign mediaGroupList = getNodes(getIdFromFieldName(fieldList, "Galeria de multimídia"), xmlArticle) />
380
381 <#list mediaGroupList as mediaGroup >
382 <#assign nodes = getNodes(getIdFromFieldName(fieldList, "Imagem da Galeria") , mediaGroup) />
383 <#list nodes as node>
384 <#assign image = getMediaInfo(fieldList, node, "Imagem", fileEntryService) />
385 <#if image?? && image?has_content && image.url?has_content>
386 <#assign galleryItems += [{"image": image}] />
387 </#if>
388 </#list>
389 </#list>
390
391 <#-- Seção de Quotes para o conteúdo da notícia -------------------------------------------------------->
392 <#-- Seção de Quotes para o conteúdo da notícia -------------------------------------------------------->
393 <#assign quotes = [] />
394 <#assign quotesRootFieldSetList = getNodes(getIdFromFieldName(fieldList, "Quotes da notícia"), xmlArticle) />
395 <#list quotesRootFieldSetList as quotesFieldSetList>
396 <#assign quoteFieldSetList = getNodes(getIdFromFieldName(fieldList, "Quote"), quotesFieldSetList) />
397 <#list quoteFieldSetList as quoteFieldSet>
398 <#assign imageJsonString = getSingleNodeString("Image94530628", quoteFieldSet) />
399 <#assign imageJson = {"url": "", "alt": "", "fileEntryId" : "", "title" : ""} />
400 <#attempt>
401 <#if imageJsonString ?? && imageJsonString?has_content>
402 <#assign imageJson = jsonFactoryUtil.createJSONObject(imageJsonString) />
403 </#if>
404
405 <#if !imageJson.url?? || !imageJson.url?has_content>
406 <#assign imageJson = {"url": "", "alt": "", "fileEntryId" : "", "title" : ""} />
407 </#if>
408 <#recover>
409 </#attempt>
410
411 <#if !imageJson.url?? || !imageJson.url?has_content>
412 <#assign imageJson = {"url": "", "alt": "", "fileEntryId" : "", "title" : ""} />
413 </#if>
414
415 <#assign quotes += [{
416 "id": getFieldValue(fieldList, quoteFieldSet, "Identificador do Quote"),
417 "content" : getFieldValue(fieldList, quoteFieldSet, "Texto do Quote"),
418 "author" : getFieldValue(fieldList, quoteFieldSet, "Nome do autor"),
419 "image" : {"url": imageJson.url, "alt": imageJson.alt, "fileEntryId" : imageJson.fileEntryId, "title" : imageJson.title}
420 }] />
421 </#list>
422 </#list>
423
424 <#assign newsInfo = {
425 "mainHeadlineOfTheNews": mainHeadlineOfTheNews,
426 "featuredNewsHeadline" : featuredNewsHeadline,
427 "displayDate" : formatDate(createDate),
428 "createDate": createDate,
429 "newsSummary" : newsSummary,
430 "newsMedia": extractNewsMedia(fieldList, xmlArticle, fileEntryService),
431 "lastPublishDate": lastPublishDate,
432 "flag": flag,
433 "url": newsJournalArticleFriendlyUrl,
434 "newsContent": newsContent,
435 "audios": audios,
436 "videos": videos,
437 "galleryItems": galleryItems,
438 "links": links,
439 "quotes": quotes
440 }/>
441
442 <#-- Renderizar o título principal da notícia -->
443 <#-- Conteúdo-> Conteúdo Web -> Templates: Site de Crise - Notícia - Título -->
444 <@renderHeadLine newsInfo/>
445
446 <#-- Renderizar o resumo da notícia -->
447 <#-- Conteúdo Web -> Templates: Site de Crise - Notícia - Resumo -->
448 <@renderReview newsInfo/>
449
450 <#-- Renderizar a data de publicação/edição da notícia e redes sociais -->
451 <#-- Conteúdo Web -> Templates: Site de Crise - Notícia - Redes sociais e data de publicação -->
452 <@renderPublishAndSocialMediasInfos newsJournalArticle newsInfo/>
453
454 <#-- Renderizar as tags da notícia -->
455 <#-- Conteúdo Web -> Templates: Site de Crise - Notícia - Render Tags -->
456 <#assign categoriesAsssetEntryResponse = restClient.get("/headless-delivery/v1.0/structured-contents/${assetEntry.getClassPK()}?nestedFields=embeddedTaxonomyCategory&fields=taxonomyCategoryBriefs") />
457
458 <#if categoriesAsssetEntryResponse?? && categoriesAsssetEntryResponse?has_content && categoriesAsssetEntryResponse.taxonomyCategoryBriefs??>
459 <#assign tagCategoryList = getCategoriesNamesAndIds("Tags", categoriesAsssetEntryResponse.taxonomyCategoryBriefs) />
460 <#assign removeStartParameterWhenTagIsClicked = true />
461 <#assign includeRequestParams = false />
462 <#assign NEWS_PAGE_NAME= "categorias"/>
463 </#if>
464
465
466 <#-- Renderizar a imagem de destaque da notícia -->
467 <#-- Conteúdo Web -> Templates: Site de Crise - Notícia - Imagem de destaque -->
468 <#assign typeOfNews = getFirstCategoryOfVocabulary(assetEntry, typeOfNewsVocabulary) />
469
470 <#if !typeOfNews?? || !typeOfNews?has_content || typeOfNews != "Infográfico" >
471 <@renderNewsFeaturedMedia newsInfo />
472 </#if>
473
474 <#-- Renderizar o conteúdo da notícia -->
475 <#-- Conteúdo Web -> Templates: Site de Crise - Notícia - Conteúdo da notícia -->
476 <@renderNewsContent newsInfo/>
477
478 <#-- Renderizar o conteúdo da notícia-->
479 <#-- Conteúdo Web -> Templates: Site de Crise - Notícia - Conteúdo da notícia -->
480
481 <#-- Renderizar o conteúdo da notícia-->
482 <#-- Conteúdo Web -> Templates: Site de Crise - Notícia - Conteúdo da notícia -->
483
484 <#-- Renderiza botoes de compartilhamento na versao mobile -->
485 <div class="render-share-news-container publish_and_social_medias_infos_desk mobile">
486 <@renderShareAndCopyNews/>
487 </div>
488
489 <#-- Renderizar links da notícia -->
490 <#-- Conteúdo Web -> Templates: Site de Crise - Notícia - Links do conteúdo da notícia -->
491 <@renderLinks newsInfo />
492
493 <@renderCite />
494
495 <#-- Renderizar áudios da notícia -->
496 <#-- Conteúdo Web -> Templates: Site de Crise - Notícia - Áudios do conteúdo da notícia -->
497
498 <#-- Renderizar galeria de imagens notícia -->
499 <#-- Conteúdo Web -> Templates: Site de Crise - Notícia - Render galeria -->
500 <@renderGallery newsInfo />
501
502 <#-- Renderizar quotes da notícia -->
503 <@renderQuotes newsInfo />
504 </div>
505 </div>
506 </div>
507<#else >
508 <div class="ptb-news__read-news paragraph-sm-regular">
509 <p> <#if locale == "pt_BR"> Nenhuma notícia <#else> There are no news </#if></p>
510 </div>
511
512 <style>
513 .ptb-news__read-news p {
514 color: #515867;
515 }
516
517 body.high-contrast-active .ptb-news__read-news p {
518 color: var(--color-neutral-100);
519 }
520 </style>
521</#if>
522
523<style>
524 .breadcrumb-breakpoint {
525 padding-top: var(--space-xxl);
526 padding-bottom: var(--space-xl);
527 }
528
529 body.high-contrast-active .breadcrumb-breakpoint {
530 background: var(--background-surface-level-01, #010101);
531 }
532
533 .breadcrumb-breakpoint .breadcrumb-col {
534 display: flex;
535 width: max-content;
536 gap: var(--space-xxs);
537 height: fit-content;
538 overflow-x: hidden;
539 }
540
541 .breadcrumb-breakpoint #liferay-breadcrumb {
542 display: none;
543 }
544
545 .breadcrumb-breakpoint .breadcrumb-page {
546 display: flex;
547 gap: var(--space-micro);
548 height: var(--size-md);
549 size: var(--size-md);
550 border: 1px solid rgba(0, 0, 0, 0);
551 box-sizing: border-box;
552 border-radius: var(--border-radius-sm);
553 }
554
555 .breadcrumb-breakpoint a.breadcrumb-page.text span,
556 .breadcrumb-breakpoint span.breadcrumb-page.text {
557 white-space: nowrap;
558 }
559
560 .breadcrumb-breakpoint .breadcrumb-page a:focus {
561 outline: none;
562 }
563
564 .breadcrumb-breakpoint .breadcrumb-page.active-page {
565 color: var(--color-text-primary-default);
566 background-color: var(--color-background-default-level-02);
567 border-radius: var(--border-radius-sm);
568 }
569
570 body.high-contrast-active .breadcrumb-breakpoint .breadcrumb-page.active-page {
571 background: var(--background-surface-level-02, #373737);
572 color: var(--text-primary-default, #FFF);
573 }
574
575 .breadcrumb-breakpoint .breadcrumb-page.previous-page {
576 transition: 300ms ease-in-out;
577 }
578
579 .breadcrumb-breakpoint .breadcrumb-page.previous-page.text {
580 text-decoration: var(--text-decoration-none);
581 color: var(--color-text-primary-default);
582 text-transform: capitalize;
583 padding-left: var(--space-xxs);
584 padding-right: var(--space-xxs);
585 }
586
587 body.high-contrast-active .breadcrumb-breakpoint .breadcrumb-page.previous-page.text {
588 color: var(--text-primary-default, #FFF);
589 }
590
591 .breadcrumb-breakpoint .breadcrumb-page.active-page.text {
592 color: var(--color-text-primary-default);
593 text-decoration: var(--text-decoration-none);
594 background-color: var(--color-background-default-level-02);
595 text-transform: capitalize;
596 padding-left: var(--space-xxs);
597 padding-right: var(--space-xxs);
598 }
599
600 body.high-contrast-active .breadcrumb-breakpoint .breadcrumb-page.previous-page.text {
601 color: var(--text-primary-default, #FFF);
602 }
603
604 .breadcrumb-breakpoint .breadcrumb-page.previous-page:not(.three-dots):hover {
605 background-color: var(--color-background-default-level-01);
606 border-color: var(--border-color-dark);
607 border-radius: var(--border-radius-sm);
608 border: 1px solid;
609 transition: all 300ms ease-in-out;
610 }
611
612 body.high-contrast-active .breadcrumb-breakpoint .breadcrumb-page.previous-page:not(.three-dots):hover {
613 background-color: transparent;
614 }
615
616 .breadcrumb-breakpoint .breadcrumb-page:focus-visible {
617 margin: var(--space-micro);
618 border-radius: var(--space-micro);
619 outline: none;
620 border: 1px solid var(--color-primary-medium);
621 box-sizing: border-box;
622 transition: 300ms ease-in-out;
623 }
624
625 body.high-contrast-active .breadcrumb-breakpoint .breadcrumb-page:focus-visible {
626 border: 1px solid rgba(228, 247, 232, 1);
627 }
628
629 .breadcrumb-breakpoint .breadcrumb-page .icon {
630 width: var(--size-xxs);
631 height: var(--size-xxs);
632 border-color: var(--border-color-darkest);
633 background-image: url('data:image/svg+xml,%3Csvg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M4.5 2.25L8.25 6L4.5 9.75" stroke="%23525252" stroke-linecap="round" stroke-linejoin="round"%3E%3C/path%3E%3C/svg%3E');
634 background-size: cover;
635 margin-top: auto;
636 margin-bottom: auto;
637 }
638
639 body.high-contrast-active .breadcrumb-breakpoint .breadcrumb-page .icon {
640 background-image: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none"><path d="M4.5 2.25L8.25 6L4.5 9.75" stroke="white" stroke-linecap="round" stroke-linejoin="round"/></svg>');
641 }
642
643 .ptb-news__read-news {
644 overflow: hidden;
645 }
646
647 body.high-contrast-active .ptb-news__read-news {
648 background: var(--background-surface-level-01, #010101);
649 }
650</style>
651
652
653<#-- ############# Site de Crise - Notícia - Redes sociais e data de publicação ####################################### -->
654<#--
655Add elements from the sidebar to define your template. Type "${" to use the
656autocomplete feature.
657-->
658
659<#macro addSchemaMarkup newsInfo>
660 <#assign image = ""/>
661 <#assign datePublished = newsInfo.createDate?string('yyyy-MM-ddHH:mm:ss-03:00')/>
662 <#assign datePublishedISOFormat = datePublished?substring(0, 10) + "T" + datePublished?substring(10)/>
663 <#assign dateModified = newsInfo.lastPublishDate?string('yyyy-MM-ddHH:mm:ss-03:00')/>
664 <#assign dateModifiedISOFormat = dateModified?substring(0, 10) + "T" + dateModified?substring(10)/>
665
666 <#if newsInfo.newsMedia.imageSrc?? && newsInfo.newsMedia.imageSrc?has_content>
667 <#assign image = "${themeDisplay.getPortalURL()}/o/adaptive-media/image/${newsInfo.newsMedia.fileEntryId}/Thumbnail-300x300/image"/>
668 <#else>
669 <#if newsInfo.newsMedia.videoYotubeID?? && newsInfo.newsMedia.videoYotubeID?has_content>
670 <#assign image = "https://img.youtube.com/vi/${newsInfo.newsMedia.videoYotubeID}/hqdefault.jpg"/>
671 </#if>
672 </#if>
673
674 <#-- Busca informações do cadastro Organization do institucional do ambiente de produção-->
675 <#-- 35467409 é o id da estrutura de webcontent "Dados Estruturados - Organização" -->
676 <#assign organizationName = "" />
677 <#assign logoImgSrc = "" />
678
679 <#assign structuredContents = restClient.get("/headless-delivery/v1.0/content-structures/35467409/structured-contents")/>
680 <#if structuredContents?has_content && structuredContents.items?has_content>
681 <#assign structuredContentData = structuredContents.items[0]/>
682 <#if structuredContentData?has_content && structuredContentData.contentFields?has_content>
683 <#list structuredContentData.contentFields as item>
684 <#if item.label == "Nome legal da organização">
685 <#assign organizationName = item.contentFieldValue.data!"">
686 </#if>
687 <#if item.label == "Logotipo" && item.contentFieldValue?has_content && item.contentFieldValue.image??>
688 <#assign logoImgSrc = themeDisplay.getURLPortal() + item.contentFieldValue.image.contentUrl!"">
689 </#if>
690 </#list>
691 </#if>
692 </#if>
693
694
695 <#-- add to head -->
696 <@liferay_util["html-top"]>
697 <script type="application/ld+json">
698 {
699 "@context": "https://schema.org",
700 "@type": "BlogPosting",
701 "headline": "${newsInfo.mainHeadlineOfTheNews}",
702 "alternativeHeadline": "${newsInfo.featuredNewsHeadline}",
703 "image": "${image}",
704 "author": {
705 "@type": "Person",
706 "name": "Petrobras",
707 "url": "${themeDisplay.getPortalURL()}/autor"
708 },
709 "publisher": {
710 "@type": "Organization",
711 "name": "${organizationName}",
712 "logo": {
713 "@type": "ImageObject",
714 "url": "${logoImgSrc}"
715 }
716 },
717 "datePublished": "${datePublishedISOFormat}",
718 "dateModified": "${dateModifiedISOFormat}",
719 "mainEntityOfPage": "${newsInfo.url}",
720 "description": "${newsInfo.newsSummary}",
721 "keywords": [<#list tagCategoryList as tag>"${tag[0]}"<#sep>, </#list>],
722 "articleBody": "${
723 newsInfo.newsContent
724 ?replace('&[a-z]+;', ' ', 'r')
725 ?replace('<[^>]+>', '', 'r')
726 ?replace('[\n\r]+', ' ', 'r')
727 ?trim
728 ?json_string
729 }"
730 }
731 </script>
732 </@>
733</#macro>
734
735<@addSchemaMarkup newsInfo/>
736
737<#macro renderHeadLine newsInfo>
738
739 <div class="main-headline-container breakpoint">
740 <div class="main-headline-container-col col-2-11 md-col-1-8 sm-col-1-4">
741 <h1 class="main-headline display-sm">${newsInfo.featuredNewsHeadline}</h1>
742 <div class="bar"></div>
743 </div>
744 </div>
745
746 <style>
747 .ptb-news__read-news .main-headline-container .main-headline-container-col {
748 display: flex;
749 flex-direction: column;
750 gap: var(--space-sm);
751 padding-bottom: var(--space-lg);
752 }
753
754 .ptb-news__read-news .main-headline-container .main-headline-container-col * {
755 margin: 0;
756 padding: 0;
757 }
758
759 .ptb-news__read-news .main-headline-container .main-headline {
760 font-family: var(--font-family-base);
761 color: var(--color-neutral-800);
762 }
763
764 body.high-contrast-active .ptb-news__read-news .main-headline-container .main-headline {
765 color: var(--text-primary-default, var(--color-neutral-100));
766 }
767
768 .ptb-news__read-news .main-headline-container .bar {
769 width: 32px;
770 height: var(--size-micro);
771 background: var(--color-secondary-medium);
772 }
773
774 body.high-contrast-active .ptb-news__read-news .main-headline-container .bar{
775 background: var(--text-secondary-accent, #FFEEB3);
776 }
777
778 @media screen and (max-width: ${MAX_MOBILE_WIDTH}px) {
779 .ptb-news__read-news .main-headline-container .main-headline-container-col {
780 gap: var(--space-xs, 12px);
781 }
782 }
783 </style>
784</#macro>
785<#-- ################################################################################################################## -->
786
787<#-- ############# Site de Crise - Notícia - Redes sociais e data de publicação ####################################### -->
788<#macro renderReview newsInfo>
789 <#assign summaryCssRoot = "summary-container" />
790
791 <div class="${summaryCssRoot}-breakpoint breakpoint">
792 <div class="${summaryCssRoot} col-2-11 md-col-1-8 sm-col-1-4">
793 <p class="summary paragraph-lg-regular">
794 ${newsInfo.newsSummary}
795 </p>
796 </div>
797
798 </div>
799
800 <style>
801 .${summaryCssRoot} .summary {
802 padding-bottom: var(--space-lg);
803 }
804
805 .${summaryCssRoot} .summary,
806 .${summaryCssRoot} .summary * {
807 color: var(--color-neutral-800, #373737);
808 font-family: var(--font-family-base);
809 font-style: var(--font-style-italic);
810 margin: var(--space-none);
811 }
812
813 body.high-contrast-active .summary,
814 body.high-contrast-active .summary * {
815 color: var(--text-secondary-default, #F8F8F8);
816 }
817 </style>
818</#macro>
819<#-- ################################################################################################################## -->
820
821<#-- ############# Site de Crise - Notícia - Redes sociais e data de publicação ####################################### -->
822<#macro renderPublishAndSocialMediasInfos journalArticle newsInfo>
823
824 <div class="publish_and_social_medias_infos_desk-breakpoint breakpoint">
825 <div class="publish_and_social_medias_infos_desk col-2-11 md-col-1-8 sm-col-1-4">
826 <div class="publish_and_update_date">
827 <#assign lastPublishDate = journalArticle.getModifiedDate()>
828 <#assign createDate = journalArticle.getCreateDate()>
829 <#if journalArticle.getLastPublishDate()??>
830 <#assign lastPublishDate = journalArticle.getLastPublishDate()>
831 </#if>
832
833 <#if locale == "pt_BR">
834 <p class="updated">Atualizado em ${formatDate(lastPublishDate)}</p>
835 <p class="published">Postado em ${formatDate(createDate)}</p>
836 <#else >
837 <p class="updated">Updated on ${formatDate(lastPublishDate)}</p>
838 <p class="published">Posted on ${formatDate(createDate)}</p>
839 </#if>
840 </div>
841 <div class="render-share-news-container desktop">
842 <@renderShareAndCopyNews/>
843 </div>
844 </div>
845 </div>
846
847 <style>
848 .ptb-news__read-news .hidden {
849 display: none;
850 }
851 /*Data de publicação e redes sociais */
852
853 /* Desktop */
854 .ptb-news__read-news .publish_and_social_medias_infos_desk {
855 position: relative;
856 display: grid;
857 grid-template-columns: auto 1fr auto;
858 }
859
860 .ptb-news__read-news .render-share-news-container.mobile {
861 display: none;
862 }
863
864 .ptb-news__read-news .publish_and_social_medias_infos_desk * {
865 padding: var(--space-none, 0);
866 margin: var(--space-none, 0);
867 font-family: var(--font-family-base);
868 font-style: var(--font-style-normal, normal);
869 font-weight: var(--font-weight-regular, 400);
870 font-size: var(--font-size-xxs, 16px);
871 line-height: var(--line-height-xl, 160%);
872 color: var(--color-neutral-800, #373737);
873 }
874
875 body.high-contrast-active .ptb-news__read-news .publish_and_social_medias_infos_desk * {
876 color: var(--text-secondary-default, #F8F8F8);
877 }
878
879 body.high-contrast-active .ptb-news__read-news .publish_and_social_medias_infos_desk a svg path,
880 body.high-contrast-active .ptb-news__read-news .publish_and_social_medias_infos_desk .mobile-share svg path {
881 stroke: var(--color-neutral-500, #D7D7D7);
882 fill: rgba(255, 255, 255, 0.32);
883 }
884
885 body.high-contrast-active .ptb-news__read-news .publish_and_social_medias_infos_desk a svg circle,
886 body.high-contrast-active .ptb-news__read-news .publish_and_social_medias_infos_desk .mobile-share svg circle {
887 fill: rgba(255, 255, 255, 0.32);
888 }
889
890 .ptb-news__read-news .publish_and_social_medias_infos_desk .publish_and_update_date {
891 display: flex;
892 align-items: center;
893 gap: var(--space-sm, 16px);
894 }
895
896 .ptb-news__read-news .publish_and_social_medias_infos_desk .publish_and_update_date .updated {
897 font-weight: var(--font-weight-bold, 700);
898 font-size: var(--font-size-xxxs, 14px);
899 }
900
901 body.high-contrast-active .ptb-news__read-news .publish_and_social_medias_infos_desk .publish_and_update_date .updated {
902 color: var(--text-primary-default, var(--color-neutral-100));
903 }
904
905 .ptb-news__read-news .publish_and_social_medias_infos_desk .publish_and_update_date .published {
906 font-weight: var(--font-weight-normal, 400);
907 font-size: var(--font-size-xxxs, 14px);
908 }
909
910 .ptb-news__read-news .publish_and_social_medias_infos_desk .social-media-container {
911 display: flex;
912 width: 100%;
913 justify-content: flex-end;
914 align-items: center;
915 gap: var(--space-sm, 16px);
916 }
917
918 .ptb-news__read-news .publish_and_social_medias_infos_desk .social-media-container .social-media-share {
919 position: relative;
920 }
921
922 .ptb-news__read-news .publish_and_social_medias_infos_desk .social-media-container .social-media-share span {
923 position: absolute;
924 width: 100%;
925 height: 100%;
926 opacity: 0;
927 overflow: hidden;
928 pointer-events: none;
929 }
930
931 .ptb-news__read-news .social-media-share {
932 width: 36px;
933 height: 36px;
934 border-radius: 50%;
935 display: flex;
936 align-items: center;
937 justify-content: center;
938 background-color: transparent;
939 transition: background-color 0.3s ease;
940 }
941
942 /* Hover dos ícones de redes sociais no modo alto contraste */
943 body.high-contrast-active .ptb-news__read-news .social-media-share:hover {
944 background-color: #000000 !important;
945 }
946
947 /* Corrige stroke e fill dos ícones ao passar o mouse (hover) */
948 body.high-contrast-active .ptb-news__read-news .social-media-share:hover svg path,
949 body.high-contrast-active .ptb-news__read-news .social-media-share:hover svg circle,
950 body.high-contrast-active .ptb-news__read-news .social-media-share:hover svg rect,
951 body.high-contrast-active .ptb-news__read-news .social-media-share:hover svg g
952 {
953 stroke: #000000 !important;
954 fill: #ffffff !important;
955 }
956
957 /* Ícone branco */
958 .ptb-news__read-news .social-media-share:hover svg * {
959 fill: #008542 !important;
960 stroke: #ffffff !important;
961 }
962
963 .ptb-news__read-news .publish_and_social_medias_infos_desk .social-media-container .mobile-share {
964 display: none;
965 }
966
967 .ptb-news__read-news .publish_and_social_medias_infos_desk .copy-text-container {
968 background: var(--color-neutral-100);
969 border: var(--border-width-hairline, 1px) solid #CCCCCC;
970 border-radius: 32px;
971 display: flex;
972 align-items: center;
973 gap: var(--space-sm, 16px);
974 padding: 6px var(--space-xxs, 8px);
975 height: 36px;
976 margin: 0;
977 cursor: pointer;
978 }
979
980 body.high-contrast-active .ptb-news__read-news .publish_and_social_medias_infos_desk .copy-text-container {
981 background: rgba(255, 255, 255, 0.32);
982 border: var(--border-width-hairline, 1px) solid rgba(255, 255, 255, 0.32);
983 }
984
985 .ptb-news__read-news .publish_and_social_medias_infos_desk .copy-text-container svg {
986 width: 18px;
987 }
988
989 body.high-contrast-active .ptb-news__read-news .publish_and_social_medias_infos_desk svg path {
990 stroke: var(--color-neutral-500, #D7D7D7);
991 }
992
993 .ptb-news__read-news .publish_and_social_medias_infos_desk .copy-text-container .text {
994 font-family: var(--font-family-base);
995 font-style: normal;
996 margin: 0;
997 height: 100%;
998 display: flex;
999 align-items: center;
1000 color: var(--color-primary-medium, #008542);
1001 font-size: var(--font-size-micro, 12px);
1002 font-weight: var(--font-weight-bold, 700);
1003 line-height: var(--line-height-lg, 144%);
1004 pointer-events: none;
1005 }
1006
1007 /* Hover padrão */
1008 .ptb-news__read-news .publish_and_social_medias_infos_desk .copy-text-container:hover {
1009 background-color: #008542;
1010 border-color: #008542;
1011 }
1012
1013 /* Texto branco no hover */
1014 .ptb-news__read-news .publish_and_social_medias_infos_desk .copy-text-container:hover .text {
1015 color: #ffffff;
1016 }
1017
1018 /* Ícone branco (SVG path) no hover */
1019 .ptb-news__read-news .publish_and_social_medias_infos_desk .copy-text-container:hover svg path {
1020 stroke: #ffffff !important;
1021 }
1022
1023 /* Hover no modo high-contrast */
1024 body.high-contrast-active .ptb-news__read-news .publish_and_social_medias_infos_desk .copy-text-container:hover {
1025 background-color: #ffffff;
1026 border-color: #ffffff;
1027 }
1028
1029 body.high-contrast-active .ptb-news__read-news .publish_and_social_medias_infos_desk .copy-text-container:hover .text {
1030 color: #000000;
1031 }
1032
1033 body.high-contrast-active .ptb-news__read-news .publish_and_social_medias_infos_desk .copy-text-container:hover svg path {
1034 stroke: #000000 !important;
1035 }
1036
1037
1038 .ptb-news__read-news .publish_and_social_medias_infos_desk .copy-text-container .text .copy-text-title-news {
1039 position: absolute;
1040 width: 100%;
1041 height: 100%;
1042 opacity: 0;
1043 overflow: hidden;
1044 }
1045
1046 body.high-contrast-active .ptb-news__read-news .publish_and_social_medias_infos_desk .copy-text-container .text {
1047 color: var(--text-primary-accent, #E4F7E8);
1048 }
1049
1050 .ptb-news__read-news .publish_and_social_medias_infos_desk .copy-message {
1051 display: none;
1052 position: absolute;
1053 bottom: -43px;
1054 right: -15px;
1055 padding: var(--space-xxxs, 4px) 15px;
1056 margin: var(--space-micro, 2px) 10px;
1057 width: 110px;
1058 font-family: var(--font-family-base);
1059 font-size: var(--font-size-micro, 12px);
1060
1061 color: #008542;
1062 background: var(--color-neutral-100);
1063 border-radius: var(--border-radius-md, 8px);
1064
1065 filter: drop-shadow(0px 4px 16px rgba(0, 0, 0, 0.16));
1066
1067 cursor: pointer;
1068 }
1069
1070 body.high-contrast-active .ptb-news__read-news .publish_and_social_medias_infos_desk .copy-message {
1071 background: rgba(255, 255, 255, 0.32);
1072 color: var(--text-primary-accent, #E4F7E8);
1073 }
1074
1075 .ptb-news__read-news .publish_and_social_medias_infos_desk .copy-message-active {
1076 display: block;
1077 }
1078
1079 /* Mobile */
1080
1081 .ptb-news__read-news .publish_and_social_medias_infos_mobile {
1082 display: flex;
1083 flex-direction: column;
1084 gap: 19px;
1085 }
1086
1087 .ptb-news__read-news .publish_and_social_medias_infos_mobile {
1088 display: none;
1089 }
1090
1091 .ptb-news__read-news .publish_and_social_medias_infos_mobile .publish_and_update_date_and_copy_text {
1092 display: flex;
1093 justify-content: space-between;
1094 align-items: center;
1095 margin-bottom: var(--space-lg, 32px);
1096 }
1097
1098 .ptb-news__read-news .publish_and_social_medias_infos_mobile .publish_and_update_date_and_copy_text .publish_and_update_date * {
1099 padding: 0;
1100 margin: 0;
1101 font-family: var(--font-family-base);
1102 font-style: var(--font-style-normal, normal);
1103 font-size: var(--font-size-micro, 12px);
1104 line-height: 136%;
1105 color: var(--color-neutral-800, #373737);
1106 }
1107
1108 body.high-contrast-active .ptb-news__read-news .publish_and_social_medias_infos_mobile .publish_and_update_date_and_copy_text .publish_and_update_date * {
1109 color: var(--text-primary-accent, #E4F7E8);
1110 }
1111
1112 .ptb-news__read-news .publish_and_social_medias_infos_mobile .publish_and_update_date_and_copy_text .publish_and_update_date {
1113 display: flex;
1114 flex-direction: column;
1115 gap: 0;
1116 }
1117
1118 .ptb-news__read-news .publish_and_social_medias_infos_mobile .publish_and_update_date_and_copy_text .publish_and_update_date .updated {
1119 font-weight: var(--font-weight-bold, 700);
1120 }
1121
1122 .ptb-news__read-news .publish_and_social_medias_infos_mobile .publish_and_update_date_and_copy_text .publish_and_update_date .published {
1123 font-weight: var(--font-weight-regular, 400);
1124 }
1125
1126 .ptb-news__read-news .publish_and_social_medias_infos_mobile .publish_and_update_date_and_copy_text .copy-text-container {
1127 background: var(--color-neutral-100);
1128 border: var(--border-width-hairline, 1px) solid #CCCCCC;
1129 border-radius: 32px;
1130 display: flex;
1131 align-items: center;
1132 gap: var(--space-sm, 16px);
1133 padding: 6px var(--space-xxs, 8px);
1134 width: 112px;
1135 height: 36px;
1136 }
1137
1138 body.high-contrast-active .ptb-news__read-news .publish_and_social_medias_infos_mobile .publish_and_update_date_and_copy_text .copy-text-container {
1139 background: rgba(255, 255, 255, 0.32);
1140 color: var(--text-primary-accent, #E4F7E8);
1141 }
1142
1143 .ptb-news__read-news .publish_and_social_medias_infos_mobile .publish_and_update_date_and_copy_text .copy-text-container p.text {
1144 margin: 0;
1145 }
1146
1147 .ptb-news__read-news .publish_and_social_medias_infos_mobile .publish_and_update_date_and_copy_text .copy-text-container .text {
1148 font-family: var(--font-family-base);
1149 font-style: var(--font-style-normal, normal);
1150 font-weight: var(--font-weight-regular, 400);
1151 font-size: 13px;
1152 line-height: 14px;
1153 color: #008542;
1154 }
1155
1156 body.high-contrast-active .ptb-news__read-news .publish_and_social_medias_infos_mobile .publish_and_update_date_and_copy_text .copy-text-container .text {
1157 background: rgba(255, 255, 255, 0.32);
1158 color: var(--text-primary-accent, #E4F7E8);
1159 }
1160
1161 @media screen and (max-width: ${MAX_MOBILE_WIDTH}px) {
1162
1163 .ptb-news__read-news .publish_and_social_medias_infos_desk .render-share-news-container.desktop {
1164 display: none;
1165 }
1166
1167 .ptb-news__read-news .render-share-news-container.mobile {
1168 display: block;
1169 margin: var(--space-xl) var(--space-lg) 0 var(--space-lg);
1170 }
1171
1172 .ptb-news__read-news .publish_and_social_medias_infos_desk * {
1173 font-size: var(--font-size-micro, 12px);
1174 }
1175
1176 .ptb-news__read-news .publish_and_social_medias_infos_desk {
1177 display: grid;
1178 grid-template-columns: 100%;
1179 grid-template-rows: 1fr 100%;
1180 }
1181
1182 .ptb-news__read-news .publish_and_social_medias_infos_desk .publish_and_update_date {
1183 grid-column-start: 1;
1184 grid-column-end: 1;
1185 grid-row-start: 1;
1186 grid-row-end: 1;
1187 gap: var(--space-xxs, 8px);
1188 }
1189
1190 .ptb-news__read-news .publish_and_social_medias_infos_desk .publish_and_update_date * {
1191 padding: 0;
1192 margin: 0;
1193 font-family: var(--font-family-base);
1194 font-style: var(--font-style-normal);
1195 color: var(--color-neutral-800, #373737);
1196 font-weight: var(--font-weight-bold);
1197 font-size: var(--font-size-xxxs, 14px);
1198 line-height: var(--line-height-md, 132%);
1199 }
1200
1201 body.high-contrast-active .ptb-news__read-news .publish_and_social_medias_infos_desk .publish_and_update_date * {
1202 color: var(--text-primary-accent, #E4F7E8);
1203 }
1204
1205 .ptb-news__read-news .publish_and_social_medias_infos_desk .publish_and_update_date .published {
1206 font-weight: var(--font-weight-regular, 400);
1207 }
1208
1209 .ptb-news__read-news .publish_and_social_medias_infos_desk .social-media-container {
1210 grid-column-start: 1;
1211 grid-column-end: 2;
1212 grid-row-start: 2;
1213 grid-row-end: 2;
1214 justify-content: center;
1215 gap: var(--space-xs, 12px);
1216 height: 36px;
1217 }
1218
1219 .ptb-news__read-news .publish_and_social_medias_infos_desk .copy-text-container {
1220 grid-column-start: 1;
1221 grid-column-end: 2;
1222 grid-row-start: 2;
1223 grid-row-end: 2;
1224 max-width: 112px;
1225 place-self: end;
1226 }
1227
1228 .ptb-news__read-news .publish_and_social_medias_infos_desk .copy-text-container .text {
1229 display: none;
1230 }
1231
1232 .ptb-news__read-news .publish_and_social_medias_infos_desk .copy-message {
1233 bottom: 0;
1234 right: -9px;
1235 }
1236
1237 .ptb-news__read-news .publish_and_social_medias_infos_desk .social-media-container .mobile-share {
1238 display: initial;
1239 }
1240 }
1241
1242 @media screen and (min-width: ${MIN_TABLET_WIDTH}px) and (max-width: ${MAX_TABLET_WIDTH}px) {
1243 .ptb-news__read-news .publish_and_social_medias_infos_desk .social-media-container {
1244 padding-right: 0;
1245 }
1246 }
1247
1248
1249 </style>
1250
1251 <script>
1252 AUI().ready(function () {
1253
1254 function copyOnClick(text) {
1255
1256 const strWithoutHtmlTags = text.replace(/(<([^>]+)>)/gi, "");
1257 const strWithoutMarcationBrackets = strWithoutHtmlTags.replace(/ *#\[[^\]]*]/g, "");
1258 const strWithoutNextPrevious = strWithoutMarcationBrackets.replace(/Previous Next/g, "");
1259 const strWithoutBlankEnters = strWithoutNextPrevious.replace(/^\s*$(?:\r\n?|\n)/gm, "");
1260 const strWithoutBlankLines = strWithoutBlankEnters.replace(/ /g, '');
1261 const tempInput = document.createElement("textarea");
1262 tempInput.value = strWithoutBlankLines;
1263
1264 document.body.appendChild(tempInput);
1265 tempInput.select();
1266 document.execCommand("copy");
1267
1268 if (tempInput.value.length > 0) {
1269 copyMessages.forEach(copyMessage => copyMessage.classList.add('copy-message-active'));
1270
1271 timerToMessage()
1272 }
1273
1274 document.body.removeChild(tempInput);
1275 }
1276
1277 const copyTextContainers = document.querySelectorAll(".publish_and_social_medias_infos_desk .copy-text-container");
1278 copyTextContainers.forEach(copyTextContainer => {
1279 copyTextContainer.addEventListener("click", (event) => {
1280 event.preventDefault();
1281 const titleText = document.querySelector(".main-headline-container .main-headline").innerHTML;
1282 const publishSocialMediaText = document.querySelector(".publish_and_social_medias_infos_desk .publish_and_update_date").innerHTML;
1283 const tagsText = document.querySelector(".tags").innerHTML;
1284 const newsContentText = document.querySelector(".news-content").innerHTML;
1285 const text = titleText + publishSocialMediaText + tagsText + newsContentText;
1286 copyOnClick(text)
1287 });
1288 });
1289
1290 const mobileShare = async () => {
1291 try {
1292 const shareData = {
1293 title: '${newsInfo.mainHeadlineOfTheNews}',
1294 text: '',
1295 url: '${newsInfo.url}'
1296 };
1297 await navigator.share(shareData);
1298 } catch (err) {
1299
1300 }
1301 };
1302
1303 const mobileShareButtons = document.querySelectorAll(".publish_and_social_medias_infos_desk .mobile-share");
1304 mobileShareButtons.forEach(mobileShareButton => {
1305 mobileShareButton.addEventListener("click", (event) => {
1306 event.preventDefault();
1307 mobileShare();
1308 });
1309 });
1310
1311 const copyMessages = document.querySelectorAll('.copy-message');
1312 const timerToMessage = () => {
1313 setTimeout(() => {
1314 removeMessage();
1315 }, 2500);
1316
1317 }
1318
1319 const removeMessage = () => {
1320 copyMessages.forEach(copyMessage => copyMessage.classList.remove('copy-message-active'));
1321 }
1322
1323 });
1324 </script>
1325
1326</#macro>
1327
1328<#-- ################################################################################################################## -->
1329
1330<#-- ############# Site de Crise - Notícia - Render Tags ############################################################## -->
1331
1332<#function getCategoriesNamesAndIds vocabularyName categoriesList>
1333 <#assign tagCategoryList = [] />
1334
1335 <#assign tagsVocabulary = assetVocabularyService.fetchGroupVocabulary(groupId, vocabularyName) />
1336 <#list categoriesList as cat>
1337 <#if tagsVocabulary.getVocabularyId() == cat.embeddedTaxonomyCategory.taxonomyVocabularyId >
1338 <#assign tagCategoryList += [[cat.taxonomyCategoryName, cat.taxonomyCategoryId]] />
1339 </#if>
1340 </#list>
1341 <#return tagCategoryList>
1342</#function>
1343
1344<#assign
1345flagVocabulary = findVocabulary("Flag", vocabularies)
1346assetCategoryPropService = serviceLocator.findService("com.liferay.asset.category.property.service.AssetCategoryPropertyLocalService")
1347/>
1348
1349<#macro renderNewsTags categoryList targetPageWhenClickTag removeStartParameterWhenTagIsClicked updateTagParamsWhenClicked>
1350 <#assign tagPrefix = "tags-" + randomNumber(groupId?number)>
1351 <div class="${tagPrefix}-breakpoint breakpoint">
1352 <div class="${tagPrefix} col-2-11 md-col-1-8 sm-col-1-4">
1353
1354 <div class="tags">
1355 <#list categoryList as cat>
1356 <#assign tagLink = mountUrlToPage("") />
1357 <#assign urlWithoutTrailingSlash = tagLink?substring(0, tagLink?length - 1)>
1358 <#assign lastSlashIndex = urlWithoutTrailingSlash?last_index_of("/")>
1359 <#assign newUrl = urlWithoutTrailingSlash?substring(0, lastSlashIndex + 1)>
1360 <#assign tagLink = newUrl + "categorias?category=" + cat[1] />
1361 <a href="${tagLink}"
1362 class="category" cetegoryid="${cat[1]}"># ${cat[0]}</a>
1363 </#list>
1364 </div>
1365 </div>
1366 </div>
1367
1368 <style>
1369 .${tagPrefix} {
1370 display: flex;
1371 flex-direction: column;
1372 padding: 0;
1373 gap: var(--space-sm);
1374 }
1375
1376 .${tagPrefix} * {
1377 margin: 0;
1378 padding: 0;
1379 }
1380
1381 .${tagPrefix} .tags {
1382 display: flex;
1383 flex-wrap: wrap;
1384 gap: var(--space-xxs, 8px);
1385 padding: var(--space-lg) 0 0;
1386 }
1387
1388 .${tagPrefix} .tags .category {
1389 padding: var(--space-xxxs) var(--space-xxs);
1390 background: var(--color-neutral-100);
1391 border: var(--border-width-hairline, 1px) solid var(--color-neutral-500);
1392 border-radius: var(--border-radius-xl);
1393
1394 font-family: var(--font-family-base);
1395 font-style: var(--font-style-normal);
1396 font-weight: var(--font-weight-regular);
1397 font-size: var(--font-size-xxxs);
1398 line-height: var(--line-height-xl);
1399 color: var(--color-neutral-800, #373737);
1400 cursor: pointer;
1401 }
1402
1403 body.high-contrast-active .${tagPrefix} .tags .category {
1404 background: rgba(255, 255, 255, 0.32);
1405 border: 1px solid rgba(255, 255, 255, 0.32);
1406 color: var(--text-secondary-default, #F8F8F8);
1407 }
1408
1409 @media screen and (max-width: ${MAX_MOBILE_WIDTH}px) {
1410 .${tagPrefix} .tags {
1411 display: flex;
1412 flex-wrap: wrap;
1413 gap: 8px;
1414 padding: var(--space-sm) 0 var(--space-lg);
1415 }
1416
1417 .${tagPrefix} {
1418 margin-top: var(--space-sm);
1419 }
1420 }
1421 </style>
1422
1423 <script>
1424 AUI().ready(function () {
1425
1426 const urlParams = new URLSearchParams(window.location.search);
1427 const categories = urlParams.getAll("category").sort();
1428
1429 const root = document.querySelector(".${tagPrefix}");
1430 const tags = root.querySelectorAll(".category");
1431 tags.forEach((tag, index) => {
1432
1433 const categoryId = tag.getAttribute("cetegoryid");
1434 if (categories.indexOf(categoryId) != -1) {
1435 tag.classList.add("active");
1436 }
1437
1438 <#if updateTagParamsWhenClicked>
1439 tag.addEventListener("click", (e) => {
1440 e.preventDefault();
1441 const clickedTag = e.target;
1442 const urlParams = new URLSearchParams(window.location.search);
1443 urlParams.delete("tag");
1444 urlParams.delete("category");
1445
1446 const categoryId = clickedTag.getAttribute("cetegoryid");
1447 urlParams.append("category", categoryId);
1448
1449 <#if removeStartParameterWhenTagIsClicked>
1450 urlParams.delete("start");
1451 </#if>
1452
1453 const href = "${themeDisplay.getPortalURL() + mountUrlToPage(targetPageWhenClickTag)}?" + urlParams.toString();
1454 window.location.href = href;
1455 });
1456 </#if>
1457 });
1458 });
1459 </script>
1460
1461</#macro>
1462
1463<#-- ################################################################################################################## -->
1464
1465<#-- ############# Site de Crise - Notícia - Imagem de destaque ####################################################### -->
1466<#macro renderNewsFeaturedMedia newsInfo>
1467 <#if (newsInfo.newsMedia.imageSrc?? && newsInfo.newsMedia.imageSrc?has_content) || (newsInfo.newsMedia.videoYotubeID?? && newsInfo.newsMedia.videoYotubeID?has_content) || (newsInfo.newsMedia.internalVideo?? && newsInfo.newsMedia.internalVideo.url?has_content)>
1468 <div class="news-featured-media">
1469
1470 <div class="media-breakpoint breakpoint">
1471 <div class="media-col col-2-11 md-col-1-8 sm-col-1-4">
1472 <#if newsInfo.newsMedia.imageSrc?? && newsInfo.newsMedia.imageSrc?has_content>
1473 <#-- Midias adaptativas de imagem para desktop e mobile -->
1474 <#assign fileDataRequest = restClient.get("/headless-delivery/v1.0/documents/${newsInfo.newsMedia.fileEntryId}") />
1475 <#assign urlAdaptativeMediaMobile = newsInfo.newsMedia.imageSrc/>
1476 <#assign urlAdaptativeMediaDesktop = newsInfo.newsMedia.imageSrc/>
1477
1478 <#if fileDataRequest?? && fileDataRequest.adaptedImages?? >
1479 <#assign dataAdaptativeMedia = fileDataRequest.adaptedImages />
1480 <#list dataAdaptativeMedia as data>
1481 <#if data.resolutionName == adaptativeMediaDesktopResolutionName>
1482 <#assign urlAdaptativeMediaDesktop = data.contentUrl/>
1483 </#if>
1484 <#if data.resolutionName == adaptativeMediaMobileResolutionName>
1485 <#assign urlAdaptativeMediaMobile = data.contentUrl/>
1486 </#if>
1487 </#list>
1488 </#if>
1489
1490 <picture>
1491 <source media="(max-width:767px)" srcset="${urlAdaptativeMediaMobile}">
1492 <img src="${urlAdaptativeMediaDesktop}" loading="lazy" alt="${newsInfo.newsMedia.imageAlt}"/>
1493 </picture>
1494 <@liferay_util["html-top"]>
1495 <meta name="title" content="${newsInfo.mainHeadlineOfTheNews}">
1496 <meta name="description" content="${newsInfo.newsSummary}">
1497
1498 <meta property="og:url" content="${currentURL}">
1499 <meta property="og:type" content="website">
1500 <meta property="og:title" content="${newsInfo.mainHeadlineOfTheNews}">
1501 <meta property="og:description" content="${newsInfo.newsSummary}" />
1502 <meta property="og:image" content="${themeDisplay.getPortalURL()}/o/adaptive-media/image/${newsInfo.newsMedia.fileEntryId}/Thumbnail-300x300/image">
1503 <meta property="og:image:alt" content="${newsInfo.newsMedia.imageAlt}">
1504
1505 <meta name="twitter:card" content="summary_large_image">
1506 <meta name="twitter:url" content="${currentURL}" />
1507 <meta name="twitter:title" content="${newsInfo.mainHeadlineOfTheNews}">
1508 <meta name="twitter:description" content="${newsInfo.newsSummary}" />
1509 <meta name="twitter:image" content= "${themeDisplay.getPortalURL()}/o/adaptive-media/image/${newsInfo.newsMedia.fileEntryId}/Thumbnail-300x300/image" >
1510 <meta name="twitter:image:alt" content="${newsInfo.newsMedia.imageAlt}">
1511 </@>
1512 <#else>
1513 <#if newsInfo.newsMedia.videoYotubeID?? && newsInfo.newsMedia.videoYotubeID?has_content>
1514 <iframe loading="lazy" data-video-id="${cardData.media.videoYotubeID}" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
1515 <@liferay_util["html-top"]>
1516 <meta name="title" content="${newsInfo.mainHeadlineOfTheNews}">
1517 <meta name="description" content="${newsInfo.newsSummary}">
1518
1519 <meta property="og:url" content="${currentURL}">
1520 <meta property="og:type" content="website">
1521 <meta property="og:title" content="${newsInfo.mainHeadlineOfTheNews}">
1522 <meta property="og:description" content="${newsInfo.newsSummary}" />
1523 <meta property="og:image" content="https://img.youtube.com/vi/${newsInfo.newsMedia.videoYotubeID}/hqdefault.jpg">
1524 <meta property="og:image:alt" content="Youtube Video Thumbnail">
1525
1526 <meta name="twitter:card" content="summary_large_image">
1527 <meta name="twitter:url" content="${currentURL}" />
1528 <meta name="twitter:title" content="${newsInfo.mainHeadlineOfTheNews}">
1529 <meta name="twitter:description" content="${newsInfo.newsSummary}" />
1530 <meta name="twitter:image" content= "https://img.youtube.com/vi/${newsInfo.newsMedia.videoYotubeID}/hqdefault.jpg" >
1531 <meta name="twitter:image:alt" content="Youtube Video Thumbnail">
1532 </@>
1533 <#else>
1534 <video loading="lazy">
1535 <source src="${newsInfo.newsMedia.internalVideo.url}">
1536 Your browser does not support the video tag.
1537 </video>
1538 </#if>
1539
1540 <div class="banner-video-icons">
1541 <#if newsInfo.newsMedia.videoYotubeID?? && newsInfo.newsMedia.videoYotubeID?has_content>
1542 <picture>
1543 <source media="(max-width:767px)" srcset="https://img.youtube.com/vi/${newsInfo.newsMedia.videoYotubeID}/mqdefault.jpg">
1544 <img class="banner-video-thumb-iframe" loading="lazy" src="https://img.youtube.com/vi/${newsInfo.newsMedia.videoYotubeID}/hqdefault.jpg" alt="YouTube Thumbnail"/>
1545 </picture>
1546 </#if>
1547 <svg class="banner-video-icon-play" width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
1548 <path d="M0 16C0 7.16344 7.16344 0 16 0C24.8366 0 32 7.16344 32 16C32 24.8366 24.8366 32 16 32C7.16344 32 0 24.8366 0 16Z" fill="white" fill-opacity="0.8"/>
1549 <path d="M22.2563 15.5744L13.2625 10.0744C13.1868 10.0277 13.1 10.0021 13.0111 10.0001C12.9221 9.99816 12.8343 10.02 12.7566 10.0633C12.6789 10.1066 12.6141 10.1698 12.569 10.2465C12.5239 10.3232 12.5001 10.4105 12.5 10.4994V21.4994C12.5001 21.5884 12.5239 21.6757 12.569 21.7524C12.6141 21.8291 12.6789 21.8923 12.7566 21.9356C12.8343 21.9789 12.9221 22.0007 13.0111 21.9988C13.1 21.9968 13.1868 21.9712 13.2625 21.9244L22.2563 16.4244C22.3301 16.3808 22.3913 16.3186 22.4338 16.2441C22.4763 16.1696 22.4987 16.0852 22.4987 15.9994C22.4987 15.9137 22.4763 15.8293 22.4338 15.7548C22.3913 15.6803 22.3301 15.6181 22.2563 15.5744Z" fill="#008542"/>
1550 </svg>
1551 </div>
1552 </#if>
1553 </div>
1554 </div>
1555
1556 <div class="credit-legend breakpoint">
1557
1558 <div class="credit-legend-container col-2-11 md-col-1-8 sm-col-1-4">
1559 <#if newsInfo.newsMedia.legend != "">
1560 <div class="legend paragraph-micro-regular">
1561 <p>${newsInfo.newsMedia.legend}</p>
1562 </div>
1563 </#if>
1564 <#if newsInfo.newsMedia.credits != "">
1565 <p class="credits paragraph-micro-regular">
1566 ${newsInfo.newsMedia.credits}
1567 </p>
1568 </#if>
1569
1570 </div>
1571 </div>
1572 </div>
1573 </#if>
1574 <style>
1575 .ptb-news__read-news .news-featured-media {
1576 padding: var(--space-xl) 0 var(--space-xl) 0;
1577 }
1578
1579 .ptb-news__read-news .news-featured-media .media-col {
1580 position: relative;
1581 }
1582
1583 .ptb-news__read-news .news-featured-media img,
1584 .ptb-news__read-news .news-featured-media video,
1585 .ptb-news__read-news .news-featured-media iframe {
1586 width: 100%;
1587 max-height: 567px;
1588 aspect-ratio: 16/9;
1589 object-fit: cover;
1590 border-radius: var(--border-radius-lg, 16px);
1591 }
1592
1593 .ptb-news__read-news .news-featured-media .banner-video-icons {
1594 width: 100%;
1595 height: 100%;
1596 position: absolute;
1597 top: 50%;
1598 left: 50%;
1599 transform: translate(-50%,-50%);
1600 cursor: pointer;
1601 }
1602
1603 .ptb-news__read-news .news-featured-media .banner-video-icons .banner-video-thumb-iframe {
1604 position: absolute;
1605 width: 100%;
1606 height: 100%;
1607 object-fit: cover;
1608 }
1609
1610 .ptb-news__read-news .news-featured-media .banner-video-icons .banner-video-icon-play {
1611 position: absolute;
1612 top: 50%;
1613 left: 50%;
1614 transform: translate(-50%,-50%);
1615 }
1616
1617 body.high-contrast-active .ptb-news__read-news .news-featured-media .banner-video-icons .banner-video-icon-play path:nth-child(1) {
1618 fill: black;
1619 }
1620
1621 body.high-contrast-active .ptb-news__read-news .news-featured-media .banner-video-icons .banner-video-icon-play path:nth-child(2) {
1622 fill: white;
1623 }
1624
1625 .ptb-news__read-news .news-featured-media *:not(.breakpoint) {
1626 margin: 0;
1627 }
1628 .ptb-news__read-news .news-featured-media * {
1629 padding: 0;
1630 font-family: var(--font-family-base);
1631 line-height: var(--line-height-xl);
1632 }
1633
1634 .ptb-news__read-news .news-featured-media .credits {
1635 text-align: right;
1636 color: var(--collor-neutral-dark-to-bright-200, #525252);
1637 margin-bottom: var(--space-xxxs, 4px);
1638 font-style: var(--font-style-italic, italic);
1639 margin-top: var(--space-xxs, 8px);
1640 margin-bottom: 0;
1641 }
1642
1643 body.high-contrast-active .ptb-news__read-news .news-featured-media .credits {
1644 color: var(--text-secondary-default, #F8F8F8);
1645 }
1646
1647 .ptb-news__read-news .news-featured-media .legend {
1648 margin-top: var(--space-xxs, 8px);
1649 display: flex;
1650 justify-content: space-between;
1651 }
1652
1653 .ptb-news__read-news .news-featured-media .legend,
1654 .ptb-news__read-news .news-featured-media .legend * {
1655 font-style: var(--font-style-italic, italic);
1656 color: var(--collor-neutral-dark-to-bright-200, #525252);
1657 }
1658
1659 .ptb-news__read-news .credit-legend .credit-legend-container {
1660 display: flex;
1661 justify-content: space-between;
1662 flex-wrap: wrap;
1663 gap: 8px;
1664 }
1665
1666 body.high-contrast-active .ptb-news__read-news .news-featured-media .legend,
1667 body.high-contrast-active .ptb-news__read-news .news-featured-media .legend * {
1668 color: var(--text-secondary-default, #F8F8F8);
1669 }
1670
1671 @media screen and (max-width: ${MAX_MOBILE_WIDTH}px) {
1672 .ptb-news__read-news .news-featured-media .credits {
1673 text-align: left;
1674 }
1675 }
1676 </style>
1677
1678 <script>
1679 /* Manipulation video*/
1680 let videoIsPlaying = false;
1681
1682 const modalForClick = document.querySelector(".ptb-news__read-news .news-featured-media .banner-video-icons");
1683 const video = document.querySelector(".ptb-news__read-news .news-featured-media .media-col > :first-child");
1684
1685 const playIcon = modalForClick && modalForClick.querySelector(".banner-video-icon-play");
1686 modalForClick && modalForClick.addEventListener("click", ()=>{
1687 if(video.tagName === "VIDEO") {
1688 if(videoIsPlaying) {
1689 video.pause();
1690 playIcon.style.display = "";
1691 videoIsPlaying = false;
1692 }
1693 else {
1694 video.play();
1695 playIcon.style.display = "none";
1696 videoIsPlaying = true;
1697 }
1698 }
1699 else if(video.tagName === "IFRAME") {
1700 const thumbYoutube = modalForClick.querySelector(".banner-video-thumb-iframe");
1701 if(videoIsPlaying) {
1702 video.contentWindow.postMessage('{"event":"command","func":"pauseVideo"}', '*');
1703 playIcon.style.display = "";
1704 videoIsPlaying = false;
1705 }
1706 else {
1707 if (!video.getAttribute('src')) {
1708 const videoId = video.getAttribute('data-video-id');
1709 const youtubeIframeUrl = 'https://www.youtube-nocookie.com/embed/' + videoId + '?si=PDNu4EIwtCuSHC1S&controls=0&enablejsapi=1&rel=0';
1710 video.setAttribute('src', youtubeIframeUrl);
1711 video.setAttribute('allow', 'accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share');
1712
1713 video.onload = () => video.contentWindow.postMessage('{"event":"command","func":"playVideo"}', '*');
1714 }
1715 thumbYoutube && (thumbYoutube.style.display = "none");
1716 video.contentWindow.postMessage('{"event":"command","func":"playVideo"}', '*');
1717 playIcon.style.display = "none";
1718 videoIsPlaying = true;
1719 }
1720 }
1721 });
1722 </script>
1723<#--/#if -->
1724</#macro>
1725<#-- ################################################################################################################## -->
1726
1727<#-- ############# Site de Crise - Notícia - Conteúdo da notícia ###################################################### -->
1728
1729<#macro renderNewsContent newsInfo>
1730
1731 <#assign targetStr = "<div class='paragraph_separator'><span class='dot'></span><span class='dot'></span><span class='dot'></span><span class='dot'></span></div>">
1732 <#assign content = newsInfo.newsContent?replace("<p></p>", targetStr, 'r')>
1733 <#assign content = content?replace("<p> </p>", targetStr, 'r')>
1734 <#assign content = content?replace("<p></p>", targetStr, 'r')>
1735 <#assign content = content?replace("<p> </p>", targetStr, 'r')>
1736
1737
1738 <div class="news-content breakpoint">
1739 <div class="col-1-12 md-col-1-8 sm-col-1-4">
1740 ${content}
1741 </div>
1742 <div class="audio-template audio-pause audio-unmuted" style="display:none">
1743 <div class="audio-button-play">
1744 <svg class="audio-play-icon" width="100%" height="100%" viewBox="0 0 91 90" fill="#008542" xmlns="http://www.w3.org/2000/svg"><circle cx="45.2903" cy="45" r="44.5" stroke="#008542"></circle> <path d="M58.9759 43.2545C60.3409 44.0179 60.3409 45.9821 58.9759 46.7455L38.7505 58.0578C37.4173 58.8034 35.7742 57.8397 35.7742 56.3122L35.7742 33.6878C35.7742 32.1603 37.4173 31.1966 38.7505 31.9422L58.9759 43.2545Z" fill="white"></path>
1745 </svg>
1746
1747 <svg class="audio-pause-icon" width="100%" height="100%" viewBox="0 0 91 90" fill="#008542" xmlns="http://www.w3.org/2000/svg"><circle cx="45.2903" cy="45" r="44.5" stroke="#008542"></circle> <path d="M42.3736 30.4167H33.6236V59.5834H42.3736V30.4167Z" fill="white"></path> <path d="M48.2069 59.5834H56.9569V30.4167H48.2069V59.5834Z" fill="white"></path>
1748 </svg>
1749 </div>
1750 <div class="audio-sondwave">
1751 <svg class="audio-sondwave-desktop" width="100%" height="100%" viewBox="0 0 590 30" fill="none" xmlns="http://www.w3.org/2000/svg">
1752 <g clip-path="url(#clip0_2625_8152)">
1753 <line x1="0.75" y1="0.75" x2="0.749999" y2="29.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1754 <line x1="5.91016" y1="7.75" x2="5.91016" y2="21.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1755 <line x1="11.0723" y1="5.75" x2="11.0723" y2="24.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1756 <line x1="16.2344" y1="11.75" x2="16.2344" y2="18.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1757 <line x1="21.3945" y1="9.75" x2="21.3945" y2="20.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1758 <line x1="26.5566" y1="9.75" x2="26.5566" y2="19.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1759 <line x1="30.6855" y1="1.75" x2="30.6855" y2="28.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1760 <line x1="35.8477" y1="12.75" x2="35.8477" y2="17.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1761 <line x1="41.0078" y1="13.75" x2="41.0078" y2="16.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1762 <line x1="46.1699" y1="10.75" x2="46.1699" y2="19.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1763 <line x1="51.3301" y1="8.75" x2="51.3301" y2="20.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1764 <line x1="56.4922" y1="0.75" x2="56.4922" y2="29.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1765 <line x1="61.6523" y1="7.75" x2="61.6523" y2="21.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1766 <line x1="66.8145" y1="5.75" x2="66.8145" y2="24.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1767 <line x1="71.9766" y1="11.75" x2="71.9766" y2="18.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1768 <line x1="77.1367" y1="9.75" x2="77.1367" y2="20.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1769 <line x1="82.2988" y1="9.75" x2="82.2988" y2="19.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1770 <line x1="86.4277" y1="1.75" x2="86.4277" y2="28.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1771 <line x1="91.5879" y1="12.75" x2="91.5879" y2="17.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1772 <line x1="96.75" y1="13.75" x2="96.75" y2="16.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1773 <line x1="101.91" y1="10.75" x2="101.91" y2="19.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1774 <line x1="107.072" y1="8.75" x2="107.072" y2="20.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1775 <line x1="112.234" y1="0.75" x2="112.234" y2="29.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1776 <line x1="117.395" y1="7.75" x2="117.395" y2="21.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1777 <line x1="122.557" y1="5.75" x2="122.557" y2="24.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1778 <line x1="127.717" y1="11.75" x2="127.717" y2="18.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1779 <line x1="132.879" y1="9.75" x2="132.879" y2="20.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1780 <line x1="138.041" y1="9.75" x2="138.041" y2="19.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1781 <line x1="142.17" y1="1.75" x2="142.17" y2="28.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1782 <line x1="147.33" y1="12.75" x2="147.33" y2="17.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1783 <line x1="151.75" y1="0.75" x2="151.75" y2="29.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1784 <line x1="156.91" y1="7.75" x2="156.91" y2="21.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1785 <line x1="162.072" y1="5.75" x2="162.072" y2="24.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1786 <line x1="167.234" y1="11.75" x2="167.234" y2="18.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1787 <line x1="172.395" y1="9.75" x2="172.395" y2="20.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1788 <line x1="177.557" y1="9.75" x2="177.557" y2="19.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1789 <line x1="181.686" y1="1.75" x2="181.686" y2="28.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1790 <line x1="186.848" y1="12.75" x2="186.848" y2="17.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1791 <line x1="192.008" y1="13.75" x2="192.008" y2="16.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1792 <line x1="197.17" y1="10.75" x2="197.17" y2="19.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1793 <line x1="202.33" y1="8.75" x2="202.33" y2="20.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1794 <line x1="207.492" y1="0.75" x2="207.492" y2="29.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1795 <line x1="212.652" y1="7.75" x2="212.652" y2="21.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1796 <line x1="217.814" y1="5.75" x2="217.814" y2="24.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1797 <line x1="222.977" y1="11.75" x2="222.977" y2="18.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1798 <line x1="228.137" y1="9.75" x2="228.137" y2="20.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1799 <line x1="233.299" y1="9.75" x2="233.299" y2="19.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1800 <line x1="237.428" y1="1.75" x2="237.428" y2="28.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1801 <line x1="242.588" y1="12.75" x2="242.588" y2="17.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1802 <line x1="247.75" y1="13.75" x2="247.75" y2="16.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1803 <line x1="252.91" y1="10.75" x2="252.91" y2="19.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1804 <line x1="258.072" y1="8.75" x2="258.072" y2="20.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1805 <line x1="263.234" y1="0.75" x2="263.234" y2="29.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1806 <line x1="268.395" y1="7.75" x2="268.395" y2="21.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1807 <line x1="273.557" y1="5.75" x2="273.557" y2="24.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1808 <line x1="278.717" y1="11.75" x2="278.717" y2="18.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1809 <line x1="283.879" y1="9.75" x2="283.879" y2="20.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1810 <line x1="289.041" y1="9.75" x2="289.041" y2="19.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1811 <line x1="293.17" y1="1.75" x2="293.17" y2="28.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1812 <line x1="298.33" y1="12.75" x2="298.33" y2="17.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1813 <line x1="302.75" y1="10.75" x2="302.75" y2="19.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1814 <line x1="307.912" y1="8.75" x2="307.912" y2="20.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1815 <line x1="313.072" y1="0.75" x2="313.072" y2="29.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1816 <line x1="318.234" y1="7.75" x2="318.234" y2="21.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1817 <line x1="323.395" y1="5.75" x2="323.395" y2="24.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1818 <line x1="328.557" y1="11.75" x2="328.557" y2="18.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1819 <line x1="333.719" y1="9.75" x2="333.719" y2="20.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1820 <line x1="338.879" y1="9.75" x2="338.879" y2="19.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1821 <line x1="343.008" y1="1.75" x2="343.008" y2="28.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1822 <line x1="348.17" y1="12.75" x2="348.17" y2="17.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1823 <line x1="353.33" y1="13.75" x2="353.33" y2="16.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1824 <line x1="358.492" y1="10.75" x2="358.492" y2="19.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1825 <line x1="363.652" y1="8.75" x2="363.652" y2="20.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1826 <line x1="368.814" y1="0.75" x2="368.814" y2="29.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1827 <line x1="373.977" y1="7.75" x2="373.977" y2="21.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1828 <line x1="379.137" y1="5.75" x2="379.137" y2="24.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1829 <line x1="384.299" y1="11.75" x2="384.299" y2="18.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1830 <line x1="389.459" y1="9.75" x2="389.459" y2="20.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1831 <line x1="394.621" y1="9.75" x2="394.621" y2="19.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1832 <line x1="398.75" y1="1.75" x2="398.75" y2="28.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1833 <line x1="403.912" y1="12.75" x2="403.912" y2="17.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1834 <line x1="408.33" y1="10.75" x2="408.33" y2="19.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1835 <line x1="413.492" y1="8.75" x2="413.492" y2="20.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1836 <line x1="418.654" y1="0.75" x2="418.654" y2="29.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1837 <line x1="423.814" y1="7.75" x2="423.814" y2="21.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1838 <line x1="428.977" y1="5.75" x2="428.977" y2="24.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1839 <line x1="434.137" y1="11.75" x2="434.137" y2="18.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1840 <line x1="439.299" y1="9.75" x2="439.299" y2="20.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1841 <line x1="444.461" y1="9.75" x2="444.461" y2="19.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1842 <line x1="448.59" y1="1.75" x2="448.59" y2="28.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1843 <line x1="453.75" y1="12.75" x2="453.75" y2="17.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1844 <line x1="458.912" y1="13.75" x2="458.912" y2="16.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1845 <line x1="464.072" y1="10.75" x2="464.072" y2="19.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1846 <line x1="469.234" y1="8.75" x2="469.234" y2="20.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1847 <line x1="474.395" y1="0.75" x2="474.395" y2="29.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1848 <line x1="479.557" y1="7.75" x2="479.557" y2="21.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1849 <line x1="484.719" y1="5.75" x2="484.719" y2="24.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1850 <line x1="489.879" y1="11.75" x2="489.879" y2="18.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1851 <line x1="495.041" y1="9.75" x2="495.041" y2="20.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1852 <line x1="500.201" y1="9.75" x2="500.201" y2="19.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1853 <line x1="504.33" y1="1.75" x2="504.33" y2="28.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1854 <line x1="509.492" y1="12.75" x2="509.492" y2="17.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1855 <line x1="513.912" y1="10.75" x2="513.912" y2="19.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1856 <line x1="519.072" y1="8.75" x2="519.072" y2="20.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1857 <line x1="524.234" y1="0.75" x2="524.234" y2="29.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1858 <line x1="529.395" y1="7.75" x2="529.395" y2="21.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1859 <line x1="534.557" y1="5.75" x2="534.557" y2="24.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1860 <line x1="539.719" y1="11.75" x2="539.719" y2="18.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1861 <line x1="544.879" y1="9.75" x2="544.879" y2="20.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1862 <line x1="550.041" y1="9.75" x2="550.041" y2="19.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1863 <line x1="554.17" y1="1.75" x2="554.17" y2="28.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1864 <line x1="559.332" y1="12.75" x2="559.332" y2="17.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1865 <line x1="564.492" y1="13.75" x2="564.492" y2="16.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1866 <line x1="569.654" y1="10.75" x2="569.654" y2="19.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1867 <line x1="574.814" y1="8.75" x2="574.814" y2="20.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1868 <line x1="579.977" y1="0.75" x2="579.977" y2="29.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1869 <line x1="585.137" y1="7.75" x2="585.137" y2="21.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1870 <line x1="590.299" y1="5.75" x2="590.299" y2="24.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1871 </g>
1872 <defs>
1873 <clipPath id="clip0_2625_8152">
1874 <rect width="590" height="30" fill="white"/>
1875 </clipPath>
1876 </defs>
1877 </svg>
1878 <svg class="audio-sondwave-mobile" width="100%" height="100%" viewBox="0 0 102 30" fill="none" xmlns="http://www.w3.org/2000/svg">
1879 <g clip-path="url(#clip0_2625_8922)">
1880 <line x1="0.75" y1="0.75" x2="0.749999" y2="29.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1881 <line x1="5.91016" y1="7.75" x2="5.91016" y2="21.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1882 <line x1="11.0723" y1="5.75" x2="11.0723" y2="24.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1883 <line x1="16.2344" y1="11.75" x2="16.2344" y2="18.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1884 <line x1="21.3945" y1="9.75" x2="21.3945" y2="20.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1885 <line x1="26.5566" y1="9.75" x2="26.5566" y2="19.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1886 <line x1="30.6855" y1="1.75" x2="30.6855" y2="28.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1887 <line x1="35.8477" y1="12.75" x2="35.8477" y2="17.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1888 <line x1="41.0078" y1="13.75" x2="41.0078" y2="16.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1889 <line x1="46.1699" y1="10.75" x2="46.1699" y2="19.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1890 <line x1="51.3301" y1="8.75" x2="51.3301" y2="20.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1891 <line x1="56.4922" y1="0.75" x2="56.4922" y2="29.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1892 <line x1="61.6523" y1="7.75" x2="61.6523" y2="21.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1893 <line x1="66.8145" y1="5.75" x2="66.8145" y2="24.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1894 <line x1="71.9766" y1="11.75" x2="71.9766" y2="18.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1895 <line x1="77.1367" y1="9.75" x2="77.1367" y2="20.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1896 <line x1="82.2988" y1="9.75" x2="82.2988" y2="19.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1897 <line x1="86.4277" y1="1.75" x2="86.4277" y2="28.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1898 <line x1="91.5879" y1="12.75" x2="91.5879" y2="17.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1899 <line x1="96.75" y1="13.75" x2="96.75" y2="16.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1900 <line x1="101.91" y1="10.75" x2="101.91" y2="19.25" stroke="#008542" stroke-width="1.5" stroke-linecap="round"/>
1901 </g>
1902 <defs>
1903 <clipPath id="clip0_2625_8922">
1904 <rect width="102" height="30" fill="white"/>
1905 </clipPath>
1906 </defs>
1907 </svg>
1908 </div>
1909 <div class="audio-time paragraph-micro-bold"> </div>
1910 <div class="audio-button-mute">
1911 <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none">
1912 <path d="M27.3625 9.6375C28.1993 10.4723 28.8632 11.464 29.3161 12.5558C29.7691 13.6476 30.0023 14.818 30.0023 16C30.0023 17.182 29.7691 18.3524 29.3161 19.4442C28.8632 20.536 28.1993 21.5277 27.3625 22.3625M10 21H4C3.73478 21 3.48043 20.8946 3.29289 20.7071C3.10536 20.5196 3 20.2652 3 20V12C3 11.7348 3.10536 11.4804 3.29289 11.2929C3.48043 11.1054 3.73478 11 4 11H10M10 21L19 28V4L10 11M10 21V11M23.825 13.175C24.1969 13.5455 24.492 13.9857 24.6933 14.4705C24.8947 14.9553 24.9983 15.4751 24.9983 16C24.9983 16.5249 24.8947 17.0447 24.6933 17.5295C24.492 18.0143 24.1969 18.4545 23.825 18.825" stroke="#525252" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1913 </svg>
1914 </div>
1915 </div>
1916 </div>
1917
1918 <#if categoriesAsssetEntryResponse?? && categoriesAsssetEntryResponse?has_content && categoriesAsssetEntryResponse.taxonomyCategoryBriefs??>
1919 <@renderNewsTags tagCategoryList NEWS_PAGE_NAME removeStartParameterWhenTagIsClicked includeRequestParams />
1920 </#if>
1921 <style>
1922
1923 .ptb-news__read-news .news-content p {
1924 margin-bottom: var(--space-md, 24px);
1925 }
1926
1927 .ptb-news__read-news .news-content strong {
1928 font-weight: var(--font-weight-bold);
1929 }
1930
1931 .ptb-news__read-news .news-content em {
1932 font-style: var(--font-style-italic);
1933 }
1934
1935 .ptb-news__read-news .news-content a:not(.stories-container *) {
1936 font-family: var(--font-family-base);
1937 font-style: var(--font-style-normal, normal);
1938 font-weight: var(--font-weight-bold, 700);
1939 font-size: var(--font-size-xs, 18px);
1940 line-height: var(--line-height-xl, 160%);
1941
1942 color: #008542;
1943 }
1944
1945 body.high-contrast-active .ptb-news__read-news .news-content a {
1946 color: #E4F7E8;
1947 }
1948
1949 .ptb-news__read-news .news-content ul {
1950 padding-left: 27px;
1951 margin-top: -16px;
1952 }
1953
1954 .ptb-news__read-news .news-content ul li::marker {
1955 content: "■" !important;
1956 color: var(--color-secondary-medium) !important;
1957 font-size: var(--size-xxs);
1958 }
1959
1960 .ptb-news__read-news .news-content ul li {
1961 color: var(--color-text-primary-default);
1962 padding: 8px 0;
1963
1964 /*paragraph-sm-regular*/
1965 font-size: var(--font-size-xxs);
1966 line-height: var(--line-height-xl);
1967 font-weight: var(--font-weight-regular);
1968 font-style: var(--font-style-normal);
1969 text-decoration: var(--text-decoration-none);
1970
1971 margin-left: calc(-1* var(--space-sm));
1972 padding-left: var(--space-sm);
1973 }
1974
1975 .ptb-news__read-news .news-content ul li * {
1976 color: var(--color-text-primary-default);
1977 padding: 8px 0;
1978
1979 /*paragraph-sm-regular*/
1980 font-size: var(--font-size-xxs);
1981 line-height: var(--line-height-xl);
1982 font-weight: var(--font-weight-regular);
1983 font-style: var(--font-style-normal);
1984 text-decoration: var(--text-decoration-none);
1985 }
1986
1987 @media screen and (min-width: 1024px) {
1988 .ptb-news__read-news .news-content > * {
1989 grid-column-start: 3;
1990 grid-column-end: 11;
1991 }
1992
1993 <#if typeOfNews?? && typeOfNews?has_content && typeOfNews == "Infográfico" >
1994 .ptb-news__read-news .news-content > *:has(img) {
1995 grid-column-start: 2;
1996 grid-column-end: 12;
1997 }
1998 }
1999
2000 </#if>
2001 }
2002
2003 .ptb-news__read-news .news-content figure {
2004 margin-bottom: var(--space-sm, 16px);
2005 }
2006
2007 .ptb-news__read-news .news-content figure figcaption {
2008 display: flex;
2009 justify-content: space-between;
2010 align-items: flex-start;
2011 align-self: stretch;
2012 margin-top: var(--space-xxs, 8px);
2013 text-align: justify;
2014 }
2015
2016 .ptb-news__read-news .news-content figure figcaption,
2017 .ptb-news__read-news .news-content figure figcaption * {
2018 color: var(--color-neutral-700, #525252);
2019 font-family: var(--font-family-base);
2020 font-size: var(--font-size-xxxs, 14px);
2021 font-style: var(--font-style-italic, italic);
2022 font-weight: var(--font-weight-regular, 400);
2023 line-height: var(--line-height-xl, 160%);
2024 }
2025
2026 body.high-contrast-active .ptb-news__read-news .news-content figure figcaption,
2027 body.high-contrast-active .ptb-news__read-news .news-content figure figcaption * {
2028 color: var(--text-secondary-default, #F8F8F8);
2029 }
2030
2031 .ptb-news__read-news .news-content figure figcaption br {
2032 display: none;
2033 }
2034
2035 .ptb-news__read-news .news-content .embed-responsive {
2036 width: 100% !important;
2037 border-radius: var(--border-radius-md, 16px);
2038 margin-bottom: var(--space-md, 16px);
2039 aspect-ratio: 16/9;
2040 }
2041
2042 .ptb-news__read-news .news-content img.first-news-image {
2043 max-width: 1008px;
2044 max-height: 567px!important;
2045 height: 567px !important;
2046 object-fit: cover
2047 }
2048
2049 .ptb-news__read-news .news-content img {
2050 width: 100%;
2051 height: auto;
2052 max-width: 800px ;
2053 max-height: 450px;
2054 display: block !important;
2055 margin-left: auto !important;
2056 margin-right: auto !important;
2057 border-radius: var(--border-radius-md, 16px);
2058 }
2059
2060 <#if typeOfNews?? && typeOfNews?has_content && typeOfNews == "Artigo" >
2061 .ptb-news__read-news .news-content img {
2062 aspect-ratio: 16/9;
2063 }
2064 </#if>
2065
2066 .ptb-news__read-news .news-content .paragraph_separator {
2067 display: flex;
2068 width: 100%;
2069 height: fit-content;
2070 justify-content: center;
2071 gap: 6px;
2072 }
2073
2074 .ptb-news__read-news .news-content .paragraph_separator .dot {
2075 height: var(--size-micro, 4px);
2076 width: var(--size-micro, 4px);
2077 background-color: #959595;
2078 border-radius: 100%;
2079 display: inline-block;
2080 }
2081
2082 .ptb-news__read-news .news-content *:not(.stories-container *) {
2083 font-family: var(--font-family-base);
2084 font-style: var(--font-style-normal, normal);
2085 font-weight: var(--font-weight-regular, 400);
2086 font-size: var(--font-size-xs, 18px);
2087 line-height: var(--line-height-xl, 160%);
2088 color: var(--color-neutral-800, #373737);
2089 }
2090
2091 body.high-contrast-active .ptb-news__read-news .news-content * {
2092 color: var(--text-primary-default, var(--color-neutral-100));
2093 }
2094
2095 .ptb-news__read-news .news-content h1,
2096 .ptb-news__read-news .news-content h1 *,
2097 .ptb-news__read-news .news-content h2,
2098 .ptb-news__read-news .news-content h2 *,
2099 .ptb-news__read-news .news-content h3,
2100 .ptb-news__read-news .news-content h3 *,
2101 .ptb-news__read-news .news-content h4,
2102 .ptb-news__read-news .news-content h4 *,
2103 .ptb-news__read-news .news-content h5,
2104 .ptb-news__read-news .news-content h5 *,
2105 .ptb-news__read-news .news-content h6,
2106 .ptb-news__read-news .news-content h6 * {
2107 color: var(--color-neutral-800, #373737) !important;
2108 }
2109
2110 body.high-contrast-active .ptb-news__read-news .news-content h1,
2111 body.high-contrast-active .ptb-news__read-news .news-content h1 *,
2112 body.high-contrast-active .ptb-news__read-news .news-content h2,
2113 body.high-contrast-active .ptb-news__read-news .news-content h2 *,
2114 body.high-contrast-active .ptb-news__read-news .news-content h3,
2115 body.high-contrast-active .ptb-news__read-news .news-content h3 *,
2116 body.high-contrast-active .ptb-news__read-news .news-content h4,
2117 body.high-contrast-active .ptb-news__read-news .news-content h4 *,
2118 body.high-contrast-active .ptb-news__read-news .news-content h5,
2119 body.high-contrast-active .ptb-news__read-news .news-content h5 *,
2120 body.high-contrast-active .ptb-news__read-news .news-content h6,
2121 body.high-contrast-active .ptb-news__read-news .news-content h6 * {
2122 color: var(--text-primary-default, var(--color-neutral-100)) !important;
2123 }
2124
2125 .ptb-news__read-news .news-content h1:last-child,
2126 .ptb-news__read-news .news-content h2:last-child,
2127 .ptb-news__read-news .news-content h3:last-child,
2128 .ptb-news__read-news .news-content h4:last-child,
2129 .ptb-news__read-news .news-content h5:last-child,
2130 .ptb-news__read-news .news-content h5:last-child,
2131 .ptb-news__read-news .news-content h6:last-child,
2132 .ptb-news__read-news .news-content p:last-child {
2133 padding-bottom: 0 !important;
2134 }
2135
2136 .ptb-news__read-news .news-content h1,
2137 .ptb-news__read-news .news-content h1 * {
2138 font-size: var(--font-size-xxl) !important;
2139 line-height: var(--line-height-sm) !important;
2140 font-weight: var(--font-weight-bold) !important;
2141 font-style: var(--font-style-normal) !important;
2142 text-decoration: var(--text-decoration-none) !important;
2143 }
2144
2145 .ptb-news__read-news .news-content h2,
2146 .ptb-news__read-news .news-content h2 * {
2147
2148 font-size: var(--font-size-xl) !important;
2149 line-height: var(--line-height-sm) !important;
2150 font-weight: var(--font-weight-bold) !important;
2151 font-style: var(--font-style-normal) !important;
2152 text-decoration: var(--text-decoration-none) !important;
2153
2154 }
2155
2156 .ptb-news__read-news .news-content h2 {
2157 margin-top: 48px !important;
2158 margin-bottom: var(--space-xl, 40px) !important;
2159
2160 }
2161
2162 .ptb-news__read-news .news-content h3,
2163 .ptb-news__read-news .news-content h3 * {
2164 font-size: var(--font-size-lg) !important;
2165 line-height: var(--line-height-sm) !important;
2166 font-weight: var(--font-weight-bold) !important;
2167 font-style: var(--font-style-normal) !important;
2168 text-decoration: var(--text-decoration-none) !important;
2169 }
2170
2171 .ptb-news__read-news .news-content h3 {
2172 margin-bottom: var(--space-sm, 16px) !important;
2173 margin-top: 48px !important;
2174 }
2175
2176 .ptb-news__read-news .news-content h4,
2177 .ptb-news__read-news .news-content h4 * {
2178 font-size: var(--font-size-md) !important;
2179 line-height: var(--line-height-md) !important;
2180 font-weight: var(--font-weight-bold) !important;
2181 font-style: var(--font-style-normal) !important;
2182 text-decoration: var(--text-decoration-none) !important;
2183 }
2184
2185 .ptb-news__read-news .news-content h4 {
2186 margin-top: 48px !important;
2187 margin-bottom: var(--space-sm, 16px) !important;
2188 }
2189
2190 .ptb-news__read-news .news-content h5,
2191 .ptb-news__read-news .news-content h5 * {
2192 font-size: var(--font-size-sm) !important;
2193 line-height: var(--line-height-md) !important;
2194 font-weight: var(--font-weight-bold) !important;
2195 font-style: var(--font-style-normal) !important;
2196 text-decoration: var(--text-decoration-none) !important;
2197 }
2198
2199 .ptb-news__read-news .news-content h5 {
2200 margin-top: 48px !important;
2201 margin-bottom: var(--space-sm, 16px) !important;
2202 }
2203
2204 .ptb-news__read-news .news-content table {
2205 border-collapse: collapse;
2206 border: none;
2207 width: 100% !important;
2208 margin: var(--space-md, 24px) 0;
2209 }
2210
2211 .ptb-news__read-news .news-content table * {
2212 font-size: var(--font-size-xxs, 16px);
2213 font-style: var(--font-style-normal, normal);
2214 font-weight: var(--font-weight-regular, 400);
2215 line-height: var(--line-height-xl, 160%);
2216 color: var(--color-neutral-800, #373737);
2217 border: 0;
2218 }
2219
2220 body.high-contrast-active .ptb-news__read-news .news-content table * {
2221 color: var(--text-primary-default, var(--color-neutral-100));
2222 }
2223
2224 .ptb-news__read-news .news-content table tbody > :first-child,
2225 .ptb-news__read-news .news-content table tbody > :first-child * {
2226 font-weight: var(--font-weight-bold, 700);
2227 flex: 1 0 0;
2228 background: var(--background-Surface-level-02, #F8F8F8);
2229 }
2230
2231 body.high-contrast-active .ptb-news__read-news .news-content table tbody > :first-child,
2232 body.high-contrast-active .ptb-news__read-news .news-content table tbody > :first-child * {
2233 background: #373737;
2234 }
2235
2236 .ptb-news__read-news .news-content table tbody {
2237 display: flex;
2238 flex-direction: column;
2239 }
2240
2241 .ptb-news__read-news .news-content table tbody * {
2242 display: flex;
2243 height: 100%;
2244 align-items: center;
2245 flex: 1 0 0;
2246 }
2247
2248 .ptb-news__read-news .news-content table tbody tr * {
2249 padding: 23px var(--space-lg, 32px);
2250 }
2251
2252
2253 .ptb-news__read-news .news-content table tbody tr {
2254 border-radius: var(--border-radius-md);
2255 border: var(--border-width-hairline, 1px) solid #EEEEEE;
2256 }
2257
2258 body.high-contrast-active .ptb-news__read-news .news-content table tbody tr {
2259 border: var(--border-width-hairline, 1px) solid #525252;
2260 }
2261
2262 .ptb-news__read-news .news-content table tbody tr:not(:last-child) {
2263 border-bottom-left-radius: 0;
2264 border-bottom-right-radius: 0;
2265 }
2266
2267 .ptb-news__read-news .news-content table tbody tr:not(:first-child) {
2268 border-top-left-radius: 0;
2269 border-top-right-radius: 0;
2270 border-top: none;
2271 }
2272
2273 .ptb-news__read-news .news-content table tbody tr td:not(:last-child) {
2274 border-right: var(--border-width-hairline, 1px) solid #EEEEEE;
2275 }
2276
2277 body.high-contrast-active .ptb-news__read-news .news-content table tbody tr td:not(:last-child) {
2278 border-right: var(--border-width-hairline, 1px) solid #525252;
2279 }
2280
2281 .ptb-news__read-news .news-content table tbody tr:first-child td {
2282 border-top: var(--border-width-hairline, 1px) solid #EEEEEE;
2283 border-bottom: var(--border-width-hairline, 1px) solid #EEEEEE;
2284 }
2285
2286 body.high-contrast-active .ptb-news__read-news .news-content table tbody tr:first-child td {
2287 border-top: var(--border-width-hairline, 1px) solid #525252;
2288 border-bottom: var(--border-width-hairline, 1px) solid #525252;
2289 }
2290
2291 .ptb-news__read-news .news-content table tbody tr td:first-child {
2292 padding-left: 0;
2293 }
2294
2295 .ptb-news__read-news .news-content table tbody tr td:last-child{
2296 padding-right: 0;
2297 }
2298
2299 .ptb-news__read-news .news-content audio {
2300 display: none;
2301 }
2302
2303 .ptb-news__read-news .news-content .audio-template {
2304 display: flex;
2305 padding: var(--space-sm, 16px);
2306 align-items: center;
2307 gap: var(--space-md, 24px);
2308 align-self: stretch;
2309 border-radius: var(--border-radius-lg, 16px);
2310 border: var(--border-width-hairline, 1px) solid var(--border-color-mid);
2311 background: var(--background-card-default, #FFF);
2312 max-height: var(--size-giant, 72px);
2313 margin: 48px 0;
2314 }
2315
2316 body.high-contrast-active .ptb-news__read-news .news-content .audio-template {
2317 background: var(--background-card-default, #010101);
2318 border: var(--border-width-hairline, 1px) solid #525252;
2319 }
2320
2321 .ptb-news__read-news .news-content .audio-template .audio-button-play {
2322 display: flex;
2323 width: var(--size-xl, 40px);
2324 height: var(--size-xl, 40px);
2325 justify-content: center;
2326 align-items: center;
2327 flex-grow: 0;
2328 flex-shrink: 0;
2329 cursor: pointer;
2330 }
2331
2332 body.high-contrast-active .ptb-news__read-news .news-content .audio-template .audio-button-play .audio-play-icon,
2333 body.high-contrast-active .ptb-news__read-news .news-content .audio-template .audio-button-play .audio-pause-icon {
2334 fill: #FFFFFF;
2335 }
2336
2337 body.high-contrast-active .ptb-news__read-news .news-content .audio-template .audio-button-play .audio-play-icon path,
2338 body.high-contrast-active .ptb-news__read-news .news-content .audio-template .audio-button-play .audio-pause-icon path {
2339 fill: #010101;
2340 }
2341
2342 .ptb-news__read-news .news-content .audio-template.audio-pause .audio-button-play .audio-play-icon {
2343 display: block;
2344 }
2345
2346 .ptb-news__read-news .news-content .audio-template.audio-pause .audio-button-play .audio-pause-icon {
2347 display: none;
2348 }
2349
2350 .ptb-news__read-news .news-content .audio-template.audio-play .audio-button-play .audio-play-icon {
2351 display: none;
2352 }
2353
2354 .ptb-news__read-news .news-content .audio-template.audio-play .audio-button-play .audio-pause-icon {
2355 display: block;
2356 }
2357
2358 .ptb-news__read-news .news-content .audio-template .audio-sondwave {
2359 display: flex;
2360 flex-direction: column;
2361 align-items: flex-start;
2362 gap: var(--space-xxs, 8px);
2363 flex: 1 0 0;
2364 height: 100%;
2365 flex-grow: 1;
2366 flex-shrink: 1;
2367 }
2368
2369 .ptb-news__read-news .news-content .audio-template .audio-sondwave line {
2370 stroke: #008542;
2371 }
2372
2373 .ptb-news__read-news .news-content .audio-template .audio-sondwave line.line-active {
2374 stroke: #90EE90;
2375 }
2376
2377 body.high-contrast-active .ptb-news__read-news .news-content .audio-template .audio-sondwave line {
2378 stroke: #E4F7E8;
2379 }
2380
2381 body.high-contrast-active .ptb-news__read-news .news-content .audio-template .audio-sondwave line.line-active {
2382 stroke: #666666;
2383 }
2384
2385 .ptb-news__read-news .news-content .audio-template .audio-sondwave .audio-sondwave-mobile {
2386 display: none;
2387 }
2388
2389 .ptb-news__read-news .news-content .audio-template .audio-time {
2390 display: flex;
2391 flex-direction: column;
2392 align-items: flex-start;
2393 gap: var(--space-xxs, 8px);
2394 flex: 1 0 0;
2395 color: var(--text-primary-accent, #008542);
2396 text-align: center;
2397 font-family: var(--font-family-base);
2398 line-height: 124% !important;
2399 flex-grow: 0;
2400 flex-shrink: 0;
2401 }
2402
2403 body.high-contrast-active .ptb-news__read-news .news-content .audio-template .audio-time {
2404 color: var(--text-primary-accent, #E4F7E8);
2405 }
2406
2407 .ptb-news__read-news .news-content .audio-template .audio-button-mute {
2408 width: var(--size-lg, 32px);
2409 height: var(--size-lg, 32px);
2410 flex-grow: 0;
2411 flex-shrink: 0;
2412 cursor: pointer;
2413 }
2414
2415 body.high-contrast-active .ptb-news__read-news .news-content .audio-template .audio-button-mute svg path {
2416 stroke: white;
2417 fill: none;
2418 }
2419
2420 .ptb-news__read-news .news-content .audio-template.audio-muted .audio-button-mute {
2421 opacity: 0.6;
2422 }
2423
2424 @media screen and (max-width: 1280px) {
2425 .ptb-news__read-news .news-content img.first-news-image {
2426 height: auto!important;
2427 object-fit: cover
2428 }
2429
2430 .ptb-news__read-news .news-content img {
2431 width: 100%;
2432 height: auto;
2433 max-width: 100% ;
2434 max-height: auto;
2435 object-fit: cover;
2436 }
2437 }
2438
2439 @media screen and (max-width: 1023px) and (min-width: ${MAX_MOBILE_WIDTH}px) {
2440 .ptb-news__read-news .news-content > * {
2441 grid-column-start: 1;
2442 grid-column-end: 9;
2443 }
2444 }
2445
2446
2447 @media screen and (max-width: ${MAX_MOBILE_WIDTH}px) {
2448
2449 .ptb-news__read-news .news-content * {
2450 font-size: var(--font-size-xxs, 16px);
2451 }
2452
2453
2454 .ptb-news__read-news .news-content > * {
2455 grid-column-start: 1;
2456 grid-column-end: 5;
2457 }
2458
2459
2460 .ptb-news__read-news .news-content h1,
2461 .ptb-news__read-news .news-content h1 * {
2462 font-size: var(--font-size-xl) !important;
2463 line-height: var(--line-height-sm) !important;
2464 font-weight: var(--font-weight-bold) !important;
2465 font-style: var(--font-style-normal) !important;
2466 text-decoration: var(--text-decoration-none) !important;
2467
2468 }
2469
2470 .ptb-news__read-news .news-content h2,
2471 .ptb-news__read-news .news-content h2 * {
2472 font-size: var(--font-size-lg) !important;
2473 line-height: var(--line-height-sm) !important;
2474 font-weight: var(--font-weight-bold) !important;
2475 font-style: var(--font-style-normal) !important;
2476 text-decoration: var(--text-decoration-none) !important;
2477 }
2478
2479 .ptb-news__read-news .news-content h2 {
2480 margin-bottom: var(--space-md, 24px) !important;
2481 }
2482
2483 .ptb-news__read-news .news-content h3,
2484 .ptb-news__read-news .news-content h3 * {
2485 font-size: var(--font-size-md) !important;
2486 line-height: var(--line-height-sm) !important;
2487 font-weight: var(--font-weight-bold) !important;
2488 font-style: var(--font-style-normal) !important;
2489 text-decoration: var(--text-decoration-none) !important;
2490 }
2491
2492 .ptb-news__read-news .news-content h3 {
2493 margin-top: var(--space-xxs, 8px) !important;
2494 }
2495
2496 .ptb-news__read-news .news-content h4,
2497 .ptb-news__read-news .news-content h4 * {
2498 font-size: var(--font-size-sm) !important;
2499 line-height: var(--line-height-md) !important;
2500 font-weight: var(--font-weight-bold) !important;
2501 font-style: var(--font-style-normal) !important;
2502 text-decoration: var(--text-decoration-none) !important;
2503 }
2504
2505 .ptb-news__read-news .news-content h5,
2506 .ptb-news__read-news .news-content h5 * {
2507 font-size: var(--font-size-xs) !important;
2508 line-height: var(--line-height-md) !important;
2509 font-weight: var(--font-weight-bold) !important;
2510 font-style: var(--font-style-normal) !important;
2511 text-decoration: var(--text-decoration-none) !important;
2512 }
2513
2514 .ptb-news__read-news .news-content figure figcaption {
2515 flex-direction: column;
2516 gap: var(--space-xxs, 8px);
2517 }
2518
2519 .ptb-news__read-news .news-content figure figcaption,
2520 .ptb-news__read-news .news-content figure figcaption * {
2521 font-size: var(--font-size-micro, 12px);
2522 }
2523
2524 .ptb-news__read-news .news-content table {
2525 margin-top: var(--space-xxs, 8px);
2526 margin-bottom: var(--space-lg, 32px);
2527 }
2528
2529 .ptb-news__read-news .news-content table * {
2530 font-size: var(--font-size-micro, 12px);
2531 line-height: 19.2%;
2532 }
2533
2534 .ptb-news__read-news .news-content table tbody * {
2535 height: 43px;
2536 padding: var(--space-xs, 12px);
2537 }
2538
2539 .ptb-news__read-news .news-content .audio-template {
2540 margin-top: var(--space-xxs, 8px);
2541 margin-bottom: var(--space-lg, 32px);
2542 }
2543 }
2544
2545 @media screen and (max-width: 500px) {
2546 .ptb-news__read-news .news-content .audio-template .audio-sondwave .audio-sondwave-desktop {
2547 display: none;
2548 }
2549
2550 .ptb-news__read-news .news-content .audio-template .audio-sondwave .audio-sondwave-mobile {
2551 display: block;
2552 }
2553 }
2554 </style>
2555
2556 <style>
2557.ws-carousel p {
2558 margin: var(--space-none, 0) !important;
2559}
2560
2561.ws-carousel {
2562 display: flex;
2563 flex-direction: column;
2564 gap: var(--space-lg, 32px);
2565 margin: var(--space-big, 72px) auto;
2566}
2567
2568.ws-carousel .ws-carousel-header {
2569 display: flex;
2570 justify-content: space-between;
2571}
2572
2573.ws-carousel .ws-carousel-header .h2,
2574.ws-carousel .ws-carousel-header h2 {
2575 color: var(--color-neutral-800, #373737) !important;
2576 font-family: var(--font-family-base), "Petrobras Sans" !important;
2577 line-height: 100% !important;
2578 margin: var(--space-none, 0) ! important;
2579}
2580
2581.ws-carousel .ws-carousel-header .nav-buttons {
2582 display: flex;
2583 justify-content: space-between;
2584 gap: var(--space-xxs, 8px);
2585}
2586
2587.ws-carousel .ws-carousel-header .nav-buttons .nav-arrow.left-arrow {
2588 transform: scaleX(-1);
2589}
2590
2591.ws-carousel .ws-carousel-header .nav-buttons .nav-arrow {
2592 cursor: pointer;
2593}
2594
2595.ws-carousel .ws-carousel-header .nav-buttons .nav-arrow.inactive {
2596 cursor: not-allowed;
2597}
2598
2599
2600.ws-carousel .ws-carousel-header .nav-buttons .nav-arrow path {
2601 transition: stroke 0.3s ease;
2602}
2603
2604.ws-carousel .ws-carousel-header .nav-buttons .nav-arrow.inactive path {
2605 stroke: #bababa;
2606}
2607
2608.ws-carousel .ws-carousel-header .nav-buttons .nav-arrow.active path {
2609 stroke: #008542;
2610}
2611
2612
2613.ws-carousel .ws-carousel-body {
2614 overflow-x: scroll;
2615 -ms-overflow-style: none;
2616 -scrollbar-width: none;
2617}
2618
2619.ws-carousel .ws-carousel-body::-webkit-scrollbar {
2620 display: none;
2621}
2622
2623.ws-carousel .ws-carousel-body .ws-container {
2624 display: flex;
2625 gap: var(--space-lg, 32px);
2626}
2627
2628.ws-carousel .ws-carousel-body .ws-container .ws-item {
2629 min-width: 300px;
2630 max-width: 300px;
2631 min-height: 400px;
2632 max-height: 400px;
2633 position: relative;
2634 overflow: hidden;
2635 border-radius: var(--border-radius-lg);
2636 box-shadow: 0px 12px 60px -10px rgba(145, 147, 149, 0.12);
2637}
2638
2639.ws-carousel .ws-carousel-body .ws-container .ws-item:hover {
2640 cursor: pointer;
2641}
2642
2643.ws-carousel .ws-carousel-body .ws-container .ws-item .ws-image {
2644 position: absolute;
2645 top: 50%;
2646 left: 50%;
2647 transform: translate(-50%, -50%);
2648 height: 100%;
2649}
2650
2651.ws-carousel .ws-carousel-body .ws-container .ws-item .ws-overlay {
2652 position: absolute;
2653 background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%);
2654 width: 100%;
2655 height: 100%;
2656}
2657
2658.ws-carousel .ws-carousel-body .ws-container .ws-item .ws-label {
2659 position: absolute;
2660 margin: var(--space-md, 24px) 0 0 var(--space-md, 24px);
2661 border-radius: var(--border-radius-pill, 100%);
2662 background: linear-gradient(0deg, var(--Background-Surface-opacity-light-level-07, rgba(255, 255, 255, 0.96)) 0%, var(--Background-Surface-opacity-light-level-07, rgba(255, 255, 255, 0.96)) 100%), var(--Default-sup-green-water, #006B65);
2663 box-shadow: 0px 2px 6px 0px rgba(0, 178, 169, 0.10);
2664 padding: var(--space-micro, 2px) var(--space-xs, 12px);
2665
2666 color: var(--Default-sup-green-water, #006B65);
2667 font-family: var(--font-family-base), "Petrobras Sans";
2668 font-size: var(--font-size-xxxs, 12px);
2669 font-style: normal;
2670 font-weight: var(--font-weight-regular, 400);
2671 line-height: var(--line-height-sm, 120%);
2672 color: #006B65;
2673}
2674
2675.ws-carousel .ws-carousel-body .ws-container .ws-item .ws-content {
2676 position: relative;
2677 z-index: 1;
2678 height: 100%;
2679
2680 display: flex;
2681 padding: var(--space-lg, 32px) var(--space-md, 24px) var(--space-md, 24px) var(--space-md, 24px);
2682 flex-direction: column;
2683 justify-content: flex-end;
2684 align-items: flex-start;
2685 gap: var(--space-md, 24px);
2686}
2687
2688.ws-carousel .ws-carousel-body .ws-container .ws-item .ws-content .h5 {
2689 overflow: hidden;
2690 color: #FFF !important;
2691 text-overflow: ellipsis;
2692 margin: 0 !important;
2693 font-family: var(--font-family-base), "Petrobras Sans" !important;
2694}
2695
2696@media (max-width: 768px) {
2697
2698 .ws-carousel .ws-carousel-header .nav-buttons {
2699 gap: var(--space-micro, 12px);
2700 }
2701
2702 .ws-carousel .ws-carousel-header .nav-buttons .nav-arrow {
2703 width: 44px;
2704 height: 44px;
2705 }
2706
2707 .ws-carousel .ws-carousel-header {
2708 flex-direction: column;
2709 align-items: flex-start;
2710 gap: var(--space-lg, 32px);
2711 }
2712
2713 .ws-carousel .ws-carousel-header .h2 {
2714 font-size: var(--font-size-lg, 24px) !important;
2715 }
2716
2717 .ws-carousel .ws-carousel-body .ws-container {
2718 gap: var(--space-lg, 32px);
2719 }
2720
2721 .ws-carousel .ws-carousel-body .ws-container .ws-item {
2722 min-width: 225px;
2723 max-width: 225px;
2724 background: linear-gradient(180deg, rgba(0, 0, 0, 0.00) 0%, rgba(0, 0, 0, 0.80) 100%), url(<path-to-image>) lightgray 50% / cover no-repeat;
2725 box-shadow: 0px 12px 60px -10px rgba(145, 147, 149, 0.12);
2726 }
2727}
2728 </style>
2729
2730<#-- Exibição de um único story com naveação direto no conteúdo -->
2731<style>
2732 .stories-container * {
2733 margin: 0;
2734 padding: 0;
2735 box-sizing: border-box;
2736 }
2737
2738 .stories-container {
2739 position: relative;
2740 /*
2741 Largura das duas setas com position absolute: 64px
2742 Largura das somas margens das setas: 48px
2743
2744 */
2745 width: calc(100vw - 64px - 48px);
2746 max-width: 400px;
2747 height: auto;
2748 aspect-ratio: 59/105;
2749 border-radius: 8px;
2750 }
2751
2752 .header-container {
2753 position: absolute;
2754 top: 0;
2755 left: 0;
2756 right: 0;
2757 z-index: 3;
2758 padding: 16px 16px 0 16px;
2759 display: flex;
2760 flex-direction: column;
2761 gap: 24px;
2762 }
2763
2764 .story-header {
2765 display: flex;
2766 flex-direction: column;
2767 gap: 8px;
2768 }
2769
2770 .progress-bars {
2771 display: flex;
2772 gap: 5px;
2773 width: 100%;
2774 }
2775
2776 .progress-bar {
2777 height: 3px;
2778 background-color: rgba(255, 255, 255, 0.3);
2779 flex-grow: 1;
2780 border-radius: 3px;
2781 overflow: hidden;
2782 }
2783
2784 .story-progress {
2785 height: 100%;
2786 background-color: white;
2787 width: 0%;
2788 transition: width 0.2s linear;
2789 }
2790
2791 .story-progress.completed {
2792 width: 100% !important;
2793 }
2794
2795 .story-progress.active {
2796 animation: progress 8s linear forwards;
2797 }
2798
2799 @keyframes progress {
2800 from {
2801 width: 0%;
2802 }
2803
2804 to {
2805 width: 100%;
2806 }
2807 }
2808
2809 .story-slide {
2810 position: absolute;
2811 width: 100%;
2812 height: 100%;
2813 display: none;
2814 flex-direction: column;
2815 justify-content: center;
2816 align-items: center;
2817 color: white;
2818 overflow: hidden;
2819 border-radius: 8px;
2820 }
2821
2822 .story-slide::before {
2823 position: absolute;
2824 z-index: 2;
2825 content: '';
2826 width: 100%;
2827 height: 100%;
2828 background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
2829 }
2830
2831 .story-slide.active {
2832 display: flex;
2833 }
2834
2835 .story-image {
2836 width: 100%;
2837 height: 100% !important;
2838 object-fit: cover;
2839 position: absolute;
2840 top: 0;
2841 left: 0;
2842 z-index: 1;
2843 aspect-ratio: auto !important;
2844 }
2845
2846 .story-content {
2847 position: relative;
2848 z-index: 2;
2849 color: white;
2850 width: 100%;
2851 display: flex;
2852 flex-direction: column;
2853 justify-content: flex-end;
2854 height: 100%;
2855 padding: 16px 24px 64px 24px;
2856 }
2857
2858 .story-content .content-wrapper {
2859 display: flex;
2860 flex-direction: column;
2861 align-items: flex-start;
2862 gap: 24px;
2863 align-self: stretch;
2864 padding: 0 16px;
2865 }
2866
2867 .story-content .content-wrapper.no-padding {
2868 padding: 0;
2869 }
2870
2871 .story-title {
2872 display: flex;
2873 padding: 8px;
2874 flex-direction: column;
2875 align-items: flex-start;
2876 align-self: stretch;
2877 backdrop-filter: blur(3px);
2878 }
2879
2880 .story-title.button {
2881 display: none;
2882 }
2883
2884 .story-title.dark-theme,
2885 .story-description.dark-theme {
2886 background: rgba(13, 19, 16, 0.80);
2887 color: #FFF;
2888 }
2889
2890 .story-description.dark-theme p {
2891 color: #FFF !important;
2892 }
2893
2894 .story-title.light-theme,
2895 .story-description.light-theme {
2896 background: rgba(255, 255, 255, 0.90);
2897 color: #373737;
2898 }
2899
2900 .story-title.green-theme,
2901 .story-description.green-theme {
2902 background: rgba(0, 133, 66, 0.80);
2903 color: #FFF;
2904 }
2905
2906 .story-title .title-text {
2907 align-self: stretch;
2908 font-size: 24px;
2909 font-style: normal;
2910 font-weight: 700;
2911 line-height: 100%;
2912 }
2913
2914 .story-title .mischievous {
2915 color: #FDC82F;
2916 font-size: 24px;
2917 font-style: normal;
2918 font-weight: 700;
2919 line-height: 100%;
2920 width: 24px;
2921 }
2922
2923 .description-and-link {
2924 width: 100%;
2925 display: flex;
2926 flex-direction: column;
2927 gap: 8px;
2928 }
2929
2930 .story-description {
2931 padding: 8px;
2932 width: 100%;
2933 }
2934
2935 .story-description p {
2936 font-size: 16px;
2937 font-weight: 400;
2938 line-height: 120%;
2939 margin-bottom: 0;
2940 }
2941
2942 .story-description.button {
2943 padding: 0;
2944 display: flex;
2945 justify-content: center;
2946 }
2947
2948 .story-description.button p a {
2949 text-decoration: underline;
2950 font-weight: bold;
2951 }
2952
2953 .story-description.button p a {
2954 background: #FFF;
2955 width: fit-content;
2956 height: 48px;
2957 display: flex;
2958 justify-content: center;
2959 align-items: center;
2960 gap: 16px;
2961 text-decoration: none;
2962 color: #008542;
2963 border-radius: 100px;
2964 padding: 0 24px;
2965 box-shadow: 0px 4px 16px 0px #00000029;
2966 font-family: 'Petrobras Sans';
2967 font-weight: 700;
2968 font-size: 16px;
2969 line-height: 144%;
2970 letter-spacing: 0%;
2971 }
2972
2973 .story-description.button p a::after {
2974 content: '';
2975 display: inline-block;
2976 flex-shrink: 0;
2977 width: 20px;
2978 height: 20px;
2979 vertical-align: middle;
2980 background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMSAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEwLjQ2OTUgMTIuMzU5MkMxMC4zMDk4IDEyLjUxODkgMTAuMzA5OCAxMi43Nzc5IDEwLjQ2OTUgMTIuOTM3N0MxMC42MjkzIDEzLjA5NzUgMTAuODg4MyAxMy4wOTc1IDExLjA0ODEgMTIuOTM3N0wxMC40Njk1IDEyLjM1OTJaTTEzLjQwNzIgMTBMMTMuNjk2NSAxMC4yODkzQzEzLjg1NjMgMTAuMTI5NSAxMy44NTYzIDkuODcwNDkgMTMuNjk2NSA5LjcxMDczTDEzLjQwNzIgMTBaTTExLjA0ODEgNy4wNjIyOUMxMC44ODgzIDYuOTAyNTMgMTAuNjI5MyA2LjkwMjUzIDEwLjQ2OTUgNy4wNjIyOUMxMC4zMDk4IDcuMjIyMDUgMTAuMzA5OCA3LjQ4MTA3IDEwLjQ2OTUgNy42NDA4M0wxMS4wNDgxIDcuMDYyMjlaTTcuMTU3MjMgOS41OTA5MUM2LjkzMTI5IDkuNTkwOTEgNi43NDgxNCA5Ljc3NDA3IDYuNzQ4MTQgMTBDNi43NDgxNCAxMC4yMjU5IDYuOTMxMjkgMTAuNDA5MSA3LjE1NzIzIDEwLjQwOTFWOS41OTA5MVpNMTcuMzczMSAxMEMxNy4zNzMxIDEzLjkxNjIgMTQuMTk4NCAxNy4wOTA5IDEwLjI4MjIgMTcuMDkwOVYxNy45MDkxQzE0LjY1MDMgMTcuOTA5MSAxOC4xOTEzIDE0LjM2ODEgMTguMTkxMyAxMEgxNy4zNzMxWk0xMC4yODIyIDE3LjA5MDlDNi4zNjYwMyAxNy4wOTA5IDMuMTkxMzIgMTMuOTE2MiAzLjE5MTMyIDEwSDIuMzczMTRDMi4zNzMxNCAxNC4zNjgxIDUuOTE0MTYgMTcuOTA5MSAxMC4yODIyIDE3LjkwOTFWMTcuMDkwOVpNMy4xOTEzMiAxMEMzLjE5MTMyIDYuMDgzOCA2LjM2NjAzIDIuOTA5MDkgMTAuMjgyMiAyLjkwOTA5VjIuMDkwOTFDNS45MTQxNiAyLjA5MDkxIDIuMzczMTQgNS42MzE5MyAyLjM3MzE0IDEwSDMuMTkxMzJaTTEwLjI4MjIgMi45MDkwOUMxNC4xOTg0IDIuOTA5MDkgMTcuMzczMSA2LjA4MzggMTcuMzczMSAxMEgxOC4xOTEzQzE4LjE5MTMgNS42MzE5MyAxNC42NTAzIDIuMDkwOTEgMTAuMjgyMiAyLjA5MDkxVjIuOTA5MDlaTTExLjA0ODEgMTIuOTM3N0wxMy42OTY1IDEwLjI4OTNMMTMuMTE4IDkuNzEwNzNMMTAuNDY5NSAxMi4zNTkyTDExLjA0ODEgMTIuOTM3N1pNMTMuNjk2NSA5LjcxMDczTDExLjA0ODEgNy4wNjIyOUwxMC40Njk1IDcuNjQwODNMMTMuMTE4IDEwLjI4OTNMMTMuNjk2NSA5LjcxMDczWk03LjE1NzIzIDEwLjQwOTFIMTMuNDA3MlY5LjU5MDkxSDcuMTU3MjNWMTAuNDA5MVoiIGZpbGw9IiMwMDg1NDIiLz4KPC9zdmc+Cg==");
2981 background-size: contain;
2982 background-repeat: no-repeat;
2983 background-position: center;
2984 }
2985
2986 .story-description a {
2987 position: relative;
2988 z-index: 3;
2989 color: #FFF;
2990 text-decoration: underline;
2991 }
2992
2993 .nav-area-container {
2994 position: absolute;
2995 top: 0;
2996 left: 0;
2997 right: 0;
2998 bottom: 0;
2999 display: flex;
3000 justify-content: space-between;
3001 align-items: center;
3002 z-index: 1;
3003 /* pointer-events: none; */
3004 }
3005
3006 .nav-area {
3007 height: 100%;
3008 width: 50%;
3009 display: flex;
3010 align-items: center;
3011 }
3012
3013 .nav-area .arrow,
3014 .nav-area .restart-icon {
3015 position: absolute;
3016 }
3017
3018 .nav-area .arrow:hover,
3019 .nav-area.next .restart-icon {
3020 cursor: pointer;
3021 }
3022
3023 .nav-area.prev .arrow {
3024 left: calc(-32px - 24px);
3025 }
3026
3027 .nav-area.next .arrow,
3028 .nav-area.next .restart-icon {
3029 right: calc(-32px - 24px);
3030 }
3031
3032 .nav-area .arrow.disabled {
3033 opacity: 0.4;
3034 }
3035
3036 .nav-area .arrow.disabled:hover {
3037 cursor: not-allowed;
3038 }
3039
3040 .nav-area .hidden {
3041 display: none;
3042 }
3043
3044 .action-buttons {
3045 display: flex;
3046 gap: 24px;
3047 justify-content: flex-end;
3048 }
3049
3050 .action-btn {
3051 background: transparent;
3052 border-radius: 50%;
3053 border: none;
3054 display: flex;
3055 align-items: center;
3056 justify-content: center;
3057 cursor: pointer;
3058 font-size: 14px;
3059 }
3060
3061 .action-btn.pause::before {
3062 content: '';
3063 display: inline-block;
3064 width: 15px;
3065 height: 18px;
3066 vertical-align: middle;
3067 background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTkiIHZpZXdCb3g9IjAgMCAxNiAxOSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTAuMjY4NTU1IDE4LjI3NzNINS4zNTE0N1YwLjI3NzM0NEgwLjI2ODU1NVYxOC4yNzczWk0xMC40MzQ0IDAuMjc3MzQ0VjE4LjI3NzNIMTUuNTE3M1YwLjI3NzM0NEgxMC40MzQ0WiIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==");
3068 background-size: contain;
3069 background-repeat: no-repeat;
3070 background-position: center;
3071 }
3072
3073 .action-btn.play::before {
3074 content: '';
3075 display: inline-block;
3076 width: 18px;
3077 height: 18px;
3078 vertical-align: middle;
3079 background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjYiIHZpZXdCb3g9IjAgMCAyMiAyNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIwLjUxMjUgMTIuMTQ5OUwyLjUyNSAxLjE0OTg4QzIuMzczNTggMS4wNTY0NyAyLjE5OTk4IDEuMDA1MTYgMi4wMjIxMSAxLjAwMTIyQzEuODQ0MjQgMC45OTcyODcgMS42Njg1NCAxLjA0MDg4IDEuNTEzMTQgMS4xMjc1QzEuMzU3NzQgMS4yMTQxMSAxLjIyODI2IDEuMzQwNjIgMS4xMzgwNSAxLjQ5Mzk3QzEuMDQ3ODUgMS42NDczMiAxLjAwMDIgMS44MjE5NiAxIDEuOTk5ODhWMjMuOTk5OUMxLjAwMDIgMjQuMTc3OCAxLjA0Nzg1IDI0LjM1MjQgMS4xMzgwNSAyNC41MDU4QzEuMjI4MjYgMjQuNjU5MSAxLjM1Nzc0IDI0Ljc4NTYgMS41MTMxNCAyNC44NzIzQzEuNjY4NTQgMjQuOTU4OSAxLjg0NDI0IDI1LjAwMjUgMi4wMjIxMSAyNC45OTg1QzIuMTk5OTggMjQuOTk0NiAyLjM3MzU4IDI0Ljk0MzMgMi41MjUgMjQuODQ5OUwyMC41MTI1IDEzLjg0OTlDMjAuNjYwMiAxMy43NjI1IDIwLjc4MjYgMTMuNjM4MiAyMC44Njc2IDEzLjQ4OTJDMjAuOTUyNiAxMy4zNDAxIDIwLjk5NzQgMTMuMTcxNSAyMC45OTc0IDEyLjk5OTlDMjAuOTk3NCAxMi44MjgzIDIwLjk1MjYgMTIuNjU5NiAyMC44Njc2IDEyLjUxMDZDMjAuNzgyNiAxMi4zNjE1IDIwLjY2MDIgMTIuMjM3MiAyMC41MTI1IDEyLjE0OTlWMTIuMTQ5OVoiIHN0cm9rZT0iI0ZGRiIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+Cg==");
3080 background-size: contain;
3081 background-repeat: no-repeat;
3082 background-position: center;
3083 }
3084
3085 .action-btn.share::before {
3086 content: '';
3087 display: inline-block;
3088 width: 18px;
3089 height: 18px;
3090 vertical-align: middle;
3091 background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTkiIGhlaWdodD0iMTkiIHZpZXdCb3g9IjAgMCAxOSAxOSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuOTA3MDMgMTAuNjYxMkwxNi43NzcgMS4wNjU3MkwxOC4xOTcgMi40NDc2Mkw4LjMzNzAzIDEyLjA1MjlMNi45MDcwMyAxMC42NjEyWiIgZmlsbD0id2hpdGUiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNi43MzQxIDIuNDg4NzdMMTMuMTA3OCAxNS45NTU0QzEzLjA3NDYgMTYuMDc5MyAxMy4wMDM2IDE2LjE5MDQgMTIuOTA0MSAxNi4yNzQyQzEyLjgwNDYgMTYuMzU3OSAxMi42ODEzIDE2LjQxMDMgMTIuNTUwNiAxNi40MjQ0QzEyLjQxOTkgMTYuNDM4NiAxMi4yODc4IDE2LjQxMzggMTIuMTcxOSAxNi4zNTMzQzEyLjA1NjMgMTYuMjkzMSAxMS45NjIyIDE2LjIwMDIgMTEuOTAxOCAxNi4wODdMMTEuOTAxMiAxNi4wODU5TDguODMwNjkgMTAuMjQyMUwyLjc4MTI5IDcuMzAzNjZMMi43Nzg5MiA3LjMwMjUxQzIuNjYwNDcgNy4yNDUzNyAyLjU2Mjc0IDcuMTU0NDUgMi40OTg3NiA3LjA0MTg3QzIuNDM0NzkgNi45MjkyOCAyLjQwNzYxIDYuODAwMzkgMi40MjA4NSA2LjY3MjM4QzIuNDM0MDkgNi41NDQzOCAyLjQ4NzEyIDYuNDIzMzQgMi41NzI4OCA2LjMyNTQzQzIuNjU4NjMgNi4yMjc1MSAyLjc3MzAyIDYuMTU3MzcgMi45MDA3OSA2LjEyNDM2TDE2LjczNDEgMi40ODg3N1pNMTguOTYyMyAxLjUwODUyQzE5LjA3NzIgMS4xMTQ0MyAxOC45MTE2IDAuNzY0OTExIDE4LjcwNzUgMC41NjYzNjFDMTguNTAzNCAwLjM2NzczNyAxOC4yMzc0IDAuMjc3MzQ0IDE3Ljk4NyAwLjI3NzM0NEgxNy44NjFMMi40MTMyNyA0LjMzNzI0TDIuNDExMTEgNC4zMzc3OUMxLjkxMDcxIDQuNDY3NTMgMS40NjI3NSA0Ljc0MjQ3IDEuMTI2ODIgNS4xMjYwNUMwLjc5MDQxIDUuNTEwMTcgMC41ODIzNTMgNS45ODUgMC41MzA0MDUgNi40ODcxN0MwLjQ3ODQ1NiA2Ljk4OTM1IDAuNTg1MDg2IDcuNDk1MDEgMC44MzYwNzEgNy45MzY2OEMxLjA4NjggOC4zNzc5MiAxLjQ2OTY5IDguNzM0MzUgMS45MzM3NCA4Ljk1ODUzTDEuOTM1MTQgOC45NTkyTDcuNDIzMzcgMTEuNjI1MUwxMC4yMTEyIDE2LjkzMDhMMTAuMjEyOCAxNi45MzM5QzEwLjQ0OTUgMTcuMzgwMiAxMC44MTk3IDE3Ljc0NiAxMS4yNzQ2IDE3Ljk4MzJDMTEuNzI5NSAxOC4yMjAzIDEyLjI0NzYgMTguMzE3NiAxMi43NjA0IDE4LjI2MjJDMTMuMjczMyAxOC4yMDY3IDEzLjc1NjggMTguMDAxMSAxNC4xNDcxIDE3LjY3MjZDMTQuNTM3MyAxNy4zNDQxIDE0LjgxNTkgMTYuOTA4MiAxNC45NDYyIDE2LjQyMjRMMTguOTYyMyAxLjUwODUyWiIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg==");
3092 background-size: contain;
3093 background-repeat: no-repeat;
3094 background-position: center;
3095 }
3096
3097 @media (max-width: 768px) {
3098 .ws-carousel {
3099 margin: var(--space-lg, 32px) 0;
3100 }
3101
3102 .stories-container {
3103 /*
3104 Largura das duas setas com position absolute: 64px
3105 Largura das somas margens das setas mobile: 16px
3106 Soma das margens laterais: 48px
3107 */
3108 width: calc(100vw - 64px - 16px - 48px);
3109 }
3110
3111 .header-container {
3112 padding: 6px;
3113 }
3114
3115 .story-progress {
3116 height: 2px;
3117 }
3118
3119 .header-container,
3120 .action-buttons {
3121 gap: 12px;
3122 }
3123
3124 .action-btn.play::before,
3125 .action-btn.pause::before,
3126 .action-btn.share::before {
3127 width: 10px;
3128 height: 10px;
3129 }
3130
3131 .nav-area.prev .arrow {
3132 left: calc(-32px - 8px);
3133 }
3134
3135 .nav-area.next .arrow,
3136 .nav-area.next .restart-icon {
3137 right: calc(-32px - 8px);
3138 }
3139
3140 .story-content {
3141 padding: 16px 16px 32px 16px;
3142 }
3143
3144 .story-content .content-wrapper {
3145 padding: 0;
3146 }
3147
3148 .story-title .title-text {
3149 font-size: 16px;
3150 }
3151
3152 .story-description p,
3153 .story-description p a {
3154 font-size: 14px !important;
3155 }
3156 }
3157</style>
3158
3159<!-- Google tag (gtag.js) -->
3160<script async src="https://www.googletagmanager.com/gtag/js?id=G-9TG5WL85H3"></script>
3161<script>
3162 window.dataLayer = window.dataLayer || [];
3163 function gtag() { dataLayer.push(arguments); }
3164 gtag('js', new Date());
3165
3166 // Configuração do Google Analytics 4
3167 gtag('config', 'G-9TG5WL85H3');
3168</script>
3169
3170 <script>
3171
3172/* Alteração tamanho primeira imagem */
3173document.addEventListener("DOMContentLoaded", function () {
3174 const firstImg = document.querySelector(".ptb-news__read-news .news-content img");
3175 if (firstImg) {
3176 firstImg.classList.add("first-news-image");
3177 }
3178});
3179
3180/* CONSTANTS */
3181const PUBLISHER_LOGO_INDEX = 0;
3182const POSTER_PORTRAIT_INDEX = 1;
3183const PUBLISHER_INDEX = 2;
3184const COVER_INDEX = 3;
3185const STORIES_INDEX = 4;
3186
3187const COVER_HAS_COVER_INDEX = 0;
3188const COVER_TITLE_INDEX = 1;
3189const COVER_TEXT_INDEX = 2;
3190const COVER_IMAGE_INDEX = 3;
3191
3192const STORY_TITLE_INDEX = 0;
3193const STORY_TEXT_INDEX = 1;
3194const STORY_COLOR_THEME_INDEX = 2;
3195const STORY_IMAGE_INDEX = 3;
3196
3197const DETAILS_SVG = `<svg width="91" height="21" viewBox="0 0 91 21" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M12.5 3.625H7.5C7.15482 3.625 6.875 3.90482 6.875 4.25V16.75C6.875 17.0952 7.15482 17.375 7.5 17.375H12.5C12.8452 17.375 13.125 17.0952 13.125 16.75V4.25C13.125 3.90482 12.8452 3.625 12.5 3.625Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/> <path d="M17.5 14.25V6.75C17.5 6.40482 17.2202 6.125 16.875 6.125H13.75C13.4048 6.125 13.125 6.40482 13.125 6.75V14.25C13.125 14.5952 13.4048 14.875 13.75 14.875H16.875C17.2202 14.875 17.5 14.5952 17.5 14.25Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/> <path d="M6.875 14.25L6.875 6.75C6.875 6.40482 6.59518 6.125 6.25 6.125H3.125C2.77982 6.125 2.5 6.40482 2.5 6.75L2.5 14.25C2.5 14.5952 2.77982 14.875 3.125 14.875H6.25C6.59518 14.875 6.875 14.5952 6.875 14.25Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/> <path d="M30.376 15.5L28.36 6.74H29.56L31.06 14.132L32.704 7.196H33.784L35.428 14.132L36.928 6.74H38.08L36.064 15.5H34.828L33.208 8.672L31.588 15.5H30.376ZM39.6543 12.836C39.6783 13.252 39.7343 13.588 39.8223 13.844C39.9183 14.092 40.0503 14.284 40.2183 14.42C40.3863 14.548 40.5863 14.636 40.8183 14.684C41.0583 14.724 41.3303 14.744 41.6343 14.744C41.9143 14.744 42.1743 14.732 42.4143 14.708C42.6543 14.684 42.8863 14.656 43.1103 14.624V15.344C42.8703 15.44 42.5943 15.512 42.2823 15.56C41.9783 15.616 41.6623 15.644 41.3343 15.644C40.3343 15.644 39.6183 15.388 39.1863 14.876C38.7623 14.356 38.5503 13.584 38.5503 12.56C38.5503 11.456 38.7663 10.652 39.1983 10.148C39.6383 9.636 40.2703 9.38 41.0943 9.38C41.5183 9.38 41.8783 9.448 42.1743 9.584C42.4703 9.712 42.7103 9.908 42.8943 10.172C43.0783 10.428 43.2103 10.744 43.2903 11.12C43.3703 11.496 43.4103 11.928 43.4103 12.416V12.836H39.6543ZM42.3543 12.056C42.3543 11.424 42.2583 10.968 42.0663 10.688C41.8823 10.4 41.5543 10.256 41.0823 10.256C40.5703 10.256 40.2103 10.412 40.0023 10.724C39.7943 11.028 39.6743 11.472 39.6423 12.056H42.3543ZM44.9427 15.5V6.74H46.0467V10.1C46.2147 9.916 46.4347 9.752 46.7067 9.608C46.9867 9.456 47.3667 9.38 47.8467 9.38C48.6467 9.38 49.2387 9.652 49.6227 10.196C50.0067 10.74 50.1987 11.496 50.1987 12.464C50.1987 13.512 49.9827 14.304 49.5507 14.84C49.1267 15.376 48.5067 15.644 47.6907 15.644C47.2347 15.644 46.8707 15.572 46.5987 15.428C46.3347 15.284 46.1107 15.096 45.9267 14.864L45.8427 15.5H44.9427ZM46.0227 12.944C46.0227 13.28 46.0627 13.56 46.1427 13.784C46.2227 14.008 46.3307 14.192 46.4667 14.336C46.6107 14.472 46.7747 14.572 46.9587 14.636C47.1507 14.692 47.3547 14.72 47.5707 14.72C48.0587 14.72 48.4267 14.556 48.6747 14.228C48.9307 13.9 49.0587 13.332 49.0587 12.524C49.0587 12.092 49.0227 11.736 48.9507 11.456C48.8867 11.168 48.7907 10.94 48.6627 10.772C48.5347 10.604 48.3747 10.484 48.1827 10.412C47.9987 10.34 47.7907 10.304 47.5587 10.304C47.3347 10.304 47.1267 10.332 46.9347 10.388C46.7507 10.444 46.5907 10.54 46.4547 10.676C46.3187 10.804 46.2107 10.98 46.1307 11.204C46.0587 11.42 46.0227 11.692 46.0227 12.02V12.944ZM54.1271 14.36C54.4711 14.424 54.8431 14.48 55.2431 14.528C55.6431 14.576 56.0231 14.6 56.3831 14.6C56.6791 14.6 56.9431 14.584 57.1751 14.552C57.4071 14.512 57.6031 14.436 57.7631 14.324C57.9231 14.212 58.0431 14.056 58.1231 13.856C58.2111 13.648 58.2551 13.38 58.2551 13.052C58.2551 12.796 58.2271 12.588 58.1711 12.428C58.1151 12.26 58.0191 12.124 57.8831 12.02C57.7551 11.916 57.5831 11.832 57.3671 11.768C57.1511 11.696 56.8871 11.624 56.5751 11.552L56.2151 11.468C55.8951 11.396 55.5991 11.308 55.3271 11.204C55.0631 11.092 54.8351 10.948 54.6431 10.772C54.4511 10.588 54.2991 10.364 54.1871 10.1C54.0831 9.836 54.0311 9.508 54.0311 9.116C54.0311 8.292 54.2711 7.668 54.7511 7.244C55.2391 6.82 55.9551 6.608 56.8991 6.608C57.3391 6.608 57.7471 6.648 58.1231 6.728C58.5071 6.808 58.8431 6.904 59.1311 7.016V7.82C58.8351 7.78 58.4951 7.736 58.1111 7.688C57.7351 7.64 57.3671 7.616 57.0071 7.616C56.7351 7.616 56.4871 7.632 56.2631 7.664C56.0391 7.696 55.8431 7.764 55.6751 7.868C55.5151 7.964 55.3911 8.104 55.3031 8.288C55.2151 8.472 55.1711 8.712 55.1711 9.008C55.1711 9.264 55.2031 9.476 55.2671 9.644C55.3391 9.804 55.4431 9.936 55.5791 10.04C55.7231 10.144 55.8951 10.232 56.0951 10.304C56.3031 10.368 56.5471 10.428 56.8271 10.484L57.2111 10.568C57.5791 10.648 57.8991 10.748 58.1711 10.868C58.4511 10.98 58.6831 11.128 58.8671 11.312C59.0511 11.496 59.1871 11.724 59.2751 11.996C59.3711 12.268 59.4191 12.6 59.4191 12.992C59.4191 13.464 59.3511 13.868 59.2151 14.204C59.0871 14.54 58.8991 14.816 58.6511 15.032C58.4031 15.24 58.0991 15.392 57.7391 15.488C57.3791 15.584 56.9711 15.632 56.5151 15.632C56.0031 15.632 55.5471 15.584 55.1471 15.488C54.7471 15.384 54.4071 15.276 54.1271 15.164V14.36ZM62.3096 13.52C62.3096 14.016 62.4056 14.348 62.5976 14.516C62.7896 14.676 63.0776 14.756 63.4616 14.756C63.7496 14.756 64.0096 14.744 64.2416 14.72V15.44C64.0736 15.488 63.8896 15.528 63.6896 15.56C63.4896 15.6 63.2776 15.62 63.0536 15.62C62.4056 15.62 61.9336 15.46 61.6376 15.14C61.3496 14.82 61.2056 14.296 61.2056 13.568V10.376H60.1376V9.74L61.2056 9.536V7.7H62.3096V9.524H64.1336V10.376H62.3096V13.52ZM66.6991 14.24C66.8351 14.416 66.9951 14.54 67.1791 14.612C67.3711 14.684 67.5951 14.72 67.8511 14.72C68.0991 14.72 68.3151 14.684 68.4991 14.612C68.6911 14.54 68.8471 14.42 68.9671 14.252C69.0951 14.076 69.1911 13.848 69.2551 13.568C69.3191 13.288 69.3511 12.936 69.3511 12.512C69.3511 12.096 69.3191 11.748 69.2551 11.468C69.1911 11.18 69.0911 10.952 68.9551 10.784C68.8271 10.608 68.6671 10.484 68.4751 10.412C68.2831 10.34 68.0631 10.304 67.8151 10.304C67.5671 10.304 67.3471 10.34 67.1551 10.412C66.9711 10.484 66.8151 10.604 66.6871 10.772C66.5671 10.94 66.4751 11.168 66.4111 11.456C66.3471 11.736 66.3151 12.084 66.3151 12.5C66.3151 12.924 66.3471 13.276 66.4111 13.556C66.4751 13.836 66.5711 14.064 66.6991 14.24ZM67.8271 15.644C66.9311 15.644 66.2671 15.384 65.8351 14.864C65.4031 14.344 65.1871 13.564 65.1871 12.524C65.1871 11.476 65.4031 10.692 65.8351 10.172C66.2751 9.644 66.9471 9.38 67.8511 9.38C68.7471 9.38 69.4111 9.64 69.8431 10.16C70.2751 10.68 70.4911 11.46 70.4911 12.5C70.4911 13.548 70.2711 14.336 69.8311 14.864C69.3991 15.384 68.7311 15.644 67.8271 15.644ZM72.0247 15.5V9.524H72.9127L73.0327 10.28C73.4407 9.712 74.0447 9.428 74.8447 9.428C74.9727 9.428 75.1047 9.44 75.2407 9.464V10.376C75.1767 10.368 75.1167 10.364 75.0607 10.364C75.0047 10.364 74.9487 10.364 74.8927 10.364C74.3007 10.364 73.8567 10.504 73.5607 10.784C73.2727 11.064 73.1287 11.516 73.1287 12.14V15.5H72.0247ZM76.431 15.5V9.524H77.535V15.5H76.431ZM76.995 8.3C76.763 8.3 76.591 8.24 76.479 8.12C76.367 8 76.311 7.832 76.311 7.616C76.311 7.144 76.539 6.908 76.995 6.908C77.227 6.908 77.395 6.968 77.499 7.088C77.611 7.208 77.667 7.376 77.667 7.592C77.667 8.064 77.443 8.3 76.995 8.3ZM80.1778 12.836C80.2018 13.252 80.2578 13.588 80.3458 13.844C80.4418 14.092 80.5738 14.284 80.7418 14.42C80.9098 14.548 81.1098 14.636 81.3418 14.684C81.5818 14.724 81.8538 14.744 82.1578 14.744C82.4378 14.744 82.6978 14.732 82.9378 14.708C83.1778 14.684 83.4098 14.656 83.6338 14.624V15.344C83.3938 15.44 83.1178 15.512 82.8058 15.56C82.5018 15.616 82.1858 15.644 81.8578 15.644C80.8578 15.644 80.1418 15.388 79.7098 14.876C79.2858 14.356 79.0738 13.584 79.0738 12.56C79.0738 11.456 79.2898 10.652 79.7218 10.148C80.1618 9.636 80.7938 9.38 81.6178 9.38C82.0418 9.38 82.4018 9.448 82.6978 9.584C82.9938 9.712 83.2338 9.908 83.4178 10.172C83.6018 10.428 83.7338 10.744 83.8138 11.12C83.8938 11.496 83.9338 11.928 83.9338 12.416V12.836H80.1778ZM82.8778 12.056C82.8778 11.424 82.7818 10.968 82.5898 10.688C82.4058 10.4 82.0778 10.256 81.6058 10.256C81.0938 10.256 80.7338 10.412 80.5258 10.724C80.3178 11.028 80.1978 11.472 80.1658 12.056H82.8778ZM85.2741 14.612C85.5141 14.644 85.7901 14.672 86.1021 14.696C86.4221 14.72 86.7341 14.732 87.0381 14.732C87.2781 14.732 87.4861 14.724 87.6621 14.708C87.8461 14.684 87.9941 14.64 88.1061 14.576C88.2181 14.504 88.3021 14.408 88.3581 14.288C88.4141 14.168 88.4421 14.012 88.4421 13.82C88.4421 13.66 88.4221 13.532 88.3821 13.436C88.3421 13.332 88.2741 13.248 88.1781 13.184C88.0901 13.12 87.9661 13.072 87.8061 13.04C87.6541 13 87.4621 12.964 87.2301 12.932L86.8341 12.872C86.6181 12.84 86.4101 12.792 86.2101 12.728C86.0101 12.656 85.8341 12.56 85.6821 12.44C85.5381 12.312 85.4181 12.148 85.3221 11.948C85.2341 11.74 85.1901 11.48 85.1901 11.168C85.1901 10.848 85.2421 10.576 85.3461 10.352C85.4501 10.128 85.5981 9.944 85.7901 9.8C85.9821 9.656 86.2101 9.552 86.4741 9.488C86.7461 9.424 87.0461 9.392 87.3741 9.392C87.7341 9.392 88.0621 9.42 88.3581 9.476C88.6621 9.524 88.9501 9.592 89.2221 9.68V10.388C88.9901 10.364 88.7301 10.34 88.4421 10.316C88.1621 10.292 87.8701 10.28 87.5661 10.28C87.3581 10.28 87.1701 10.288 87.0021 10.304C86.8341 10.32 86.6901 10.36 86.5701 10.424C86.4501 10.48 86.3541 10.564 86.2821 10.676C86.2181 10.78 86.1861 10.928 86.1861 11.12C86.1861 11.272 86.2061 11.396 86.2461 11.492C86.2941 11.58 86.3621 11.656 86.4501 11.72C86.5461 11.776 86.6661 11.82 86.8101 11.852C86.9541 11.884 87.1301 11.916 87.3381 11.948L87.6621 11.996C87.9421 12.036 88.1941 12.092 88.4181 12.164C88.6421 12.236 88.8301 12.34 88.9821 12.476C89.1421 12.604 89.2621 12.772 89.3421 12.98C89.4301 13.188 89.4741 13.452 89.4741 13.772C89.4741 14.436 89.2861 14.912 88.9101 15.2C88.5341 15.488 88.0141 15.632 87.3501 15.632C87.1501 15.632 86.9501 15.62 86.7501 15.596C86.5501 15.58 86.3581 15.556 86.1741 15.524C85.9901 15.492 85.8181 15.46 85.6581 15.428C85.5061 15.388 85.3781 15.352 85.2741 15.32V14.612Z" fill="white"/> </svg`;
3198
3199/* Função para criar formatar object*/
3200const createStoryObject = (objectContent) => {
3201 const hasCover = Boolean(
3202 objectContent.contentFields[COVER_INDEX].nestedContentFields[
3203 COVER_HAS_COVER_INDEX
3204 ].contentFieldValue.data
3205 );
3206 return {
3207 category: objectContent.taxonomyCategoryBriefs[0].taxonomyCategoryName,
3208 publisherLogoSrc:
3209 objectContent.contentFields[PUBLISHER_LOGO_INDEX].contentFieldValue.data,
3210 posterPortraitSrc:
3211 objectContent.contentFields[POSTER_PORTRAIT_INDEX].contentFieldValue.data,
3212 publisher:
3213 objectContent.contentFields[PUBLISHER_INDEX].contentFieldValue.data,
3214 friendlyUrlPath: objectContent.friendlyUrlPath,
3215 cover: {
3216 image: Boolean(
3217 objectContent.contentFields[COVER_INDEX].nestedContentFields[
3218 COVER_HAS_COVER_INDEX
3219 ].contentFieldValue.data
3220 ),
3221 title:
3222 objectContent.contentFields[COVER_INDEX].nestedContentFields[
3223 COVER_TITLE_INDEX
3224 ].contentFieldValue.data,
3225 description:
3226 objectContent.contentFields[COVER_INDEX].nestedContentFields[
3227 COVER_TEXT_INDEX
3228 ].contentFieldValue.data,
3229 imageUrl:
3230 objectContent.contentFields[COVER_INDEX].nestedContentFields[
3231 COVER_IMAGE_INDEX
3232 ].contentFieldValue.image?.contentUrl || null,
3233 imageAlt:
3234 objectContent.contentFields[COVER_INDEX].nestedContentFields[
3235 COVER_IMAGE_INDEX
3236 ].contentFieldValue.image?.description || null,
3237 },
3238 stories: objectContent.contentFields
3239 .slice(STORIES_INDEX)
3240 .map((contentField) => {
3241 return {
3242 title:
3243 contentField.nestedContentFields[STORY_TITLE_INDEX]
3244 ?.contentFieldValue?.data ?? null,
3245 description:
3246 contentField.nestedContentFields[STORY_TEXT_INDEX]?.contentFieldValue
3247 .data ?? null,
3248 colorTheme:
3249 contentField.nestedContentFields[STORY_COLOR_THEME_INDEX]
3250 ?.contentFieldValue?.value ?? null,
3251 imageUrl:
3252 contentField.nestedContentFields[STORY_IMAGE_INDEX]
3253 ?.contentFieldValue?.image?.contentUrl ?? null,
3254 imageAlt:
3255 contentField.nestedContentFields[STORY_IMAGE_INDEX]
3256 ?.contentFieldValue?.image?.description ?? null,
3257 };
3258 }),
3259 };
3260};
3261
3262/* Renderiza os cards */
3263const storyCardFrom = (storyData) => {
3264 const storyCard = document.createElement("div");
3265 storyCard.classList.add("ws-item");
3266
3267 let displayPageUrl;
3268 if (`${themeDisplay.getURLPortal()}`.includes('webserver')) {
3269 displayPageUrl = `${themeDisplay.getURLPortal()}/web/nossa-energia/w/` + storyData.friendlyUrlPath;
3270 } else {
3271 displayPageUrl = `${themeDisplay.getURLPortal()}/w/` + storyData.friendlyUrlPath;
3272 }
3273
3274 storyCard.addEventListener("click", (e) => {
3275 window.location.href = displayPageUrl;
3276 });
3277
3278 const image = document.createElement("img");
3279 image.classList.add("ws-image");
3280 image.src = storyData.cover.imageUrl
3281 ? storyData.cover.imageUrl
3282 : storyData.stories[0].imageUrl;
3283 image.alt = storyData.cover.imageAlt
3284 ? storyData.cover.imageAlt
3285 : storyData.stories[0].imageAlt;
3286
3287 storyCard.appendChild(image);
3288
3289 const overlay = document.createElement("div");
3290 overlay.classList.add("ws-overlay");
3291 storyCard.appendChild(overlay);
3292
3293 const label = document.createElement("span");
3294 label.classList.add("ws-label");
3295 label.dataset.category = storyData.category;
3296 label.classList.add((storyData.category || "Categoria").toLowerCase().replace(" ", '-'));
3297 label.textContent = storyData.category || "Categoria";
3298 storyCard.appendChild(label);
3299
3300 const content = document.createElement("div");
3301 content.classList.add("ws-content");
3302
3303 const title = document.createElement("h5");
3304 title.classList.add("h5")
3305 title.textContent = storyData.cover.title || "Título do Card";
3306 content.appendChild(title);
3307
3308 const details = document.createElement("div");
3309 details.classList.add("ws-details");
3310
3311 details.innerHTML = DETAILS_SVG || `<svg>...</svg>`;
3312 content.appendChild(details);
3313
3314 storyCard.appendChild(content);
3315
3316 return storyCard;
3317};
3318
3319/* Renderiza cores */
3320
3321const getCategoriesColorsStyles = async () => {
3322 //
3323 const urlToFetchToGetWebStoriesCategoriesColor = `/o/headless-admin-taxonomy/v1.0/taxonomy-vocabularies/31841266/taxonomy-categories?fields=name%2CtaxonomyCategoryProperties`;
3324
3325 return fetch(urlToFetchToGetWebStoriesCategoriesColor, {
3326 method: "GET",
3327 headers: {
3328 accept: "application/json",
3329 "x-csrf-token": Liferay.authToken,
3330 },
3331 })
3332 .then((response) => {
3333 if (response.status === 200) {
3334 return response.json();
3335 } else {
3336 throw new Error("Erro interno. Por favor tente mais tarde.");
3337 }
3338 })
3339 .then((data) => {
3340 const styleTag = document.createElement('style');
3341 styleTag.id= 'webstories-carousel-labels';
3342
3343 let styleContent = ``;
3344
3345 data.items.forEach(item => {
3346 let textColor = item.taxonomyCategoryProperties.find(taxonomtProp => taxonomtProp.key === "Cor do Texto")?.value;
3347 let textHighContrastColor = item.taxonomyCategoryProperties.find(taxonomtProp => taxonomtProp.key === "Cor do Texto em Alto Contraste")?.value;
3348
3349 if (textColor != undefined) {
3350 styleContent = styleContent + `
3351 .ws-carousel .ws-carousel-body .ws-container .ws-item .ws-label[data-category="` + item.name + `"] {
3352 color: #` + textColor + `;
3353 }
3354 `
3355 }
3356
3357 if (textHighContrastColor != undefined) {
3358 styleContent = styleContent + `
3359 body.high-contrast .ws-carousel .ws-carousel-body .ws-container .ws-item .ws-label[data-category="` + item.name + `"] {
3360 color: #` + textHighContrastColor + `;
3361 }
3362 `
3363 }
3364 });
3365
3366 styleTag.textContent = styleContent;
3367
3368 document.head.appendChild(styleTag);
3369 });
3370};
3371
3372getCategoriesColorsStyles();
3373
3374/* Renderiza os itens */
3375const renderItems = (carouselId, webStoriesObjects) => {
3376 const carouselElement = document.querySelector(`#` + carouselId);
3377 const carouselContainer = carouselElement.querySelector(`.ws-container`);
3378 const carouselBody = carouselElement.querySelector(".ws-carousel-body");
3379 const navButtons = carouselElement.querySelector(".nav-buttons");
3380 const leftArrow = navButtons.querySelector(".left-arrow");
3381 const rightArrow = navButtons.querySelector(".right-arrow");
3382
3383 // Adiciona Cards
3384 webStoriesObjects.forEach((storyObject, index) => {
3385 const storyCard = storyCardFrom(storyObject);
3386 storyCard.dataset.index = index;
3387 carouselContainer.appendChild(storyCard);
3388 });
3389
3390 // Altera o Layout
3391 function updateLayout() {
3392 if (webStoriesObjects.length < 3) {
3393 if (window.matchMedia("(min-width: 769px)").matches) {
3394 carouselContainer.style.justifyContent = "center";
3395 navButtons.style.display = "none";
3396 } else {
3397 carouselContainer.style.justifyContent = "flex-start";
3398 navButtons.style.display = "flex";
3399 }
3400 } else {
3401 carouselContainer.style.justifyContent = "";
3402 carouselContainer.style.gap = window.matchMedia("(max-width: 768px)")
3403 .matches
3404 ? "32px"
3405 : "16px";
3406 navButtons.style.display = "";
3407 }
3408 }
3409 updateLayout();
3410 window.addEventListener("resize", updateLayout);
3411
3412 // Configura Scroll das setas
3413 leftArrow.addEventListener("click", () => {
3414 const items = carouselBody.querySelectorAll(".ws-item");
3415 const gap = window.matchMedia("(max-width: 768px)").matches ? 32 : 16;
3416 const pageSize = items[0].offsetWidth + gap;
3417 const currentScroll = carouselBody.scrollLeft;
3418 const currentPageReal = carouselBody.scrollLeft / pageSize;
3419 const currentPage = parseInt(currentPageReal);
3420 const rest = currentPage - currentPageReal;
3421 const nextPage = rest !== 0 ? currentPage : currentPage - 1;
3422 carouselBody.scrollLeft = nextPage * pageSize;
3423 });
3424
3425 rightArrow.addEventListener("click", () => {
3426 const gap = window.matchMedia("(max-width: 768px)").matches ? 32 : 16;
3427 const items = carouselBody.querySelectorAll(".ws-item");
3428 carouselBody.scrollLeft += items[0].offsetWidth + gap;
3429 });
3430
3431 const updateArrows = () => {
3432 const scrollLeft = carouselBody.scrollLeft;
3433 const maxScrollLeft = carouselBody.scrollWidth - carouselBody.clientWidth;
3434
3435 // Regra 1: A seta esquerda fica cinza se scrollLeft for 0
3436 if (scrollLeft === 0) {
3437 leftArrow.classList.remove("active");
3438 leftArrow.classList.add("inactive");
3439 } else {
3440 leftArrow.classList.remove("inactive");
3441 leftArrow.classList.add("active");
3442 }
3443
3444 // Regra 2: A seta direita fica cinza se o scroll for máximo
3445 if (scrollLeft >= maxScrollLeft) {
3446 rightArrow.classList.remove("active");
3447 rightArrow.classList.add("inactive");
3448 } else {
3449 rightArrow.classList.remove("inactive");
3450 rightArrow.classList.add("active");
3451 }
3452 };
3453
3454 carouselBody.addEventListener("scroll", updateArrows);
3455};
3456
3457/* Fetch Things */
3458async function getWebStoriesDataSectionFromNews(webContentId) {
3459 const ID_INDEX = 0;
3460 const WEB_STORIES_STRUCTURED_CONTENT_INDEX_START_AT = 2;
3461 const urlToFetchToGetWebStoriesGroup =
3462 `/o/headless-delivery/v1.0/structured-contents/` +
3463 webContentId +
3464 `?fields=contentFields`;
3465
3466 return fetch(urlToFetchToGetWebStoriesGroup, {
3467 method: "GET",
3468 headers: {
3469 accept: "application/json",
3470 "x-csrf-token": Liferay.authToken,
3471 },
3472 })
3473 .then((response) => {
3474 if (response.status === 200) {
3475 return response.json();
3476 } else {
3477 throw new Error("Erro interno. Por favor tente mais tarde.");
3478 }
3479 })
3480 .then((data) => {
3481 const webStoriesGroups = Array.from(data.contentFields).filter(
3482 (contentField) => contentField.label === "Web Stories"
3483 );
3484
3485 const webStoriesDataMapped = webStoriesGroups.map((webStoryGroup) => {
3486 const webStoryGroupId =
3487 webStoryGroup.nestedContentFields[ID_INDEX].contentFieldValue.data;
3488 const webStoriesStrucutredContentNodes =
3489 webStoryGroup.nestedContentFields.slice(
3490 WEB_STORIES_STRUCTURED_CONTENT_INDEX_START_AT
3491 );
3492 const webStoriesIds = Array.from(webStoriesStrucutredContentNodes).map(
3493 (webStoryNode) => {
3494 const webStoryId =
3495 webStoryNode.contentFieldValue.structuredContentLink.id;
3496 return {
3497 webStoryId: webStoryId,
3498 };
3499 }
3500 );
3501 return {
3502 webStoryGroupId: webStoryGroupId,
3503 webStoriesIds: webStoriesIds,
3504 };
3505 });
3506
3507 return webStoriesDataMapped;
3508 })
3509 .then((webStoriesDataMapped) => {
3510 // Mapeia os dados recebidos
3511 return Promise.all(
3512 webStoriesDataMapped.map(async (group) => {
3513 const updatedWebStoriesIds = await Promise.all(
3514 group.webStoriesIds.map(async (story) => {
3515 // Faz o fetch para obter os dados do webStoryId
3516 const response = await fetch(
3517 `/o/headless-delivery/v1.0/structured-contents/` +
3518 story.webStoryId,
3519 {
3520 method: "GET",
3521 headers: {
3522 accept: "application/json",
3523 "x-csrf-token": Liferay.authToken,
3524 },
3525 }
3526 );
3527 if (!response.ok) {
3528 throw new Error(
3529 `Erro ao buscar dados para webStoryId` + story.webStoryId
3530 );
3531 }
3532 const webStoryData = await response.json();
3533 return { webStoryData: webStoryData };
3534 })
3535 );
3536
3537 // Retorna o objeto transformado
3538 return {
3539 webStoryGroupId: group.webStoryGroupId,
3540 webStoriesData: updatedWebStoriesIds,
3541 };
3542 })
3543 );
3544 })
3545 .then((webStoriesDataFetched) => {
3546 return webStoriesDataFetched.map((data) => {
3547 return {
3548 webStoryGroupId: data.webStoryGroupId,
3549 webStoryObjects: data.webStoriesData.map((data) =>
3550 createStoryObject(data.webStoryData)
3551 ),
3552 };
3553 });
3554 })
3555 .catch((error) => {
3556 console.error("Erro ao buscar coleção: ", error);
3557 });
3558}
3559
3560async function getWebStoriesData(webStoriesIds) {
3561 // Mapeia os IDs para criar um array de promessas
3562 const fetchPromises = webStoriesIds.map((webStoryId) => {
3563 //const urlToFetch = `/o/headless-delivery/v1.0/structured-contents/` + webStoryId + `?fields=contentFields`;
3564 const urlToFetch =
3565 `/o/headless-delivery/v1.0/structured-contents/` +
3566 webStoryId +
3567 `?fields=contentFields%2CtaxonomyCategoryBriefs`;
3568 return fetch(urlToFetch, {
3569 method: "GET",
3570 headers: {
3571 accept: "application/json",
3572 "x-csrf-token": Liferay.authToken,
3573 },
3574 }).then((response) => {
3575 if (!response.ok) {
3576 throw new Error(`Erro ao buscar ID`);
3577 }
3578 return response.json(); // Transforma a resposta em JSON
3579 });
3580 });
3581
3582 // Aguarda todas as promessas e preserva a ordem
3583 try {
3584 const results = await Promise.all(fetchPromises);
3585 return results; // Retorna os resultados em ordem
3586 } catch (error) {
3587 console.error("Erro ao buscar Web Stories:", error);
3588 throw error; // Relança o erro para tratamento posterior
3589 }
3590}
3591
3592<#noparse>
3593const scriptForStoryInNews = (storyData, containerId) => {
3594
3595 storyData.stories = storyData.stories.filter(story => story.imageUrl !== null)
3596
3597 const storiesContainer = document.getElementById(`stories-container-${containerId}`);
3598 const prevArrow = storiesContainer.querySelector('.nav-area.prev svg.arrow');
3599 const nextArrow = storiesContainer.querySelector('.nav-area.next svg.arrow');
3600 const restartIcon = storiesContainer.querySelector('.nav-area.next svg.restart-icon');
3601 const progressBars = storiesContainer.querySelector('.progress-bars');
3602 const pauseBtn = storiesContainer.querySelector('.pause-btn');
3603 const shareBtn = storiesContainer.querySelector('.share-btn');
3604
3605 let currentStoryIndex = 0;
3606 let progressTimeout;
3607 let touchStartX = 0;
3608 let touchEndX = 0;
3609 let isPaused = false;
3610 let viewedStories = new Set();
3611 let progressStartTime = 0;
3612 let remainingTime = 8000;
3613
3614 // Tagueamento com Google Analytics
3615 const trackStoryPageView = (pageId) => {
3616 gtag("event", `web_story_page_view_${pageId}`, {
3617 story_title: document.title,
3618 canonical_url: window.location.href,
3619 source_url: document.referrer
3620 });
3621 }
3622
3623 // Cria slides dos stories
3624 function createStorySlides() {
3625 // Cria barras de progresso
3626 storyData.stories.forEach((story, index) => {
3627 const progressContainer = document.createElement('div');
3628 progressContainer.className = 'progress-bar';
3629 progressContainer.dataset.index = index;
3630
3631 const progress = document.createElement('div');
3632 progress.className = 'story-progress';
3633 progressContainer.appendChild(progress);
3634
3635 progressBars.appendChild(progressContainer);
3636 });
3637
3638 // Cria slides
3639 storyData.stories.forEach((story, index) => {
3640 const slide = document.createElement('div');
3641 slide.className = `story-slide ${index === 0 ? 'active' : ''}`;
3642 slide.dataset.index = index;
3643
3644 let imageHtml = '';
3645 if (story.imageUrl) {
3646 imageHtml = `<img src="${story.imageUrl}" alt="${story.imageAlt || ''}" class="story-image" loading="lazy">`;
3647 }
3648
3649 slide.innerHTML = `
3650 ${imageHtml}
3651 <div class="story-content">
3652 <div class="content-wrapper">
3653 ${story.title && (
3654 `<div class="story-title ${story.colorTheme}">
3655 <p class="title-text">${story.title}</p>
3656 <div class="mischievous">—</div>
3657 </div>`
3658 )}
3659 ${story.description && `<div class="story-description description-text ${story.colorTheme}">${story.description}</div>`}
3660 </div>
3661 </div>
3662 `;
3663 storiesContainer.insertBefore(slide, storiesContainer.querySelector('.nav-area-container'));
3664 });
3665
3666 updateArrows();
3667 updateProgressBars();
3668 startProgressBar();
3669 }
3670
3671 // Atualiza o estado das setas de navegação
3672 function updateArrows() {
3673 // Seta anterior
3674 if (currentStoryIndex === 0) {
3675 prevArrow.classList.add('disabled');
3676 } else {
3677 prevArrow.classList.remove('disabled');
3678 }
3679
3680 // Próxima seta
3681 if (currentStoryIndex === storyData.stories.length - 1) {
3682 nextArrow.classList.add('hidden');
3683 restartIcon.classList.remove('hidden');
3684 } else {
3685 nextArrow.classList.remove('hidden');
3686 restartIcon.classList.add('hidden');
3687 }
3688 }
3689
3690 // Atualiza as barras de progresso conforme navegação
3691 function updateProgressBars() {
3692 const allProgressBars = storiesContainer.querySelectorAll('.progress-bar .story-progress');
3693
3694 allProgressBars.forEach((bar, index) => {
3695 bar.classList.remove('completed', 'active');
3696 bar.style.width = '0%';
3697 bar.style.animation = 'none';
3698
3699 if (index < currentStoryIndex) {
3700 // Stories já vistos - barra completa
3701 bar.classList.add('completed');
3702 bar.style.width = '100%';
3703 } else if (index === currentStoryIndex) {
3704 // Story atual - barra em progresso
3705 bar.classList.add('active');
3706 } else {
3707 // Stories não vistos - barra vazia
3708 bar.style.width = '0%';
3709 }
3710 });
3711 }
3712
3713 function nextStory() {
3714 if (currentStoryIndex < storyData.stories.length - 1) {
3715 viewedStories.add(currentStoryIndex);
3716 goToStory(currentStoryIndex + 1);
3717 }
3718 }
3719
3720 function prevStory() {
3721 if (currentStoryIndex > 0) {
3722 viewedStories.delete(currentStoryIndex);
3723 goToStory(currentStoryIndex - 1);
3724 }
3725 }
3726
3727 function goToStory(index) {
3728 // Pausa a animação atual
3729 clearTimeout(progressTimeout);
3730
3731 storiesContainer.querySelector('.story-slide.active').classList.remove('active');
3732 currentStoryIndex = index;
3733 storiesContainer.querySelector(`.story-slide[data-index="${index}"]`).classList.add('active');
3734
3735 updateArrows();
3736 updateProgressBars();
3737
3738 isPaused = false;
3739 pauseBtn.classList.replace('play', 'pause');
3740 startProgressBar();
3741 }
3742
3743 function startProgressBar() {
3744 const currentProgressBar = storiesContainer.querySelector(`.progress-bar[data-index="${currentStoryIndex}"] .story-progress`);
3745
3746 // Resetar e iniciar animação
3747 currentProgressBar.style.animation = 'none';
3748 currentProgressBar.offsetHeight; // Trigger reflow
3749 currentProgressBar.style.animation = 'progress 8s linear forwards';
3750
3751 progressStartTime = Date.now();
3752
3753 progressTimeout = setTimeout(() => {
3754 nextStory();
3755 }, remainingTime);
3756 }
3757
3758 // Pausar/continuar story
3759 function togglePause() {
3760 isPaused = !isPaused;
3761
3762 const currentProgressBar = storiesContainer.querySelector(`.progress-bar[data-index="${currentStoryIndex}"] .story-progress`);
3763
3764 if (isPaused) {
3765 // Pausar
3766 currentProgressBar.style.animationPlayState = 'paused';
3767 clearTimeout(progressTimeout);
3768
3769 // Calcular tempo restante
3770 const elapsed = Date.now() - progressStartTime;
3771 remainingTime = Math.max(0, 8000 - elapsed);
3772
3773 pauseBtn.classList.remove('pause');
3774 pauseBtn.classList.add('play');
3775 } else {
3776 // Retomar
3777 currentProgressBar.style.animationPlayState = 'running';
3778 pauseBtn.classList.remove('play');
3779 pauseBtn.classList.add('pause');
3780
3781 // Reiniciar com tempo restante
3782 progressStartTime = Date.now();
3783 progressTimeout = setTimeout(() => {
3784 nextStory();
3785 }, remainingTime);
3786 }
3787 }
3788
3789 function shareStory() {
3790 const currentStory = storyData.stories[currentStoryIndex];
3791 const baseUrl = window.location.origin;
3792 let displayPageUrl;
3793 if (baseUrl.includes('webserver')) {
3794 displayPageUrl = `${baseUrl}/web/nossa-energia/w/${storyData.friendlyUrlPath}`;
3795 } else {
3796 displayPageUrl = `${baseUrl}/w/${storyData.friendlyUrlPath}`;
3797 }
3798
3799 const shareData = {
3800 title: currentStory.title || 'Story',
3801 text: currentStory.description ? currentStory.description.replace(/<[^>]*>/g, '') : '',
3802 url: displayPageUrl
3803 };
3804
3805 if (navigator.share) {
3806 navigator.share(shareData)
3807 .then(() => console.log('Compartilhado com sucesso'))
3808 .catch((error) => console.log('Erro ao compartilhar:', error));
3809 } else {
3810 // Fallback para navegadores que não suportam a API de compartilhamento
3811 alert('Compartilhar: ' + shareData.title + '\n' + shareData.text + '\n' + shareData.url);
3812 }
3813 }
3814
3815 // Event Listeners
3816 prevArrow.addEventListener('click', (e) => {
3817 e.stopPropagation();
3818 prevStory();
3819 });
3820
3821 nextArrow.addEventListener('click', (e) => {
3822 e.stopPropagation();
3823 nextStory();
3824 });
3825
3826 restartIcon.addEventListener('click', (e) => {
3827 e.stopPropagation();
3828 goToStory(0);
3829 });
3830
3831 pauseBtn.addEventListener('click', e => {
3832 e.stopPropagation();
3833 togglePause();
3834 });
3835
3836 shareBtn.addEventListener('click', e => {
3837 e.stopPropagation();
3838 shareStory();
3839 });
3840
3841 // Navegação por clique na tela
3842 storiesContainer.addEventListener('click', (e) => {
3843 const containerWidth = storiesContainer.offsetWidth;
3844 const clickX = e.clientX - storiesContainer.getBoundingClientRect().left;
3845
3846 // Se clicou na metade esquerda
3847 if (clickX < containerWidth / 2) {
3848 prevStory();
3849 }
3850 // Se clicou na metade direita
3851 else if (clickX > containerWidth / 2) {
3852 nextStory();
3853 }
3854 });
3855
3856 // Inicializar
3857 createStorySlides();
3858
3859 // Envia evento de click em links
3860 storiesContainer.addEventListener('click', e => {
3861 if (e.target.classList.contains('a')) {
3862 gtag("event", `web_story_link_click_${storyData.friendlyUrlPath}`);
3863 }
3864 });
3865
3866 const lastPage = storiesContainer.querySelector(".story-slide:last-of-type");
3867
3868 // Observa a mudança das páginas do story
3869 const observer = new MutationObserver((mutationsList) => {
3870 mutationsList.forEach((mutation) => {
3871 if (mutation.type === "attributes" && mutation.attributeName === "active") {
3872 const target = mutation.target;
3873 if (target.tagName.toLowerCase() === "story-slide" && target.hasAttribute("active")) {
3874 trackStoryPageView(target.getAttribute('data-index'));
3875 target === lastPage && gtag("event", 'web_story_complete');
3876 }
3877 }
3878 });
3879 });
3880
3881 const activePage = storiesContainer.querySelector('.story-slide.active');
3882 if (activePage && activePage.getAttribute('data-index') === '0') {
3883 trackStoryPageView(0);
3884 }
3885
3886 const pages = storiesContainer.querySelectorAll(".story-slide");
3887 pages.forEach(page => {
3888 observer.observe(page, { attributes: true, attributeFilter: ["active"] });
3889 });
3890}
3891</#noparse>
3892
3893async function fetchAndLogWebStories() {
3894 const webStoriesCarouselDataList = await getWebStoriesDataSectionFromNews(
3895 "${newsJournalArticle.getResourcePrimKey()}"
3896 );
3897
3898 webStoriesCarouselDataList.forEach((webStoriesCarouselData) => {
3899 const onlyOneWebstory = webStoriesCarouselData.webStoryObjects.length === 1;
3900
3901 if (onlyOneWebstory) {
3902 // renderiza um único story com navegação dentro da notícia
3903 const carouselElement = document.querySelector(`#` + webStoriesCarouselData.webStoryGroupId);
3904 carouselElement.style.alignItems = 'center';
3905 <#noparse>
3906 carouselElement.innerHTML =
3907 ` <div class="stories-container" id="stories-container-${webStoriesCarouselData.webStoryGroupId}">
3908 <div class="header-container">
3909 <div class="story-header">
3910 <div class="progress-bars"></div>
3911 </div>
3912 <div class="action-buttons">
3913 <button class="action-btn pause pause-btn"></button>
3914 <button class="action-btn share share-btn"></button>
3915 </div>
3916 </div>
3917
3918 <!-- Os stories serão inseridas aqui via JavaScript -->
3919
3920 <div class="nav-area-container">
3921 <div class="nav-area prev">
3922 <svg class="arrow disabled" width="32" height="32" viewBox="0 0 34 33" fill="none"
3923 xmlns="http://www.w3.org/2000/svg">
3924 <g>
3925 <path
3926 d="M1 16.5C1 7.66344 8.16344 0.5 17 0.5C25.8366 0.5 33 7.66344 33 16.5C33 25.3366 25.8366 32.5 17 32.5C8.16344 32.5 1 25.3366 1 16.5Z"
3927 stroke="#959595" />
3928 <path d="M19 21.5L14 16.5L19 11.5" stroke="#525252" stroke-width="1.5" stroke-linecap="round"
3929 stroke-linejoin="round" />
3930 </g>
3931 </svg>
3932 </div>
3933 <div class="nav-area next">
3934 <svg class="arrow" width="32" height="32" viewBox="0 0 34 33" fill="none" xmlns="http://www.w3.org/2000/svg">
3935 <path
3936 d="M1 16.5C1 7.66344 8.16344 0.5 17 0.5C25.8366 0.5 33 7.66344 33 16.5C33 25.3366 25.8366 32.5 17 32.5C8.16344 32.5 1 25.3366 1 16.5Z"
3937 stroke="#008542" />
3938 <path d="M15 11.5L20 16.5L15 21.5" stroke="#008542" stroke-width="1.5" stroke-linecap="round"
3939 stroke-linejoin="round" />
3940 </svg>
3941 <svg class="restart-icon hidden" width="32" height="32" viewBox="0 0 34 33" fill="none" xmlns="http://www.w3.org/2000/svg">
3942 <path
3943 d="M1 16.5C1 7.66344 8.16344 0.5 17 0.5C25.8366 0.5 33 7.66344 33 16.5C33 25.3366 25.8366 32.5 17 32.5C8.16344 32.5 1 25.3366 1 16.5Z"
3944 stroke="#008542" />
3945 <path
3946 d="M13.9875 14.7313H10.9875M10.9875 14.7313V11.7313M10.9875 14.7313L13.1125 12.6125C13.8816 11.8429 14.8616 11.3186 15.9286 11.106C16.9956 10.8934 18.1017 11.0021 19.1069 11.4182C20.1122 11.8344 20.9714 12.5393 21.576 13.4439C22.1805 14.3485 22.5032 15.412 22.5032 16.5C22.5032 17.588 22.1805 18.6515 21.576 19.5561C20.9714 20.4607 20.1122 21.1656 19.1069 21.5818C18.1017 21.9979 16.9956 22.1066 15.9286 21.894C14.8616 21.6814 13.8816 21.1571 13.1125 20.3875"
3947 stroke="#008542" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" />
3948 </svg>
3949 </div>
3950 </div>
3951 </div>
3952 `;
3953 </#noparse>
3954 const singleWebstoryData = webStoriesCarouselData.webStoryObjects[0];
3955 scriptForStoryInNews(singleWebstoryData, webStoriesCarouselData.webStoryGroupId);
3956 } else {
3957 // Carrossel
3958 renderItems(
3959 webStoriesCarouselData.webStoryGroupId,
3960 webStoriesCarouselData.webStoryObjects
3961 );
3962 }
3963 });
3964}
3965
3966fetchAndLogWebStories();
3967
3968</script>
3969
3970 <script>
3971 <#assign configureLinkTab = "configureLinkTab_" + randomNumber(5)>
3972
3973 function ${configureLinkTab}() {
3974 const root = document.querySelector(".ptb-news__read-news");
3975 const newsContentElement = root.querySelector(".news-content div:first-child");
3976 const pList = newsContentElement.querySelectorAll("p");
3977 pList.forEach((pElement) => {
3978 const cont = pElement.innerHTML.trim();
3979 if (cont == "" || cont == " ") {
3980 newsContentElement?.removeChild(pElement);
3981 }
3982 });
3983 }
3984
3985 ${configureLinkTab}();
3986
3987 <#if typeOfNews?? && typeOfNews?has_content && typeOfNews == "Infográfico" >
3988
3989 function resizeMediaInfographic() {
3990 if (window.innerWidth > 1024) {
3991 const contents = document.querySelectorAll(".ptb-news__read-news .news-content p");
3992 contents.forEach((content) => {
3993 content.querySelector("img") && (content.style.gridColumn = "2 / 12");
3994 });
3995 }
3996 else {
3997 const contents = document.querySelectorAll(".ptb-news__read-news .news-content p");
3998 contents.forEach((content) => {
3999 content.querySelector("img") && (content.style.gridColumn = "");
4000 });
4001
4002 }
4003 }
4004 resizeMediaInfographic();
4005 </#if>
4006
4007
4008
4009 document.addEventListener("DOMContentLoaded", () => {
4010 const headers = document.querySelectorAll(".ptb-news__read-news .news-content h1, .ptb-news__read-news .news-content h2, .ptb-news__read-news .news-content h3, .ptb-news__read-news .news-content h4");
4011
4012 headers.forEach((header) => {
4013
4014 const currentLevel = parseInt(header.tagName.charAt(1));
4015
4016 if (currentLevel >= 1 && currentLevel <= 5) {
4017
4018 const newLevel = currentLevel + 1;
4019 const newTagName = "h" + newLevel;
4020
4021 // Criar a nova tag e transferir o conteúdo
4022 const newHeader = document.createElement(newTagName);
4023 newHeader.innerHTML = header.innerHTML;
4024
4025 // Substituir a tag antiga pela nova
4026 header.parentNode.replaceChild(newHeader, header);
4027 }
4028 });
4029
4030 <#assign typeOfNews = getFirstCategoryOfVocabulary(assetEntry, typeOfNewsVocabulary) />
4031
4032 <#if typeOfNews?? && typeOfNews?has_content && typeOfNews == "Infográfico" >
4033 resizeMediaInfographic();
4034 window.addEventListener("resize", resizeMediaInfographic);
4035 </#if>
4036 });
4037
4038 AUI().ready(()=>{
4039 const audiosContainer = document.querySelectorAll(".ptb-news__read-news .news-content .audio-content");
4040 const audioTemplate = document.querySelector(".ptb-news__read-news .news-content .audio-template");
4041
4042 audiosContainer.forEach((audioContainer)=>{
4043
4044 const audio = audioContainer.querySelector("audio");
4045 const audioInterface = audioTemplate.cloneNode(true);
4046
4047 const sondwave = audioInterface.querySelector(".audio-sondwave");
4048 const linesDesktop = audioInterface.querySelectorAll(".audio-sondwave .audio-sondwave-desktop line");
4049 const linesMobile = audioInterface.querySelectorAll(".audio-sondwave .audio-sondwave-mobile line");
4050
4051 const playPauseButtonAudioInterface = audioInterface.querySelector(".audio-button-play");
4052
4053 playPauseButtonAudioInterface.addEventListener("click", ()=>{
4054 if(audioInterface.classList.contains("audio-play")) {
4055 audioInterface.classList.replace("audio-play", "audio-pause");
4056 audio.pause();
4057 }
4058 else {
4059
4060 audiosContainer.forEach((audioContainer)=>{
4061 const otherAudio = audioContainer.querySelector("audio");
4062 const otherAudioInterface = audioContainer.querySelector(".audio-button-play");
4063 !otherAudio.paused && otherAudioInterface.click();
4064 });
4065
4066 audioInterface.classList.replace("audio-pause", "audio-play");
4067 audio.play();
4068 }
4069 });
4070
4071 const audioMuteButton = audioInterface.querySelector(".audio-button-mute");
4072
4073 audioMuteButton.addEventListener("click", ()=>{
4074 if(audioInterface.classList.contains("audio-unmuted")) {
4075 audioInterface.classList.replace("audio-unmuted", "audio-muted");
4076 audio.muted = true;
4077 }
4078 else {
4079 audioInterface.classList.replace("audio-muted", "audio-unmuted");
4080 audio.muted = false;
4081 }
4082 });
4083
4084 const audioTime = audioInterface.querySelector(".audio-time");
4085 audioTime.textContent = Math.floor(audio.duration / 60) + ":" + Math.floor(audio.duration % 60);
4086
4087
4088 audio.addEventListener("timeupdate", ()=>{
4089 let minutes = Math.floor((audio.duration - audio.currentTime) / 60);
4090 let seconds = Math.floor((audio.duration - audio.currentTime) % 60);
4091
4092 minutes = minutes < 10? "0" + minutes : minutes;
4093 seconds = seconds < 10? "0" + seconds : seconds;
4094
4095 audioTime.textContent = minutes + ":" + seconds;
4096
4097 const progress = (audio.currentTime / audio.duration) * 100;
4098
4099 linesDesktop.forEach(function(line, index) {
4100 const lineProgress = (index / linesDesktop.length) * 100;
4101 if (progress >= lineProgress) {
4102 !line.classList.contains("line-active") && line.classList.add("line-active");
4103 } else {
4104 line.classList.contains("line-active") && line.classList.remove("line-active");
4105 }
4106 });
4107
4108 linesMobile.forEach(function(line, index) {
4109 const lineProgress = (index / linesMobile.length) * 100;
4110 if (progress >= lineProgress) {
4111 !line.classList.contains("line-active") && line.classList.add("line-active");
4112 } else {
4113 line.classList.contains("line-active") && line.classList.remove("line-active");
4114 }
4115 });
4116 });
4117
4118
4119 sondwave.addEventListener("click", (event)=>{
4120 const distanceLeft = (event.clientX - sondwave.getBoundingClientRect().left)/sondwave.offsetWidth;
4121 audio.currentTime = audio.duration * distanceLeft;
4122 });
4123
4124 audioInterface.style.display = "";
4125 audioContainer.appendChild(audioInterface);
4126 });
4127
4128 });
4129 </script>
4130</#macro>
4131
4132<#macro renderShareAndCopyNews>
4133 <#-- <div class="share_news_container">-->
4134 <div class="social-media-container">
4135
4136 <#assign emailMsg = "Veja o conteúdo do post no link ">
4137 <#if locale == "en_US">
4138 <#assign emailMsg = "See the content of the post in the link ">
4139 </#if>
4140 <a class="social-media-share" href="mailto:?subject=${newsInfo.mainHeadlineOfTheNews}&body=${emailMsg}${newsInfo.url}"
4141 target="_blank">
4142 <svg class="email" width="37" height="36" viewBox="0 0 37 36" fill="none"
4143 xmlns="http://www.w3.org/2000/svg">
4144 <circle cx="18.5" cy="18" r="17.5" fill="white" stroke="#E1E1E1"/>
4145 <path d="M24.9231 12H11.0769C10.9239 12 10.7772 12.0579 10.669 12.1611C10.5608 12.2642 10.5 12.4041 10.5 12.55V21.9C10.5 22.1917 10.6216 22.4715 10.838 22.6778C11.0543 22.8841 11.3478 23 11.6538 23H24.3462C24.6522 23 24.9457 22.8841 25.162 22.6778C25.3784 22.4715 25.5 22.1917 25.5 21.9V12.55C25.5 12.4041 25.4392 12.2642 25.331 12.1611C25.2228 12.0579 25.0761 12 24.9231 12ZM24.3462 21.9H11.6538V13.8012L17.6106 19.0056C17.7169 19.0984 17.8559 19.1498 18 19.1498C18.1441 19.1498 18.2831 19.0984 18.3894 19.0056L24.3462 13.8012V21.9Z"
4146 fill="#008542"/>
4147 </svg>
4148 <span >send e-mail</span>
4149 </a>
4150
4151 <a class="social-media-share" href="https://www.facebook.com/sharer/sharer.php?u=${newsInfo.url}" target="_blank">
4152 <svg class="facebook" width="37" height="36" viewBox="0 0 37 36" fill="none"
4153 xmlns="http://www.w3.org/2000/svg">
4154 <circle cx="18.5" cy="18" r="17.5" fill="white" stroke="#E1E1E1"/>
4155 <path d="M17.5417 24H20.0341V18.1855H21.9697L22.2879 15.875H20.0341V14.2754C20.0341 13.9199 20.0871 13.6406 20.2462 13.4629C20.4053 13.2598 20.75 13.1582 21.2273 13.1582H22.5V11.1016C22.0227 11.0508 21.3864 11 20.6439 11C19.6894 11 18.947 11.2793 18.3902 11.8125C17.8068 12.3457 17.5417 13.082 17.5417 14.0469V15.875H15.5V18.1855H17.5417V24Z"
4156 fill="#008542"/>
4157 </svg>
4158 <span >Facebook</span>
4159 </a>
4160
4161 <#assign mobileShareButtonId = "mobile-share-" + randomNumber(5)>
4162 <div class="mobile-share" id="${mobileShareButtonId}">
4163 <svg width="37" height="36" viewBox="0 0 37 36" fill="none" xmlns="http://www.w3.org/2000/svg">
4164 <circle cx="18.5" cy="18" r="17.5" fill="white" stroke="#E1E1E1"/>
4165 <path d="M13.8923 20.5914C15.2136 20.5914 16.2847 19.5151 16.2847 18.1875C16.2847 16.8599 15.2136 15.7837 13.8923 15.7837C12.5711 15.7837 11.5 16.8599 11.5 18.1875C11.5 19.5151 12.5711 20.5914 13.8923 20.5914Z"
4166 fill="#008542" stroke="#008542" stroke-linecap="round" stroke-linejoin="round"/>
4167 <path d="M22.2654 26.0001C23.5866 26.0001 24.6577 24.9238 24.6577 23.5962C24.6577 22.2686 23.5866 21.1924 22.2654 21.1924C20.9441 21.1924 19.873 22.2686 19.873 23.5962C19.873 24.9238 20.9441 26.0001 22.2654 26.0001Z"
4168 fill="#008542" stroke="#008542" stroke-linecap="round" stroke-linejoin="round"/>
4169 <path d="M22.2654 15.1827C23.5866 15.1827 24.6577 14.1064 24.6577 12.7788C24.6577 11.4512 23.5866 10.375 22.2654 10.375C20.9441 10.375 19.873 11.4512 19.873 12.7788C19.873 14.1064 20.9441 15.1827 22.2654 15.1827Z"
4170 fill="#008542" stroke="#008542" stroke-linecap="round" stroke-linejoin="round"/>
4171 <path d="M20.2546 14.0784L15.9036 16.8879" stroke="#008542" stroke-linecap="round"
4172 stroke-linejoin="round"/>
4173 <path d="M15.9036 19.4871L20.2546 22.2966" stroke="#008542" stroke-linecap="round"
4174 stroke-linejoin="round"/>
4175 </svg>
4176 </div>
4177
4178 <a class="social-media-share" href="https://twitter.com/intent/tweet?url=${newsInfo.url}" target="_blank" data-size="large">
4179 <svg class="twitter" width="37" height="36" viewBox="0 0 37 36" fill="none"
4180 xmlns="http://www.w3.org/2000/svg">
4181 <circle cx="18.5" cy="18" r="17.5" fill="white" stroke="#E1E1E1"/>
4182 <path d="M22.7542 12H24.7809L20.3542 17.0933 25.5809 24H21.4742L18.2741 19.8133 14.5941 24H12.5674L17.3141 18.56 12.3008 12H16.5141L19.4208 15.84 22.7542 12ZM22.0342 22.7733H23.1542L15.9008 13.1467H14.6741L22.0342 22.7733Z" fill="#008542"/>
4183 </svg>
4184 <span >twitter</span>
4185 </a>
4186
4187 <a class="social-media-share" href="https://api.whatsapp.com/send?text=${newsInfo.url}" data-action="share/whatsapp/share"
4188 target="_blank">
4189 <svg class="whatsapp" width="37" height="36" viewBox="0 0 37 36" fill="none"
4190 xmlns="http://www.w3.org/2000/svg">
4191 <circle cx="18.5" cy="18" r="17.5" fill="white" stroke="#E1E1E1"/>
4192 <path d="M12.5482 21.3241C11.6166 19.7525 11.2908 17.8949 11.6318 16.1C11.9729 14.3052 12.9573 12.6965 14.4003 11.5761C15.8434 10.4556 17.6457 9.90042 19.4691 10.0147C21.2925 10.129 23.0114 10.9049 24.3033 12.1967C25.5951 13.4886 26.371 15.2075 26.4853 17.0309C26.5996 18.8543 26.0444 20.6566 24.9239 22.0997C23.8035 23.5427 22.1948 24.5271 20.4 24.8682C18.6051 25.2092 16.7475 24.8834 15.1759 23.9518L12.5795 24.687C12.4731 24.7181 12.3603 24.72 12.2529 24.6925C12.1455 24.6651 12.0475 24.6092 11.9692 24.5308C11.8908 24.4525 11.8349 24.3545 11.8075 24.2471C11.78 24.1397 11.7819 24.0269 11.813 23.9205L12.5482 21.3241Z"
4193 fill="#008542"/>
4194 <path d="M20.6917 21C20.0094 21.0017 19.3335 20.8686 18.7029 20.6083C18.0722 20.348 17.4992 19.9656 17.0168 19.4832C16.5344 19.0008 16.152 18.4278 15.8917 17.7971C15.6314 17.1665 15.4983 16.4906 15.5 15.8083C15.5017 15.3281 15.6937 14.8682 16.0338 14.5293C16.374 14.1903 16.8346 14 17.3148 14C17.394 13.9994 17.472 14.0201 17.5404 14.06C17.6089 14.1 17.6653 14.1576 17.7037 14.2269L18.462 15.5491C18.5071 15.6295 18.5303 15.7203 18.5291 15.8124C18.528 15.9046 18.5026 15.9948 18.4556 16.0741L17.8463 17.0917C18.1584 17.7859 18.7141 18.3416 19.4083 18.6537L20.4259 18.0444C20.5052 17.9974 20.5954 17.972 20.6876 17.9709C20.7797 17.9697 20.8705 17.9929 20.9509 18.038L22.2731 18.7963C22.3424 18.8347 22.4 18.8911 22.44 18.9596C22.4799 19.028 22.5006 19.106 22.5 19.1852C22.4983 19.6649 22.3074 20.1245 21.9689 20.4643C21.6303 20.8041 21.1713 20.9966 20.6917 21Z"
4195 fill="white"/>
4196 </svg>
4197 <span >Share to WhatsApp </span>
4198 </a>
4199
4200 <div class="copy-text-container">
4201 <svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
4202 <path d="M10.5 10.5H13.5V2.5H5.5V5.5" stroke="#008542" stroke-linecap="round"
4203 stroke-linejoin="round"/>
4204 <path d="M10.5 5.5H2.5V13.5H10.5V5.5Z" stroke="#008542" stroke-linecap="round"
4205 stroke-linejoin="round"/>
4206 </svg>
4207
4208 <#if locale == "pt_BR">
4209 <p class="text">Copiar texto <span class="copy-text-title-news"> ${newsInfo.mainHeadlineOfTheNews} </span> </p>
4210 <#else >
4211 <p class="text">Copy text <span class="copy-text-title-news"> ${newsInfo.mainHeadlineOfTheNews} </span> </p>
4212 </#if>
4213 </div>
4214
4215 </div>
4216
4217 <#if locale == "pt_BR">
4218 <span class="copy-message">Texto copiado!</span>
4219 <#else >
4220 <span class="copy-message">Text copied!</span>
4221 </#if>
4222 <#-- </div>-->
4223</#macro>
4224
4225<#-- ################################################################################################################## -->
4226
4227<#-- ############# Site de Crise - Notícia - Links do conteúdo da notícia ############################################# -->
4228<#macro renderLinks newsInfo>
4229 <#if newsInfo.links?size != 0>
4230 <#--videos "escondidos" que serão unidos a .ptb-news__read-content -->
4231
4232 <div class="ptb-news__links-container d-none ">
4233 <div id="ptb-news__links-identifiers">
4234 <#assign separator = "">
4235 <#list newsInfo.links as link>
4236 ${link.id};
4237 <#assign separator = ";">
4238 </#list>
4239 </div>
4240 <#list newsInfo.links as link>
4241 <#assign link_index = link?index>
4242 <#assign linkUrl = "#">
4243 <#assign target = "_blank">
4244 <#assign linkClass = "">
4245
4246 <div id="ptb-news__link-container-${link_index}">
4247 <#if link.externalLink?has_content>
4248 <#assign linkUrl = link.externalLink>
4249 <#assign target = "_blank">
4250 <#assign linkClass = "external-link">
4251 <#elseif link.pageLink?has_content>
4252 <#assign linkUrl = link.pageLink>
4253 <#assign target = "_self">
4254 <#assign linkClass = "internal-page-link">
4255 <#elseif link.file.mimeType?has_content>
4256 <#assign linkUrl = link.file.url>
4257 <#assign target = "_blank">
4258 <#assign linkClass = "file-link">
4259 </#if>
4260
4261 <#-- PDF icon -->
4262 <#if link.iconType == "Opção78730408" >
4263 <svg width="24" height="24" viewBox="0 0 24 24" fill="none"
4264 xmlns="http://www.w3.org/2000/svg">
4265 <path d="M3.752 15.974H4.664C4.912 15.974 5.124 15.954 5.3 15.914C5.476 15.874 5.62 15.806 5.732 15.71C5.852 15.606 5.94 15.466 5.996 15.29C6.052 15.114 6.08 14.894 6.08 14.63C6.08 14.11 5.968 13.758 5.744 13.574C5.528 13.39 5.168 13.298 4.664 13.298H3.752V15.974ZM2 20.654V11.894H4.784C5.856 11.894 6.632 12.122 7.112 12.578C7.6 13.026 7.844 13.698 7.844 14.594C7.844 15.474 7.604 16.158 7.124 16.646C6.652 17.134 5.872 17.378 4.784 17.378H3.752V20.654H2Z"
4266 fill="#008542"/>
4267 <path d="M10.8402 19.142H11.9442C12.2962 19.142 12.6042 19.102 12.8682 19.022C13.1322 18.942 13.3482 18.798 13.5162 18.59C13.6922 18.374 13.8242 18.082 13.9122 17.714C14.0002 17.338 14.0442 16.854 14.0442 16.262C14.0442 15.678 14.0002 15.202 13.9122 14.834C13.8322 14.458 13.7042 14.166 13.5282 13.958C13.3602 13.75 13.1442 13.606 12.8802 13.526C12.6242 13.446 12.3202 13.406 11.9682 13.406H10.8402V19.142ZM9.16016 20.654V11.894H12.1002C12.7642 11.894 13.3322 11.982 13.8042 12.158C14.2762 12.326 14.6602 12.59 14.9562 12.95C15.2602 13.302 15.4802 13.75 15.6162 14.294C15.7602 14.83 15.8322 15.47 15.8322 16.214C15.8322 17.726 15.5362 18.846 14.9442 19.574C14.3522 20.294 13.3882 20.654 12.0522 20.654H9.16016Z"
4268 fill="#008542"/>
4269 <path d="M17.2695 20.654V11.894H22.2735V13.358H18.9735V15.59H21.9015V17.054H18.9735V20.654H17.2695Z"
4270 fill="#008542"/>
4271 <path d="M6.08984 8.24516V1.60376C6.08984 1.44364 6.15211 1.29007 6.26294 1.17684C6.37377 1.06361 6.52408 1 6.68082 1H13.7725M13.7725 1L17.9094 5.22634M13.7725 1L13.7725 5.22634H17.9094M17.9094 5.22634V8.24516"
4272 stroke="#008542" stroke-width="1.5" stroke-linecap="round"
4273 stroke-linejoin="round"/>
4274 </svg>
4275
4276 <#-- JPG icon -->
4277 <#elseif link.iconType == "Opção89889679" >
4278 <svg width="24" height="24" viewBox="0 0 24 24" fill="none"
4279 xmlns="http://www.w3.org/2000/svg">
4280 <path d="M2 19.1657C2.248 19.1977 2.504 19.2257 2.768 19.2497C3.032 19.2657 3.284 19.2737 3.524 19.2737C3.844 19.2737 4.112 19.2497 4.328 19.2017C4.544 19.1537 4.72 19.0657 4.856 18.9377C4.992 18.8017 5.088 18.6257 5.144 18.4097C5.208 18.1857 5.24 17.8977 5.24 17.5457V11.8937H6.992V17.5457C6.992 18.6817 6.756 19.5057 6.284 20.0177C5.82 20.5297 5.128 20.7857 4.208 20.7857C3.984 20.7857 3.764 20.7737 3.548 20.7497C3.34 20.7257 3.14 20.6937 2.948 20.6537C2.756 20.6137 2.58 20.5697 2.42 20.5217C2.26 20.4737 2.12 20.4257 2 20.3777V19.1657Z"
4281 fill="#008542"/>
4282 <path d="M10.4203 15.9737H11.3323C11.5803 15.9737 11.7923 15.9537 11.9683 15.9137C12.1443 15.8737 12.2883 15.8057 12.4003 15.7097C12.5203 15.6057 12.6083 15.4657 12.6643 15.2897C12.7203 15.1137 12.7483 14.8937 12.7483 14.6297C12.7483 14.1097 12.6363 13.7577 12.4123 13.5737C12.1963 13.3897 11.8363 13.2977 11.3323 13.2977H10.4203V15.9737ZM8.66834 20.6537V11.8937H11.4523C12.5243 11.8937 13.3003 12.1217 13.7803 12.5777C14.2683 13.0257 14.5123 13.6977 14.5123 14.5937C14.5123 15.4737 14.2723 16.1577 13.7923 16.6457C13.3203 17.1337 12.5403 17.3777 11.4523 17.3777H10.4203V20.6537H8.66834Z"
4283 fill="#008542"/>
4284 <path d="M22.0085 20.2697C21.6405 20.4057 21.2085 20.5257 20.7125 20.6297C20.2245 20.7337 19.7165 20.7857 19.1885 20.7857C18.5005 20.7857 17.9245 20.6897 17.4605 20.4977C17.0045 20.2977 16.6365 20.0097 16.3565 19.6337C16.0845 19.2577 15.8885 18.7977 15.7685 18.2537C15.6485 17.7017 15.5885 17.0777 15.5885 16.3817C15.5885 15.6217 15.6565 14.9537 15.7925 14.3777C15.9285 13.8017 16.1445 13.3217 16.4405 12.9377C16.7365 12.5457 17.1205 12.2537 17.5925 12.0617C18.0645 11.8617 18.6405 11.7617 19.3205 11.7617C19.7845 11.7617 20.2125 11.8017 20.6045 11.8817C21.0045 11.9617 21.3605 12.0577 21.6725 12.1697V13.3937C21.5525 13.3857 21.4125 13.3737 21.2525 13.3577C21.0925 13.3337 20.9205 13.3137 20.7365 13.2977C20.5605 13.2817 20.3765 13.2697 20.1845 13.2617C20.0005 13.2457 19.8205 13.2377 19.6445 13.2377C19.2205 13.2377 18.8605 13.2857 18.5645 13.3817C18.2765 13.4697 18.0405 13.6297 17.8565 13.8617C17.6805 14.0857 17.5485 14.3937 17.4605 14.7857C17.3805 15.1777 17.3405 15.6737 17.3405 16.2737C17.3405 16.8417 17.3765 17.3217 17.4485 17.7137C17.5285 18.0977 17.6485 18.4097 17.8085 18.6497C17.9685 18.8897 18.1765 19.0617 18.4325 19.1657C18.6965 19.2697 19.0125 19.3217 19.3805 19.3217C19.6765 19.3217 20.0245 19.2857 20.4245 19.2137V17.1977H19.1045V15.8897H22.0085V20.2697Z"
4285 fill="#008542"/>
4286 <path d="M6.08984 8.24516V1.60376C6.08984 1.44364 6.15211 1.29007 6.26294 1.17684C6.37377 1.06361 6.52408 1 6.68082 1H13.7725M13.7725 1L17.9094 5.22634M13.7725 1L13.7725 5.22634H17.9094M17.9094 5.22634V8.24516"
4287 stroke="#008542" stroke-width="1.5" stroke-linecap="round"
4288 stroke-linejoin="round"/>
4289 </svg>
4290 <#-- DOC icon -->
4291 <#elseif link.iconType == "Opção15480314" >
4292 <svg width="24" height="24" viewBox="0 0 24 24" fill="none"
4293 xmlns="http://www.w3.org/2000/svg">
4294 <path d="M2.68 19.1417H3.784C4.136 19.1417 4.444 19.1017 4.708 19.0217C4.972 18.9417 5.188 18.7977 5.356 18.5897C5.532 18.3737 5.664 18.0817 5.752 17.7137C5.84 17.3377 5.884 16.8537 5.884 16.2617C5.884 15.6777 5.84 15.2017 5.752 14.8337C5.672 14.4577 5.544 14.1657 5.368 13.9577C5.2 13.7497 4.984 13.6057 4.72 13.5257C4.464 13.4457 4.16 13.4057 3.808 13.4057H2.68V19.1417ZM1 20.6537V11.8937H3.94C4.604 11.8937 5.172 11.9817 5.644 12.1577C6.116 12.3257 6.5 12.5897 6.796 12.9497C7.1 13.3017 7.32 13.7497 7.456 14.2937C7.6 14.8297 7.672 15.4697 7.672 16.2137C7.672 17.7257 7.376 18.8457 6.784 19.5737C6.192 20.2937 5.228 20.6537 3.892 20.6537H1Z"
4295 fill="#008542"/>
4296 <path d="M10.7894 20.4977C10.3334 20.3057 9.96138 20.0217 9.67338 19.6457C9.39338 19.2697 9.18937 18.8057 9.06137 18.2537C8.93337 17.6937 8.86938 17.0457 8.86938 16.3097C8.86938 15.5657 8.93337 14.9097 9.06137 14.3417C9.19737 13.7737 9.40938 13.2977 9.69738 12.9137C9.99338 12.5297 10.3694 12.2417 10.8254 12.0497C11.2894 11.8577 11.8494 11.7617 12.5054 11.7617C13.1694 11.7617 13.7294 11.8577 14.1854 12.0497C14.6414 12.2417 15.0094 12.5257 15.2894 12.9017C15.5774 13.2777 15.7854 13.7457 15.9134 14.3057C16.0414 14.8577 16.1054 15.5017 16.1054 16.2377C16.1054 16.9817 16.0374 17.6377 15.9014 18.2057C15.7734 18.7737 15.5614 19.2497 15.2654 19.6337C14.9774 20.0177 14.6014 20.3057 14.1374 20.4977C13.6814 20.6897 13.1254 20.7857 12.4694 20.7857C11.8054 20.7857 11.2454 20.6897 10.7894 20.4977ZM11.0894 18.6737C11.2414 18.9057 11.4334 19.0737 11.6654 19.1777C11.8974 19.2737 12.1694 19.3217 12.4814 19.3217C12.7934 19.3217 13.0654 19.2737 13.2974 19.1777C13.5294 19.0737 13.7214 18.9057 13.8734 18.6737C14.0254 18.4337 14.1374 18.1217 14.2094 17.7377C14.2814 17.3457 14.3174 16.8577 14.3174 16.2737C14.3174 15.6897 14.2814 15.2057 14.2094 14.8217C14.1374 14.4297 14.0254 14.1177 13.8734 13.8857C13.7294 13.6457 13.5414 13.4777 13.3094 13.3817C13.0774 13.2777 12.8054 13.2257 12.4934 13.2257C12.1814 13.2257 11.9094 13.2777 11.6774 13.3817C11.4454 13.4777 11.2534 13.6457 11.1014 13.8857C10.9494 14.1177 10.8374 14.4297 10.7654 14.8217C10.6934 15.2057 10.6574 15.6897 10.6574 16.2737C10.6574 16.8577 10.6934 17.3457 10.7654 17.7377C10.8374 18.1217 10.9454 18.4337 11.0894 18.6737Z"
4297 fill="#008542"/>
4298 <path d="M23.1389 20.3897C22.8349 20.5017 22.4989 20.5937 22.1309 20.6657C21.7709 20.7457 21.3629 20.7857 20.9069 20.7857C20.2189 20.7857 19.6429 20.6897 19.1789 20.4977C18.7229 20.3057 18.3549 20.0257 18.0749 19.6577C17.7949 19.2817 17.5949 18.8177 17.4749 18.2657C17.3629 17.7137 17.3069 17.0777 17.3069 16.3577C17.3069 15.5977 17.3709 14.9297 17.4989 14.3537C17.6269 13.7777 17.8309 13.2977 18.1109 12.9137C18.3909 12.5297 18.7589 12.2417 19.2149 12.0497C19.6709 11.8577 20.2229 11.7617 20.8709 11.7617C21.3029 11.7617 21.6989 11.8017 22.0589 11.8817C22.4269 11.9537 22.7629 12.0457 23.0669 12.1577V13.3817C22.8029 13.3497 22.4949 13.3177 22.1429 13.2857C21.7989 13.2537 21.4829 13.2377 21.1949 13.2377C20.8029 13.2377 20.4709 13.2857 20.1989 13.3817C19.9349 13.4697 19.7189 13.6297 19.5509 13.8617C19.3829 14.0857 19.2629 14.3937 19.1909 14.7857C19.1189 15.1697 19.0829 15.6617 19.0829 16.2617C19.0829 16.8617 19.1189 17.3617 19.1909 17.7617C19.2709 18.1537 19.3949 18.4657 19.5629 18.6977C19.7389 18.9217 19.9669 19.0817 20.2469 19.1777C20.5269 19.2657 20.8709 19.3097 21.2789 19.3097C21.5989 19.3097 21.9309 19.2937 22.2749 19.2617C22.6189 19.2217 22.9069 19.1897 23.1389 19.1657V20.3897Z"
4299 fill="#008542"/>
4300 <path d="M6.08984 8.24516V1.60376C6.08984 1.44364 6.15211 1.29007 6.26294 1.17684C6.37377 1.06361 6.52408 1 6.68082 1H13.7725M13.7725 1L17.9094 5.22634M13.7725 1L13.7725 5.22634H17.9094M17.9094 5.22634V8.24516"
4301 stroke="#008542" stroke-width="1.5" stroke-linecap="round"
4302 stroke-linejoin="round"/>
4303 </svg>
4304 <#-- External link icon -->
4305 <#elseif link.iconType == "Opção43823553" >
4306 <svg width="24" height="24" viewBox="0 0 32 32" fill="none"
4307 xmlns="http://www.w3.org/2000/svg">
4308 <path opacity="0.98"
4309 d="M25.5 15.5001V26.5001C25.5 26.7653 25.3946 27.0197 25.2071 27.2072C25.0196 27.3947 24.7652 27.5001 24.5 27.5001L5.5 27.5001C5.23479 27.5001 4.98043 27.3947 4.79289 27.2072C4.60536 27.0197 4.5 26.7653 4.5 26.5001L4.5 7.50009C4.5 7.23488 4.60536 6.98052 4.79289 6.79299C4.98043 6.60545 5.23478 6.50009 5.5 6.50009L17 6.50009M20.4742 4.7124H27.8988M27.8988 4.7124V12.137M27.8988 4.7124L14.5 18.0001"
4310 stroke="#008542" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
4311 </svg>
4312 <#-- Internal page link icon -->
4313 <#elseif link.iconType == "Opção64212757" >
4314 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="#008542" viewBox="0 0 256 256">
4315 <path d="M137.54,186.36a8,8,0,0,1,0,11.31l-9.94,10A56,56,0,0,1,48.38,128.4L72.5,104.28A56,56,0,0,1,149.31,102a8,8,0,1,1-10.64,12,40,40,0,0,0-54.85,1.63L59.7,139.72a40,40,0,0,0,56.58,56.58l9.94-9.94A8,8,0,0,1,137.54,186.36Zm70.08-138a56.08,56.08,0,0,0-79.22,0l-9.94,9.95a8,8,0,0,0,11.32,11.31l9.94-9.94a40,40,0,0,1,56.58,56.58L172.18,140.4A40,40,0,0,1,117.33,142,8,8,0,1,0,106.69,154a56,56,0,0,0,76.81-2.26l24.12-24.12A56.08,56.08,0,0,0,207.62,48.38Z">
4316 </path>
4317 </svg>
4318 <#-- Download link icon -->
4319 <#elseif link.iconType == "Opção20766606" >
4320 <svg width="24" height="24" viewBox="0 0 32 32" fill="none"
4321 xmlns="http://www.w3.org/2000/svg">
4322 <path d="M10.75 13.75L16 19M16 19L21.25 13.75M16 19V5M27 19V26C27 26.2652 26.8946 26.5196 26.7071 26.7071C26.5196 26.8946 26.2652 27 26 27H6C5.73478 27 5.48043 26.8946 5.29289 26.7071C5.10536 26.5196 5 26.2652 5 26V19"
4323 stroke="#008542" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
4324 </svg>
4325 </#if>
4326<#if link.title?? && link.title?has_content>
4327 <a href="${linkUrl}" class="link ${linkClass}" target="${target}">${link.title}</a>
4328 </#if>
4329 </div>
4330 </#list>
4331 </div>
4332
4333 <script>
4334 var newsContent_code = document.querySelector(".news-content").innerHTML;
4335
4336 var linksIdentifiers = document.querySelector("#ptb-news__links-identifiers").innerHTML.trim().split(";");
4337 linksIdentifiers.forEach((linkIdentifier, index) => {
4338 const linkIdentifierContent = document.querySelector("#ptb-news__link-container-" + index);
4339 if (linkIdentifierContent) {
4340 const tag = "#[" + linkIdentifier.trim() + "]";
4341 const splitContent = newsContent_code.split(tag);
4342 newsContent_code = splitContent.join(linkIdentifierContent.innerHTML);
4343 //linkIdentifierContent.parentNode.removeChild(linkIdentifierContent);
4344 }
4345 });
4346
4347
4348 var ptb_news__read_content = document.querySelector(".news-content");
4349 ptb_news__read_content.innerHTML = newsContent_code;
4350
4351 const links_ptb_news = document.querySelectorAll(".news-content a");
4352 links_ptb_news.forEach((link) => {
4353 link.classList.add("link-ptb-news");
4354 });
4355
4356 </script>
4357
4358 <style>
4359 .ptb-news__read-news .ptb-news__link a {
4360 font-family: var(--font-family-base);
4361 font-style: var(--font-style-normal, normal);
4362 font-weight: var(--font-weight-bold, 700);
4363 font-size: var(--font-size-xxs, 16px);
4364 line-height: var(--line-height-xl, 160%);
4365 text-decoration-line: var(--text-decoration-underline, underline);
4366 color: #008542;
4367 }
4368
4369 body.high-contrast-active .ptb-news__read-news .ptb-news__link a {
4370 color: #E4F7E8;
4371 }
4372
4373 .ptb-news__read-news .news-content .link {
4374 font-family: var(--font-family-base);
4375 font-style: var(--font-style-normal, normal);
4376 font-weight: var(--font-weight-bold, 700);
4377 font-size: var(--font-size-xs, 18px);
4378 line-height: var(--line-height-xl, 160%);
4379
4380 text-decoration-line: var(--text-decoration-underline, underline);
4381 color: #008542;
4382 }
4383
4384 body.high-contrast-active .ptb-news__read-news .news-content .link {
4385 color: #E4F7E8;
4386 }
4387
4388 body.high-contrast-active .ptb-news__read-news .news-content svg path {
4389 stroke: var(--color-neutral-500, #D7D7D7);
4390 fill: rgba(255, 255, 255, 0.32);
4391 }
4392
4393 .ptb-news__read-news .news-content .ptb-link__wrapper {
4394 display: flex;
4395 flex-direction: column;
4396 gap: 0;
4397 margin-top: -24px;
4398 }
4399
4400 .ptb-news__read-news .news-content .ptb-link__wrapper svg {
4401 margin-right: var(--space-sm, 16px);
4402 }
4403
4404 .ptb-news__read-news .news-content .ptb-link__wrapper .first {
4405 gap: 0 !important;
4406 }
4407
4408 @media screen and (max-width: ${MAX_MOBILE_WIDTH}px) {
4409 .ptb-news__read-news .news-content .link {
4410 font-size: var(--font-size-xxs, 16px);
4411 }
4412 }
4413 </style>
4414 </#if>
4415</#macro>
4416
4417<#-- ################################################################################################################## -->
4418
4419<#-- ################################################################################################################## -->
4420
4421<#-- ############# Site de Crise - Notícia - Links do conteúdo da notícia ############################################# -->
4422<#macro renderCite>
4423 <div class="ptb-news__cite-container">
4424 <div class="ptb-news__cite-container-breakpoint breakpoint">
4425 <div class="ptb-news__cite-container-col col-1-12 md-col-1-8 sm-col-1-4">
4426 <div class="ptb-news__cite-title">
4427 <#if locale?lower_case == "pt_br">
4428 Notas
4429 <#else>
4430 Notes
4431 </#if>
4432 </div>
4433
4434 <div class="ptb-news__cites-elements">
4435 </div>
4436 </div>
4437 </div>
4438 </div>
4439
4440 <script>
4441 function positionCitesText(parentNodeCitesText) {
4442
4443 parentNodeCitesText.forEach((parentNodeCiteText)=>{
4444 if(window.innerWidth > 1024) {
4445 parentNodeCiteText.style.display="";
4446 parentNodeCiteText.style.gridColumnStart = "11";
4447 parentNodeCiteText.style.gridColumnEnd = "13";
4448 }
4449 else {
4450 parentNodeCiteText.style.display="none";
4451 parentNodeCiteText.style.gridColumnStart = "";
4452 parentNodeCiteText.style.gridColumnEnd = "";
4453 }
4454 });
4455 }
4456
4457 function addCitesTextMobile(citesText) {
4458 const citesContainer = document.querySelector(".ptb-news__read-news-post .ptb-news__cite-container .ptb-news__cite-container-col .ptb-news__cites-elements");
4459
4460 if(citesContainer.children.length === 0) {
4461 citesContainer && citesText.forEach((citeText)=>{
4462 citesContainer.appendChild(citeText.cloneNode(true));
4463 });
4464 }
4465 }
4466
4467 const citesText = document.querySelectorAll(".news-content cite");
4468
4469 if (citesText.length > 0) {
4470 const parentNodeCitesText = [...citesText].map((citeText)=>citeText.parentNode);
4471 positionCitesText(parentNodeCitesText);
4472 addCitesTextMobile(citesText);
4473 }
4474 else {
4475 const citesContainer = document.querySelector(".ptb-news__cite-container");
4476 citesContainer && (citesContainer.style.display="none");
4477 }
4478
4479 document.addEventListener('DOMContentLoaded', ()=>{
4480
4481 const citesText = document.querySelectorAll(".news-content cite");
4482
4483 if (citesText.length > 0) {
4484 const parentNodeCitesText = [...citesText].map((citeText)=>citeText.parentNode);
4485
4486 positionCitesText(parentNodeCitesText);
4487 addCitesTextMobile(citesText);
4488
4489 window.addEventListener('resize', ()=>{positionCitesText(parentNodeCitesText)});
4490 }
4491 else {
4492 const citesContainer = document.querySelector(".ptb-news__cite-container");
4493 citesContainer && (citesContainer.style.display="none");
4494 }
4495 });
4496
4497 </script>
4498
4499 <style>
4500
4501 .ptb-news__read-news-post cite {
4502 color: var(--color-neutral-800, #373737);
4503 font-family: var(--font-family-base);
4504 font-size: var(--font-size-xxxs, 14px) !important;
4505 font-style: var(--font-style-normal, normal);
4506 font-weight: var(--font-weight-regular, 400);
4507 line-height: var(--line-height-xl, 160%);
4508 }
4509
4510 .ptb-news__read-news-post cite a{
4511 font-size: var(--font-size-xxxs, 14px) !important;
4512 }
4513
4514 body.high-contrast-active .ptb-news__read-news-post cite {
4515 color: var(--text-primary-default, var(--color-neutral-100));
4516 }
4517
4518 .ptb-news__read-news-post .news-content cite,
4519 .ptb-news__read-news-post .ptb-news__cite-container cite {
4520 display: block;
4521 padding-left: var(--space-md);
4522 border-left: var(--border-width-hairline, 1px) solid var(--color-neutral-500, #D7D7D7);
4523 }
4524
4525 @media screen and (min-width: 1025px) {
4526 .ptb-news__read-news-post .ptb-news__cite-container {
4527 display: none;
4528 }
4529 }
4530
4531 @media screen and (max-width: 1025px) {
4532 .ptb-news__read-news .ptb-news__cite-container .link {
4533 text-decoration-line: var(--text-decoration-underline, underline);
4534 color: #008542;
4535 }
4536
4537 body.high-contrast-active .ptb-news__read-news .ptb-news__cite-container .link {
4538 color: #E4F7E8;
4539 }
4540
4541 body.high-contrast-active .ptb-news__read-news .ptb-news__cite-container svg path {
4542 stroke: var(--color-neutral-500, #D7D7D7);
4543 fill: rgba(255, 255, 255, 0.32);
4544 }
4545
4546 .ptb-news__read-news-post .ptb-news__cite-container {
4547 display: grid;
4548 background: var(--background-surface-level-03, #EEE);
4549 }
4550
4551 body.high-contrast-active .ptb-news__read-news-post .ptb-news__cite-container {
4552 background: var(--background-surface-level-03, #525252);
4553 }
4554
4555 .ptb-news__read-news-post .ptb-news__cite-container .ptb-news__cite-container-col {
4556 padding: var(--space-xxl) 0;
4557 display: flex;
4558 flex-direction: column;
4559 gap: var(--space-lg, 32px);
4560 }
4561
4562 .ptb-news__read-news-post .ptb-news__cite-container .ptb-news__cite-container-col .ptb-news__cites-elements {
4563 display: flex;
4564 flex-direction: column;
4565 gap: var(--space-lg, 32px);
4566 }
4567
4568 .ptb-news__read-news-post .ptb-news__cite-container .ptb-news__cite-container-col .ptb-news__cite-title {
4569 color: var(--color-neutral-800, #373737);
4570 font-size: var(--font-size-sm, 20px);
4571 font-style: var(--font-style-normal, normal);
4572 font-weight: var(--font-weight-bold, 700);
4573 line-height: var(--line-height-xl, 160%);
4574 }
4575
4576 body.high-contrast-active .ptb-news__read-news-post .ptb-news__cite-container .ptb-news__cite-container-col .ptb-news__cite-title {
4577 color: var(--text-primary-default, var(--color-neutral-100));
4578 }
4579 }
4580 </style>
4581
4582</#macro>
4583
4584<#-- ################################################################################################################## -->
4585
4586
4587<#-- ############# Site de Crise - Notícia - Galeria de imagens ####################################################### -->
4588<#macro renderGallery newsInfo>
4589 <#if newsInfo.galleryItems?size == 0>
4590 <#return />
4591 </#if>
4592
4593 <div class="gallery-breakpoint breakpoint">
4594 <div class="gallery col-3-11 md-col-1-8 sm-col-1-4">
4595
4596 <div class="title-container">
4597 <svg class="icon" viewBox="0 0 26 23" fill="none" xmlns="http://www.w3.org/2000/svg">
4598 <path d="M23 22H3C2.46957 22 1.96086 21.7893 1.58579 21.4142C1.21071 21.0391 1 20.5304 1 20V6C1 5.46957 1.21071 4.96086 1.58579 4.58579C1.96086 4.21071 2.46957 4 3 4H7L9 1H17L19 4H23C23.5304 4 24.0391 4.21071 24.4142 4.58579C24.7893 4.96086 25 5.46957 25 6V20C25 20.5304 24.7893 21.0391 24.4142 21.4142C24.0391 21.7893 23.5304 22 23 22Z"
4599 stroke="#525252" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
4600 <path d="M13 17C15.4853 17 17.5 14.9853 17.5 12.5C17.5 10.0147 15.4853 8 13 8C10.5147 8 8.5 10.0147 8.5 12.5C8.5 14.9853 10.5147 17 13 17Z"
4601 stroke="#525252" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
4602 </svg>
4603 <p class="title">
4604 <#if locale == "pt_BR"> Galeria de Imagens <#else > Image gallery </#if>
4605 </p>
4606 </div>
4607
4608 <div class="image-container">
4609 <#assign index = 0 />
4610 <#assign index = 0 />
4611 <#list newsInfo.galleryItems as gItem>
4612 <div class="modal-image-fragment" index="${index}">
4613 <div class="modal-image-container" index="${index}">
4614 <span class="click-image" ></span>
4615
4616 <div class="image-player-container">
4617 <span class="close-image">
4618 <svg width="44" height="44" viewBox="0 0 44 44" fill="none" xmlns="http://www.w3.org/2000/svg">
4619 <path d="M22 -9.61651e-07C34.1503 -4.30546e-07 44 9.84974 44 22C44 34.1503 34.1503 44 22 44C9.84973 44 -1.49276e-06 34.1503 -9.61651e-07 22C-4.30546e-07 9.84973 9.84974 -1.49276e-06 22 -9.61651e-07Z" fill="white"/>
4620 <path d="M26.5 26.5L17.5 17.5M17.5 26.5L26.5 17.5" stroke="#008542" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
4621 </svg>
4622 </span>
4623 <div class="image-player-session">
4624 <#-- Midias adaptativas de imagem para desktop e mobile -->
4625 <#assign fileDataRequest = restClient.get("/headless-delivery/v1.0/documents/${gItem.image.fileEntryId}") />
4626 <#assign urlAdaptativeMediaMobile = gItem.image.url/>
4627 <#assign urlAdaptativeMediaDesktop = gItem.image.url/>
4628
4629 <#if fileDataRequest?? && fileDataRequest.adaptedImages?? >
4630 <#assign dataAdaptativeMedia = fileDataRequest.adaptedImages />
4631 <#list dataAdaptativeMedia as data>
4632 <#if data.resolutionName == adaptativeMediaDesktopResolutionName>
4633 <#assign urlAdaptativeMediaDesktop = data.contentUrl/>
4634 </#if>
4635 <#if data.resolutionName == adaptativeMediaMobileResolutionName>
4636 <#assign urlAdaptativeMediaMobile = data.contentUrl/>
4637 </#if>
4638 </#list>
4639 </#if>
4640
4641 <picture>
4642 <source media="(max-width:767px)" srcset="${urlAdaptativeMediaMobile}" >
4643 <img width="274px" height="152px" loading="lazy" src="${urlAdaptativeMediaDesktop}" alt="${gItem.image.alt}"/>
4644 </picture>
4645 </div>
4646 </div>
4647 </div>
4648 </div>
4649 <#assign index = index + 1 />
4650 <#assign index = index + 1 />
4651 </#list>
4652 <div class="control-arrow left-arrow">
4653 <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
4654 <path d="M20 26L10 16L20 6" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
4655 </svg>
4656 </div>
4657 <div class="control-arrow right-arrow">
4658 <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
4659 <path d="M12 6L22 16L12 26" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
4660 </svg>
4661 </div>
4662 <div class="image-bullets">
4663 <#list 0..(newsInfo.galleryItems?size-1) as index>
4664 <div index="${index}" class="bullet"></div>
4665 </#list>
4666 </div>
4667 </div>
4668 <div class="control-arrow left-arrow">
4669 <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
4670 <path d="M20 26L10 16L20 6" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
4671 </svg>
4672 </div>
4673 <div class="control-arrow right-arrow">
4674 <svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
4675 <path d="M12 6L22 16L12 26" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
4676 </svg>
4677 </div>
4678 <div class="image-bullets">
4679 <#list 0..(newsInfo.galleryItems?size-1) as index>
4680 <div index="${index}" class="bullet"></div>
4681 </#list>
4682 </div>
4683 </div>
4684 </div>
4685 </div>
4686
4687 <style>
4688
4689 .ptb-news__read-news .gallery {
4690 padding-top: 42px;
4691 }
4692
4693 .ptb-news__read-news .gallery * {
4694 margin: 0;
4695 padding: 0;
4696 }
4697
4698 .ptb-news__read-news .gallery {
4699 display: flex;
4700 gap: var(--space-xl, 40px);
4701 flex-direction: column;
4702 }
4703
4704 .ptb-news__read-news .gallery .control-arrow {
4705 position: fixed;
4706 height: 100%;
4707 align-items: center;
4708 display: flex;
4709 justify-content: center;
4710 display: none;
4711 z-index: 9999;
4712 }
4713
4714 .ptb-news__read-news .gallery .control-arrow svg {
4715 cursor: pointer;
4716 }
4717
4718 .ptb-news__read-news .gallery .left-arrow {
4719 top: 0;
4720 left: 5vw;
4721 }
4722
4723 .ptb-news__read-news .gallery .right-arrow {
4724 top: 0;
4725 right: 5vw;
4726 }
4727
4728 .ptb-news__read-news .gallery .lefg-arrow svg {
4729 margin-left: 16px !important;
4730 }
4731
4732 .ptb-news__read-news .gallery .right-arrow svg {
4733 margin-right: 16px !important;
4734 }
4735
4736 .ptb-news__read-news .gallery .image-bullets {
4737 display: none;
4738 gap: var(--space-sm, 16px);
4739 position: fixed;
4740 left: 0;
4741 bottom: calc(10vh + 24px);
4742 width: 100vw;
4743 z-index: 9999;
4744 justify-content: center;
4745 }
4746
4747 .ptb-news__read-news .gallery .image-bullets .bullet {
4748 width: var(--size-xs, 16px);
4749 height: var(--size-xs, 16px);
4750 border-radius: 50%;
4751 border: 1px solid var(--color-neutral-100, #FFFFFF);
4752 z-index: 9999;
4753 cursor: pointer;
4754 }
4755
4756 .ptb-news__read-news .gallery .image-bullets .bullet.current-item {
4757 background: var(--color-neutral-100, #FFFFFF);
4758 }
4759
4760 .ptb-news__read-news .gallery .control-arrow {
4761 position: fixed;
4762 height: 100%;
4763 align-items: center;
4764 display: flex;
4765 justify-content: center;
4766 display: none;
4767 z-index: 9999;
4768 }
4769
4770 .ptb-news__read-news .gallery .left-arrow {
4771 top: 0;
4772 left: 5vw;
4773 }
4774
4775 .ptb-news__read-news .gallery .right-arrow {
4776 top: 0;
4777 right: 5vw;
4778 }
4779
4780 .ptb-news__read-news .gallery .lefg-arrow svg {
4781 margin-left: 16px !important;
4782 }
4783
4784 .ptb-news__read-news .gallery .right-arrow svg {
4785 margin-right: 16px !important;
4786 }
4787
4788 .ptb-news__read-news .gallery .image-bullets {
4789 display: none;
4790 gap: var(--space-sm, 16px);
4791 position: fixed;
4792 left: 0;
4793 bottom: calc(10vh + 24px);
4794 width: 100vw;
4795 z-index: 9999;
4796 justify-content: center;
4797 }
4798
4799 .ptb-news__read-news .gallery .image-bullets .bullet {
4800 width: var(--size-xs, 16px);
4801 height: var(--size-xs, 16px);
4802 border-radius: 50%;
4803 border: 1px solid var(--color-neutral-100, #FFFFFF);
4804 z-index: 9999;
4805 }
4806
4807 .ptb-news__read-news .gallery .image-bullets .bullet.current-item {
4808 background: var(--color-neutral-100, #FFFFFF);
4809 }
4810
4811 .ptb-news__read-news .gallery .title-container {
4812 display: flex;
4813 align-items: center;
4814 gap: var(--space-sm, 16px);
4815 }
4816
4817 .ptb-news__read-news .gallery .title-container svg {
4818 width: var(--size-md, 24px);
4819 height: 21px;
4820 }
4821
4822 .ptb-news__read-news .gallery .title-container .title {
4823 color: var(--color-neutral-800, #373737);
4824 font-family: var(--font-family-base);
4825 font-size: var(--font-size-lg);
4826 font-style: var(--font-style-normal);
4827 font-weight: var(--font-weight-bold);
4828 line-height: var(--line-height-md);
4829 }
4830
4831 body.high-contrast-active .ptb-news__read-news .gallery .title-container .title {
4832 color: var(--color-neutral-100);
4833 }
4834
4835 .ptb-news__read-news .gallery .image-container {
4836 display: flex;
4837 gap: var(--space-sm, 16px);
4838 flex-wrap: wrap;
4839 }
4840
4841 .ptb-news__read-news .gallery .image-container .modal-image-fragment {
4842 width: inherit;
4843 height: inherit;
4844 max-height: calc(100vw/2);
4845 padding: 0;
4846 margin: 0;
4847 overflow: hidden;
4848 }
4849
4850 .ptb-news__read-news .gallery .image-container .modal-image-fragment * {
4851 box-sizing: border-box;
4852 margin: 0;
4853 padding: 0;
4854 }
4855
4856 .ptb-news__read-news .gallery .image-container .modal-image-fragment .modal-image-container {
4857 width: 100%;
4858 height: inherit;
4859 display: flex;
4860 justify-content: center;
4861 align-items: center;
4862 position: relative;
4863 }
4864
4865 .ptb-news__read-news .gallery .image-container .modal-image-fragment .modal-image-container.image-playing {
4866 position: fixed;
4867 top: 0;
4868 left: 0;
4869 width: 100vw !important;
4870 height: 100vh !important;
4871 z-index: 9999 !important;
4872 background-color: rgba(0, 0, 0, 0.75);
4873 max-height: 100vh;
4874 }
4875
4876 .ptb-news__read-news .gallery .image-container .modal-image-fragment .modal-image-container .click-image {
4877 height: 100%;
4878 width: 100%;
4879 position: absolute;
4880 z-index: 3;
4881 cursor: pointer;
4882 }
4883
4884 .ptb-news__read-news .gallery .image-container .modal-image-fragment .modal-image-container .image-player-container {
4885 width: 100%;
4886 height: 100%;
4887 }
4888
4889 .ptb-news__read-news .gallery .image-container .modal-image-fragment .modal-image-container .image-player-container.image-playing {
4890 position: relative;
4891 width: 90vw !important;
4892 height: 80vh !important;
4893 z-index: 9999 !important;
4894 background-color: rgba(0, 0, 0, 0.75);
4895 border-radius: var(--border-radius-card);
4896 }
4897
4898 .ptb-news__read-news .gallery .image-container .modal-image-fragment .modal-image-container .image-player-container .close-image {
4899 display: none;
4900 position: absolute;
4901 top: 0;
4902 right: 0;
4903 transform: translate(100%, -100%);
4904 z-index: 99999;
4905 }
4906
4907 body.high-contrast-active .ptb-news__read-news .gallery .image-container .modal-image-fragment .modal-image-container .image-player-container .close-image path:nth-child(1) {
4908 fill: var(--background-Surface-level-01, #010101);
4909 }
4910
4911 body.high-contrast-active .ptb-news__read-news .gallery .image-container .modal-image-fragment .modal-image-container .image-player-container .close-image path:nth-child(2) {
4912 stroke: #E4F7E8;
4913 }
4914
4915 .ptb-news__read-news .gallery .image-container .modal-image-fragment .modal-image-container .image-player-container .close-image.image-active {
4916 display: block;
4917 }
4918
4919 .ptb-news__read-news .gallery .image-container .modal-image-fragment .modal-image-container .image-player-container .image-player-session {
4920 width: 100%;
4921 height: 100%;
4922 }
4923
4924 .ptb-news__read-news .gallery .image-container .modal-image-fragment .modal-image-container .image-player-container.image-playing .image-player-session {
4925 width: 90vw !important;
4926 height: 80vh !important;
4927 z-index: 9999 !important;
4928 background-color: rgba(0, 0, 0, 0.75);
4929 border-radius: var(--border-radius-card);
4930 overflow: hidden;
4931 }
4932
4933 .ptb-news__read-news .gallery .image-container .modal-image-fragment .modal-image-container .image-player-container .image-player-session img {
4934 object-fit: cover;
4935 }
4936
4937 .ptb-news__read-news .gallery .image-container .modal-image-fragment .modal-image-container .image-player-container.image-playing .image-player-session img {
4938 width: 100%;
4939 height: 100%;
4940 margin-left: 0 !important;
4941 max-height: 100vh;
4942 }
4943
4944 .ptb-news__read-news .gallery .image-container img {
4945 width: 274px;
4946 height: 152px;
4947 border-radius: var(--border-radius-md, 8px);
4948 }
4949
4950 @media screen and (max-width: ${MAX_MOBILE_WIDTH}px) {
4951
4952 .ptb-news__read-news .gallery {
4953 padding-top: var(--space-xl, 40px);
4954 }
4955
4956 .ptb-news__read-news .gallery .image-container {
4957 gap: var(--space-xxs, 8px);
4958 }
4959
4960 .ptb-news__read-news .gallery .image-container img {
4961 width: 296px;
4962 height: 180px;
4963 }
4964
4965 .ptb-news__read-news .gallery .image-container .modal-image-fragment .modal-image-container.image-playing .image-player-container.image-playing {
4966 transform: rotate(90deg);
4967 transform-origin: center;
4968 width: 80vh !important;
4969 height: 90vw !important;
4970 }
4971
4972 .ptb-news__read-news .gallery .image-container .modal-image-fragment .modal-image-container.image-playing .image-player-container.image-playing img{
4973 cursor: pointer;
4974 }
4975
4976 .ptb-news__read-news .gallery .image-container .modal-image-fragment .modal-image-container .image-player-container.image-playing .image-player-session {
4977 width: 80vh !important;
4978 height: 90vw !important;
4979 }
4980
4981 .ptb-news__read-news .gallery .lefg-arrow svg {
4982 margin-left: 4px !important;
4983 }
4984
4985 .ptb-news__read-news .gallery .right-arrow svg {
4986 margin-right: 4px !important;
4987 }
4988
4989 .ptb-news__read-news .gallery .image-bullets {
4990 gap: 14px;
4991 }
4992
4993 .ptb-news__read-news .gallery .image-bullets .bullet {
4994 width: var(--size-xxs, 12px);
4995 height: var(--size-xxs, 12px);
4996 }
4997
4998 .ptb-news__read-news .gallery .lefg-arrow svg {
4999 margin-left: 4px !important;
5000 }
5001
5002 .ptb-news__read-news .gallery .right-arrow svg {
5003 margin-right: 4px !important;
5004 }
5005
5006 .ptb-news__read-news .gallery .image-bullets {
5007 gap: 14px;
5008 }
5009
5010 .ptb-news__read-news .gallery .image-bullets .bullet {
5011 width: var(--size-xxs, 12px);
5012 height: var(--size-xxs, 12px);
5013 }
5014 }
5015
5016 </style>
5017
5018 <script>
5019
5020
5021 const allModalImagesFragment = document.querySelectorAll(".ptb-news__read-news .gallery .modal-image-fragment");
5022 const totalItems = allModalImagesFragment.length;
5023 const bulletsContainer = document.querySelector(".ptb-news__read-news .gallery .image-bullets");
5024 const bullets = bulletsContainer.querySelectorAll(".bullet");
5025 let currentItem = 0;
5026 const nextImage = document.querySelector(".ptb-news__read-news .gallery .right-arrow");
5027 const previousImage = document.querySelector(".ptb-news__read-news .gallery .left-arrow");
5028
5029 const stopImage = (getImageClick, imagePlayerContainer, imageContainer, closeImage) => {
5030 getImageClick.classList.remove('image-playing');
5031 imagePlayerContainer.classList.remove('image-playing');
5032 imageContainer.classList.remove('image-playing');
5033
5034 const currentBullet = document.querySelector('.ptb-news__read-news .gallery .image-bullets .bullet[index="' + currentItem + '"]')
5035 currentBullet && currentBullet.classList.remove('current-item');
5036
5037 closeImage.classList.remove('image-active');
5038
5039 document.querySelector("body").style.overflow = 'initial';
5040 [nextImage, previousImage].forEach(item => {
5041 item.style.display = "none";
5042 });
5043 bulletsContainer.style.display = "none";
5044 }
5045
5046 const playImage = (index, getImageClick, imagePlayerContainer, imageContainer, closeImage) => {
5047 getImageClick.classList.add('image-playing');
5048 imagePlayerContainer.classList.add('image-playing');
5049 imageContainer.classList.add('image-playing');
5050 closeImage.classList.add('image-active');
5051
5052
5053 document.querySelector("body").style.overflow = 'hidden';
5054 [nextImage, previousImage].forEach(item => {
5055 item.style.display = "flex";
5056 });
5057 bulletsContainer.style.display = "flex";
5058 bullets[index].classList.add('current-item');
5059 }
5060
5061 const changeImage = (next) => {
5062 if(next == currentItem || next < 0 || next >= totalItems) return;
5063
5064 const getImageClick = allModalImagesFragment[currentItem].querySelector('.click-image');
5065 const imageContainer = allModalImagesFragment[currentItem].querySelector('.modal-image-container');
5066 const imagePlayerContainer = allModalImagesFragment[currentItem].querySelector('.image-player-container');
5067 const image = imagePlayerContainer.querySelector('img');
5068 const closeImage = imagePlayerContainer.querySelector('.close-image');
5069
5070 const currentBullet = document.querySelector('.ptb-news__read-news .gallery .image-bullets .bullet[index="' + currentItem + '"]')
5071 currentBullet.classList.remove('current-item');
5072
5073 stopImage(getImageClick, imagePlayerContainer, imageContainer, closeImage);
5074 allModalImagesFragment[next].querySelector('.click-image')?.click();
5075
5076 const nextBullet = document.querySelector('.ptb-news__read-news .gallery .image-bullets .bullet[index="' + next + '"]')
5077 nextBullet.classList.add('current-item');
5078 currentItem = next;
5079 }
5080
5081 nextImage.addEventListener('click', () => {
5082 changeImage(currentItem + 1);
5083 });
5084
5085 previousImage.addEventListener('click', () => {
5086 changeImage(currentItem - 1);
5087 });
5088
5089 bullets.forEach((bullet, bulletIndex) => {
5090 bullet.addEventListener('click', (_) => changeImage(bulletIndex)) ;
5091 });
5092
5093 allModalImagesFragment.forEach((modalImageFragment, index)=>{
5094 const totalItems = allModalImagesFragment.length;
5095 const bulletsContainer = document.querySelector(".ptb-news__read-news .gallery .image-bullets");
5096 const bullets = bulletsContainer.querySelectorAll(".bullet");
5097 let currentItem = 0;
5098 const nextImage = document.querySelector(".ptb-news__read-news .gallery .right-arrow");
5099 const previousImage = document.querySelector(".ptb-news__read-news .gallery .left-arrow");
5100 });
5101
5102 allModalImagesFragment.forEach((modalImageFragment, index)=>{
5103 const getImageClick = modalImageFragment.querySelector('.click-image');
5104 const imageContainer = modalImageFragment.querySelector('.modal-image-container');
5105 const imagePlayerContainer = modalImageFragment.querySelector('.image-player-container');
5106
5107 const image = imagePlayerContainer.querySelector('img');
5108 const closeImage = imagePlayerContainer.querySelector('.close-image');
5109 const body = document.body;
5110
5111 const toTopButton = document.querySelector(".fragment_88038 .petro-button");
5112
5113 getImageClick.addEventListener('click', () => {
5114 if (document.body.classList.contains('has-edit-mode-menu')) {
5115 return;
5116 }
5117 currentItem = index;
5118 if (imagePlayerContainer.classList.contains('image-playing')) {
5119 toTopButton && (toTopButton.style.zIndex = "");
5120 stopImage(getImageClick, imagePlayerContainer, imageContainer, closeImage);
5121 } else {
5122 playImage(index, getImageClick, imagePlayerContainer, imageContainer, closeImage);
5123 toTopButton && (toTopButton.style.zIndex = "1");
5124 }
5125 })
5126
5127 closeImage.addEventListener('click', () => {
5128 if (imagePlayerContainer.classList.contains('image-playing')) {
5129 toTopButton && (toTopButton.style.zIndex = "");
5130 stopImage(getImageClick, imagePlayerContainer, imageContainer, closeImage);
5131 const bulletToClose = document.querySelector('.ptb-news__read-news .gallery .image-bullets .bullet[index="' + index + '"]')
5132 bulletToClose?.classList.remove('current-item');
5133 }
5134 })
5135 });
5136 </script>
5137
5138</#macro>
5139
5140
5141<#-- ################################################################################################################## -->
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155 <#-- ############# Site de Crise - Notícia - Galeria de imagens ####################################################### -->
5156<#macro renderQuotes newsInfo>
5157 <#if newsInfo.quotes?size != 0>
5158 <#--quotes "escondidas" que serão unidas a .ptb-news__read-content -->
5159
5160 <div class="ptb-news__quotes-container d-none ">
5161 <div id="ptb-news__quotes-identifiers">
5162 <#assign separator = "">
5163 <#list newsInfo.quotes as quote>
5164 ${quote.id};
5165 <#assign separator = ";">
5166 </#list>
5167 </div>
5168 <#list newsInfo.quotes as quote>
5169 <#assign quotes_index = quote?index>
5170 <div id="ptb-news__quotes-container-${quote_index}">
5171 <#assign noAuthorWrapper = !((quote.image.url?? && quote.image.url?has_content) || (quote.author?has_content)) />
5172 <div class="quote <#if noAuthorWrapper>no-author-wrapper</#if>">
5173 <div class="text-wrapper">
5174 <blockquote class="text">${quote.content}</blockquote >
5175 </div>
5176 <#if !noAuthorWrapper>
5177 <div class="author-wrapper">
5178 <#if quote.image.url?? && quote.image.url?has_content>
5179 <#assign imageUrl = "/o/adaptive-media/image/" + quote.image.fileEntryId +"/Thumbnail-300x300/image"/>
5180 <img src="${imageUrl}" loading="lazy" alt="${quote.image.alt}">
5181 </#if>
5182 <#if quote.author?? && quote?has_content>
5183 <p class="author">${quote.author}</p>
5184 </#if>
5185 </div>
5186 </#if>
5187 </div>
5188 </div>
5189 </#list>
5190 </div>
5191
5192 <script>
5193 var newsContent_code = document.querySelector(".news-content").innerHTML;
5194
5195 var quotesIdentifiers = document.querySelector("#ptb-news__quotes-identifiers").innerHTML.trim().split(";");
5196 quotesIdentifiers.forEach((quoteIdentifier, index) => {
5197 const quoteIdentifierContent = document.querySelector("#ptb-news__quotes-container-" + index);
5198 if (quoteIdentifierContent) {
5199 const tag = "#[" + quoteIdentifier.trim() + "]";
5200 const splitContent = newsContent_code.split(tag);
5201 newsContent_code = splitContent.join(quoteIdentifierContent.innerHTML);
5202 //linkIdentifierContent.parentNode.removeChild(linkIdentifierContent);
5203 }
5204 });
5205
5206
5207 var ptb_news__read_content = document.querySelector(".news-content");
5208 ptb_news__read_content.innerHTML = newsContent_code;
5209
5210 </script>
5211
5212 <style>
5213
5214 .ptb-news__read-news .quote {
5215 display: flex;
5216 flex-direction: column;
5217 gap: var(--space-md, 24px);
5218 }
5219
5220 .ptb-news__read-news .quote.no-author-wrapper{
5221 gap: 0;
5222 }
5223
5224 .ptb-news__read-news .quote .text-wrapper {
5225 padding-left: var(--space-xl, 40px);
5226 }
5227
5228 .ptb-news__read-news .quote .text-wrapper .text {
5229 font-style: var(--font-style-italic) !important;
5230 padding-left: var(--space-md, 24px);
5231 margin-bottom: 0;
5232 border-left: 1px solid var(--border-color-mid, #d7d7d7);
5233 font-size: var(--font-size-xxs, 16px);
5234 }
5235
5236 .ptb-news__read-news .quote .author-wrapper {
5237 display: flex;
5238 flex-direction: row;
5239 gap: var(--space-md, 24px);
5240 }
5241
5242 .ptb-news__read-news .news-content .quote .author-wrapper img {
5243 height: var(--size-xxxl, 56px);
5244 width: var(--size-xxxl, 56px);
5245 border-radius: 100px;
5246 border: var(--size-nano, 2px) solid var(--border-color-mid) !important;
5247 }
5248
5249 .ptb-news__read-news .news-content .quote .author-wrapper p {
5250 margin: 0;
5251 align-self: center;
5252 font-size: var(--font-size-xs, 18px);
5253 font-style: var(--font-style-normal, normal);
5254 font-weight: var(--font-weight-bold, 700);
5255 line-height: var(--line-height-xs, 100%);
5256 }
5257
5258 @media screen and (max-width: ${MAX_MOBILE_WIDTH}px) {
5259 .ptb-news__read-news .quote .text-wrapper {
5260 padding-left: 0;
5261 }
5262
5263 .ptb-news__read-news .quote .text-wrapper .text {
5264 font-size: var(--font-size-xxxs, 14px);
5265 }
5266
5267 .ptb-news__read-news .news-content .quote .author-wrapper p {
5268 font-size: var(--font-size-xxs, 16px);
5269 }
5270 }
5271 </style>
5272 </#if>
5273</#macro>
5274
5275
5276
5277
5278<#-- ################################################################################################################## -->
5279
5280
5281
5282
5283
5284
5285
5286
5287<#-- ############# Site de Crise - Notícia - Extrair dados de Notícias ################################################ -->
5288<#--
5289Add elements from the sidebar to define your template. Type "${" to use the
5290autocomplete feature.
5291-->
5292<#function extractFeaturedNewsHeadline fieldList xmlArticle>
5293 <#return getFieldValue(fieldList, xmlArticle, "Título de destaque da notícia")>
5294</#function>
5295
5296<#function extractNewsSummary fieldList xmlArticle>
5297 <#return getFieldValue(fieldList, xmlArticle, "Resumo da notícia")>
5298</#function>
5299
5300<#function extractPublishDate journalArticle>
5301 <#assign lastPublishDate = journalArticle.getModifiedDate()>
5302 <#if journalArticle.getLastPublishDate()??>
5303 <#assign lastPublishDate = journalArticle.getLastPublishDate()>
5304 <#else>
5305 <#assign lastPublishDate = journalArticle.getModifiedDate()>
5306 </#if>
5307 <#return lastPublishDate />
5308</#function>
5309
5310<#-- Seção da imagem de destaque ---------------------------------------------------------------------->
5311<#function extractNewsMedia fieldList xmlArticle fileEntryService>
5312 <#-- Tentando pegar Imagem -->
5313 <#assign mediasGroup = getNodes(getIdFromFieldName(fieldList, "Mídia de destaque da notícia"), xmlArticle) />
5314 <#assign media = {} />
5315 <#list mediasGroup as mediaGroup >
5316 <#assign media = getMediaInfo(fieldList, mediaGroup, "Imagem Destaque", fileEntryService) />
5317 <#assign media = {"imageSrc": media.url, "imageAlt": media.alt, "fileEntryId" : media.fileEntryId} />
5318
5319 <#-- Se não tiver imagem, tentar pegar vídeo -->
5320 <#if !media.imageSrc?has_content>
5321 <#assign youtubeID = getFieldValue(fieldList, mediaGroup, "ID do vídeo do YouTube do vídeo de destaque") />
5322 <#if youtubeID?? && youtubeID?has_content>
5323 <#assign media = {"videoYotubeID": youtubeID} />
5324 <#else>
5325 <#-- Tentar pegar vídeo Interno -->
5326 <#assign internalVideo = getMediaInfo(fieldList, mediaGroup, "Fazer upload de um vídeo de destaque", fileEntryService) />
5327 <#if internalVideo?? && internalVideo?has_content>
5328 <#assign media = {"internalVideo": internalVideo} />
5329 </#if>
5330 </#if>
5331 </#if>
5332
5333 <#assign referenceMediasGroup = getNodes(getIdFromFieldName(fieldList, "Referências"), mediaGroup) />
5334 <#list referenceMediasGroup as referenciaMediaGroup >
5335 <#assign credits = getFieldValue(fieldList, referenceMediasGroup, "Crédito da mídia de destaque da notícia") />
5336 <#assign legend = getFieldValue(fieldList, referenceMediasGroup, "Legenda da mídia de destaque da notícia") />
5337 </#list>
5338
5339 <#assign media = media + {"credits": credits, "legend": legend} />
5340
5341 </#list>
5342
5343 <#return media>
5344</#function>
5345
5346
5347<#--------------------- Renderização de Lista de Cards ----------------------------------------------->
5348
5349<#-- Root Css -> Para poder instanciar dois elementos e não dar confusão no JS -->
5350<#assign rootCss = "card-news-list-container_" + randomNumber(4586) />
5351
5352<#attempt>
5353 <#assign ourEnergyStyles = [] />
5354 <#list ourEnergyVocabulary.getCategories() as ourEnergyCategory >
5355 <#assign shadowColorCategory = "" />
5356 <#if (assetCategoryPropService.fetchCategoryProperty(ourEnergyCategory.getCategoryId(),"Cor da Sombra")??)>
5357 <#assign categoryShadowColorByService = assetCategoryPropService.fetchCategoryProperty(ourEnergyCategory.getCategoryId(),"Cor da Sombra") />
5358 <#assign shadowColorCategory = categoryShadowColorByService.value />
5359 </#if>
5360
5361 <#assign backgroundColorCategory = "" />
5362 <#if (assetCategoryPropService.fetchCategoryProperty(ourEnergyCategory.getCategoryId(),"Cor de Fundo")??)>
5363 <#assign categoryBackgroundColorByService = assetCategoryPropService.fetchCategoryProperty(ourEnergyCategory.getCategoryId(),"Cor de Fundo") />
5364 <#assign backgroundColorCategory = categoryBackgroundColorByService.value />
5365 </#if>
5366
5367 <#assign textColorCategory = "" />
5368 <#if (assetCategoryPropService.fetchCategoryProperty(ourEnergyCategory.getCategoryId(),"Cor do Texto")??)>
5369 <#assign categoryTextColorByService = assetCategoryPropService.fetchCategoryProperty(ourEnergyCategory.getCategoryId(),"Cor do Texto") />
5370 <#assign textColorCategory = categoryTextColorByService.value />
5371 </#if>
5372
5373 <#assign textColorHighContrastCategory = "" />
5374 <#if (assetCategoryPropService.fetchCategoryProperty(ourEnergyCategory.getCategoryId(),"Cor do Texto em Alto Contraste")??)>
5375 <#assign categoryTextColorHighContrastByService = assetCategoryPropService.fetchCategoryProperty(ourEnergyCategory.getCategoryId(),"Cor do Texto em Alto Contraste") />
5376 <#assign textColorHighContrastCategory = categoryTextColorHighContrastByService.value />
5377 </#if>
5378
5379 <#assign ourEnergyStyles += [{"titleLocale": ourEnergyCategory.getTitle(locale),"shadowColor": shadowColorCategory, "backgroundColor": backgroundColorCategory, "textColor": textColorCategory, "textColorHighContrast": textColorHighContrastCategory}] />
5380 </#list>
5381
5382 <#recover>
5383 <#assign ourEnergyStyles = [] />
5384
5385</#attempt>
5386
5387<#-- Função para obter a primeira categoria associonada a um Vocabulário o qual está associado a um Jornal Article -->
5388<#function getFirstCategoryTitleLocaleOfVocabulary journalArticle vocabulary >
5389 <#attempt>
5390 <#assign categories = assetCategoryLocalService.getCategories("com.liferay.journal.model.JournalArticle", journalArticle.getClassPK()) />
5391
5392 <#list categories as category>
5393 <#if vocabulary.getVocabularyId() == category.getVocabularyId()>
5394 <#return category.getTitle(locale)>
5395 </#if>
5396 </#list>
5397
5398 <#return "">
5399
5400 <#recover>
5401 <#return "" />
5402
5403 </#attempt>
5404</#function>
5405
5406<#-- Função para obter os dados de um card no Web Content (Journal Article) -->
5407<#function getDataForCard entry >
5408 <#attempt>
5409 <#assign journalArticle = journalArticleLocalService.getLatestArticle(entry.getClassPK()) />
5410 <#assign ddmStructure = journalArticle.getDDMStructure() />
5411 <#assign fieldList = getFieldListByStructure(ddmStructure) />
5412 <#assign xmlArticle = journalArticle.getDocument().getRootElement() />
5413
5414 <#-- Tentando pegar Imagem -->
5415 <#assign mediasGroup = getNodes(getIdFromFieldName(fieldList, "Mídia de destaque da notícia"), xmlArticle) />
5416 <#assign media = "" />
5417 <#list mediasGroup as mediaGroup >
5418 <#assign media = getMediaInfo(fieldList, mediaGroup, "Imagem Destaque", fileEntryService) />
5419
5420 <#assign fileDataRequest = restClient.get("/headless-delivery/v1.0/documents/${media.fileEntryId}") />
5421
5422 <#assign urlAdaptativeMediaDesktop = ""/>
5423 <#assign urlAdaptativeMediaMobile = ""/>
5424 <#if media.url?? && media.url?has_content && fileDataRequest?? && fileDataRequest.adaptedImages?? >
5425 <#assign dataAdaptativeMedia = fileDataRequest.adaptedImages />
5426 <#list dataAdaptativeMedia as data>
5427 <#if data.resolutionName == adaptativeMediaDesktopResolutionName>
5428 <#assign urlAdaptativeMediaDesktop = data.contentUrl/>
5429 </#if>
5430 <#if data.resolutionName == adaptativeMediaMobileResolutionName>
5431 <#assign urlAdaptativeMediaMobile = data.contentUrl/>
5432 </#if>
5433 </#list>
5434 </#if>
5435 <#assign media = {"imageSrc": media.url, "imageAlt": media.alt, "imageFileEntryId": media.fileEntryId, "urlAdaptativeMedia": {"mobile": urlAdaptativeMediaMobile, "desktop": urlAdaptativeMediaDesktop}} />
5436
5437 <#-- Se não tiver imagem, tentar pegar vídeo -->
5438 <#if !media.imageSrc?? || !media.imageSrc?has_content>
5439 <#assign youtubeID = getFieldValue(fieldList, mediaGroup, "ID do vídeo do YouTube do vídeo de destaque") />
5440 <#if youtubeID?? && youtubeID?has_content>
5441 <#assign media = {"videoYotubeID": youtubeID} />
5442 <#else>
5443 <#-- Tentar pegar vídeo Interno -->
5444 <#assign internalVideo = getMediaInfo(fieldList, mediaGroup, "Fazer upload de um vídeo de destaque", fileEntryService) />
5445 <#if internalVideo?? && internalVideo?has_content>
5446 <#assign media = {"internalVideo": internalVideo} />
5447 </#if>
5448 </#if>
5449 </#if>
5450 </#list>
5451
5452 <#assign title = getFieldValue(fieldList, xmlArticle, "Título de destaque da notícia") />
5453
5454 <#assign timeRead = getFieldValue(fieldList, xmlArticle, "Tempo de Leitura") />
5455
5456 <#assign ourEnergyCategory = getFirstCategoryTitleLocaleOfVocabulary(entry, ourEnergyVocabulary) />
5457
5458 <#assign typeOfNews = getFirstCategoryTitleLocaleOfVocabulary(entry, typeOfNewsVocabulary) />
5459
5460 <#if themeDisplay.getPortalURL()?contains("webserver")>
5461 <#assign urlNews = themeDisplay.getPortalURL() + themeDisplay.getPathFriendlyURLPublic() + layout.getGroup().friendlyURL + "/w/" + journalArticle.getUrlTitle()>
5462 <#else>
5463 <#assign urlNews = themeDisplay.getPortalURL() + "/w/" + journalArticle.getUrlTitle()>
5464 </#if>
5465
5466 <#assign cardData = {"media": media, "title": title, "timeRead": timeRead, "ourEnergyCategory": ourEnergyCategory, "typeOfNews": typeOfNews, "urlNews": urlNews} />
5467
5468 <#return cardData>
5469
5470 <#recover>
5471 <#return {} />
5472 </#attempt>
5473
5474 <#-- cardData -> image: url, alt
5475 title
5476 timeRead
5477 ourEnergyCategory
5478 typeOfNews
5479 urlNews
5480 -->
5481</#function>
5482
5483
5484<#-- Macro para renderizar os arrows-->
5485<#macro renderArrows>
5486 <div class="card-news-list-arrows-breakpoint">
5487 <div class="card-news-list-arrows">
5488 <div class="card-news-arrow-left arrow-disable">
5489 <svg width="34" height="34" viewBox="0 0 34 34" fill="none" xmlns="http://www.w3.org/2000/svg">
5490 <path d="M1 17C1 8.16344 8.16344 1 17 1C25.8366 1 33 8.16344 33 17C33 25.8366 25.8366 33 17 33C8.16344 33 1 25.8366 1 17Z" stroke="#959595"/>
5491 <path d="M22.5 17H11.5M11.5 17L16 12.5M11.5 17L16 21.5" stroke="#525252" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
5492 </svg>
5493 </div>
5494 <div class="card-news-arrow-right">
5495 <svg width="34" height="34" viewBox="0 0 34 34" fill="none" xmlns="http://www.w3.org/2000/svg">
5496 <path d="M1 17C1 8.16344 8.16344 1 17 1C25.8366 1 33 8.16344 33 17C33 25.8366 25.8366 33 17 33C8.16344 33 1 25.8366 1 17Z" stroke="#008542"/>
5497 <path d="M11.5 17H22.5M22.5 17L18 12.5M22.5 17L18 21.5" stroke="#008542" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
5498 </svg>
5499
5500 </div>
5501 </div>
5502 </div>
5503
5504 <style>
5505
5506 .${rootCss} .card-news-list-arrows-breakpoint {
5507 position: relative;
5508 z-index: 1;
5509 width: 100%;
5510 }
5511
5512 .${rootCss} .card-news-list-arrows-breakpoint .card-news-list-arrows {
5513 display: flex;
5514 align-items: flex-start;
5515 justify-self: flex-end;
5516 gap: var(--space-xxs, 8px);
5517 }
5518
5519 .${rootCss} .card-news-list-arrows-breakpoint .card-news-list-arrows .card-news-arrow-left,
5520 .${rootCss} .card-news-list-arrows-breakpoint .card-news-list-arrows .card-news-arrow-right {
5521 cursor: pointer;
5522 }
5523
5524 .${rootCss} .card-news-list-arrows-breakpoint .card-news-list-arrows .card-news-arrow-left:not(.arrow-disable):hover path:nth-child(1),
5525 .${rootCss} .card-news-list-arrows-breakpoint .card-news-list-arrows .card-news-arrow-right:not(.arrow-disable):hover path:nth-child(1) {
5526 fill: rgb(0, 133, 66);
5527 }
5528
5529 body.high-contrast-active .${rootCss} .card-news-list-arrows-breakpoint .card-news-list-arrows .card-news-arrow-left:not(.arrow-disable):hover path:nth-child(1),
5530 body.high-contrast-active .${rootCss} .card-news-list-arrows-breakpoint .card-news-list-arrows .card-news-arrow-right:not(.arrow-disable):hover path:nth-child(1) {
5531 fill: white;
5532 }
5533
5534 .${rootCss} .card-news-list-arrows-breakpoint .card-news-list-arrows .card-news-arrow-left:not(.arrow-disable):hover path:nth-child(2),
5535 .${rootCss} .card-news-list-arrows-breakpoint .card-news-list-arrows .card-news-arrow-right:not(.arrow-disable):hover path:nth-child(2) {
5536 stroke: #fff;
5537 }
5538
5539 body.high-contrast-active .${rootCss} .card-news-list-arrows-breakpoint .card-news-list-arrows .card-news-arrow-left:not(.arrow-disable):hover path:nth-child(2),
5540 body.high-contrast-active .${rootCss} .card-news-list-arrows-breakpoint .card-news-list-arrows .card-news-arrow-right:not(.arrow-disable):hover path:nth-child(2) {
5541 stroke: #010101;
5542 }
5543
5544 .${rootCss} .card-news-list-arrows-breakpoint .card-news-list-arrows .card-news-arrow-left.arrow-disable,
5545 .${rootCss} .card-news-list-arrows-breakpoint .card-news-list-arrows .card-news-arrow-right.arrow-disable {
5546 opacity: 0.4;
5547 cursor: auto;
5548 }
5549
5550 .${rootCss} .card-news-list-arrows-breakpoint .card-news-list-arrows .card-news-arrow-left path,
5551 .${rootCss} .card-news-list-arrows-breakpoint .card-news-list-arrows .card-news-arrow-right path {
5552 stroke: rgb(0, 133, 66);
5553 transition: all 300ms ease-in-out;
5554 }
5555
5556 body.high-contrast-active .${rootCss} .card-news-list-arrows-breakpoint .card-news-list-arrows .card-news-arrow-left path,
5557 body.high-contrast-active .${rootCss} .card-news-list-arrows-breakpoint .card-news-list-arrows .card-news-arrow-right path {
5558 stroke: rgba(228, 247, 232, 1);
5559 }
5560
5561 .${rootCss} .card-news-list-arrows-breakpoint .card-news-list-arrows .card-news-arrow-left.arrow-disable path:nth-child(1),
5562 .${rootCss} .card-news-list-arrows-breakpoint .card-news-list-arrows .card-news-arrow-right.arrow-disable path:nth-child(1) {
5563 stroke: rgb(149, 149, 149);
5564 }
5565
5566 body.high-contrast-active .${rootCss} .card-news-list-arrows-breakpoint .card-news-list-arrows .card-news-arrow-left.arrow-disable path:nth-child(1),
5567 body.high-contrast-active .${rootCss} .card-news-list-arrows-breakpoint .card-news-list-arrows .card-news-arrow-right.arrow-disable path:nth-child(1) {
5568 stroke: rgba(215, 215, 215, 1);
5569 }
5570
5571 .${rootCss} .card-news-list-arrows-breakpoint .card-news-list-arrows .card-news-arrow-left.arrow-disable path:nth-child(2),
5572 .${rootCss} .card-news-list-arrows-breakpoint .card-news-list-arrows .card-news-arrow-right.arrow-disable path:nth-child(2) {
5573 stroke: rgb(82, 82, 82);
5574 }
5575
5576 body.high-contrast-active .${rootCss} .card-news-list-arrows-breakpoint .card-news-list-arrows .card-news-arrow-left.arrow-disable path:nth-child(2),
5577 body.high-contrast-active .${rootCss} .card-news-list-arrows-breakpoint .card-news-list-arrows .card-news-arrow-right.arrow-disable path:nth-child(2) {
5578 stroke: rgba(149, 149, 149, 1);
5579 }
5580
5581 @media screen and (min-width: 1440px) {
5582 .${rootCss} .card-news-list-arrows-breakpoint {
5583 width: 100%;
5584 }
5585 }
5586
5587 @media screen and (max-width: ${MAX_MOBILE_WIDTH}px) {
5588
5589 .${rootCss} .card-news-list-arrows-breakpoint .card-news-list-arrows {
5590 justify-self: flex-start;
5591 margin-top: var(--space-lg);
5592 }
5593 }
5594
5595 </style>
5596
5597</#macro>
5598
5599
5600<#-- Macro para renderizar um Card -->
5601<#macro renderCard cardData>
5602 <#-- cardData -> image: url, alt
5603 title
5604 timeRead
5605 ourEnergyCategory
5606 typeOfNews
5607 urlNews
5608 -->
5609
5610 <div class="card-news-container">
5611 <a class="news-page-see-more-link card-news-link" href="${cardData.urlNews}"> Link da Notícia ${cardData.title} </a>
5612 <div class="card-news-thumb">
5613 <#assign noImage = "" />
5614 <#if cardData.media.imageSrc?? && cardData.media.imageSrc?has_content>
5615 <#assign imageSrcDesktop = cardData.media.imageSrc />
5616 <#assign imageSrcMobile = cardData.media.imageSrc />
5617 <#if cardData.media.urlAdaptativeMedia?? && cardData.media.urlAdaptativeMedia?has_content>
5618 <#assign imageSrcDesktop = cardData.media.urlAdaptativeMedia.desktop />
5619 <#assign imageSrcMobile = cardData.media.urlAdaptativeMedia.mobile />
5620 </#if>
5621 <picture>
5622 <source media="(max-width:767px)" srcset="${imageSrcMobile}">
5623 <img class="card-news-image" loading="lazy" src="${imageSrcDesktop}" alt="${cardData.media.imageAlt}"/>
5624 </picture>
5625 <#else>
5626 <#if cardData.media.videoYotubeID?? && cardData.media.videoYotubeID?has_content>
5627 <picture>
5628 <source media="(max-width:767px)" srcset="https://img.youtube.com/vi/${cardData.media.videoYotubeID}/mqdefault.jpg">
5629 <img class="card-news-image" loading="lazy" src="https://img.youtube.com/vi/${cardData.media.videoYotubeID}/maxresdefault.jpg" alt="YouTube Thumbnail"/>
5630 </picture>
5631 <#else>
5632 <#if (cardData.media.internalVideo?? && cardData.media.internalVideo.url?has_content) >
5633 <video class="card-news-image" loading="lazy">
5634 <source src="${cardData.media.internalVideo.url}">
5635 Your browser does not support the video tag.
5636 </video>
5637 <#else>
5638 <#assign noImage = "no-image" />
5639 </#if>
5640 </#if>
5641 <svg class="thumb-play-icon" width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
5642 <path d="M0 16C0 7.16344 7.16344 0 16 0C24.8366 0 32 7.16344 32 16C32 24.8366 24.8366 32 16 32C7.16344 32 0 24.8366 0 16Z" fill="white" fill-opacity="0.8"/>
5643 <path d="M22.2563 15.5744L13.2625 10.0744C13.1868 10.0277 13.1 10.0021 13.0111 10.0001C12.9221 9.99816 12.8343 10.02 12.7566 10.0633C12.6789 10.1066 12.6141 10.1698 12.569 10.2465C12.5239 10.3232 12.5001 10.4105 12.5 10.4994V21.4994C12.5001 21.5884 12.5239 21.6757 12.569 21.7524C12.6141 21.8291 12.6789 21.8923 12.7566 21.9356C12.8343 21.9789 12.9221 22.0007 13.0111 21.9988C13.1 21.9968 13.1868 21.9712 13.2625 21.9244L22.2563 16.4244C22.3301 16.3808 22.3913 16.3186 22.4338 16.2441C22.4763 16.1696 22.4987 16.0852 22.4987 15.9994C22.4987 15.9137 22.4763 15.8293 22.4338 15.7548C22.3913 15.6803 22.3301 15.6181 22.2563 15.5744Z" fill="#008542"/>
5644 </svg>
5645 </#if>
5646 </div>
5647
5648 <div class="card-news-category-container ${noImage}">
5649 <div data-category="${cardData.ourEnergyCategory}" class="card-news-category paragraph-micro-regular"> ${cardData.ourEnergyCategory} </div>
5650 </div>
5651
5652 <div class="card-news-text-content ${noImage}">
5653 <div class="card-news-title h5"> ${cardData.title} </div>
5654
5655 <div class="card-news-info">
5656 <div class="card-news-type">
5657 <#if getPostTypeImageUrl(POST_TYPES_CATEGORIES, (cardData.typeOfNews)!default(""))?? >
5658 <#assign postTypeIconUrl = getPostTypeImageUrl(POST_TYPES_CATEGORIES, (cardData.typeOfNews)!default("")) />
5659 <img src="${postTypeIconUrl}" loading="lazy" alt="post type icon" />
5660 <div class="card-news-type-text paragraph-micro-regular">${cardData.typeOfNews}</div>
5661 <#else/>
5662 <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
5663 <path d="M6.25 7.5H13.75M6.25 10H13.75M6.25 12.5H13.75M3.125 3.75H16.875C17.2202 3.75 17.5 4.02982 17.5 4.375V15.625C17.5 15.9702 17.2202 16.25 16.875 16.25H3.125C2.77982 16.25 2.5 15.9702 2.5 15.625V4.375C2.5 4.02982 2.77982 3.75 3.125 3.75Z" stroke="#959595" stroke-linecap="round" stroke-linejoin="round"/>
5664 </svg>
5665 <div class="card-news-type-text paragraph-micro-regular">Artigo</div>
5666 </#if>
5667 </div>
5668
5669 <#if cardData.timeRead?? && cardData.timeRead?has_content>
5670 <div class="card-news-time-read">
5671 <svg class="card-news-icon-time-read" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
5672 <path d="M10.5 5.625C10.5 5.34886 10.2761 5.125 10 5.125C9.72386 5.125 9.5 5.34886 9.5 5.625H10.5ZM10 10H9.5C9.5 10.2761 9.72386 10.5 10 10.5V10ZM14.375 10.5C14.6511 10.5 14.875 10.2761 14.875 10C14.875 9.72386 14.6511 9.5 14.375 9.5V10.5ZM17 10C17 13.866 13.866 17 10 17V18C14.4183 18 18 14.4183 18 10H17ZM10 17C6.13401 17 3 13.866 3 10H2C2 14.4183 5.58172 18 10 18V17ZM3 10C3 6.13401 6.13401 3 10 3V2C5.58172 2 2 5.58172 2 10H3ZM10 3C13.866 3 17 6.13401 17 10H18C18 5.58172 14.4183 2 10 2V3ZM9.5 5.625V10H10.5V5.625H9.5ZM10 10.5H14.375V9.5H10V10.5Z" fill="#959595"/>
5673 </svg>
5674
5675 <div class="card-news-time-read-text paragraph-micro-regular">${cardData.timeRead} min</div>
5676 </div>
5677 </#if>
5678 </div>
5679 </div>
5680 </div>
5681</#macro>
5682
5683<style>
5684 .${rootCss} .card-news-container {
5685 width: 300px;
5686 height: 370px;
5687 display: flex;
5688 flex-direction: column;
5689 flex-shrink: 0;
5690 align-items: flex-start;
5691 border-radius: var(--border-radius-lg);
5692 border: var(--border-width-hairline) solid var(--border-card-default, #EEE);
5693 background: var(--background-surface-level-01, #FFF);
5694 box-shadow: 0px 12px 60px -10px rgba(145, 147, 149, 0.12);
5695 overflow: hidden;
5696 scroll-snap-align: start;
5697 cursor: pointer;
5698 transition: border 300ms ease-in-out;
5699 text-decoration: none;
5700 position: relative;
5701 }
5702
5703 body.high-contrast-active .${rootCss} .card-news-container {
5704 border: var(--border-width-hairline) solid var(--border-card-default, #525252);
5705 background: var(--background-surface-level-01, #010101);
5706 }
5707
5708 .${rootCss} .card-news-container:hover {
5709 border: var(--border-width-hairline) solid rgb(0, 133, 66);
5710 }
5711
5712 body.high-contrast-active .${rootCss} .card-news-container:hover {
5713 border: var(--border-width-hairline) solid var(--border-card-default, #E4F7E8);
5714 }
5715
5716 .${rootCss} .card-news-container .card-news-link {
5717 position: absolute;
5718 top: 0;
5719 width: 100%;
5720 height: 100%;
5721 z-index: 1;
5722 opacity: 0;
5723 }
5724
5725 .${rootCss} .card-news-container .card-news-thumb {
5726 position: relative;
5727 }
5728
5729 .${rootCss} .card-news-container .card-news-image {
5730 width: 298px;
5731 height: 168px;
5732 object-fit: cover;
5733 }
5734
5735
5736 .${rootCss} .card-news-container .card-news-thumb .thumb-play-icon {
5737 position: absolute;
5738 left: 50%;
5739 top: 50%;
5740 transform: translate(-50%, -50%);
5741 }
5742
5743 body.high-contrast-active .${rootCss} .card-news-container .card-news-thumb .thumb-play-icon path:nth-child(1) {
5744 fill: black;
5745 }
5746
5747 body.high-contrast-active .${rootCss} .card-news-container .card-news-thumb .thumb-play-icon path:nth-child(2) {
5748 fill: white;
5749 }
5750
5751 .${rootCss} .card-news-container .card-news-category-container {
5752 position: relative;
5753 }
5754
5755 .${rootCss} .card-news-container .card-news-category-container .card-news-category {
5756 display: flex;
5757 justify-content: center;
5758 align-items: center;
5759 padding: var(--space-micro) var(--space-xs);
5760 position: absolute;
5761 z-index: 2;
5762 left: var(--space-md);
5763 top: -13px;
5764 border-radius: var(--border-radius-pill);
5765 background: linear-gradient(0deg, var(--background-surface-opacity-light-level-07, rgba(255, 255, 255, 0.96)) 0%, var(--background-surface-opacity-light-level-07, rgba(255, 255, 255, 0.96)) 100%), var(--default-sup-green-water, #006B65);
5766 box-shadow: 0px 2px 6px 0px rgba(0, 178, 169, 0.10);
5767 line-height: var(--line-height-lg, 144%);
5768 color: var(--default-sup-green-water, #006B65);
5769 white-space: nowrap;
5770 }
5771
5772 body.high-contrast-active .${rootCss} .card-news-container .card-news-category-container .card-news-category {
5773 background: linear-gradient(0deg, var(--background-surface-opacity-light-level-07, #373737) 0%, var(--background-surface-opacity-light-level-07, #373737) 100%), var(--default-sup-green-water, #99E0DD);
5774 color: var(--default-sup-green-water, #99E0DD);
5775 }
5776
5777 .${rootCss} .card-news-container .card-news-category-container.no-image .card-news-category {
5778 position: relative;
5779 top: 0;
5780 left: 0;
5781 margin-left: var(--space-md);
5782 margin-top: var(--space-md);
5783 }
5784
5785 .${rootCss} .card-news-container .card-news-text-content {
5786 display: flex;
5787 padding: var(--space-lg, 32px) var(--space-md, 24px) var(--space-md, 24px) var(--space-md, 24px);
5788 flex-direction: column;
5789 justify-content: space-between;
5790 align-items: flex-start;
5791 flex: 1 0 0;
5792 align-self: stretch;
5793 }
5794
5795 .${rootCss} .card-news-container .card-news-text-content.no-image {
5796 padding-top: var(--space-sm);
5797 }
5798
5799 .${rootCss} .card-news-container .card-news-text-content .card-news-title {
5800 display: -webkit-box;
5801 -webkit-box-orient: vertical;
5802 -webkit-line-clamp: 4;
5803 align-self: stretch;
5804 overflow: hidden;
5805 color: var(--text-primary-default, #373737);
5806 text-overflow: ellipsis;
5807 margin: 0;
5808 }
5809
5810 body.high-contrast-active .${rootCss} .card-news-container .card-news-text-content .card-news-title {
5811 color: var(--text-primary-default, #FFF);
5812 }
5813
5814 .${rootCss} .card-news-container .card-news-text-content .card-news-info {
5815 display: flex;
5816 align-items: center;
5817 align-content: center;
5818 gap: var(--space-sm, 16px);
5819 align-self: stretch;
5820 flex-wrap: wrap;
5821 }
5822
5823 .${rootCss} .card-news-container .card-news-text-content .card-news-info .card-news-type,
5824 .${rootCss} .card-news-container .card-news-text-content .card-news-info .card-news-time-read {
5825 display: flex;
5826 align-items: center;
5827 gap: var(--space-xxs, 8px);
5828 }
5829
5830 body.high-contrast-active .${rootCss} .card-news-container .card-news-text-content .card-news-info .card-news-type path {
5831 stroke: #D7D7D7;
5832 }
5833
5834 .${rootCss} .card-news-container .card-news-text-content .card-news-info .card-news-type .card-news-type-text,
5835 .${rootCss} .card-news-container .card-news-text-content .card-news-info .card-news-time-read .card-news-time-read-text {
5836 color: var(--text-tertiary-default, #959595);
5837 line-height: var(--line-height-lg, 144%);
5838 }
5839
5840 body.high-contrast-active .${rootCss} .card-news-container .card-news-text-content .card-news-info .card-news-type .card-news-type-text,
5841 body.high-contrast-active .${rootCss} .card-news-container .card-news-text-content .card-news-info .card-news-time-read .card-news-time-read-text {
5842 color: var(--text-tertiary-default, #EEE);
5843 }
5844
5845 .${rootCss} .card-news-container .card-news-text-content .card-news-info .card-news-time-read .card-news-icon-time-read {
5846 transform: translateY(-0.5px);
5847 }
5848
5849 body.high-contrast-active .${rootCss} .card-news-container .card-news-text-content .card-news-info .card-news-time-read .card-news-icon-time-read path {
5850 fill: #D7D7D7;
5851 }
5852</style>
5853
5854<#assign maxNumberOfCards = 9/>
5855<#assign className = "com.liferay.journal.model.JournalArticle" />
5856<#assign classNameId = PortalUtil.getClassNameId(className) />
5857${AssetEntryQuery.setClassNameIds([classNameId]) }
5858${AssetEntryQuery.setEnd(maxNumberOfCards)}
5859
5860<#assign entries = []/>
5861<#assign ourEnergyCategoriesIds = getAllCategoryIdOfVocabulary(assetEntry, ourEnergyVocabulary) />
5862<#list ourEnergyCategoriesIds as ourEnergyCategoryId>
5863 ${AssetEntryQuery.setAllCategoryIds([ourEnergyCategoryId])}
5864 <#assign ents = AssetEntryQueryService.getEntries(AssetEntryQuery) />
5865 <#assign entries = entries + ents />
5866</#list>
5867
5868
5869<#-- Renderizar Lista de cards -->
5870<#if entries?has_content>
5871 <div class="${rootCss}">
5872 <div class="list-of-news-title breakpoint">
5873 <div class="list-of-news-title-col col-1-12 md-col-1-8 sm-col-1-4">
5874 <div class="list-title fragment_85017">
5875 <div class="petro-title">
5876 <h2 id="title" class="display-sm" style="color: var(--color-neutral-800)">
5877 <#if locale?lower_case == "pt_br"> Leia também <#else> Read also </#if>
5878 </h2>
5879 <div class="yellow-bar-container">
5880 <div class="yellow-bar bar-display-sm" style="background-color: var(--color-secondary-medium)"></div>
5881 <@renderArrows />
5882 </div>
5883 </div>
5884 </div>
5885 </div>
5886 </div>
5887
5888 <div class="card-news-list-breakpoint breakpoint">
5889 <div class="card-news-list col-1-12 md-col-1-8 sm-col-1-4">
5890 <#if entries?size gt maxNumberOfCards>
5891 <#assign entries = entries[0..maxNumberOfCards] />
5892 </#if>
5893 <#list entries as entry>
5894 <#if assetEntry.getClassPK() != entry.getClassPK() >
5895 <#assign cardData = getDataForCard(entry) />
5896 <@renderCard cardData/>
5897 </#if>
5898 </#list>
5899 </div>
5900 </div>
5901 </div>
5902</#if>
5903
5904
5905<style>
5906 .portlet {
5907 margin: 0;
5908 }
5909
5910 .${rootCss} {
5911 padding: var(--space-giant, 80px) 0;
5912 background: var(--background-surface-level-01, #FFF);
5913 width: 100%;
5914 position: relative;
5915 font-family: var(--font-family-base, "Petrobras Sans");
5916 display: flex;
5917 flex-direction: column;
5918 gap: var(--space-lg);
5919 }
5920
5921 body.high-contrast-active .${rootCss} {
5922 background: var(--background-surface-level-01, #010101);
5923 }
5924
5925 .${rootCss} .list-of-news-title {
5926 position: relative;
5927 z-index: 1;
5928 }
5929
5930 .${rootCss} body.high-contrast-active .fragment_614685 .petro-title .yellow-bar {
5931 background-color: #FFEEB3 !important;
5932 }
5933
5934 .${rootCss} .petro-title > div:has(> .yellow-bar, > .card-news-list-arrows-breakpoint) {
5935 display: flex;
5936 }
5937
5938 .${rootCss} .card-news-list {
5939 display: flex;
5940 gap: var(--space-lg);
5941 overflow: auto;
5942 position: relative;
5943 z-index: 1;
5944 scroll-snap-type: x mandatory;
5945 scrollbar-width: none;
5946 }
5947
5948 .${rootCss} .card-news-list::-webkit-scrollbar {
5949 display: none;
5950 }
5951
5952 @media screen and (min-width: 1441px) {
5953 .${rootCss} .card-news-list-breakpoint {
5954 width: 100%;
5955 }
5956
5957 .${rootCss} .list-of-news-title {
5958 width: 100%;
5959 }
5960 }
5961
5962 @media screen and (max-width: 1024px) {
5963 .${rootCss} .fragment_614685 {
5964 padding: var(--space-xxl, 56px) 0;
5965 }
5966 }
5967
5968 @media screen and (max-width: 768px) {
5969 .${rootCss} .petro-title > div:has(> .yellow-bar, > .card-news-list-arrows-breakpoint) {
5970 flex-direction: column;
5971 }
5972 }
5973
5974
5975</style>
5976
5977<#list ourEnergyStyles as ourEnergyStyle>
5978 <style>
5979 .${rootCss} [data-category="${ourEnergyStyle.titleLocale}"] {
5980 background: linear-gradient(0deg, var(--background-surface-opacity-light-level-07, rgba(255, 255, 255, 0.96)) 0%, var(--background-surface-opacity-light-level-07, rgba(255, 255, 255, 0.96)) 100%), #${ourEnergyStyle.backgroundColor} !important;
5981 box-shadow: 0px 2px 6px 0px #${ourEnergyStyle.shadowColor} !important;
5982 color: #${ourEnergyStyle.textColor} !important;
5983 }
5984
5985 body.high-contrast-active .${rootCss} [data-category="${ourEnergyStyle.titleLocale}"] {
5986 background: linear-gradient(0deg, var(--background-surface-opacity-light-level-07, rgba(55, 55, 55, 1)) 0%, var(--background-surface-opacity-light-level-07, rgba(55, 55, 55, 1)) 100%), #${ourEnergyStyle.backgroundColor} !important;
5987 color: #${ourEnergyStyle.textColorHighContrast} !important;
5988 }
5989
5990 </style>
5991</#list>
5992
5993<script>
5994
5995 function disableEnableArrow(arrow, scrollBar, maxDistance, direction)
5996 {
5997 if(direction === "left") {
5998 if (scrollBar.scrollLeft > 0) {
5999 arrow.classList.contains("arrow-disable") && arrow.classList.remove("arrow-disable");
6000 }
6001 else {
6002 !arrow.classList.contains("arrow-disable") && arrow.classList.add("arrow-disable");
6003 }
6004 }
6005 else if(direction === "right") {
6006 if (Math.ceil(scrollBar.scrollLeft + scrollBar.clientWidth) < maxDistance) {
6007 arrow.classList.contains("arrow-disable") && arrow.classList.remove("arrow-disable");
6008 }
6009 else {
6010 !arrow.classList.contains("arrow-disable") && arrow.classList.add("arrow-disable");
6011 }
6012 }
6013 }
6014
6015 function scrollCarousel()
6016 {
6017 const root = document.querySelector(".${rootCss}");
6018 if(root) {
6019 const scrollBar = root.querySelector(".${rootCss} .card-news-list");
6020 const gap = 32;// var(--space-lg);
6021 const stepLength = scrollBar.querySelector(".card-news-container").offsetWidth + gap;
6022 const arrowLeftBtn = root.querySelector(".card-news-arrow-left")
6023 const arrowRightBtn = root.querySelector(".card-news-arrow-right")
6024
6025 let maxDistance = scrollBar.scrollWidth;
6026
6027 arrowLeftBtn.addEventListener('click', () => {
6028 if (scrollBar.scrollLeft > 0) {
6029 scrollBar.scroll({
6030 left: scrollBar.scrollLeft - stepLength,
6031 behavior: "smooth",
6032 });
6033 }
6034 });
6035
6036 arrowRightBtn.addEventListener('click', () => {
6037 if (scrollBar.scrollLeft < maxDistance) {
6038 scrollBar.scroll({
6039 left: scrollBar.scrollLeft + stepLength,
6040 behavior: "smooth",
6041 });
6042 }
6043 });
6044
6045 scrollBar.addEventListener("scroll", ()=>{
6046 disableEnableArrow(arrowLeftBtn, scrollBar, maxDistance, "left");
6047 disableEnableArrow(arrowRightBtn, scrollBar, maxDistance, "right");
6048 });
6049
6050 disableEnableArrow(arrowLeftBtn, scrollBar, maxDistance, "left");
6051 disableEnableArrow(arrowRightBtn, scrollBar, maxDistance, "right");
6052
6053 }
6054 }
6055
6056 document.addEventListener('DOMContentLoaded', scrollCarousel);
6057
6058</script>
6059
6060<style>
6061
6062
6063.ptb-news__read-news .news-content .embed-responsive-youtube::before {
6064 padding-top: 0;
6065}
6066
6067.ptb-news__read-news .news-content .embed-responsive-liferay::before {
6068 padding-top: calc(9/16 *100% - 64px);
6069}
6070
6071.ptb-news__read-news .news-content .thumnail-play-button {
6072}
6073
6074.ptb-news__read-news .news-content .thumnail-play-button {
6075 position: relative;
6076 z-index: 100;
6077 height: 64px;
6078 width: 64px;
6079 background-repeat: no-repeat;
6080 top: calc(50%);
6081 left: calc(50% - 32px);
6082}
6083
6084
6085.ptb-news__read-news .news-content .thumnail-play-button-youtube {
6086 position: absolute;
6087 z-index: 100;
6088 height: 64px;
6089 width: 64px;
6090 background-repeat: no-repeat;
6091 top: calc(50% - 135px);
6092 left: calc(50% - 32px);
6093}
6094
6095.ptb-news__read-news .news-content .thumnail-play-button-liferay {
6096 position: relative;
6097 z-index: 100;
6098 height: 64px;
6099 width: 64px;
6100 top: calc(-50% + 32px);
6101 left: calc(50% - 32px);
6102 background-repeat: no-repeat;
6103}
6104
6105
6106 .ptb-news__read-news .news-content .embed-responsive-youtube img {
6107 width: 100%;
6108 height: 100%;
6109 }
6110
6111</style>
6112
6113 <script>
6114 <#assign createYoutubeThumbnails = "createYoutubeThumbnails_"+ randomNumber(5952) />
6115
6116 function ${createYoutubeThumbnails}(){
6117
6118 const newsContent = document.querySelector(".news-content");
6119
6120 const getYoutubeId = (youtubeUrl) => {
6121
6122 const url = new URL(youtubeUrl);
6123 const splittedPathName = url.pathname.split("/");
6124
6125 if (splittedPathName.length <= 0){
6126 return "";
6127 }
6128
6129 return splittedPathName[splittedPathName.length-1];
6130 };
6131
6132 window.addEventListener("resize", (event) => {
6133 const iframeList = newsContent.querySelectorAll('iframe');
6134 iframeList.forEach((iframe) => {
6135 const src = iframe.src;
6136 if (!src){
6137 return;
6138 }
6139
6140 const isYoutube = src.toLowerCase().includes("youtube");
6141 if (!isYoutube){
6142 return;
6143 }
6144
6145 const iframeParent = iframe.parentNode;
6146
6147 const thumbnail = iframeParent.querySelector("img");
6148 if (thumbnail){
6149 // thumbnail.style="width:" + iframe.width + "px; height: " + iframe.height + "px";
6150 }
6151 });
6152
6153 });
6154
6155 const iframeList = newsContent.querySelectorAll('iframe');
6156 iframeList.forEach((iframe) => {
6157 const src = iframe.src;
6158 if (!src){
6159 return;
6160 }
6161
6162 const isYoutube = src.toLowerCase().includes("youtube");
6163 if (!isYoutube){
6164 return;
6165 }
6166
6167 const iframeParent = iframe.parentNode;
6168
6169 const thumbnail = document.createElement("img");
6170 thumbnail.src = 'https://img.youtube.com/vi/' + getYoutubeId(src) +'/hqdefault.jpg';
6171 thumbnail.alt = "Youtube";
6172 thumbnail.loading = "lazy";
6173 //thumbnail.style="width:" + iframe.width + "px; height: " + iframe.height + "px";
6174
6175 const playButton = document.createElement("div");
6176 playButton.style = 'background-image: url("data:image/svg+xml,%3Csvg width=\'64\' height=\'64\' viewBox=\'0 0 64 64\' fill=\'none\' xmlns=\'http://www.w3.org/2000/svg\'%3E%3Cg clip-path=\'url(%23clip0_4118_27800)\'%3E%3Crect width=\'64\' height=\'64\' rx=\'32\' fill=\'white\'/%3E%3Cpath d=\'M39.22 32.52C39.591 32.2726 39.591 31.7274 39.22 31.48L28.9717 24.6478C28.5563 24.3709 28 24.6686 28 25.1678V38.8322C28 39.3314 28.5563 39.6291 28.9717 39.3522L39.22 32.52Z\' fill=\'%23008542\' stroke=\'%23008542\' stroke-width=\'2\' stroke-linecap=\'round\' stroke-linejoin=\'round\'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id=\'clip0_4118_27800\'%3E%3Crect width=\'64\' height=\'64\' rx=\'32\' fill=\'white\'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A")';
6177 playButton.classList.add("thumnail-play-button-youtube");
6178 const children = iframeParent.children;
6179
6180 if (children.length > 0) {
6181 iframeParent.insertBefore(thumbnail, children.firstChild);
6182 iframeParent.insertBefore(playButton, thumbnail);
6183 iframe.classList.add("hide");
6184 iframeParent.classList.add("embed-responsive-youtube");
6185 }
6186
6187 playButton.addEventListener("click", () => {
6188 thumbnail.click();
6189 });
6190
6191 thumbnail.addEventListener("click", () => {
6192 thumbnail.classList.add("hide");
6193 playButton.classList.add("hide");
6194 iframe.classList.remove("hide");
6195 iframeParent.classList.remove("embed-responsive-youtube");
6196 const url = new URL(src);
6197 const searchParams = url.searchParams;
6198 searchParams.set("rel", "0");
6199 //searchParams.set("modestbranding", "0");
6200 //searchParams.set("mute", "0");
6201 //searchParams.set("color", "white");
6202 searchParams.set("controls", "1");
6203 //searchParams.set("playsinline", "1");
6204 //searchParams.set("enablejsapi", "1");
6205 searchParams.set("autoplay", "1");
6206 //searchParams.set("logo", "0");
6207 iframeParent.setAttribute("data-embed-id", url.toString());
6208 iframe.setAttribute("src", url.toString());
6209 });
6210 });
6211
6212 }
6213
6214 ${createYoutubeThumbnails}();
6215
6216 <#assign createLRThumbnails = "createLRThumbnails"+ randomNumber(5952) />
6217
6218 function ${createLRThumbnails}(){
6219
6220 const newsContent = document.querySelector(".news-content");
6221 const iframeList = newsContent.querySelectorAll("iframe[data-video-liferay]");
6222
6223 iframeList.forEach(iframe => {
6224
6225 const playButton = document.createElement("div");
6226 playButton.style = 'background-image: url("data:image/svg+xml,%3Csvg width=\'64\' height=\'64\' viewBox=\'0 0 64 64\' fill=\'none\' xmlns=\'http://www.w3.org/2000/svg\'%3E%3Cg clip-path=\'url(%23clip0_4118_27800)\'%3E%3Crect width=\'64\' height=\'64\' rx=\'32\' fill=\'white\'/%3E%3Cpath d=\'M39.22 32.52C39.591 32.2726 39.591 31.7274 39.22 31.48L28.9717 24.6478C28.5563 24.3709 28 24.6686 28 25.1678V38.8322C28 39.3314 28.5563 39.6291 28.9717 39.3522L39.22 32.52Z\' fill=\'%23008542\' stroke=\'%23008542\' stroke-width=\'2\' stroke-linecap=\'round\' stroke-linejoin=\'round\'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id=\'clip0_4118_27800\'%3E%3Crect width=\'64\' height=\'64\' rx=\'32\' fill=\'white\'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A")';
6227 playButton.classList.add("thumnail-play-button-liferay");
6228 const children = iframe.parentNode.children;
6229 if (children.length > 0) {
6230 iframe.parentNode.insertBefore(playButton, children.firstChild);
6231 }
6232
6233 iframe.addEventListener("load", () => {
6234 if (iframe.contentDocument){
6235 const video = iframe.contentDocument.body.querySelector("video");
6236 video.removeAttribute("controls");
6237 }
6238 });
6239
6240 iframe.parentNode.classList.add("embed-responsive-liferay");
6241
6242
6243 playButton.addEventListener("click", () => {
6244 playButton.classList.add("hide");
6245 playButton.classList.remove("thumnail-play-button-liferay");
6246 iframe.parentNode.classList.remove("embed-responsive-liferay");
6247 if (iframe.contentDocument){
6248 const video = iframe.contentDocument.body.querySelector("video");
6249 video.setAttribute("controls", "");
6250 video.play();
6251 }
6252 });
6253 });
6254 }
6255
6256 ${createLRThumbnails}();
6257
6258 document.querySelectorAll(".news-content img").forEach(img => img.loading = "lazy");
6259
6260 </script>
Escolha um Canal:
Navegue nas Seções:
Acessibilidade
Idioma:
Selecione um idioma: