logo petrobras
Agência Petrobras
Faça uma busca:
Buscar
Mais pesquisados
Preço dos combustíveis
Pré-Sal
Time Petrobras
Title
Destaques
Title
Brasil de EnergiaClique aqui para abrir a configuração do link do cartão.
Brasil de Energia
Os jornalistas Francisco José e Diógenes Dantas atravessam o Brasil para falar sobre transição energética justa na série documental "Um Brasil de Energia"
X
O uso deste material é autorizado apenas para fins editoriais.
Ok Cancel
X
Mais recentes
Um erro ocorreu enquanto processava o modelo.
Java method "com.liferay.journal.model.impl.JournalArticleImpl.getDocument()" threw an exception when invoked on com.liferay.journal.model.impl.JournalArticleImpl object "{\"mvccVersion\": 1, \"ctCollectionId\": 0, \"uuid\": \"6a919bb1-67ab-2df1-da6c-8c5edeecafed\", \"id\": 17253733, \"resourcePrimKey\": 17245540, \"groupId\": 10623376, \"companyId\": 20099, \"userId\": 11888211, \"userName\": \"Leonardo Bruno Pimenta Melo\", \"createDate\": \"Tue Apr 30 18:40:34 GMT 2024\", \"modifiedDate\": \"Tue Apr 30 20:27:01 GMT 2024\", \"externalReferenceCode\": \"1cdc1e22-3fa0-0c1f-ab52-81b13d174e09\", \"folderId\": 11260026, \"classNameId\": 0, \"classPK\": 0, \"treePath\": \"/10628776/11260026/\", \"articleId\": \"17245538\", \"version\": 1.5, \"urlTitle\": \"negocio/tupi-alcanca-2-6-bilhoes-de-barris-de-producao-acumulada\", \"DDMStructureId\": 10628772, \"DDMTemplateKey\": \"\", \"defaultLanguageId\": \"pt_BR\", \"layoutUuid\": \"\", \"displayDate\": \"Tue Apr 30 18:29:00 GMT 2024\", \"expirationDate\": null, \"reviewDate\": null, \"indexable\": true, \"smallImage\": false, \"smallImageId\": 0, \"smallImageSource\": 1, \"smallImageURL\": \"\", \"lastPublishDate\": null, \"status\": 0, \"statusByUserId\": 11888211, \"statusByUserName\": \"Leonardo Bruno Pimenta Melo\", \"statusDate\": \"Tue Apr 30 20:27:01 GMT 2024\"}"; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign xmlArticle = journalArticle.g... [in template "20099#20135#10832147" in function "getCardData" at line 52, column 5] ----
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<#assign journalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
8<#assign fileEntryService = staticUtil["com.liferay.document.library.kernel.service.DLFileEntryLocalServiceUtil"] />
9<#assign assetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") />
10<#assign assetVocabularyService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyService") />
11<#assign assetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") />
12<#assign vocabularies = assetVocabularyService.getGroupVocabularies(groupId) />
13<#assign editoriaVocabulary = findVocabulary("Editorial", vocabularies) />
14
15
16
17<#function getFirstCategoryFromVocabulary entry vocabulary>
18 <#assign categories = assetCategoryLocalService.getCategories("com.liferay.journal.model.JournalArticle", entry.getClassPK()) />
19 <#list categories as category>
20 <#assign vocabulary = assetVocabularyService.getVocabulary(category.getVocabularyId()) />
21
22 <#if vocabulary.getVocabularyId() == category.getVocabularyId()>
23 <#return category>
24 </#if>
25 </#list>
26 <#return "">
27</#function>
28
29<#assign rootCss = "card-news_" + randomNumber(4586) />
30<#assign cardMap = {} />
31
32<#-- Função para obter os dados de um card no Web Content (Journal Article) -->
33<#function getCardData entry journalArticleLocalService fileEntryService cardMap>
34
35 <#assign editoria = getFirstCategoryFromVocabulary(entry, editoriaVocabulary) />
36 <#assign editoriaId = -1 />
37 <#if editoria?has_content>
38 <#assign editoriaId = editoria.getCategoryId() />
39 </#if>
40 <#if editoriaId == -1>
41 <#return {} />
42 </#if>
43 <#if cardMap[ editoriaId?string]??>
44 <#if cardMap[editoriaId?string]?size gt 7 >
45 <#return {} />
46 </#if>
47 </#if>
48
49 <#assign journalArticle = journalArticleLocalService.getLatestArticle(entry.getClassPK()) />
50 <#assign ddmStructure = journalArticle.getDDMStructure() />
51 <#assign fieldList = getFieldListByStructure(ddmStructure) />
52 <#assign xmlArticle = journalArticle.getDocument().getRootElement() />
53 <#assign ddmStructure = journalArticle.getDDMStructure() />
54
55 <#assign imagesGroup = getNodes(getIdFromFieldName(fieldList, "Imagem de destaque da notícia"), xmlArticle) />
56 <#assign image = "" />
57 <#list imagesGroup as imageGroup >
58 <#assign image = getMediaInfo(fieldList, imageGroup, "Imagem de destaque", fileEntryService) /> />
59 </#list>
60
61 <#assign title = getFieldValue(fieldList, xmlArticle, "Título de destaque da notícia") />
62
63 <#assign lastPublishDate = journalArticle.getDisplayDate()>
64 <#assign createDate = journalArticle.getCreateDate()>
65
66 <#assign editoria = getFirstCategoryFromVocabulary(entry, editoriaVocabulary) />
67 <#assign editoriaId = -1 />
68 <#if editoria?has_content>
69 <#assign editoriaId = editoria.getCategoryId() />
70 </#if>
71
72 <#assign review = getFieldValue(fieldList, xmlArticle, "Subtítulo") />
73
74 <#assign urlNews = "/">
75 <#if themeDisplay.getPortalURL()?contains("webserver")>
76 <#assign urlNews = themeDisplay.getPortalURL() + themeDisplay.getPathFriendlyURLPublic() + layout.getGroup().friendlyURL + "/w/" + journalArticle.getUrlTitle()>
77 <#else>
78 <#assign urlNews = "/w/" + journalArticle.getUrlTitle()>
79 </#if>
80
81 <#assign cardInfo = {"image": image,
82 "title": title,
83 "lastPublishDate": lastPublishDate,
84 "createDate" : createDate,
85 "editoriaId": editoriaId,
86 "urlNews": urlNews,
87 "review": review} />
88
89 <#if cardMap[editoriaId?string]??>
90 <#assign cardMap = cardMap + {editoriaId : cardMap[editoriaId?string] + [cardInfo]} />
91 <#else>
92 <#assign cardMap = cardMap + {editoriaId : [cardInfo]} />
93 </#if>
94
95 <#return cardInfo />
96
97</#function>
98
99
100<#macro renderCard cardData>
101 <#if !cardData["image"]??>
102 <#return />
103 </#if>
104
105 <div class="card ${rootCss}" category-id="${cardData.editoriaId}">
106 <#if cardData.image.url?has_content>
107 <img class="image" src="/o/adaptive-media/image/${cardData.image.fileEntryId}/Thumbnail-300x300/image" alt="${cardData.image.alt}"/>
108 </#if>
109 <div class="news-content">
110 <div class="head">
111 <p class="date">${formatDate(cardData.lastPublishDate)}</p>
112 <h2 class="title h4">${cardData.title}</h2>
113 <div class="bar"></div>
114 </div>
115 <div class="bottom-wrapper">
116 <div class="review-container">
117 ${cardData.review}
118 </div>
119 <div class="link-container">
120 <a class="link" href="${cardData.urlNews}" class="card-news-container">
121 <#if locale?lower_case == "pt_br"> Continuar lendo <#else> Keep reading </#if>
122 <span style="display: none">${randomNumber(10000)}</span> <#-- Devido ao ASESWEB -->
123 </a>
124 </div>
125 </div>
126 </div>
127 </div>
128
129</#macro>
130
131<#-- Renderizar Lista de cards -->
132<#if entries?has_content>
133 <#list entries as entry>
134 <#assign cardData = getCardData(entry journalArticleService fileEntryService cardMap) />
135 <@renderCard cardData/>
136 </#list>
137
138 <style>
139
140
141 .${rootCss} {
142 display: flex;
143 flex-direction: column;
144 width: 306px;
145 border-radius: 16px;
146 border: 1px solid var(--color-neutral-400, #EEE);
147 background: var(--color-neutral-100, #FFF);
148 margin: 0;
149 }
150
151 .${rootCss}:hover {
152 box-shadow: var(--box-shadow-neutral);
153 transition: box-shadow 300ms ease-in-out;
154 }
155
156 .${rootCss} .news-content {
157 padding: var(--space-md, 24px);
158 display: flex;
159 flex-direction: column;
160 height: 100%;
161 background: var(--color-background-card);
162 border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
163 }
164
165
166 .${rootCss} img {
167 background: lightgray 50% / cover no-repeat;
168 height: 170px;
169 width: 100%;
170 border-radius: 16px 16px 0 0;
171 /*transform: translateX(-1px);*/
172 object-fit: cover;
173 }
174
175 .${rootCss} .head {
176 display: flex;
177 flex-direction: column;
178 gap: var(--space-xxs, 8px);
179 }
180
181 .${rootCss} .head .date {
182 color: var(--color-neutral-800, #373737);
183 font-family: var(--font-family-base, "Petrobras Sans");
184 font-size: 14px;
185 font-style: normal;
186 font-weight: 400;
187 line-height: 160%; /* 19.2px */
188 }
189
190 .${rootCss} .head .title {
191 color: var(--color-neutral-800);
192 }
193
194 .${rootCss} .head .bar {
195 background-color: var(--color-secondary-solid-to-bright-200, #FDC82F);
196 height: 4px;
197 width: 20px;
198 margin: 12px 0 16px 0;
199 }
200
201 .${rootCss} .bottom-wrapper {
202 height: 100%;
203 display: flex;
204 flex-direction: column;
205 justify-content: space-between;
206 }
207
208 .${rootCss} .bottom-wrapper .review-container {
209 color: var(--color-neutral-800, #373737);
210 font-family: var(--font-family-base, "Petrobras Sans");
211 font-size: 16px;
212 font-style: normal;
213 font-weight: 400;
214 line-height: 160%; /* 22.4px */
215 }
216
217 .${rootCss} .bottom-wrapper .link-container {
218 flex: 0 1 auto;
219 }
220
221 .${rootCss} .bottom-wrapper .link-container .link {
222 color: var(--color-primary-solid-to-bright-200, var(--color-primary-medium));
223 font-family: var(--font-family-base, "Petrobras Sans");
224 font-size: 16px;
225 font-style: normal;
226 font-weight: 700;
227 line-height: 144%; /* 23.04px */
228 text-decoration-line: underline;
229 }
230
231 @media screen and (max-width: 1024px) {
232 .${rootCss} {
233 flex-direction: column;
234 /*gap: 16px;*/
235 min-width: 296px;
236 }
237
238 .${rootCss} img {
239 height: 140px;
240 }
241
242 .${rootCss} .head .date {
243 font-size: 12px;
244 }
245
246 .${rootCss} .head .title {}
247
248 .${rootCss} .head .bar {
249 width: 18px;
250 margin: 8px 0 16px 0;
251 }
252
253 .${rootCss} .review-container {
254 font-size: 14px;
255 }
256 }
257 </style>
258</#if>
Mais lidos
29/01/2024
Inscrições para concurso de nível técnico terminam na próxima quarta
Seleção terá reserva de 20% das vagas para PCD e 20% para negros. Provas serão realizadas em 40 cidades, incluindo capitais de todos os estados
30/01/2024
Petrobras apoia projetos de reciclagem no Rio e na Baixada Fluminense com capacidade de reaproveitar 600 toneladas de materiais por ano
Unidades da estatal destinam resíduos recicláveis para cooperativas de catadores e fomentam a capacitação dos trabalhadores
31/01/2024
Petrobras destaca transição energética e ativos rentáveis em imersão com investidores em NY
26/01/2024
Petrobras bate recordes no primeiro ano da atual gestão
26/01/2024
Petrobras conclui primeira perfuração de poço exploratório na Margem Equatorial
30/01/2024
Petrobras amplia testes para produção de diesel com conteúdo renovável
Além da Repar, que já comercializa o produto, mais três refinarias realizaram testes e estão aptas para a produção do Diesel R5
26/01/2024
Petrobras informa sobre Reservas Provadas em 2023
30/01/2024
Repar bate recordes históricos de produção e vendas
Produção de diesel da refinaria da Petrobras no Paraná foi de 5,7 bilhões de litros, batendo o recorde de 2014. A produção de gasolina atingiu 3,4 bilhões de litros, 3% a mais que recorde de 2012, e de asfalto foi de 453 mil toneladas, 0,5% superior ao recorde de 2010.
Navegue por editoria
Inovação
Institucional
Negócio
Sustentabilidade
Um erro ocorreu enquanto processava o modelo.
Java method "com.liferay.journal.model.impl.JournalArticleImpl.getDocument()" threw an exception when invoked on com.liferay.journal.model.impl.JournalArticleImpl object "{\"mvccVersion\": 1, \"ctCollectionId\": 0, \"uuid\": \"6a919bb1-67ab-2df1-da6c-8c5edeecafed\", \"id\": 17253733, \"resourcePrimKey\": 17245540, \"groupId\": 10623376, \"companyId\": 20099, \"userId\": 11888211, \"userName\": \"Leonardo Bruno Pimenta Melo\", \"createDate\": \"Tue Apr 30 18:40:34 GMT 2024\", \"modifiedDate\": \"Tue Apr 30 20:27:01 GMT 2024\", \"externalReferenceCode\": \"1cdc1e22-3fa0-0c1f-ab52-81b13d174e09\", \"folderId\": 11260026, \"classNameId\": 0, \"classPK\": 0, \"treePath\": \"/10628776/11260026/\", \"articleId\": \"17245538\", \"version\": 1.5, \"urlTitle\": \"negocio/tupi-alcanca-2-6-bilhoes-de-barris-de-producao-acumulada\", \"DDMStructureId\": 10628772, \"DDMTemplateKey\": \"\", \"defaultLanguageId\": \"pt_BR\", \"layoutUuid\": \"\", \"displayDate\": \"Tue Apr 30 18:29:00 GMT 2024\", \"expirationDate\": null, \"reviewDate\": null, \"indexable\": true, \"smallImage\": false, \"smallImageId\": 0, \"smallImageSource\": 1, \"smallImageURL\": \"\", \"lastPublishDate\": null, \"status\": 0, \"statusByUserId\": 11888211, \"statusByUserName\": \"Leonardo Bruno Pimenta Melo\", \"statusDate\": \"Tue Apr 30 20:27:01 GMT 2024\"}"; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign xmlArticle = journalArticle.g... [in template "20099#20135#11536932" in function "getCardData" at line 63, column 5] ----
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<#assign journalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
8<#assign fileEntryService = staticUtil["com.liferay.document.library.kernel.service.DLFileEntryLocalServiceUtil"] />
9<#assign assetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") />
10<#assign assetVocabularyService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyService") />
11<#assign assetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") />
12<#assign vocabularies = assetVocabularyService.getGroupVocabularies(groupId) />
13<#assign editoriaVocabulary = findVocabulary("Editorial", vocabularies) />
14<#assign mediaVocabulary = findVocabulary("Multimidia", vocabularies) />
15
16<#-- Categoria para filtrar registros para idioma em inglês -->
17<#assign PAGE_ENGLISH_CATEGORY = 12780360 >
18
19<#assign assetEntryQuery = objectUtil('com.liferay.asset.kernel.service.persistence.AssetEntryQuery')>
20<#assign portalUtil = staticUtil["com.liferay.portal.kernel.util.PortalUtil"]>
21<#assign assetEntryLocalServiceUtil = objectUtil("com.liferay.asset.kernel.service.AssetEntryLocalServiceUtil").getService()>
22
23<#function getFirstCategoryFromVocabulary entry vocabulary>
24 <#assign categories = assetCategoryLocalService.getCategories("com.liferay.journal.model.JournalArticle", entry.getClassPK()) />
25 <#list categories as category>
26 <#assign vocabulary = assetVocabularyService.getVocabulary(category.getVocabularyId()) />
27
28 <#if vocabulary.getVocabularyId() == category.getVocabularyId()>
29 <#return category>
30 </#if>
31 </#list>
32 <#return "">
33</#function>
34
35<#assign rootCss = "card-news_" + randomNumber(4586) />
36<#assign cardMap = {} />
37
38<#-- Função para obter os dados de um card no Web Content (Journal Article) -->
39<#function getCardData entry journalArticleLocalService fileEntryService cardMap>
40
41 <#assign editoria = getFirstCategoryFromVocabulary(entry, editoriaVocabulary) />
42 <#assign editoriaId = -1 />
43 <#if editoria?has_content>
44 <#assign editoriaId = editoria.getCategoryId() />
45 </#if>
46 <#if editoriaId == -1>
47 <#return {} />
48 </#if>
49 <#if cardMap[ editoriaId?string]??>
50 <#if cardMap[editoriaId?string]?size gt 7 >
51 <#return {} />
52 </#if>
53 </#if>
54
55 <#assign journalArticle = journalArticleLocalService.getLatestArticle(entry.getClassPK()) />
56 <#assign structName = getStructName(journalArticle) />
57 <#if structName != "Agência de Notícias - Notícia">
58 <#return {}/>
59 </#if>
60
61 <#assign ddmStructure = journalArticle.getDDMStructure() />
62 <#assign fieldList = getFieldListByStructure(ddmStructure) />
63 <#assign xmlArticle = journalArticle.getDocument().getRootElement() />
64
65
66 <#assign imagesGroup = getNodes(getIdFromFieldName(fieldList, "Imagem de destaque da notícia"), xmlArticle) />
67 <#assign image = "" />
68 <#list imagesGroup as imageGroup >
69 <#assign image = getMediaInfo(fieldList, imageGroup, "Imagem de destaque", fileEntryService) /> />
70 </#list>
71
72 <#assign title = getFieldValue(fieldList, xmlArticle, "Título de destaque da notícia") />
73
74 <#assign lastPublishDate = journalArticle.getDisplayDate()>
75 <#assign createDate = journalArticle.getCreateDate()>
76
77 <#assign editoria = getFirstCategoryFromVocabulary(entry, editoriaVocabulary) />
78 <#assign editoriaId = -1 />
79 <#if editoria?has_content>
80 <#assign editoriaId = editoria.getCategoryId() />
81 </#if>
82
83 <#assign review = getFieldValue(fieldList, xmlArticle, "Subtítulo") />
84
85 <#assign urlNews = "/">
86 <#if themeDisplay.getPortalURL()?contains("webserver")>
87 <#assign urlNews = themeDisplay.getPortalURL() + themeDisplay.getPathFriendlyURLPublic() + layout.getGroup().friendlyURL + "/w/" + journalArticle.getUrlTitle()>
88 <#else>
89 <#assign urlNews = "/w/" + journalArticle.getUrlTitle()>
90 </#if>
91
92 <#assign cardInfo = {"image": image,
93 "title": title,
94 "lastPublishDate": lastPublishDate,
95 "createDate" : createDate,
96 "editoriaId": editoriaId,
97 "urlNews": urlNews,
98 "review": review} />
99
100 <#if cardMap[editoriaId?string]??>
101 <#assign cardMap = cardMap + {editoriaId : cardMap[editoriaId?string] + [cardInfo]} />
102 <#else>
103 <#assign cardMap = cardMap + {editoriaId : [cardInfo]} />
104 </#if>
105
106 <#return cardInfo />
107
108</#function>
109
110
111<#macro renderCard cardData>
112 <#if !cardData["image"]??>
113 <#return />
114 </#if>
115
116 <div class="card ${rootCss}" category-id="${cardData.editoriaId}">
117 <#if cardData.image.url?has_content>
118 <img class="image" src="/o/adaptive-media/image/${cardData.image.fileEntryId}/Thumbnail-300x300/image" alt="${cardData.image.alt}"/>
119 </#if>
120 <div class="news-content">
121 <div class="head">
122 <p class="date">${formatDate(cardData.lastPublishDate)}</p>
123 <h2 class="title h4">${cardData.title}</h2>
124 <div class="bar"></div>
125 </div>
126 <div class="bottom-wrapper">
127 <div class="review-container">
128 ${cardData.review}
129 </div>
130 <div class="link-container">
131 <a class="link" href="${cardData.urlNews}" class="card-news-container">
132 <#if locale?lower_case == "pt_br"> Continuar lendo <#else> Keep reading </#if>
133 <span style="display: none">${randomNumber(10000)}</span> <#-- Devido ao ASESWEB -->
134 </a>
135 </div>
136 </div>
137 </div>
138 </div>
139
140</#macro>
141
142
143
144<#function getAssetEntries portalUtil assetEntryLocalServiceUtil vocabulary>
145 <#attempt >
146 <#assign groupId = themeDisplay.getScopeGroupId()>
147 <#assign companyId = themeDisplay.getCompanyId()>
148 <#assign realUserId = themeDisplay.getDefaultUserId() />
149 <#assign className = "com.liferay.journal.model.JournalArticle">
150 <#assign classNameId = portalUtil.getClassNameId(className)>
151
152 <#assign assetEntryQuery = objectUtil('com.liferay.asset.kernel.service.persistence.AssetEntryQuery') />
153 ${assetEntryQuery.setClassNameIds([classNameId]) }
154 ${assetEntryQuery.setEnd(8)}
155 <#assign notAllCategoryIds = [] />
156 <#list mediaVocabulary.getCategories() as category>
157 <#assign notAllCategoryIds += [category.getCategoryId()] />
158 </#list>
159 ${assetEntryQuery.setNotAllCategoryIds(notAllCategoryIds)}
160
161 <#assign allAssets = []/>
162 <#list vocabulary.getCategories() as category>
163 <#if locale?lower_case == "pt_br">
164 ${assetEntryQuery.setAllCategoryIds([category.getCategoryId()])}
165 <#else>
166 ${assetEntryQuery.setAllCategoryIds([category.getCategoryId(), PAGE_ENGLISH_CATEGORY])}
167 </#if>
168 <#assign ents = assetEntryLocalServiceUtil.getEntries(assetEntryQuery) />
169 <#assign allAssets = allAssets + ents />
170 </#list>
171
172 <#return allAssets />
173 <#recover >
174 <#return [] />
175 </#attempt>
176</#function>
177
178
179
180<#assign allAssets = getAssetEntries(portalUtil, assetEntryLocalServiceUtil, editoriaVocabulary) />
181
182<#-- Renderizar Lista de cards -->
183<#if allAssets?has_content>
184
185 <#list allAssets?sort_by("publishDate")?reverse as assetEntry>
186 <#assign cardData = getCardData(assetEntry journalArticleService fileEntryService cardMap) />
187 <@renderCard cardData/>
188 </#list>
189
190 <style>
191 .${rootCss} {
192 display: flex;
193 flex-direction: column;
194 width: 306px;
195 border-radius: 16px;
196 border: 1px solid var(--color-neutral-400, #EEE);
197 background: var(--color-neutral-100, #FFF);
198 margin: 0;
199 }
200
201 .${rootCss}:hover {
202 box-shadow: var(--box-shadow-neutral);
203 transition: box-shadow 300ms ease-in-out;
204 }
205
206 .${rootCss} .news-content {
207 border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
208 background: var(--color-background-card);
209 padding: var(--space-md, 24px);
210 display: flex;
211 flex-direction: column;
212 height: 100%;
213 }
214
215 .${rootCss} img {
216 background: lightgray 50% / cover no-repeat;
217 height: 170px;
218 width: 100%;
219 border-radius: 16px 16px 0 0;
220 /*transform: translateX(-1px);*/
221 object-fit: cover;
222 }
223
224 .${rootCss} .head {
225 display: flex;
226 flex-direction: column;
227 gap: var(--space-xxs, 8px);
228 }
229
230 .${rootCss} .head .date {
231 color: var(--color-neutral-800, #373737);
232 font-family: var(--font-family-base, "Petrobras Sans");
233 font-size: 14px;
234 font-style: normal;
235 font-weight: 400;
236 line-height: 160%; /* 19.2px */
237 }
238
239 .${rootCss} .head .title {
240 color: var(--color-neutral-800);
241 }
242
243 .${rootCss} .head .bar {
244 background-color: var(--color-secondary-medium, #FDC82F);
245 height: 4px;
246 width: 20px;
247 margin: 12px 0 16px 0;
248 }
249
250 .${rootCss} .bottom-wrapper {
251 height: 100%;
252 display: flex;
253 flex-direction: column;
254 justify-content: space-between;
255 }
256
257 .${rootCss} .bottom-wrapper .review-container {
258 color: var(--color-neutral-800, #373737);
259 font-family: var(--font-family-base, "Petrobras Sans");
260 font-size: 16px;
261 font-style: normal;
262 font-weight: 400;
263 line-height: 160%; /* 22.4px */
264 }
265
266 .${rootCss} .bottom-wrapper .link-container {
267 flex: 0 1 auto;
268 }
269
270 .${rootCss} .bottom-wrapper .link-container .link {
271 color: var(--color-primary-solid-to-bright-200, var(--color-primary-medium));
272 font-family: var(--font-family-base, "Petrobras Sans");
273 font-size: 16px;
274 font-style: normal;
275 font-weight: 700;
276 line-height: 144%; /* 23.04px */
277 text-decoration-line: underline;
278 }
279
280
281 @media screen and (max-width: 1024px) {
282 .${rootCss} {
283 flex-direction: column;
284 gap: 16px;
285 min-width: 296px;
286 }
287
288 .${rootCss} img {
289 height: 140px;
290 }
291
292 .${rootCss} .head .date {
293 font-size: 12px;
294 }
295
296 .${rootCss} .head .title {
297 }
298
299 .${rootCss} .head .bar {
300 width: 18px;
301 margin: 8px 0 16px 0;
302 }
303
304 .${rootCss} .review-container {
305 font-size: 14px;
306 }
307 }
308 </style>
309</#if>
Navegue por conteúdo multimídia
Aprovados
Cadastro de Reserva
Documento
Foto
Mapa e Ilustração
Piauí
Vídeo
Áudio
Um erro ocorreu enquanto processava o modelo.
Java method "com.liferay.journal.model.impl.JournalArticleImpl.getDocument()" threw an exception when invoked on com.liferay.journal.model.impl.JournalArticleImpl object "{\"mvccVersion\": 1, \"ctCollectionId\": 0, \"uuid\": \"33099de2-f3db-2dda-032e-d766d76ed560\", \"id\": 12965641, \"resourcePrimKey\": 12965602, \"groupId\": 10623376, \"companyId\": 20099, \"userId\": 11888211, \"userName\": \"Leonardo Bruno Pimenta Melo\", \"createDate\": \"Mon Feb 05 15:25:52 GMT 2024\", \"modifiedDate\": \"Mon Feb 05 15:28:09 GMT 2024\", \"externalReferenceCode\": \"7aeca9d7-9a54-b2cd-234d-863e5e0bd727\", \"folderId\": 10628795, \"classNameId\": 0, \"classPK\": 0, \"treePath\": \"/10628795/\", \"articleId\": \"12965600\", \"version\": 1.1, \"urlTitle\": \"grafico-projetos-de-parques-eolicos-offshore-em-avaliacao\", \"DDMStructureId\": 10628779, \"DDMTemplateKey\": \"\", \"defaultLanguageId\": \"pt_BR\", \"layoutUuid\": \"\", \"displayDate\": \"Mon Mar 06 18:06:00 GMT 2023\", \"expirationDate\": null, \"reviewDate\": null, \"indexable\": true, \"smallImage\": false, \"smallImageId\": 0, \"smallImageSource\": 1, \"smallImageURL\": \"\", \"lastPublishDate\": null, \"status\": 0, \"statusByUserId\": 11888211, \"statusByUserName\": \"Leonardo Bruno Pimenta Melo\", \"statusDate\": \"Mon Feb 05 15:28:09 GMT 2024\"}"; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign xmlArticle = journalArticle.g... [in template "20099#20135#11247695" in function "getCardData" at line 89, column 5] ----
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<#assign journalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
8<#assign fileEntryService = staticUtil["com.liferay.document.library.kernel.service.DLFileEntryLocalServiceUtil"] />
9<#assign assetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") />
10<#assign assetVocabularyService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyService") />
11<#assign assetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") />
12<#assign vocabularies = assetVocabularyService.getGroupVocabularies(groupId) />
13<#assign mediaVocabulary = findVocabulary("Multimidia", vocabularies) />
14<#assign editoriaVocabulary = findVocabulary("Editorial", vocabularies) />
15
16<#assign assetEntryQuery = objectUtil('com.liferay.asset.kernel.service.persistence.AssetEntryQuery')>
17<#assign portalUtil = staticUtil["com.liferay.portal.kernel.util.PortalUtil"]>
18<#assign assetEntryLocalServiceUtil = objectUtil("com.liferay.asset.kernel.service.AssetEntryLocalServiceUtil").getService()>
19
20<#assign SITE_URL = themeDisplay.getPortalURL() + themeDisplay.getPathFriendlyURLPublic() + layout.getGroup().friendlyURL />
21
22<#function getFirstCategoryFromVocabulary journalArticleCategories vocabulary>
23 <#list journalArticleCategories as category>
24 <#if vocabulary.getVocabularyId() == category.getVocabularyId()>
25 <#return category>
26 </#if>
27 </#list>
28 <#return "">
29</#function>
30
31<#--
32@function formatTime
33@description Formata uma data e hora para string.
34@param date Instância da classe Date do java.
35@return String formatada da data e hora.
36 -->
37<#function formatTime date>
38 <#if !date ?? || !date?has_content>
39 <#return "">
40 </#if>
41 <#return date?datetime?string("HH:mm:ss")>
42</#function>
43
44<#assign rootCss = "card-media_" + randomNumber(4586) />
45<#assign cardMap = {} />
46<#assign mediaAudioCategoryTitle = {"pt_BR": "Áudio","en_US":"Audio"}/>
47<#assign mediaDocumentCategoryTitle = {"pt_BR": "Documento","en_US":"Document"}>
48<#assign mediaMapCategoryTitle = {"pt_BR": "Mapa e Ilustração","en_US":"Map and Illustration"}/>
49<#assign mediaPhotoCategoryTitle = {"pt_BR": "Foto","en_US":"Foto"}/>
50<#assign videoPhotoCategoryTitle = {"pt_BR": "Video","en_US":"Video"}/>
51
52<#assign MEDIA_TYPE_NONE = 0 />
53<#assign MEDIA_TYPE_DOCUMENT = 1 />
54<#assign MEDIA_TYPE_VIDEO = 2 />
55<#assign MEDIA_TYPE_AUDIO = 3 />
56<#assign MEDIA_TYPE_PHOTO = 4 />
57<#assign MEDIA_TYPE_MAP = 5 />
58
59<#function getCategory(categoryTitle categoryList)>
60 <#assign result = categoryList?filter(cat -> cat.getTitle(locale) == categoryTitle) />
61 <#if result?size gt 0>
62 <#return result[0]>
63 </#if>
64 <#return "">
65</#function>
66
67<#-- Função para obter os dados de um card no Web Content (Journal Article) -->
68<#function getCardData entry journalArticleLocalService fileEntryService cardMap mediaVocabulary>
69
70 <#assign journalArticleCategories = assetCategoryLocalService.getCategories("com.liferay.journal.model.JournalArticle", entry.getClassPK()) />
71
72 <#assign mediaCategory = getFirstCategoryFromVocabulary(journalArticleCategories, mediaVocabulary) />
73 <#assign mediCategoryId = -1 />
74 <#if mediaCategory?has_content>
75 <#assign mediCategoryId = mediaCategory.getCategoryId() />
76 </#if>
77 <#if mediCategoryId == -1>
78 <#return {} />
79 </#if>
80 <#if cardMap[mediCategoryId?string]??>
81 <#if cardMap[mediCategoryId?string]?size gt 7 >
82 <#--return {} -->
83 </#if>
84 </#if>
85
86 <#assign journalArticle = journalArticleLocalService.getLatestArticle(entry.getClassPK()) />
87 <#assign ddmStructure = journalArticle.getDDMStructure() />
88 <#assign fieldList = getFieldListByStructure(ddmStructure) />
89 <#assign xmlArticle = journalArticle.getDocument().getRootElement() />
90
91 <#assign cardTitle = getFieldValue(fieldList, xmlArticle, "Título Home")/>
92 <#assign subtitle = getFieldValue(fieldList, xmlArticle, "Legenda")/>
93 <#assign author = getFieldValue(fieldList, xmlArticle, "Autor")/>
94 <#assign thumbnailImage = getMediaInfo(fieldList, xmlArticle, "Imagem de thumbnail", fileEntryService) >
95
96 <#assign groupId = getIdFromFieldName(fieldList, "Arquivo original") />
97 <#assign originalFileGroup = getGroupNode(groupId, xmlArticle) />
98
99 <#assign originalFile = getMediaInfo(fieldList, originalFileGroup, "Arquivo selecionado", fileEntryService) >
100 <#assign originalFileExternalUrl = getFieldValue(fieldList, originalFileGroup, "URL externa") />
101
102 <#assign lastPublishDate = journalArticle.getDisplayDate()>
103 <#assign createDate = journalArticle.getCreateDate()>
104
105 <#assign editoriaCategory = getFirstCategoryFromVocabulary(journalArticleCategories, editoriaVocabulary) />
106
107 <#assign photoCategory = getCategory(mediaPhotoCategoryTitle[locale], journalArticleCategories) />
108 <#assign documentCategory = getCategory(mediaDocumentCategoryTitle[locale], journalArticleCategories) />
109 <#assign mapCategory = getCategory(mediaMapCategoryTitle[locale], journalArticleCategories) />
110 <#assign audioCategory = getCategory(mediaAudioCategoryTitle[locale], journalArticleCategories) />
111 <#assign videoCategory = getCategory(videoPhotoCategoryTitle[locale], journalArticleCategories) />
112
113 <#assign isPhoto = photoCategory?has_content />
114 <#assign isDocument = documentCategory?has_content />
115 <#assign isMap = mapCategory?has_content />
116 <#assign isAudio = audioCategory?has_content />
117 <#assign isVideo = videoCategory?has_content />
118
119 <#assign mediaType = -1 />
120
121 <#if isPhoto>
122 <#assign mediaType = MEDIA_TYPE_PHOTO />
123 <#elseif isDocument>
124 <#assign mediaType = MEDIA_TYPE_DOCUMENT />
125 <#elseif isMap>
126 <#assign mediaType = MEDIA_TYPE_MAP />
127 <#elseif isAudio>
128 <#assign mediaType = MEDIA_TYPE_AUDIO />
129 <#elseif isVideo>
130 <#assign mediaType = MEDIA_TYPE_VIDEO />
131 </#if>
132
133 <#assign editoriaCategoryTitle = "" />
134 <#assign editoriaCategoryId = -1/>
135 <#if editoriaCategory?? && editoriaCategory?has_content>
136 <#assign editoriaCategoryTitle = editoriaCategory.getTitle(locale) />
137 <#assign editoriaCategoryId = editoriaCategory.getCategoryId()/>
138 </#if>
139
140 <#assign cardInfo = {"cardTitle": cardTitle,
141 "subtitle" : subtitle,
142 "author": author,
143 "thumbnailImage": thumbnailImage,
144 "originalFile": originalFile,
145 "originalFileExternalUrl": originalFileExternalUrl,
146 "lastPublishDate": lastPublishDate,
147 "createDate" : createDate,
148 "mediaId": mediCategoryId,
149 "mediaCategoryTitle": mediaCategory.getTitle(locale),
150 "mediaType" : mediaType,
151 "editoriaCategoryTitle" : editoriaCategoryTitle,
152 "editoriaCategoryId" :editoriaCategoryId,
153 "renderEditoriaCategoryAsLink" : true,
154 "renderMediaCategoryAsLink" : false
155 }/>
156
157 <#if cardMap[mediCategoryId?string]??>
158 <#assign cardMap = cardMap + {mediCategoryId : cardMap[mediCategoryId?string] + [cardInfo]} />
159 <#else>
160 <#assign cardMap = cardMap + {mediCategoryId : [cardInfo]} />
161 </#if>
162
163 <#return cardInfo />
164</#function>
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181<#macro printMediaIcon mediaType>
182
183 <#if mediaType == MEDIA_TYPE_DOCUMENT>
184 <svg viewBox="0 0 12 15" fill="none" xmlns="http://www.w3.org/2000/svg">
185 <path d="M7.5 1.5H1.5C1.36739 1.5 1.24021 1.55268 1.14645 1.64645C1.05268 1.74021 1 1.86739 1 2V13C1 13.1326 1.05268 13.2598 1.14645 13.3536C1.24021 13.4473 1.36739 13.5 1.5 13.5H10.5C10.6326 13.5 10.7598 13.4473 10.8536 13.3536C10.9473 13.2598 11 13.1326 11 13V5M7.5 1.5L11 5M7.5 1.5V5H11M4 8H8M4 10H8"
186 stroke="#373737" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
187 </svg>
188 <#elseif mediaType == MEDIA_TYPE_VIDEO>
189 <svg viewBox="0 0 16 11" fill="none" xmlns="http://www.w3.org/2000/svg">
190 <path d="M11.5 4.5L15 2.5V8.5L11.5 6.5M1.5 1.25H9.5C10.0304 1.25 10.5391 1.46071 10.9142 1.83579C11.2893 2.21086 11.5 2.71957 11.5 3.25V9.25C11.5 9.38261 11.4473 9.50979 11.3536 9.60355C11.2598 9.69732 11.1326 9.75 11 9.75H3C2.46957 9.75 1.96086 9.53929 1.58579 9.16421C1.21071 8.78914 1 8.28043 1 7.75V1.75C1 1.61739 1.05268 1.49021 1.14645 1.39645C1.24021 1.30268 1.36739 1.25 1.5 1.25Z"
191 stroke="#525252" stroke-linecap="round" stroke-linejoin="round"/>
192 </svg>
193 <#elseif mediaType == MEDIA_TYPE_AUDIO>
194 <svg viewBox="0 0 12 15" fill="none" xmlns="http://www.w3.org/2000/svg">
195 <path d="M5.9999 12V14M10.4749 8C10.3452 9.09574 9.81795 10.1058 8.99314 10.8387C8.16834 11.5716 7.10329 11.9765 5.9999 11.9765C4.89651 11.9765 3.83147 11.5716 3.00666 10.8387C2.18186 10.1058 1.65462 9.09574 1.5249 8M5.9999 1C7.38061 1 8.4999 2.11929 8.4999 3.5V7.5C8.4999 8.88071 7.38061 10 5.9999 10C4.61919 10 3.4999 8.88071 3.4999 7.5V3.5C3.4999 2.11929 4.61919 1 5.9999 1Z"
196 stroke="#373737" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
197 </svg>
198 <#elseif mediaType == MEDIA_TYPE_PHOTO>
199 <svg viewBox="0 0 14 13" fill="none" xmlns="http://www.w3.org/2000/svg">
200 <path d="M12 11.5H2C1.73478 11.5 1.48043 11.3946 1.29289 11.2071C1.10536 11.0196 1 10.7652 1 10.5V3.5C1 3.23478 1.10536 2.98043 1.29289 2.79289C1.48043 2.60536 1.73478 2.5 2 2.5H4L5 1H9L10 2.5H12C12.2652 2.5 12.5196 2.60536 12.7071 2.79289C12.8946 2.98043 13 3.23478 13 3.5V10.5C13 10.7652 12.8946 11.0196 12.7071 11.2071C12.5196 11.3946 12.2652 11.5 12 11.5Z"
201 stroke="#373737" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
202 <path d="M7 9C8.24264 9 9.25 7.99264 9.25 6.75C9.25 5.50736 8.24264 4.5 7 4.5C5.75736 4.5 4.75 5.50736 4.75 6.75C4.75 7.99264 5.75736 9 7 9Z"
203 stroke="#373737" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
204 </svg>
205 <#elseif mediaType == MEDIA_TYPE_MAP>
206 <svg viewBox="0 0 14 13" fill="none" xmlns="http://www.w3.org/2000/svg">
207 <path d="M5 10L1 11V2L5 1M5 10L9 12M5 10V1M5 1L9 3M9 12V3M9 12L13 11V2L9 3" stroke="#373737"
208 stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"/>
209 </svg>
210 </#if>
211</#macro>
212
213
214
215<#macro renderCard infoToRender siteUrl>
216 <#if !infoToRender["cardTitle"]??>
217 <#return />
218 </#if>
219
220 <#assign cssRoot = "multimedia"/>
221 <div class="card ${rootCss}" category-id="${infoToRender.mediaId}">
222 <#if infoToRender.thumbnailImage.url?has_content>
223 <div class="img-container">
224 <img src="${infoToRender.thumbnailImage.url}" alt="${infoToRender.thumbnailImage.alt}">
225 </div>
226 </#if>
227 <div class="text-container">
228 <#if infoToRender.renderEditoriaCategoryAsLink>
229 <a class="editoria small-caps-lg"
230 href="${siteUrl}/listar-editoria?q=&category=${infoToRender.editoriaCategoryId}">${infoToRender.editoriaCategoryTitle}</a>
231 <#else>
232 <p class="editoria small-caps-lg">${infoToRender.editoriaCategoryTitle}</p>
233 </#if>
234 <h2 class="card-title h2">
235 <#assign MAX_CARD_TITLE_CHARACTERS = 76 />
236 <#if infoToRender.cardTitle?length gt MAX_CARD_TITLE_CHARACTERS>
237 ${infoToRender.cardTitle?substring(0, MAX_CARD_TITLE_CHARACTERS)} + ...
238 <#else>
239 ${infoToRender.cardTitle}
240 </#if>
241 <#-- ${infoToRender.cardTitle} -->
242 </h2>
243 <div class="date">
244 <#if locale == "pt_BR">
245 <p class="updated">Publicado em ${formatDate(infoToRender.lastPublishDate)}
246 às ${formatTime(infoToRender.lastPublishDate)}</p>
247 <#else >
248 <p class="updated">Published on ${formatDate(infoToRender.lastPublishDate)}
249 at ${formatTime(infoToRender.lastPublishDate)} </p>
250 </#if>
251 </div>
252
253
254 <div class="media-link-container">
255 <div class="media-category-title-container">
256 <@printMediaIcon infoToRender.mediaType />
257 <p class="title">
258 ${infoToRender.mediaCategoryTitle}
259 </p>
260 </div>
261
262 <#assign originalFileSource= "" />
263 <#assign imgAlt= "" />
264 <#if infoToRender.originalFile.url?has_content>
265 <#assign originalFileSource= infoToRender.originalFile.url />
266 <#assign imgAlt= infoToRender.originalFile.alt />
267 <#else>
268 <#assign originalFileSource= infoToRender.originalFileExternalUrl />
269 <#assign imgAlt= infoToRender.cardTitle />
270 </#if>
271 <#--
272 <p>
273 infoToRender.originalFile.url : ${infoToRender.originalFile.url} <br>
274 infoToRender.originalFileExternalUrl : ${infoToRender.originalFileExternalUrl}
275 </p>
276 -->
277 <a class="download link" href="${originalFileSource}" target="_blank">
278 Download
279 <svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
280 <path d="M5.04688 6.73438L8 9.6875M8 9.6875L10.9531 6.73438M8 9.6875V1.8125M14.1875 9.6875V13.625C14.1875 13.7742 14.1282 13.9173 14.0227 14.0227C13.9173 14.1282 13.7742 14.1875 13.625 14.1875H2.375C2.22582 14.1875 2.08274 14.1282 1.97725 14.0227C1.87176 13.9173 1.8125 13.7742 1.8125 13.625V9.6875"
281 stroke="#008542" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
282 </svg>
283 </a>
284 </div>
285 </div>
286 </div>
287</#macro>
288
289<#macro printCssStyleForMedia cssRoot>
290 <style>
291 .${cssRoot} {
292 display: flex;
293 flex-direction: column;
294 gap: var(--space-none);
295 border-radius: var(--border-radius-lg);
296 border: 1px solid var(--color-neutral-400, #EEE);
297 background: var(--color-neutral-100, #FFF);
298 height: 404px;
299 width: 306px;
300 flex-shrink: 0;
301 }
302 .${cssRoot}.none {
303 display: none;
304 }
305
306 .${cssRoot}:hover {
307 box-shadow: var(--box-shadow-neutral);
308 transition: box-shadow 300ms ease-in-out;
309 }
310
311 .${cssRoot} .img-container {
312 height: 170px;
313 }
314
315 .${cssRoot} .img-container img {
316 width: 306px;
317 border-radius: var(--space-sm) var(--space-sm) var(--space-none) var(--space-none);
318 object-fit: cover;
319 left: -1px;
320 position: relative;
321 height: 170px;
322 }
323
324 .${cssRoot} .text-container {
325 width: 100%;
326 padding: var(--space-md);
327 display: flex;
328 flex-direction: column;
329 gap: var(--space-xxs, 8px);
330 height: 100%;
331 }
332
333 .${cssRoot} .text-container .editoria {
334 color: var(--color-neutral-800, #373737);
335 font-weight: var(--font-weight-regular);
336 }
337
338 .${cssRoot} .text-container .card-title {
339 color: var(--color-neutral-800, #373737);
340 margin: 0;
341 font-family: var(--font-family-base, "Petrobras Sans");
342 font-size: var(--font-size-sm, 20px);
343 font-style: var(--font-style-normal,normal);
344 font-weight: var(--font-weight-bold, 700);
345 line-height: var(--line-height-md, 132%); /* 26.4px */
346 }
347
348 .${cssRoot} .text-container .date,
349 .${cssRoot} .text-container .date .updated,
350 .${cssRoot} .text-container .date .published {
351 color: var(--color-neutral-800, #373737);
352 font-family: var(--font-family-base, "Petrobras Sans");
353 font-size: var(--font-size-xxxs, 14px);
354 font-style: var(--font-style-normal, normal);
355 font-weight: var(--font-weight-regular, 400);
356 line-height: var(--line-height-xl, 160%); /* 25.6px */
357 margin: var(--space-none);
358 }
359
360 .${cssRoot} .text-container .bar {
361 width: var(--size-xl);
362 height: 4.1px;
363 margin-top: var(--space-md);
364 background-color: var(--color-secondary-medium);
365 }
366
367 .${cssRoot} .text-container .date {
368 }
369
370 .${cssRoot} .text-container .media-link-container {
371 display: flex;
372 flex-direction: row;
373 align-items: flex-end;
374 justify-content: space-between;
375 padding-top: var(--size-xxxs);
376 height: 100%;
377 }
378
379 .${cssRoot} .text-container .media-link-container .media-category-title-container {
380 display: flex;
381 gap: var(--size-micro);
382 align-items: center;
383 justify-content: center;
384 border-radius: 100px;
385 padding: var(--space-none) var(--space-xs);
386 border: 1px solid var(--color-neutral-400, #EEE);
387 background: var(--color-neutral-200, #FBFBFB);
388 height: 32px;
389 }
390
391 .${cssRoot} .text-container .media-link-container .media-category-title-container svg {
392 max-width: 16px;
393 width: 16px;
394 }
395
396 .${cssRoot} .text-container .media-link-container .media-category-title-container .title {
397 color: var(--color-neutral-700, #525252);
398 font-family: var(--font-family-base);
399 font-size: var(--font-size-xxxs);
400 font-style: var(--font-style-normal);
401 font-weight: var(--font-weight-regular);
402 line-height: var(--line-height-xl);
403 margin: var(--space-none);
404 }
405
406 .${cssRoot} .text-container .media-link-container .download {
407 color: var(--color-primary-medium, #008542);
408 font-family: var(--font-family-base);
409 font-size: var(--font-size-xxxs);
410 font-style: var(--font-style-normal);
411 font-weight: var(--font-weight-bold);
412 line-height: var(--line-height-lg);
413
414 text-decoration-line: var(--text-decoration-underline);
415 display: flex;
416 gap: var(--space-xxs);
417 align-items: center;
418 }
419
420 .${cssRoot} .text-container .media-link-container .download svg {
421 width: 18px !important;
422 height: 18px;
423 }
424
425 @media screen and (max-width: 742px) {
426 .${cssRoot} {
427 flex-direction: column;
428 gap: var(--space-none);
429 min-width: 296px;
430 }
431
432 .${cssRoot} .img-container img {
433 height: 154px;
434 border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
435 object-fit: cover;
436 max-width: 296px;
437 }
438
439 .${cssRoot} .text-container {
440 padding: var(--space-md);
441 gap: var(--space-xxs);
442 }
443
444 .${cssRoot} .text-container .bar {
445 margin: var(--space-sm) var(--space-none);
446 }
447
448 .${cssRoot} .text-container .media-link-container .media-category-title-container .title {
449 font-size: var(--font-size-micro);
450 }
451
452 .${cssRoot} .text-container .media-link-container .media-category-title-container svg {
453 width: 16px;
454 }
455
456 .${cssRoot} .text-container .media-link-container .media-category-title-container {
457 gap: var(--size-micro);
458 padding: var(--space-xxxs) var(--space-xxs);
459 height: 24px;
460 }
461
462 .${cssRoot} .text-container .media-link-container .download {
463 font-size: var(--font-size-micro);
464 }
465 }
466 </style>
467</#macro>
468
469
470<#--assign AssetEntryFinder = serviceLocator.findService("com.liferay.asset.kernel.service.persistence.AssetEntryFinder") -->
471
472<#function getAssetEntries assetEntryQuery portalUtil assetEntryLocalServiceUtil>
473 <#attempt >
474 <#assign groupId = themeDisplay.getScopeGroupId()>
475 <#assign companyId = themeDisplay.getCompanyId()>
476 <#assign realUserId = themeDisplay.getDefaultUserId() />
477 <#assign className = "com.liferay.journal.model.JournalArticle">
478 <#assign classNameId = portalUtil.getClassNameId(className)>
479
480 ${assetEntryQuery.setClassNameIds([classNameId]) }
481 ${assetEntryQuery.setEnd(8)}
482
483 <#assign allAssets = []/>
484 <#list mediaVocabulary.getCategories() as medCat>
485 ${assetEntryQuery.setAllCategoryIds([medCat.getCategoryId()])}
486 <#assign ents = assetEntryLocalServiceUtil.getEntries(assetEntryQuery) />
487 <#assign allAssets = allAssets + ents />
488 </#list>
489
490 <#return allAssets />
491 <#recover >
492 <#return [] />
493 </#attempt>
494</#function>
495
496
497
498<#assign allAssets = getAssetEntries(assetEntryQuery, portalUtil, assetEntryLocalServiceUtil) />
499<#list allAssets as assetEntry>
500 <#assign cardData = getCardData(assetEntry journalArticleService fileEntryService cardMap mediaVocabulary) />
501 <@renderCard cardData SITE_URL/>
502</#list>
503
504<@printCssStyleForMedia rootCss/>
505
506
507<#assign cardMap = {} />
508<#list allAssets as assetEntry>
509
510 <#assign journalArticleCategories = assetCategoryLocalService.getCategories("com.liferay.journal.model.JournalArticle", entry.getClassPK()) />
511
512 <#assign mediaCategory = getFirstCategoryFromVocabulary(journalArticleCategories, mediaVocabulary) />
513 <#assign mediCategoryId = -1 />
514 <#if mediaCategory?has_content>
515 <#assign mediCategoryId = mediaCategory.getCategoryId() />
516 </#if>
517 <#if mediCategoryId == -1>
518 <#return {} />
519 </#if>
520 <#if cardMap[mediCategoryId?string]??>
521 <#if cardMap[mediCategoryId?string]?size gt 7 >
522 <#--return {} -->
523 </#if>
524 </#if>
525
526 <#assign journalArticle = journalArticleService.getLatestArticle(entry.getClassPK()) />
527 <#assign ddmStructure = journalArticle.getDDMStructure() />
528 <#assign fieldList = getFieldListByStructure(ddmStructure) />
529 <#assign xmlArticle = journalArticle.getDocument().getRootElement() />
530
531 <#assign cardTitle = getFieldValue(fieldList, xmlArticle, "Título Home")/>
532 <#assign subtitle = getFieldValue(fieldList, xmlArticle, "Legenda")/>
533 <#assign author = getFieldValue(fieldList, xmlArticle, "Autor")/>
534 <#assign thumbnailImage = getMediaInfo(fieldList, xmlArticle, "Imagem de thumbnail", fileEntryService) >
535
536 <#assign groupId = getIdFromFieldName(fieldList, "Arquivo original") />
537 <#assign originalFileGroup = getGroupNode(groupId, xmlArticle) />
538
539 <#assign originalFile = getMediaInfo(fieldList, originalFileGroup, "Arquivo selecionado", fileEntryService) >
540 <#assign originalFileExternalUrl = getFieldValue(fieldList, originalFileGroup, "URL externa") />
541
542 <#assign lastPublishDate = journalArticle.getDisplayDate()>
543 <#assign createDate = journalArticle.getCreateDate()>
544 <#if journalArticle.getLastPublishDate()??>
545 <#assign lastPublishDate = journalArticle.getLastPublishDate()>
546 </#if>
547
548 <#assign editoriaCategory = getFirstCategoryFromVocabulary(journalArticleCategories, editoriaVocabulary) />
549
550 <#assign photoCategory = getCategory(mediaPhotoCategoryTitle[locale], journalArticleCategories) />
551 <#assign documentCategory = getCategory(mediaDocumentCategoryTitle[locale], journalArticleCategories) />
552 <#assign mapCategory = getCategory(mediaMapCategoryTitle[locale], journalArticleCategories) />
553 <#assign audioCategory = getCategory(mediaAudioCategoryTitle[locale], journalArticleCategories) />
554 <#assign videoCategory = getCategory(videoPhotoCategoryTitle[locale], journalArticleCategories) />
555
556 <#assign isPhoto = photoCategory?has_content />
557 <#assign isDocument = documentCategory?has_content />
558 <#assign isMap = mapCategory?has_content />
559 <#assign isAudio = audioCategory?has_content />
560 <#assign isVideo = videoCategory?has_content />
561
562 <#assign mediaType = -1 />
563
564 <#if isPhoto>
565 <#assign mediaType = MEDIA_TYPE_PHOTO />
566 <#elseif isDocument>
567 <#assign mediaType = MEDIA_TYPE_DOCUMENT />
568 <#elseif isMap>
569 <#assign mediaType = MEDIA_TYPE_MAP />
570 <#elseif isAudio>
571 <#assign mediaType = MEDIA_TYPE_AUDIO />
572 <#elseif isVideo>
573 <#assign mediaType = MEDIA_TYPE_VIDEO />
574 </#if>
575
576 <#assign cardInfo = {"cardTitle": cardTitle,
577 "subtitle" : subtitle,
578 "author": author,
579 "thumbnailImage": thumbnailImage,
580 "originalFile": originalFile,
581 "originalFileExternalUrl": originalFileExternalUrl,
582 "lastPublishDate": lastPublishDate,
583 "createDate" : createDate,
584 "mediaId": mediCategoryId,
585 "mediaCategoryTitle": mediaCategory.getTitle(locale),
586 "mediaType" : mediaType,
587 "editoriaCategoryTitle" : editoriaCategory.getTitle(locale),
588 "editoriaCategoryId" : editoriaCategory.getCategoryId(),
589 "renderEditoriaCategoryAsLink" : true,
590 "renderMediaCategoryAsLink" : false
591 }/>
592
593 <h1>
594 <!-- originalFile.url : ${cardInfo.originalFile.url} -->
595 </h1>
596
597 <#if cardMap[mediCategoryId?string]??>
598 <#assign cardMap = cardMap + {mediCategoryId : cardMap[mediCategoryId?string] + [cardInfo]} />
599 <#else>
600 <#assign cardMap = cardMap + {mediCategoryId : [cardInfo]} />
601 </#if>
602
603</#list>
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619<#-- Renderizar Lista de cards -->
620<#--if entries?has_content>
621 <#list entries as entry>
622 <#assign cardData = getCardData(entry journalArticleService fileEntryService cardMap mediaVocabulary) />
623 <@renderCard cardData SITE_URL/>
624 </#list>
625
626 <@printCssStyleForMedia rootCss/>
627</#if -->
Utilize nossa busca para encontrar o que procura
Faça uma busca:
Buscar
Mais pesquisados
Preço dos combustíveis
Pré-Sal
Time Petrobras
Um erro ocorreu enquanto processava o modelo.
Java method "com.liferay.journal.model.impl.JournalArticleImpl.getDocument()" threw an exception when invoked on com.liferay.journal.model.impl.JournalArticleImpl object "{\"mvccVersion\": 1, \"ctCollectionId\": 0, \"uuid\": \"e676f63b-3777-4c00-5a1d-7f604a04072c\", \"id\": 12613261, \"resourcePrimKey\": 10628951, \"groupId\": 10623376, \"companyId\": 20099, \"userId\": 873837, \"userName\": \"Gefersom Lima\", \"createDate\": \"Tue Oct 31 18:45:56 GMT 2023\", \"modifiedDate\": \"Fri Jan 26 22:15:39 GMT 2024\", \"externalReferenceCode\": \"7748054\", \"folderId\": 10628763, \"classNameId\": 0, \"classPK\": 0, \"treePath\": \"/10628763/\", \"articleId\": \"7748054\", \"version\": 1.3, \"urlTitle\": \"configuracao-de-rodape\", \"DDMStructureId\": 10628806, \"DDMTemplateKey\": \"\", \"defaultLanguageId\": \"pt_BR\", \"layoutUuid\": \"\", \"displayDate\": \"Tue Oct 31 18:43:00 GMT 2023\", \"expirationDate\": null, \"reviewDate\": null, \"indexable\": false, \"smallImage\": false, \"smallImageId\": 0, \"smallImageSource\": 1, \"smallImageURL\": \"\", \"lastPublishDate\": null, \"status\": 0, \"statusByUserId\": 873856, \"statusByUserName\": \"Wagner de Melo Reck\", \"statusDate\": \"Fri Jan 26 22:15:39 GMT 2024\"}"; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign xmlArticle = article.getDocum... [in template "20099#20135#2683802" in function "extractFooterInfo" at line 30, column 3] - Reached through: @renderSacInfoDates entry, journalArt... [in template "20099#20135#2683802" at line 83, column 5] ----
1<#--
2Widget templates can be used to modify the look of a
3specific application.
4
5Please use the right panel to quickly add commonly used variables.
6Autocomplete is also available and can be invoked by typing "${".
7-->
8
9<#include "${templatesPath}/1975398" />
10
11<#assign journalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
12<#assign fileEntryService = staticUtil["com.liferay.document.library.kernel.service.DLFileEntryLocalServiceUtil"] />
13
14<#function extractFooterInfo curEntry journalArticleService fileEntryService >
15 <#if !curEntry?? >
16 <#return {}>
17 </#if>
18
19 <#assign article = journalArticleService.getLatestArticle(curEntry.getClassPK()) />
20 <#if !article??>
21 <#return {}>
22 </#if>
23
24 <#assign ddmStructure = article.getDDMStructure()>
25 <#if !ddmStructure??>
26 <#return {}>
27 </#if>
28
29 <#assign fieldList = getFieldListByStructure(ddmStructure) />
30 <#assign xmlArticle = article.getDocument().getRootElement() />
31
32
33 <#assign iconInformation = getMediaInfo(fieldList, xmlArticle, "Acesso à Informação - Imagem", fileEntryService) />
34 <#assign iconSac = getMediaInfo(fieldList, xmlArticle, "SAC Imagem", fileEntryService) />
35 <#assign sacLabel = getFieldValue(fieldList, xmlArticle, "SAC - Rótulo") />
36 <#assign sacNumber = getFieldValue(fieldList, xmlArticle, "SAC - Número") />
37 <#assign informationLabel = getFieldValue(fieldList, xmlArticle, "Acesso à Informação") />
38 <#assign transparencyLabel = getFieldValue(fieldList, xmlArticle, "Portal da Transparencia - Rótulo") />
39 <#assign transparencyLink = getFieldValue(fieldList, xmlArticle, "Portal da Transparencia - Link") />
40
41
42 <#return {
43 "iconInformation": iconInformation,
44 "iconSac" : iconSac,
45 "sacLabel" : sacLabel,
46 "sacNumber" : sacNumber,
47 "informationLabel": informationLabel,
48 "transparencyLabel": transparencyLabel,
49 "transparencyLink": transparencyLink
50 }>
51
52</#function>
53
54
55<#macro renderSacInfoDates entry journalArticleService fileEntryService >
56 <#assign info = extractFooterInfo(entry journalArticleService fileEntryService) />
57 <div class="footer-informations">
58 <div class="sac-information icons-container">
59
60 <img alt="${info.iconSac.alt}" src="${info.iconSac.url}"/>
61 <div class="icons-texts">
62 <p class="button-xs-regular" >${info.sacLabel}</p>
63 <p class="button-xs-bold">${info.sacNumber}</p>
64 </div>
65 </div>
66
67 <div class="logo-informations icons-container">
68 <img alt="${info.iconInformation.alt}" src="${info.iconInformation.url}"/>
69 <div class="icons-texts">
70 <p class="button-xs-regular">
71 ${info.informationLabel}
72 </p>
73 <a class="button-xs-bold" open="_blank"
74 href='${info.transparencyLink}'>
75 ${info.transparencyLabel}
76 </a>
77 </div>
78 </div>
79 </div>
80</#macro>
81
82<#if entry?has_content>
83 <@renderSacInfoDates entry journalArticleService fileEntryService />
84</#if>
85
86
87<style>
88
89 .footer-informations {
90 display: flex;
91 justify-content: center;
92 align-items: center;
93 }
94
95 .footer-informations .icons-container img {
96 width: 29px;
97 height: 29px;
98 margin: 5px 8px 0 0;
99 }
100
101 .footer-informations .icons-container {
102 color: var(--color-text-primary-default);
103 display: flex;
104 }
105
106 .footer-informations .logo-informations {
107 padding-left: calc(var(--space-lg)/2);
108 display: flex;
109 }
110
111 .footer-informations .icons-container .icons-texts * {
112 color: var(--color-text-primary-default);
113 }
114
115 .footer-informations .sac-information .icons-texts {
116 border-right: 1px solid var(--border-color-light);
117 }
118
119
120 .footer-informations .icons-container .icons-texts {
121 padding-right: calc(var(--space-lg)/2);
122 display: flex;
123 flex-direction: column;
124
125 }
126
127 @media screen and (max-width: 767px) {
128
129 .footer-informations {
130 flex-direction: column;
131 }
132
133 .footer-informations .icons-container {
134 margin-bottom: 16px !important;
135 }
136
137 .footer-informations .sac-information .icons-texts {
138 border-right: none;
139 }
140
141 .footer-informations .logo-informations {
142 margin-bottom: 16px;
143 padding: 0;
144 }
145
146 }
147
148</style>
- Assessoria de Imprensa
- Categorias
- Acesse também
Um erro ocorreu enquanto processava o modelo.
Java method "com.liferay.journal.model.impl.JournalArticleImpl.getDocument()" threw an exception when invoked on com.liferay.journal.model.impl.JournalArticleImpl object "{\"mvccVersion\": 1, \"ctCollectionId\": 0, \"uuid\": \"e676f63b-3777-4c00-5a1d-7f604a04072c\", \"id\": 12613261, \"resourcePrimKey\": 10628951, \"groupId\": 10623376, \"companyId\": 20099, \"userId\": 873837, \"userName\": \"Gefersom Lima\", \"createDate\": \"Tue Oct 31 18:45:56 GMT 2023\", \"modifiedDate\": \"Fri Jan 26 22:15:39 GMT 2024\", \"externalReferenceCode\": \"7748054\", \"folderId\": 10628763, \"classNameId\": 0, \"classPK\": 0, \"treePath\": \"/10628763/\", \"articleId\": \"7748054\", \"version\": 1.3, \"urlTitle\": \"configuracao-de-rodape\", \"DDMStructureId\": 10628806, \"DDMTemplateKey\": \"\", \"defaultLanguageId\": \"pt_BR\", \"layoutUuid\": \"\", \"displayDate\": \"Tue Oct 31 18:43:00 GMT 2023\", \"expirationDate\": null, \"reviewDate\": null, \"indexable\": false, \"smallImage\": false, \"smallImageId\": 0, \"smallImageSource\": 1, \"smallImageURL\": \"\", \"lastPublishDate\": null, \"status\": 0, \"statusByUserId\": 873856, \"statusByUserName\": \"Wagner de Melo Reck\", \"statusDate\": \"Fri Jan 26 22:15:39 GMT 2024\"}"; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign xmlArticle = article.getDocum... [in template "20099#20135#2683780" in function "extractFooterInfo" at line 31, column 3] - Reached through: @renderConfigFooterDates entry, journ... [in template "20099#20135#2683780" at line 82, column 5] ----
1<#--
2Widget templates can be used to modify the look of a
3specific application.
4
5Please use the right panel to quickly add commonly used variables.
6Autocomplete is also available and can be invoked by typing "${".
7-->
8
9<#include "${templatesPath}/1975398" />
10
11<#assign journalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
12
13<#function extractFooterInfo curEntry journalArticleService >
14 <#if !curEntry?? >
15 <#return {} />
16 </#if>
17
18 <#assign article = journalArticleService.getLatestArticle(curEntry.getClassPK()) />
19 <#if !article??>
20 <#return {} />
21 </#if>
22
23 <#assign ddmStructure = article.getDDMStructure() />
24 <#if !ddmStructure??>
25 <#return {} />
26 </#if>
27
28 <#assign productCategories = [] />
29
30 <#assign fieldList = getFieldListByStructure(ddmStructure) />
31 <#assign xmlArticle = article.getDocument().getRootElement() />
32
33
34 <#assign cookiesLabel = getFieldValue(fieldList, xmlArticle, "Definições de Cookies - Rótulo") />
35 <#assign copyrightMessage = getFieldValue(fieldList, xmlArticle, "Mensagem de Copyright") />
36
37 <#assign linkItemGroupXMLList = getNodesByLabel(fieldList, xmlArticle, "Links do rodapé")>
38 <#assign linksAndLabels = []>
39 <#list linkItemGroupXMLList as linkItemGroupXML>
40 <#assign obj = {
41 "link": getFieldValue(fieldList, linkItemGroupXML, "Link"),
42 "label": getFieldValue(fieldList, linkItemGroupXML, "Rótulo")
43 } />
44 <#assign linksAndLabels = linksAndLabels + [obj] />
45 </#list>
46 <#return {
47 "linksAndLabels": linksAndLabels,
48 "cookiesLabel" : cookiesLabel,
49 "copyrightMessage": copyrightMessage
50 } />
51</#function>
52
53
54<#macro renderConfigFooterDates entry journalArticleService >
55 <#assign info = extractFooterInfo(entry journalArticleService) />
56
57
58 <div class="fragment-footer breakpoint" id="pet-fragment-footer">
59
60 <div class="petrobras-footer col-1-12 md-col-1-8 sm-col-1-4">
61 <div class="footer-other-links-container">
62 <div class="footer-links">
63 <a class="menu-item-footer button-sm-regular ot-sdk-show-settings" id="ot-sdk-btn" target="_blank" tabindex="0">${info.cookiesLabel} </a>
64 <#list info.linksAndLabels as link>
65 <a class="button-sm-regular" open="_blank"
66 href='${link.link}'
67 tabindex="0">
68 ${link.label}
69 </a>
70 </#list>
71 </div>
72 <p class="footer_copyright button-sm-regular">${info.copyrightMessage}</p>
73 </div>
74 </div>
75
76
77 </div>
78
79</#macro>
80
81<#if entry?has_content>
82 <@renderConfigFooterDates entry journalArticleService />
83</#if>
84
85
86<style>
87
88
89 .petrobras-footer * {
90 margin: 0;
91 padding: 0;
92 }
93
94 .petrobras-footer {
95 display: flex;
96 justify-content: space-between;
97 font-family: var(--font-family-base);
98 width: 100%;
99 background: var(--color-background-default-level-02)
100 }
101
102
103 .petrobras-footer .footer-other-links-container {
104 display: flex;
105 justify-content: space-between;
106 gap: 16px;
107 width: 100%;
108 margin: var(--space-xl) 0 !important;
109 }
110
111 .petrobras-footer .footer-other-links-container .footer-links {
112 display: flex;
113 gap: var(--space-md);
114 }
115
116 .petrobras-footer .footer-other-links-container .footer-links p,
117 .petrobras-footer .footer-other-links-container .footer-links a {
118 color: var(--color-text-primary-default);
119 }
120
121 /*Cookies button*/
122 .petrobras-footer .footer-other-links-container .footer-links
123 #ot-sdk-btn.ot-sdk-show-settings, #ot-sdk-btn.optanon-show-settings {
124 color: var(--color-text-primary-default);
125 border: none;
126 padding: 0;
127 font-size: var(--font-size-xxxs);
128 line-height: var(--line-height-lg);
129 }
130
131 .petrobras-footer .footer-other-links-container .footer-links
132 #ot-sdk-btn.ot-sdk-show-settings:hover, #ot-sdk-btn.optanon-show-settings:hover {
133 background: transparent;
134 color: var(--color-neutral-800);
135 }
136
137
138 .petrobras-footer .footer-other-links-container .footer_copyright {
139 color: var(--color-neutral-dark-to-bright-300, var(--color-neutral-600));
140 }
141
142
143
144 @media (max-width: 1200px) {
145
146 .petrobras-footer .footer-other-links-container {
147 display: flex;
148 flex-direction: column;
149 margin: 48px auto 55px auto;
150 align-items: center;
151 text-align: center;
152 justify-content: flex-start;
153 gap: var(--space-md);
154 }
155
156 .petrobras-footer .footer-other-links-container p {
157 margin-left: 0;
158 }
159
160 .petrobras-footer .footer-other-links-container .footer-links {
161 display: flex;
162 flex-direction: column;
163 gap: var(--space-md);
164 }
165
166
167 .petrobras-footer .footer-other-links-container .footer-links a,
168 .petrobras-footer .footer-other-links-container .footer-links p {
169 margin-left: 0;
170 }
171
172 }
173
174 @media (max-width: 767px) {
175
176 .petrobras-footer .footer-other-links-container .footer_copyright {
177 padding-bottom: 25px;
178 }
179 }
180
181</style>
Canais
Idioma
Acessibilidade
Busca
Um inesperado erro ocorreu.
Um inesperado erro ocorreu.
Faça uma busca:
Buscar
Mais pesquisados
Preço dos combustíveis
Pré-Sal
Time Petrobras
Um inesperado erro ocorreu.
Um inesperado erro ocorreu.