S'ha produït un error mentre es processava la plantilla.
Java method "related.news.RelatedNewsServiceImpl.getRelatedNews(long, long, long, long, int)" threw an exception when invoked on related.news.RelatedNewsServiceImpl object "related.news.RelatedNewsServiceImpl@16c2b8fe"; see cause exception in the Java stack trace.
----
FTL stack trace ("~" means nesting-related):
- Failed at: #assign entries = RelatedNewsService... [in template "37101#37411#42333" at line 271, column 9]
----
1<#setting url_escaping_charset="UTF-8">
2
3<#-- get services -->
4<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") />
5<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService") />
6<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
7<#assign dlFileEntryLocalServiceUtil = staticUtil["com.liferay.document.library.kernel.service.DLFileEntryLocalServiceUtil"] />
8<#assign groupLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService") />
9
10<#-- get other data -->
11<#assign article = journalArticleLocalService.getArticle( groupId, .vars['reserved-article-id'].data) />
12<#assign assetEntry = assetEntryLocalService.getEntry('com.liferay.journal.model.JournalArticle', article.resourcePrimKey) />
13<#assign assetEntryCategories = assetEntry.getCategories() />
14<#if assetEntryCategories?size gt 0>
15 <#assign mainCategory = assetEntryCategories?first />
16</#if>
17
18<#-- get groups -->
19<#assign globalGroupId = groupLocalService.getCompanyGroup(portalUtil.getDefaultCompanyId()).getGroupId()
20 curGroup = groupLocalService.getGroup(getterUtil.getLong(groupId))
21 curGroupDisplayUrl = curGroup.getDisplayURL(themeDisplay)
22 parentGroupId = assetEntry.getGroupId()
23 parentGroup = groupLocalService.getGroup(getterUtil.getLong(parentGroupId))
24 parentGroupName = htmlUtil.escape(parentGroup.getDescriptiveName())
25 parentGroupDisplayUrl = parentGroup.getDisplayURL(themeDisplay)
26 displayParentGroup = true />
27
28<#-- set-up entry url if parent group is different than current group -->
29<#if parentGroupId != groupId ||
30 parentGroupId == globalGroupId>
31 <#assign parentGroupDisplayUrl = curGroupDisplayUrl />
32</#if>
33
34<#-- hide parent group name when it is Global -->
35<#if parentGroupId == globalGroupId>
36 <#assign displayParentGroup = false />
37</#if>
38
39<div class="full-view-container press-release-container">
40 <div class="header">
41 <div class="container-fluid container-fluid-max-xl">
42 <div class="d-lg-flex justify-content-lg-between align-items-end">
43 <div class="d-block d-lg-inline-block flex-shrink-0">
44 <h4><@liferay.language key="press-releases" /></h4>
45 </div>
46 <div class="tags-nav-container scroll-nav-container d-flex d-lg-inline-flex align-items-center justify-content-lg-end ml-lg-4 mr-n3 mr-lg-0 mt-2 mt-lg-0 w-lg-2/3">
47 <#if assetEntry.getTags()?size gt 0>
48 <button type="button" class="btn btn-unstyled btn-scroll-left flex-shrink-0" id="btnScrollLeft">
49 <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
50 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7" />
51 </svg>
52 </button>
53 <ul class="list-group list-group-horizontal tags-list p-0" id="tagsNavigation">
54 <#list assetEntry.getTags() as tag>
55 <#assign tagURL = languageUtil.format(locale, "tag-url", false) + '/-/tag/${tag.getName()?url}' />
56
57 <li class="list-group-item mb-0">
58 <a href="${tagURL}"><span class="capitalize-first">${tag.getName()}</span></a>
59 </li>
60 </#list>
61 </ul>
62 <button type="button" class="btn btn-unstyled btn-scroll-right flex-shrink-0" id="btnScrollRight">
63 <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
64 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" />
65 </svg>
66 </button>
67 </#if>
68 </div>
69 </div>
70 </div>
71 </div>
72
73 <div class="container-fluid container-fluid-max-xl py-5 py-md-6">
74 <article class="press-release">
75 <div class="row">
76 <div class="col-md-8 col-lg-9">
77 <div class="article-header mb-5 mb-lg-6">
78 <#if mainCategory??>
79 <#assign categoryURL = languageUtil.format(locale, "categorization-press-releases-url", false) + '/-/categories/${mainCategory.getCategoryId()}' />
80
81 <h6 class="subtitle-xs mb-3">
82 <a class="text-default-color" href="${categoryURL}"><span class="capitalize-first">${mainCategory.getTitle(locale)}</span></a>
83 </h6>
84 </#if>
85 <h1 class="title h3 mb-3">${.vars['reserved-article-title'].data}</h1>
86
87 <#if intro.getData() != ''>
88 <div class="intro font-size-3xl">
89 ${intro.getData()}
90 </div>
91 </#if>
92 </div>
93
94 <p class="subtitle-xs meta-data mb-3">
95 <span class="date">
96 <#if assetEntry.getPublishDate()??>
97 ${dateUtil.getDate(assetEntry.getPublishDate(), "dd.MM.yy", locale)}
98 <#else>
99 ${dateUtil.getDate(assetEntry.getModifiedDate(), "dd.MM.yy", locale)}
100 </#if>
101 </span>
102 <#if displayParentGroup>
103 <span class="delimiter"> | </span>
104 <span class="origin">${parentGroupName}</span>
105 </#if>
106 </p>
107 </div>
108 </div>
109 <div class="row">
110 <div class="col-md-8 col-lg-9 content-col">
111 <#if mainImage.getData()?? && mainImage.getData() != "">
112 <div class="main-image mx-n3 mx-md-0 mb-5">
113 <div class="embed-responsive embed-responsive-16by9 w-full">
114 <img class="embed-responsive-item object-cover"<#if mainImage.getAttribute("alt")??> alt="${mainImage.getAttribute("alt")}"</#if> data-fileentryid="${mainImage.getAttribute("fileEntryId")}" src="${mainImage.getData()}" loading="lazy" />
115 </div>
116
117 <#if mainImageCaption.getData()?? && mainImageCaption.getData() != "">
118 <p class="caption">${mainImageCaption.getData()}</p>
119 </#if>
120 </div>
121 </#if>
122
123 <@getShareMenu />
124
125 <#if body.getData()?? && body.getData() != ''>
126 <div class="content text-body-lg">
127 ${body.getData()}
128 </div>
129 </#if>
130 </div>
131 <div class="col-md-4 col-lg-3 sidebar-col">
132 <div class="sidebar">
133 <#if FieldsGroup98946696.note.getData()?? && FieldsGroup98946696.note.getData() != ''>
134 <#assign noteBoxBgColor = '#f5f5f5' />
135 <#if FieldsGroup98946696.noteBgColor?? && FieldsGroup98946696.noteBgColor.getData()??>
136 <#assign noteBoxBgColor = FieldsGroup98946696.noteBgColor.getData() />
137 </#if>
138
139 <div class="note text-body mb-4" style="background-color: ${noteBoxBgColor};">
140 <div class="note-header mb-5">
141 <#if FieldsGroup98946696.noteIcon.getData()??>
142 <p class="mb-2">
143 <#switch FieldsGroup98946696.noteIcon.getData()>
144 <#case 'info'>
145 <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.3">
146 <path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
147 </svg>
148 <#break>
149 <#case 'archive'>
150 <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.3">
151 <path stroke-linecap="round" stroke-linejoin="round" d="M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4" />
152 </svg>
153 <#break>
154 <#case 'play'>
155 <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.3">
156 <path stroke-linecap="round" stroke-linejoin="round" d="M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z" />
157 <path stroke-linecap="round" stroke-linejoin="round" d="M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
158 </svg>
159 <#break>
160 <#case 'locationMarker'>
161 <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.3">
162 <path stroke-linecap="round" stroke-linejoin="round" d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" />
163 <path stroke-linecap="round" stroke-linejoin="round" d="M15 11a3 3 0 11-6 0 3 3 0 016 0z" />
164 </svg>
165 <#break>
166 <#case 'link'>
167 <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.3">
168 <path stroke-linecap="round" stroke-linejoin="round" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1" />
169 </svg>
170 <#break>
171 <#case 'camera'>
172 <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.3">
173 <path stroke-linecap="round" stroke-linejoin="round" d="M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z" />
174 <path stroke-linecap="round" stroke-linejoin="round" d="M15 13a3 3 0 11-6 0 3 3 0 016 0z" />
175 </svg>
176 <#break>
177 <#default>
178 <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.3">
179 <path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
180 </svg>
181 </#switch>
182 </p>
183 </#if>
184 <#if FieldsGroup98946696.noteTitle.getData()?? && FieldsGroup98946696.noteTitle.getData() != ''>
185 <h4 class="note-title pr-lg-4 pr-xl-6 mb-0">${FieldsGroup98946696.noteTitle.getData()}</h4>
186 </#if>
187 <#if FieldsGroup98946696.noteSubtitle.getData()?? && FieldsGroup98946696.noteSubtitle.getData() != ''>
188 <h6 class="note-subtitle mt-1">
189 ${FieldsGroup98946696.noteSubtitle.getData()}
190 </h6>
191 </#if>
192 </div>
193 <div class="note-content leading-1.4">
194 ${FieldsGroup98946696.note.getData()}
195 </div>
196 </div>
197 </#if>
198 <#if FieldsGroup35503703.document.getSiblings()?has_content && FieldsGroup35503703.document.getSiblings()?first.getData() != ''>
199 <#assign archiveBoxBgColor = '#e0e0e0' />
200 <#if FieldsGroup35503703.documentsBgColor?? && FieldsGroup35503703.documentsBgColor.getData()??>
201 <#assign archiveBoxBgColor = FieldsGroup35503703.documentsBgColor.getData() />
202 </#if>
203
204 <div class="archive text-body" style="background-color: ${archiveBoxBgColor};">
205 <div class="archive-header mb-4">
206 <p class="mb-2">
207 <svg width="19" height="22" viewBox="0 0 19 22" fill="none" xmlns="http://www.w3.org/2000/svg">
208 <path d="M12.172 6.10343L5.58599 12.949C5.39497 13.1407 5.2426 13.3701 5.13779 13.6238C5.03297 13.8774 4.9778 14.1502 4.97549 14.4262C4.97318 14.7022 5.02378 14.9759 5.12435 15.2314C5.22491 15.4869 5.37341 15.719 5.5612 15.9142C5.74898 16.1094 5.97229 16.2637 6.21808 16.3683C6.46387 16.4728 6.72723 16.5254 6.99279 16.523C7.25835 16.5206 7.52079 16.4632 7.7648 16.3543C8.00881 16.2453 8.2295 16.087 8.41399 15.8884L14.828 9.04288C15.5566 8.25874 15.9598 7.20851 15.9507 6.1184C15.9416 5.02828 15.5209 3.98549 14.7793 3.21463C14.0376 2.44377 13.0344 2.00652 11.9856 1.99704C10.9368 1.98757 9.9264 2.40664 9.17199 3.16398L2.75699 10.0085C1.63168 11.1782 0.999481 12.7646 0.999481 14.4187C0.999481 16.0729 1.63168 17.6593 2.75699 18.8289C3.8823 19.9986 5.40856 20.6557 6.99999 20.6557C8.59142 20.6557 10.1177 19.9986 11.243 18.8289L17.5 12.3399" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
209 </svg>
210 </p>
211 <p class="text-body-xl mb-0">
212 <#if FieldsGroup35503703.documentsSectionTitle.getData()?? && FieldsGroup35503703.documentsSectionTitle.getData() != ''>
213 ${FieldsGroup35503703.documentsSectionTitle.getData()}
214 <#else>
215 <@liferay.language key="files" />
216 </#if>
217 </p>
218 </div>
219 <ul class="list-unstyled documents-list p-0 m-0 mt-autо">
220 <#list FieldsGroup35503703.document.getSiblings() as cur_Document>
221 <#if cur_Document.getData()?? && cur_Document.getData() != ''>
222 <#assign json = jsonFactoryUtil.createJSONObject(cur_Document.data)
223 groupId = json.getLong("groupId")
224 fileEntryUuid = json.getString("uuid")
225 fileEntry = dlFileEntryLocalServiceUtil.getFileEntryByUuidAndGroupId( fileEntryUuid, groupId) />
226
227 <li<#if cur_Document?has_next> class="mb-3"</#if>>
228 <a class="d-flex text-break" href="${cur_Document.getData()}" title="${languageUtil.format(locale, "download-x", "${fileEntry.getTitle()}", false)}">
229 <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 mr-1 flex-shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
230 <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
231 </svg>
232 ${fileEntry.getTitle()}
233 </a>
234 </li>
235 </#if>
236 </#list>
237 </ul>
238 </div>
239 </#if>
240 </div>
241 </div>
242 </div>
243 </article>
244 </div>
245</div>
246
247<#assign relatedArticles = [] />
248<#assign maxItems = 3 />
249<#assign assetEntryId = assetEntry.getEntryId() />
250
251<#-- get manually related assets -->
252<#assign articleRelatedLinks = assetLinkLocalService.getDirectLinks(assetEntryId) />
253<#if articleRelatedLinks?size gt 0>
254 <#list articleRelatedLinks as related_link>
255 <#if relatedArticles?size < maxItems>
256 <#assign relatedAssetEntryId = related_link.getEntryId2() />
257 <#assign relatedAssetEntry = assetEntryLocalService.getEntry(relatedAssetEntryId) />
258 <#assign relatedAssetEntryPrimKey = relatedAssetEntry.getClassPK() />
259 <#assign relatedAssetEntryClassName = relatedAssetEntry.getClassName() />
260 <#assign relatedAssetEntryClassTypeId = relatedAssetEntry.getClassTypeId() />
261
262 <#if relatedAssetEntryClassName == assetEntry.getClassName() &&
263 relatedAssetEntryClassTypeId == assetEntry.getClassTypeId()>
264 <#assign relatedArticle = journalArticleLocalService.getLatestArticle(relatedAssetEntryPrimKey) />
265 <#assign relatedArticles = relatedArticles + [relatedArticle] />
266 </#if>
267 </#if>
268 </#list>
269<#elseif mainCategory??>
270 <#-- get assets related by category -->
271 <#assign entries = RelatedNewsService.getRelatedNews(themeDisplay.getScopeGroupId(),getterUtil.getLong(mainCategory.getCategoryId()), assetEntry.getClassTypeId(), themeDisplay.getCompanyId(), maxItems) />
272
273 <#if entries??>
274 <#list entries as entry>
275 <#assign entryId = entry.getEntryId() />
276 <#if entryId != assetEntryId>
277 <#assign entryPrimKey = entry.getClassPK() />
278 <#assign article = journalArticleLocalService.getLatestArticle(entryPrimKey) />
279 <#assign relatedArticles = relatedArticles + [article] />
280 </#if>
281 </#list>
282 </#if>
283</#if>
284
285<#if relatedArticles?size gt 0>
286 <div class="container-fluid py-5 py-lg-6 px-0 bg-gray-200">
287 <div class="container-fluid container-fluid-max-xl">
288 <h2 class="section-title">
289 <@liferay.language key="related-press-releases" />
290 </h2>
291
292 <div class="columns-block related-press-releases">
293 <div class="grid grid-cols-md-2 grid-cols-lg-3 gap-4 gap-lg-6 gap-xl-8">
294 <#list relatedArticles as article>
295 <@getRelatedArticle article=article />
296 </#list>
297 </div>
298 </div>
299
300 <div class="view-more-button-block mt-5">
301 <a class="btn btn-view-more" href="${languageUtil.format(locale, "press-releases-section-url", false)}">
302 <@liferay.language key="view-more" />
303 </a>
304 </div>
305 </div>
306 </div>
307</#if>
308
309<#macro getRelatedArticle
310 article
311>
312 <#assign assetEntry = assetEntryLocalService.getEntry('com.liferay.journal.model.JournalArticle', article.resourcePrimKey)
313 assetRenderer = assetEntry.getAssetRenderer()
314 assetEntryTitle = htmlUtil.escape( assetRenderer.getTitle(locale)) />
315
316 <#-- get parent group -->
317 <#assign parentGroupId = assetEntry.getGroupId()
318 parentGroup = groupLocalService.getGroup(getterUtil.getLong(parentGroupId))
319 parentGroupName = htmlUtil.escape(parentGroup.getDescriptiveName())
320 parentGroupDisplayUrl = parentGroup.getDisplayURL(themeDisplay)
321 displayParentGroup = true />
322
323 <#-- set parentGroupDisplayUrl in viewUrl -->
324 <#if parentGroupId != groupId ||
325 parentGroupId == globalGroupId>
326 <#assign parentGroupDisplayUrl = curGroupDisplayUrl />
327 </#if>
328
329 <#-- article view url -->
330 <#assign viewURL = parentGroupDisplayUrl + languageUtil.format(locale, "press-releases-view-url", false) + '/-/v/' + parentGroupId + '/' + assetRenderer.getUrlTitle(locale) />
331
332 <#-- hide parent group name when it is Global -->
333 <#if parentGroupId == globalGroupId>
334 <#assign displayParentGroup = false />
335 </#if>
336
337 <div class="card archive d-flex flex-column w-full h-full bg-white">
338 <div class="thumbnail-image embed-responsive embed-responsive-16by8 overflow-hidden">
339 <@getThumbnailImage entry=article fieldName='Image09115908' />
340 </div>
341
342 <div class="summary embed-responsive embed-responsive-16by8 overflow-hidden">
343 <div class="content-wrapper embed-responsive-item d-flex align-items-end">
344 <div class="content p-4">
345 <p class="subtitle-xs mb-1">
346 <span class="date">
347 <#if assetEntry.getPublishDate()??>
348 ${dateUtil.getDate(assetEntry.getPublishDate(), "dd.MM.yy", locale)}
349 <#else>
350 ${dateUtil.getDate(assetEntry.getModifiedDate(), "dd.MM.yy", locale)}
351 </#if>
352 </span>
353 <#if displayParentGroup>
354 <span class="delimiter"> | </span>
355 <span class="origin">${parentGroupName}</span>
356 </#if>
357 </p>
358 <h5 class="title text-body mb-0">
359 <a href="${viewURL}" class="text-current" title="${assetEntryTitle}">${assetEntryTitle}</a>
360 </h5>
361 </div>
362 </div>
363 </div>
364 </div>
365</#macro>
366
367<#macro getThumbnailImage
368 entry
369 fieldName
370 >
371 <#assign imageFileSrc = '' />
372 <#if saxReaderUtil.read( entry.getContentByLocale(locale) )??>
373 <#assign document = saxReaderUtil.read( entry.getContentByLocale(locale) ) />
374 <#assign imageFileSrc = '' />
375 <#assign imageAlt = entry.getTitle(locale) />
376
377 <#assign imageField = document.valueOf("//dynamic-element[@name='" + fieldName + "']/dynamic-content/text()") />
378 <#if imageField?has_content>
379 <#assign json = jsonFactoryUtil.createJSONObject(imageField) />
380 <#assign imageAlt = json.getString("alt") />
381 <#assign imageFileEntryId = json.getLong("fileEntryId") />
382
383 <#if imageFileEntryId != 0 && dlFileEntryLocalServiceUtil.fetchDLFileEntry(imageFileEntryId)??>
384 <#assign imageFileEntry = dlFileEntryLocalServiceUtil.fetchDLFileEntry(imageFileEntryId) />
385 <#assign imageFileSrc = "/documents/" + imageFileEntry.getGroupId() + "/" + imageFileEntry.getFolderId() + "/" + imageFileEntry.getTitle() + "/" + imageFileEntry.getUuid() />
386 </#if>
387 </#if>
388
389 <#if imageFileSrc != ''>
390 <img src="${imageFileSrc}" class="embed-responsive-item object-cover" alt="${imageAlt}" loading="lazy" />
391 </#if>
392 </#if>
393</#macro>
394
395<#macro getShareMenu>
396 <#assign shareUrl = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()?keep_before( '?' ) />
397
398 <div class="share-menu">
399 <ul class="social-links list-inline">
400 <li class="list-inline-item">
401 <a href="https://www.facebook.com/dialog/share?app_id=717920445342945&href=${shareUrl}"e=${.vars['reserved-article-title'].data}" class="facebook" title="<@liferay.language key="share-on-facebook" />" rel="nofollow noreferrer" target="_blank">
402 <svg width="16" height="15" viewBox="0 0 16 15" fill="none" xmlns="http://www.w3.org/2000/svg">
403 <path fill-rule="evenodd" clip-rule="evenodd" d="M15.25 7.54578C15.25 3.40353 11.8363 0.0457764 7.625 0.0457764C3.41371 0.0457764 0 3.40353 0 7.54578C0 11.289 2.78846 14.3918 6.43397 14.9543V9.71403H4.49722V7.54578H6.43397V5.89353C6.43397 4.01403 7.57162 2.97603 9.31394 2.97603C10.1481 2.97603 11.0204 3.12228 11.0204 3.12228V4.96728H10.0597C9.11187 4.96728 8.81679 5.54553 8.81679 6.13878V7.54578H10.9312L10.5934 9.71328H8.81679V14.9543C12.4615 14.3918 15.25 11.289 15.25 7.54578Z" fill="currentColor"/>
404 </svg>
405 </a>
406 </li>
407 <li class="list-inline-item">
408 <a href="https://twitter.com/intent/tweet?url=${shareUrl}&text=${.vars['reserved-article-title'].data}&via=sindicato_satse" class="twitter" title="<@liferay.language key="share-on-twitter" />" rel="nofollow noreferrer" target="_blank">
409 <svg xmlns="http://www.w3.org/2000/svg" width="17" height="17" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 30 30" style="enable-background:new 0 0 30 30;" class="icon twitter-icon" xml:space="preserve">
410 <path d="M26.4,26l-8.8-12.8l0,0L25.5,4h-2.6l-6.5,7.5L11.3,4H4.3l8.2,12l0,0L3.9,26h2.7l7.2-8.3l5.7,8.3H26.4z M10.2,6 l12.3,18h-2.1L8.1,6H10.2z" fill="currentColor"></path>
411 </svg>
412 </a>
413 </li>
414 <li class="list-inline-item">
415 <a href="#" class="copy-url" id="copyUrl" title="<@liferay.language key="copy-link" />">
416 <svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
417 <path d="M9.61902 7.129C9.04706 6.56659 8.27142 6.25064 7.46267 6.25064C6.65392 6.25064 5.87828 6.56659 5.30632 7.129L2.25632 10.129C1.96502 10.4057 1.73266 10.7368 1.57281 11.1028C1.41297 11.4688 1.32883 11.8625 1.32531 12.2608C1.32179 12.6591 1.39896 13.0542 1.55232 13.4229C1.70567 13.7916 1.93215 14.1265 2.21852 14.4082C2.50489 14.6899 2.84543 14.9126 3.22026 15.0635C3.5951 15.2143 3.99672 15.2902 4.4017 15.2868C4.80667 15.2833 5.2069 15.2005 5.57901 15.0433C5.95112 14.8861 6.28767 14.6575 6.56902 14.371L7.4093 13.5453M6.83132 9.871C7.40328 10.4334 8.17892 10.7494 8.98767 10.7494C9.79642 10.7494 10.5721 10.4334 11.144 9.871L14.194 6.871C14.7496 6.30519 15.057 5.54739 15.0501 4.7608C15.0431 3.97421 14.7224 3.22177 14.1569 2.66554C13.5914 2.10932 12.8264 1.79381 12.0267 1.78698C11.227 1.78014 10.4566 2.08253 9.88132 2.629L9.04257 3.454" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
418 </svg>
419 </a>
420 </li>
421 </ul>
422 </div>
423</#macro>
424
425<script type="text/javascript">
426 /*
427 * Copy currentUrl
428 */
429 var copyUrlEl = document.getElementById("copyUrl");
430 var copyUrlFn = function() {
431 var currentUrl = window.location.href;
432 navigator.clipboard.writeText(currentUrl);
433 }
434
435 copyUrlEl.addEventListener( "click", (e) => {
436 e.preventDefault();
437 copyUrlFn();
438 });
439
440 /*
441 * Scroll tagsNavigation
442 */
443 var tagsNavigation = document.querySelector("#tagsNavigation");
444 if ( tagsNavigation ) {
445 tagsNavigation.addEventListener("wheel", (e) => {
446 e.preventDefault();
447 tagsNavigation.scrollLeft += e.deltaY;
448 });
449
450 var btnScrollLeft = document.getElementById( "btnScrollLeft" );
451 var btnScrollRight = document.getElementById( "btnScrollRight" );
452 var toggleScrollButtonsVisibility = function () {
453 /* toggle btnScrollLeft/btnScrollRight visibility */
454 if ( tagsNavigation.scrollWidth > tagsNavigation.clientWidth ) {
455 btnScrollRight.style.display = 'block';
456 btnScrollLeft.style.display = (tagsNavigation.scrollLeft == 0 ) ? 'none' : 'block';
457
458 tagsNavigation.addEventListener('scroll', () => {
459 btnScrollRight.style.display = ( parseInt( tagsNavigation.scrollWidth - tagsNavigation.clientWidth ) === parseInt( tagsNavigation.scrollLeft ) ) ? 'none' : 'block';
460 btnScrollLeft.style.display = ( tagsNavigation.scrollLeft == 0 ) ? 'none' : 'block';
461 });
462 }
463 }
464 toggleScrollButtonsVisibility();
465
466 btnScrollLeft.addEventListener( "click", (e) => {
467 sideScroll(tagsNavigation, 'left', 15, 100, 10);
468 });
469
470 btnScrollRight.addEventListener( "click", (e) => {
471 sideScroll(tagsNavigation, 'right', 15, 100, 10);
472 });
473
474 function sideScroll(element, direction, speed, distance, step){
475 scrollAmount = 0;
476 var slideTimer = setInterval(function(){
477 if(direction == 'left'){
478 element.scrollLeft -= step;
479 } else {
480 element.scrollLeft += step;
481 }
482 scrollAmount += step;
483 if(scrollAmount >= distance){
484 window.clearInterval(slideTimer);
485 }
486 }, speed);
487 }
488 }
489</script>