Si è verificato un errore nell'elaborarazione del modello.
The following has evaluated to null or missing: ==> response.data.docs.getJSONObject(0) [in template "3572636#3572671#4212428" at line 27, column 24] ---- Tip: If the failing expression is known to be 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: #assign doc = response.data.docs.getJ... [in template "3572636#3572671#4212428" at line 27, column 9] ----
1<#import "_TEMPLATE_CONTEXT_/3572636/3574130/23609/3793037" as d40>
2
3<#setting url_escaping_charset="UTF-8">
4
5<#assign
6 PUTIL = objectUtil("com.liferay.portal.kernel.util.PortalUtil")
7 uuid = themeDisplay.getURLCurrent()?keep_after("-/c/n/")?keep_before("?")?keep_after_last("_")
8 langId = locale?keep_before("_")
9 contentType = "event"
10 vueActions = ""
11 doc = ""
12 lat = "0"
13 lng = "0"
14 hasCoords = false
15/>
16<#-- <#assign z=request.setAttribute("ogTitle","title")>
17<#assign z=request.setAttribute("ogImage","imgg")>
18<#assign z=request.setAttribute("ogDesc","desc")> -->
19
20<#assign currentUrl = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent() />
21<#assign z=request.setAttribute("ogUrl","${currentUrl}")>
22
23<#if uuid?has_content>
24 <#assign response = d40.fetchData("https://guestapp.d40.it/v1/search/apt-trento/${contentType}/?uuid=${uuid}&active=false")>
25
26 <#if !response.error && response.data.docs?has_content>
27 <#assign doc = response.data.docs.getJSONObject(0)>
28
29 ${request.session.removeAttribute("circularCategories")}
30 ${request.session.setAttribute("circularCategories", doc.details.assetCategoryIds)}
31 </#if>
32</#if>
33
34<#if doc?has_content>
35 <#if doc.details?? && doc.details.name[langId]?has_content>
36 ${PUTIL.setPageTitle(doc.details.name[langId], request)}
37 </#if>
38
39 <#assign vueActions = "getFavorites();">
40
41 <#if doc.details.location.geoCoords.lat?has_content && doc.details.location.geoCoords.lon?has_content>
42 <#assign
43 hasCoords = true
44 lat = doc.details.location.geoCoords.lat
45 lng = doc.details.location.geoCoords.lon
46 vueActions = "getFavorites();buildMap(${lat}, ${lng})"
47 />
48 </#if>
49</#if>
50
51<style>
52 .swiper-button-next:after{
53 content: "";
54 }
55 .swiper-button-prev:after{
56 content: "";
57 }
58 .bg-darkgray{
59 background-color: #e5e5e5 !important;
60 }
61 .min-h-12{
62 min-height: 3rem;
63 }
64 .-ml-5{
65 margin-left: -5%;
66 }
67</style>
68
69<div v-scope id="${d40.portletNamespace}" @vue:mounted="${vueActions}" v-cloak>
70 <#if doc?has_content>
71 <#if themeDisplay.getLayout().getAncestors()?has_content>
72 <section id="breadcrumb" class="z-15 mt-25">
73 <div class="container">
74 <ol class="breadcrumb flex lg:justify-center">
75 <li class="pl-1 text-sm mr-2 relative">${d40.getLabel("sei_in")}:</li>
76
77 <li class="breadcrumb-item">
78 <a href="/" class="breadcrumb-link" title="Home">
79 <span class="breadcrumb-text-truncate text-dark underline">Home</span>
80 </a>
81 </li>
82
83 <#list themeDisplay.getLayout().getAncestors()?reverse as ancestor>
84 <li class="breadcrumb-item">
85 <a href="${ancestor.getFriendlyURL()}" class="breadcrumb-link" title="${d40.escape(ancestor.getHTMLTitle(locale))}">
86 <span class="breadcrumb-text-truncate text-dark underline">
87 ${d40.escape(ancestor.getHTMLTitle(locale))}
88 </span>
89 </a>
90 </li>
91 </#list>
92
93 <li class="breadcrumb-item active">
94 <span class="breadcrumb-text-truncate text-dark">
95 ${doc.details.name[langId]}
96 </span>
97 </li>
98 </ol>
99 </div>
100 </section>
101 </#if>
102
103 <section class="relative mt-20">
104 <div class="container">
105 <div class="row">
106 <div class="col-12 col-lg-7">
107 <div class="card-row flex-col lg:flex-row mb-10">
108 <div class="autofit-col autofit-col-expand order-2 lg:order-1">
109 <div class="autofit-section">
110 <p class="text-dark font-semibold font-heading text-3xl lg:text-4xl uppercase">
111 ${doc.details.name[langId]}
112
113 <#assign z=request.setAttribute("ogTitle","${doc.details.name[langId]}")>
114
115 </p>
116 </div>
117 </div>
118 <div class="autofit-col justify-start order-1 lg:order-2 mb-3 lg:mb-0">
119 <div class="autofit-section">
120 <div class="flex space-x-4">
121 <button type="button" v-if="isFavorite('${doc.uuid}')" @click="removeFavorite($event, '${doc.uuid}')" class="btn btn-link px-2">
122 <i class="fas fa-heart text-dark fa-2x"></i>
123 </button>
124 <button type="button" v-else @click="setFavorite($event, {id: '${doc.uuid}', contentJSON: {title: '${doc.details.name[langId]?js_string}', previewDescription: '', description: '', geoRef: '', previewPicture: '${d40.getDTNPreview(doc)}', viewUrl: '${d40.getDTNUrl(doc.details.name[langId], doc.uuid, contentType)}'}})" class="btn btn-link px-2">
125 <i class="fal fa-heart text-dark fa-2x"></i>
126 </button>
127
128 <button type="button" @click="share('${doc.details.name[langId]}', '')" class="btn btn-link px-2">
129 <i class="fas fa-share-alt text-dark fa-2x"></i>
130 </button>
131 </div>
132 </div>
133 </div>
134 </div>
135
136 <#if doc.details.description[langId]?has_content>
137 <div class="underline-grow text-dark font-light lg:text-lg leading-loose">
138 ${doc.details.description[langId]}
139
140 <#if doc.details.description[langId]?length lt 160>
141 <#assign
142 z=request.setAttribute("ogDesc","${htmlUtil.stripHtml(doc.details.description[langId])}")
143 />
144 <#else>
145 <#assign
146 z=request.setAttribute("ogDesc","${htmlUtil.stripHtml(doc.details.description[langId])?substring(0,160)}")
147 />
148 </#if>
149
150 </div>
151 </#if>
152
153 <#if doc.timetables.timeDescription[langId]?has_content>
154 <div class="text-dark text-lg font-light mb-5 mt-10">
155 ${doc.timetables.timeDescription[langId]?keep_before("<br><p><b>")}
156 </div>
157 </#if>
158
159 <#if doc.details.howToArrive?has_content && doc.details.howToArrive[langId]?has_content>
160 <div class="text-dark text-lg font-light mb-5 mt-10">
161 <b>${d40.getLabel("come_arrivare")}:</b>
162 ${doc.details.howToArrive[langId]}
163 </div>
164 </#if>
165
166 <#-- <#if d40.isDev> -->
167 <#if doc.booking?has_content>
168 <#if doc.booking.bookable?has_content && doc.booking.bookable>
169 <#if doc.booking.standartPrices?has_content>
170 <#attempt>
171 <div class="text-dark text-lg font-light mb-5 mt-10">
172 <#list doc.booking.standartPrices.iterator() as single_price >
173 <#if single_price[langId]?has_content>
174
175 <#if single_price?index == 0>
176 <p class="mt-3"><b>${d40.getLabel("costo_biglietto")}:</b></p>
177 <ul style="padding-left:0;list-style: none;">
178 </#if>
179
180 <li>
181 • ${single_price[langId]}
182 </li>
183 </#if>
184 </#list>
185 </ul>
186 </div>
187 <#recover>
188 <div style="display:none !important;"></div>
189 </#attempt>
190 </#if>
191 </#if>
192 </#if>
193 <#-- </#if> -->
194
195 </div>
196
197 <div class="xl:absolute col-12 col-lg-5 xl:max-w-xl lg:right-0">
198 <div class="bg-light">
199 <div class="card-body px-5 pt-5 lg:px-10 lg:pt-10 pb-0">
200 <p class="text-dark font-bold uppercase text-lg mb-0">
201 ${d40.getLabel("informazioni_contatti")}
202 </p>
203 <#if doc.details.townLabel != "{}">
204 <p class="text-dark text-lg mb-0">
205 ${d40.getLabel("localita")}: <span class="text-capitalize">${doc.details.townLabel[langId]}</span>
206 </p>
207 </#if>
208 <#if doc.details.location.address.fulltext?? && doc.details.location.address.fulltext?has_content>
209 <p class="text-dark text-lg mb-0">
210 ${doc.details.location.address.fulltext}
211 </p>
212 </#if>
213 <#if doc.timetables.timeInfos?has_content>
214 <p class="text-dark font-bold text-lg mb-0 mt-3">
215 ${d40.getLabel("date_evento")}
216 </p>
217 </#if>
218 </div>
219
220 <#if doc.timetables.timeInfos?has_content>
221 <div class="flex min-h-12">
222 <details class="bg-darkgray w-full lg:w-105% right-0 -ml-5">
223 <summary class="btn btn-link text-dark no-underline my-1 ml-12">
224 <i class="fal fa-calendar-alt"></i>
225
226 <#attempt>
227 <#assign day_count = 0>
228
229 <#list doc.timetables.timeInfos.getJSONObject(0).openingDays.iterator()?keys as single_day >
230 <#assign day_count += 1>
231 </#list>
232
233 <div style="display:none !important;">
234 ${jsonFactoryUtil.looseSerialize(day_count)}
235 </div>
236 <#recover>
237 <#assign test = doc.timetables.timeInfos.getJSONObject(0).openingDays />
238 <div style="display:none !important;">
239
240 </div>
241 </#attempt>
242
243
244 <#assign
245 split_fdf = doc.timetables.timeInfos.getJSONObject(0).dateFrom?split('-')
246 split_fdt = doc.timetables.timeInfos.getJSONObject(0).dateTo?split('-')
247 fdf = split_fdf[2]+"."+split_fdf[1]+"."+split_fdf[0]
248 fdt = split_fdt[2]+"."+split_fdt[1]+"."+split_fdt[0]
249 ftf = doc.timetables.timeInfos.getJSONObject(0).timeFrom
250 ftt = doc.timetables.timeInfos.getJSONObject(0).timeTo
251 />
252
253 <#if fdf == fdt>
254 ${fdf}
255 <#else>
256 ${d40.getLabel("dal")} ${fdf} ${d40.getLabel("al")} ${fdt}
257 </#if>
258
259 <i class="fal fa-chevron-down fa-lg ml-5"></i>
260 </summary>
261
262 <#if doc.timetables.timeDescription[langId]?has_content>
263 <div class="card-body px-5 lg:px-15">
264 <div class="text-dark">
265 ${doc.timetables.timeDescription[langId]?keep_after('<br>')?keep_before("<br><p><b>")}
266 </div>
267 </div>
268 </#if>
269
270 <#-- <#if d40.isDev> -->
271 <#if doc.booking?has_content>
272 <#if doc.booking.bookable?has_content && doc.booking.bookable>
273 <#if doc.booking.standartPrices?has_content>
274 <#attempt>
275 <div class="card-body px-5 lg:px-15">
276 <#list doc.booking.standartPrices.iterator() as single_price >
277 <#if single_price[langId]?has_content>
278
279 <#if single_price?index == 0>
280 <p class="mt-3"><b>${d40.getLabel("costo_biglietto")}:</b></p>
281 <ul style="padding-left:0;list-style: none;">
282 </#if>
283
284 <li>
285 • ${single_price[langId]}
286 </li>
287 </#if>
288 </#list>
289 </ul>
290 </div>
291 <#recover>
292 <div style="display:none !important;"></div>
293 </#attempt>
294 </#if>
295 </#if>
296 </#if>
297 <#-- </#if> -->
298
299 <div class="card-body px-5 lg:px-10" style="display:none">
300 <ul>
301 <#list doc.timetables.timeInfos.iterator() as datetime>
302 <li class="text-dark mb-1">
303
304 <#assign
305 split_df = datetime.dateFrom?split('-')
306 split_dt = datetime.dateTo?split('-')
307 df = split_df[2]+"."+split_df[1]+"."+split_df[0]
308 dt = split_dt[2]+"."+split_dt[1]+"."+split_dt[0]
309 tf = datetime.timeFrom
310 tt = datetime.timeTo
311 />
312
313 <#if df == dt>
314 ${d40.getLabel("il")} ${df} - ${tf} - ${tt}
315 <#else>
316 ${d40.getLabel("dal")} ${df} ${d40.getLabel("al")} ${dt} - ${tf} - ${tt}
317 </#if>
318 </li>
319 </#list>
320 </ul>
321 </div>
322 </details>
323 </div>
324 </#if>
325
326 <div class="card-body px-5 lg:px-10">
327 <#if doc.contacts.getJSONObject(0).address.fulltext?? && doc.contacts.getJSONObject(0).address.fulltext?has_content>
328 <p class="text-dark font-bold uppercase text-lg mb-0">
329 ${d40.getLabel("organizzazione")}
330 </p>
331 </#if>
332
333 <#if doc.contacts.getJSONObject(0).supplierName?? && doc.contacts.getJSONObject(0).supplierName?has_content>
334 <p class="text-dark text-lg mb-1 font-bold">
335 ${doc.contacts.getJSONObject(0).supplierName}
336 </p>
337 </#if>
338
339 <#if doc.contacts.getJSONObject(0).address.fulltext?? && doc.contacts.getJSONObject(0).address.fulltext?has_content>
340 <p class="text-dark text-lg mb-1">
341 ${doc.contacts.getJSONObject(0).address.fulltext}
342 </p>
343 </#if>
344
345 <#if doc.contacts.getJSONObject(0).telephone?? && doc.contacts.getJSONObject(0).telephone?has_content>
346 <#list doc.contacts.getJSONObject(0).telephone.iterator() as phone>
347 <#if phone?? && phone?has_content>
348 <a href="tel:${phone}" class="block no-underline text-dark text-lg space-x-2 mb-0">
349 <#assign clear_phone = phone?replace('+39', '')/>
350 <#if clear_phone?starts_with("0461")>
351 <#assign display_phone = clear_phone?replace('0461', '0461 ')/>
352 <#else>
353 <#attempt>
354 <#assign
355 pre_chunk = clear_phone[0..2]
356 display_phone = pre_chunk+" "+clear_phone[3..]
357 />
358 <#recover>
359 </#attempt>
360 </#if>
361
362 <#if display_phone?? && display_phone?has_content>
363 <i class="far fa-phone text-dark"></i>
364 <u>${display_phone}</u>
365 </#if>
366 </a>
367 </#if>
368 </#list>
369 </#if>
370 <#if doc.contacts.getJSONObject(0).mail?? && doc.contacts.getJSONObject(0).mail?has_content>
371 <a href="mailto:${doc.contacts.getJSONObject(0).mail}" class="block no-underline text-dark text-lg space-x-2 mb-0">
372 <i class="far fa-envelope text-dark"></i>
373 <u>${doc.contacts.getJSONObject(0).mail}</u>
374 </a>
375 </#if>
376 <#if doc.contacts.getJSONObject(0).websiteUrl[langId]?? && doc.contacts.getJSONObject(0).websiteUrl[langId]?has_content>
377 <a href="${doc.contacts.getJSONObject(0).websiteUrl[langId]}" class="block no-underline text-dark text-lg space-x-2 mb-0" target="_blank">
378 <i class="far fa-external-link text-dark"></i>
379 <u>${d40.getLabel("sito_web")}</u>
380 </a>
381 </#if>
382
383 <#if doc.contacts.getJSONObject(0).socialRefs.facebook?? && doc.contacts.getJSONObject(0).socialRefs.facebook?has_content>
384 <a href="${doc.contacts.getJSONObject(0).socialRefs.facebook[langId]}" class="block no-underline text-dark text-lg space-x-2 mb-0" target="_blank">
385 <i class="fab fa-facebook-square text-dark"></i>
386 <u>facebook</u>
387 </a>
388 </#if>
389
390 <#if doc.contacts.getJSONObject(0).socialRefs.twitter?? && doc.contacts.getJSONObject(0).socialRefs.twitter?has_content>
391 <a href="${doc.contacts.getJSONObject(0).socialRefs.twitter[langId]}" class="block no-underline text-dark text-lg space-x-2 mb-0" target="_blank">
392 <i class="fab fa-twitter-square text-dark"></i>
393 <u>twitter</u>
394 </a>
395 </#if>
396
397 <#if doc.contacts.getJSONObject(0).socialRefs.instagram?? && doc.contacts.getJSONObject(0).socialRefs.instagram?has_content>
398 <a href="${doc.contacts.getJSONObject(0).socialRefs.instagram[langId]}" class="block no-underline text-dark text-lg space-x-2 mb-0" target="_blank">
399 <i class="fab fa-instagram-square text-dark"></i>
400 <u>instagram</u>
401 </a>
402 </#if>
403
404 <#if langId == 'en'>
405 <#assign ri_url = "/contact-tourist-office-trento" />
406 <#elseif langId == 'de'>
407 <#assign ri_url = "/kontakt-info-anfrage-trento" />
408 <#else>
409 <#assign ri_url = "/richiesta-informazioni" />
410 </#if>
411
412 <a href="${ri_url}" class="btn bg-green text-white font-bold uppercase px-4 py-2 rounded-0 mt-10">
413 ${d40.getLabel("richiedi_info")}
414 </a>
415 </div>
416 <#if hasCoords>
417 <div class="relative flex h-70">
418 <div class="absolute w-full lg:w-105% h-full right-0">
419 <div id="suggesto-map" class="monochrome-map size-full border-0"></div>
420 </div>
421 </div>
422
423 <div class="card-body p-5 lg:px-10">
424 <!-- https://www.google.com/maps/@${lat},${lng},14z -->
425 <a href="https://www.google.com/maps/dir/?api=1&travelmode=driving&destination=${lat},${lng}" class="d-block no-underline space-x-5" target="_blank">
426 <span class="font-bold text-dark uppercase">
427 ${d40.getLabel("indicazioni_stradali")}
428 </span>
429 <img src="${d40.icons_folder}/arrow_circle-dark.svg" class="w-20" />
430 </a>
431 </div>
432 </#if>
433 </div>
434 </div>
435 </div>
436 </div>
437 </section>
438
439 <#if doc.details.images?has_content>
440 <#assign usePreview = false>
441
442 <section id="gallery" class="relative overflow-x-hidden mt-20 lg:mt-40">
443 <div class="container">
444 <p class="text-dark uppercase text-lg lg:text-3xl mb-7">
445 ${d40.getLabel("galleria_immagini")}
446 </p>
447
448 <div class="swiper-container">
449 <div class="swiper-wrapper">
450 <#if doc.details.cover != "[]">
451 <#assign usePreview = true>
452
453 <#list doc.details.cover.iterator() as pic>
454 <div class="swiper-slide">
455 <a href="javascript:void(0);" class="card shadow-none border-0 bg-transparent no-underline" data-toggle="modal" data-target="#lightbox-modal" data-slider="${pic?index}" data-senna-off="true">
456 <div class="relative">
457 <img data-src="${d40.getKitPrefix(pic[langId], 'n-preview_h')}" loading="lazy" class="lazyload rounded-custom size-full fit-cover" alt="" />
458 </div>
459 </a>
460 </div>
461
462 <#-- assign z=request.setAttribute("ogImage","${pic[langId]}") -->
463 <#assign z=request.setAttribute("ogImage","${d40.getKitPrefix(pic[langId], 'n-preview_h')}")>
464
465 <#break>
466 </#list>
467 </#if>
468
469 <#list doc.details.images.iterator() as pic>
470 <#if usePreview>
471 <#assign counter = pic?counter>
472 <#else>
473 <#assign counter = pic?index>
474 </#if>
475
476 <div class="swiper-slide">
477 <a href="javascript:void(0);" class="card shadow-none border-0 bg-transparent no-underline" data-toggle="modal" data-target="#lightbox-modal" data-slider="${counter}" data-senna-off="true">
478 <div class="relative">
479 <img data-src="${d40.getKitPrefix(pic[langId], 'n-preview_h')}" loading="lazy" class="lazyload rounded-custom size-full fit-cover" alt="" />
480 </div>
481 </a>
482 </div>
483 </#list>
484 </div>
485 </div>
486 </div>
487 <div class="btn-square absolute btn-prev bg-white left-0">
488 <span class="sr-only">${d40.getLabel("precedente")}</span>
489 <i class="fas fa-chevron-left text-dark w-6 h-6"></i>
490 </div>
491 <div class="btn-square absolute btn-next bg-white right-0">
492 <span class="sr-only">${d40.getLabel("successivo")}</span>
493 <i class="fas fa-chevron-right text-dark w-6 h-6"></i>
494 </div>
495 </section>
496
497 <div id="lightbox-modal" tabindex="-1" role="dialog" class="modal fade">
498 <div class="modal-dialog modal-full-screen inset-0 border-0 shadow-none">
499 <div class="modal-content bg-transparent">
500 <div class="modal-body overflow-hidden">
501 <div class="absolute top-0 right-0 z-5">
502 <button type="button" data-dismiss="modal" class="btn btn-monospaced btn-secondary m-3">
503 <span class="sr-only">${d40.getLabel("chiudi")}</span>
504 <i class="fal fa-times fa-lg"></i>
505 </button>
506 </div>
507
508 <#-- lightbox -->
509 <div id="lightbox-swiper" class="swiper-container h-75 my-auto">
510 <div class="swiper-button-prev w-12 h-12">
511 <span class="sticker sticker-circle bg-green size-full">
512 <span class="sticker-overlay">
513 <i class="fas fa-chevron-left fa-2x text-white"></i>
514 </span>
515 </span>
516 </div>
517
518 <div class="swiper-button-next w-12 h-12">
519 <span class="sticker sticker-circle bg-green size-full">
520 <span class="sticker-overlay">
521 <i class="fas fa-chevron-right fa-2x text-white"></i>
522 </span>
523 </span>
524 </div>
525
526 <div class="swiper-wrapper h-full">
527 <#if doc.details.cover != "[]">
528 <#list doc.details.cover.iterator() as pic>
529 <div class="swiper-slide h-full">
530 <img data-src="${d40.getKitPrefix(pic[langId], 'n-full_hd')}" loading="lazy" class="lazyload flex h-full object-contain mx-auto" alt="">
531 </div>
532 <#break>
533 </#list>
534 </#if>
535
536 <#list doc.details.images.iterator() as pic>
537 <div class="swiper-slide h-full">
538 <img data-src="${d40.getKitPrefix(pic[langId], 'n-full_hd')}" loading="lazy" class="lazyload flex h-full object-contain mx-auto" alt="">
539 </div>
540 </#list>
541 </div>
542 </div>
543
544 <#-- thumbnails -->
545 <div id="thumbnail-swiper" class="swiper-container" thumbsSlider="">
546 <div class="swiper-wrapper">
547 <#if doc.details.cover != "[]">
548 <#list doc.details.cover.iterator() as pic>
549 <div class="swiper-slide">
550 <img data-src="${d40.getKitPrefix(pic[langId], 'n-preview_h')}" loading="lazy" class="lazyload object-cover cursor-pointer size-full" alt="">
551 </div>
552 <#break>
553 </#list>
554 </#if>
555
556 <#list doc.details.images.iterator() as pic>
557 <div class="swiper-slide">
558 <img data-src="${d40.getKitPrefix(pic[langId], 'n-preview_h')}" loading="lazy" class="lazyload object-cover cursor-pointer size-full" alt="">
559 </div>
560 </#list>
561 </div>
562 </div>
563 </div>
564 </div>
565 </div>
566 </div>
567 </#if>
568
569 <#-- SEZIONE NON USATA
570 <section class="mt-20">
571 <div class="container">
572 <div class="bg-light max-w-xl p-5 lg:p-10">
573 <div class="card-row space-x-5">
574 <div class="autofit-col">
575 <div class="autofit-section">
576 <i class="fas fa-download text-dark w-7 h-7"></i>
577 </div>
578 </div>
579 <div class="autofit-col autofit-col-expand">
580 <div class="autofit-section">
581 <p class="text-dark font-bold text-lg lg:text-xl uppercase mb-0"> Programma completo </p>
582 </div>
583 </div>
584 </div>
585 </div>
586
587 <div class="row mt-10 lg:mt-20">
588 <div class="col-12 col-lg-8">
589 <div class="space-y-10">
590 <p class="text-dark uppercase text-lg lg:text-3xl">
591 ${d40.getLabel("dettagli")}
592 </p>
593 <div class="space-y-5">
594 <div class="row">
595 <div class="col-12 col-md-3 col-lg-2">
596 <p class="text-dark font-bold uppercase">Data</p>
597 </div>
598 <div class="col-12 col-md-9 col-lg-10">
599 <div class="text-dark font-light text-lg">
600 Dettagli
601 </div>
602 </div>
603 </div>
604 </div>
605 </div>
606 </div>
607 </div>
608 </div>
609 </section>
610 -->
611
612 <#-- <section class="mt-20">
613 <div class="container">
614 <div class="bg-light">
615 <div class="space-y-10 p-5 lg:p-10">
616 <p class="text-dark uppercase text-lg lg:text-3xl mb-0">
617 ${d40.getLabel("organizzazione")}
618 </p>
619 <div class="space-y-2">
620 <#if doc.contacts.getJSONObject(0).address.fulltext?? && doc.contacts.getJSONObject(0).address.fulltext?has_content>
621 <p class="text-dark mb-0">
622 ${doc.contacts.getJSONObject(0).address.fulltext}
623 </p>
624 </#if>
625
626 <#if doc.contacts.getJSONObject(0).mail?? && doc.contacts.getJSONObject(0).mail?has_content>
627 <a href="mailto:${doc.contacts.getJSONObject(0).mail}" class="d-block text-dark underline">
628 ${doc.contacts.getJSONObject(0).mail}
629 </a>
630 </#if>
631
632 <#if doc.contacts.getJSONObject(0).telephone?? && doc.contacts.getJSONObject(0).telephone?has_content>
633 <#list doc.contacts.getJSONObject(0).telephone.iterator() as phone>
634 <p class="text-dark mb-0">
635 <span class="font-bold">${d40.getLabel("telefono")}:</span>
636 ${phone}
637 </p>
638 </#list>
639 </#if>
640
641 <#if doc.contacts.getJSONObject(0).socialRefs.facebook?? && doc.contacts.getJSONObject(0).socialRefs.facebook?has_content>
642 <a href="${doc.contacts.getJSONObject(0).socialRefs.facebook[langId]}" class="block no-underline text-dark text-lg space-x-2 mb-0" target="_blank">
643 <i class="fab fa-facebook-square text-dark"></i>
644 <u>facebook</u>
645 </a>
646 </#if>
647
648 <#if doc.contacts.getJSONObject(0).socialRefs.twitter?? && doc.contacts.getJSONObject(0).socialRefs.twitter?has_content>
649 <a href="${doc.contacts.getJSONObject(0).socialRefs.twitter[langId]}" class="block no-underline text-dark text-lg space-x-2 mb-0" target="_blank">
650 <i class="fab fa-twitter-square text-dark"></i>
651 <u>twitter</u>
652 </a>
653 </#if>
654
655 <#if doc.contacts.getJSONObject(0).socialRefs.instagram?? && doc.contacts.getJSONObject(0).socialRefs.instagram?has_content>
656 <a href="${doc.contacts.getJSONObject(0).socialRefs.instagram[langId]}" class="block no-underline text-dark text-lg space-x-2 mb-0" target="_blank">
657 <i class="fab fa-instagram-square text-dark"></i>
658 <u>instagram</u>
659 </a>
660 </#if>
661 </div>
662 </div>
663 </div>
664 </div>
665 </section> -->
666
667 <#-- SEZIONE NON USATA
668 <section class="mt-10">
669 <div class="container">
670 <p class="text-dark uppercase text-lg lg:text-3xl mb-7"> Info sezione </p>
671 <p class="text-dark text-lg font-light mb-0"> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </p>
672 </div>
673 </section>
674 -->
675 <#else>
676 <div class="text-center mt-35">
677 <p class="text-dark">
678 ${d40.getLabel("errore_caricamento_contenuto")}
679 </p>
680 </div>
681 </#if>
682</div>
683
684<script type="module">
685 import { createApp } from "https://cdnjs.cloudflare.com/ajax/libs/petite-vue/0.4.1/petite-vue.es.min.js";
686
687 createApp({
688 isMobile: window.innerWidth < 768,
689 favorites: [],
690 getFavorites() {
691 if(localStorage.getItem("favorites") !== null) {
692 this.favorites = JSON.parse(localStorage.getItem("favorites"));
693 }
694 },
695 setFavorite(e, item) {
696 e.preventDefault();
697 this.getFavorites();
698
699 var newFavorite = {
700 id: item.id,
701 contentJSON: {
702 title: item.contentJSON.title,
703 previewDescription: item.contentJSON.previewDescription,
704 description: item.contentJSON.description,
705 geoRef: item.contentJSON.geoRef,
706 previewPicture: item.contentJSON.previewPicture,
707 viewUrl: item.contentJSON.viewUrl,
708 type: "lfr",
709 }
710 };
711
712 this.favorites.push(newFavorite);
713 this.saveFavorites();
714 },
715 removeFavorite(e, itemId) {
716 e.preventDefault();
717 this.favorites = this.favorites.filter((obj) => obj.id !== itemId);
718 this.saveFavorites();
719 },
720 saveFavorites() {
721 localStorage.setItem("favorites", JSON.stringify(this.favorites));
722 },
723 isFavorite(itemId) {
724 if (this.favorites.some((e) => e.id == itemId)) {
725 return true;
726 }
727
728 return false;
729 },
730 buildMap(lat, lng) {
731 var map = new SuggestoMap("suggesto-map"),
732 location = [parseFloat(lat), parseFloat(lng)];
733
734 var svgIcon = L.divIcon({
735 html: `
736 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44.537 64.343">
737 <path d="M32.952,68c-4.491-5.935-9.221-11.692-12.837-18.251-3.4-6.175-5.892-12.453-4.094-19.725,2.422-9.787,12.253-17.363,22.112-16.878,11.322.558,20.189,8.638,21.649,19.385.8,5.867-1.25,10.892-3.84,15.837A105.38,105.38,0,0,1,43.958,65.889c-.687.844-1.309,1.739-1.96,2.611-.953,1.06-1.971,2.068-2.841,3.191-.965,1.245-1.729,1.629-2.844.1A50.506,50.506,0,0,0,32.952,68m4.722-46.328A14.156,14.156,0,0,0,23.76,35.59c-.168,7.053,6.542,13.748,13.813,13.783A14.234,14.234,0,0,0,51.46,35.693,14.138,14.138,0,0,0,37.674,21.676" transform="translate(-15.419 -13.129)" fill="#5098c6"/>
738 <path d="M31.941,63.206A50.288,50.288,0,0,1,35.3,67c1.116,1.526,1.878,1.142,2.844-.1.87-1.123,1.889-2.132,2.841-3.191a8.579,8.579,0,0,1,5.414,2.22c1.659,1.642,1.586,3.631-.455,4.627a21.209,21.209,0,0,1-16.871.723c-1.611-.565-3.293-1.51-3.092-3.645.19-2.018,1.855-2.718,3.511-3.342.833-.315,1.791-.363,2.447-1.079" transform="translate(-14.408 -8.331)" fill="#222"/>
739 <path d="M36.946,20.929A14.137,14.137,0,0,1,50.732,34.944,14.236,14.236,0,0,1,36.844,48.626c-7.27-.036-13.98-6.732-13.813-13.783A14.157,14.157,0,0,1,36.946,20.929m-.023,5.445a8.4,8.4,0,1,0,8.394,8.22,8.5,8.5,0,0,0-8.394-8.22" transform="translate(-14.69 -12.381)" fill="#fdfcf9"/>
740 <path d="M36.45,25.9a8.4,8.4,0,0,1,.077,16.809A8.405,8.405,0,1,1,36.45,25.9" transform="translate(-14.218 -11.905)" fill="#222"/>
741 </svg>`,
742 className: "",
743 iconSize: [44.537, 64.343],
744 iconAnchor: [22.287, 64.343],
745 });
746
747 var mapData = {
748 tilelayer: "osm",
749 gestureHandling: true,
750 fitBounds: false,
751 mapcenter: location,
752 zoom: 15,
753 markersFilter: "*",
754 markers: [],
755 layers: []
756 };
757
758 map.sm.createMap(mapData);
759
760 L.circleMarker(location, {
761 radius: 0,
762 color: "#000",
763 fillOpacity: 0,
764 weight: 0
765 }).addTo(map.sm.lmap);
766
767 L.marker(location, {
768 icon: svgIcon
769 }).addTo(map.sm.lmap);
770 },
771 share(title, desc, mode = "legacy") {
772 if (this.isMobile) {
773 var shareData = {
774 title: title,
775 text: desc,
776 url: window.location.href.replaceAll("{", "%7B").replaceAll("}", "%7D")
777 };
778
779 try {
780 navigator.share(shareData);
781 } catch (err) {
782 console.error("Error sharing: " + err);
783
784 if (mode == "legacy") {
785 this.legacyShare();
786 } else if (mode == "social") {
787 this.socialShare(title, desc);
788 }
789 }
790 } else {
791 if (mode == "legacy") {
792 this.legacyShare();
793 } else if (mode == "social") {
794 this.socialShare(title, desc);
795 }
796 }
797 },
798 legacyShare() {
799 var clip = document.createElement("input"),
800 toCopy = window.location.href.replaceAll("{", "%7B").replaceAll("}", "%7D");
801
802 document.body.appendChild(clip);
803 clip.value = toCopy;
804 clip.select();
805 clip.setSelectionRange(0, 999999);
806
807 navigator.clipboard.writeText(clip.value);
808 document.body.removeChild(clip);
809
810 alert("Link copiato");
811 },
812 socialShare(title, desc, image = "") {
813 var link = "#",
814 winHeight = 450,
815 winWidth = 600,
816 winTop = window.screen.height / 2 - winHeight / 2,
817 winLeft = window.screen.width / 2 - winWidth / 2,
818 params = "scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,width=" + winWidth + ",height=" + winHeight + ",left=" + winLeft + ",top=" + winTop;
819
820 link = "http://www.facebook.com/sharer.php?s=100&p[title]=" + encodeURIComponent(title) + "&p[summary]=" + encodeURIComponent(desc) + "&p[url]=" + window.location.href + "&p[images][0]=" + image;
821
822 window.open(link, "Facebook", params);
823 }
824 }).mount("#${d40.portletNamespace}");
825</script>
826
827<#if doc?has_content>
828 <script>
829 document.addEventListener("DOMContentLoaded", function(){
830 if(${(doc.details.images?has_content)?c}){
831 new Swiper("#gallery .swiper-container", {
832 slidesPerView: 1,
833 spaceBetween: 50,
834 centerSlides: true,
835 centerInsufficientSlides: true,
836 breakpoints: {
837 768: {
838 slidesPerView: 2,
839 spaceBetween: 25
840 },
841 992: {
842 slidesPerView: 3,
843 spaceBetween: 25
844 }
845 },
846 navigation: {
847 prevEl: "#gallery .btn-prev",
848 nextEl: "#gallery .btn-next"
849 }
850 });
851
852 var thumbnails = new Swiper("#thumbnail-swiper", {
853 spaceBetween: 10,
854 slidesPerView: 2,
855 centerInsufficientSlides: true,
856 freeMode: true,
857 watchSlidesVisibility: true,
858 watchSlidesProgress: true,
859 breakpoints: {
860 768: {
861 slidesPerView: 3
862 },
863 992: {
864 slidesPerView: 4
865 },
866 1200: {
867 slidesPerView: 5
868 }
869 },
870 });
871
872 var lightbox = new Swiper("#lightbox-swiper", {
873 spaceBetween: 10,
874 autoHeight: true,
875 observer: true,
876 observeSlideChildren: true,
877 keyboard: {
878 enabled: true
879 },
880 navigation: {
881 nextEl: ".swiper-button-next",
882 prevEl: ".swiper-button-prev"
883 },
884 thumbs: {
885 swiper: thumbnails
886 }
887 });
888
889 $("#lightbox-modal").on("shown.bs.modal", function(e){
890 lightbox.update();
891 thumbnails.update();
892 lightbox.slideTo($(e.relatedTarget).data("slider"));
893 lightbox.update();
894 });
895
896 $("#lightbox-modal .swiper-wrapper").on("click", function(e){
897 if($(e.target).attr("class").includes("swiper-slide")){
898 $("#lightbox-modal").modal("hide");
899 }
900 });
901
902 if ($(window).width() > 991) {
903 var left_col_h = $(".relative.mt-20 > .container > .row > .col-lg-7").outerHeight();
904 var right_col_h = $(".relative.mt-20 > .container > .row > .col-lg-5").outerHeight();
905 var marg_h = right_col_h - left_col_h + 40;
906
907 if(right_col_h > left_col_h)
908 {
909 $('#gallery').removeClass('lg:mt-40 mt-20');
910 $('#gallery').css({'margin-top':marg_h+'px'});
911 }
912 }
913 }
914 });
915 </script>
916</#if>