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.timeRange.rangeFrom?split('-')
246 split_fdt = doc.timetables.timeRange.rangeTo?split('-')
247 fdf = split_fdf[2]+"."+split_fdf[1]+"."+split_fdf[0]
248 fdt = split_fdt[2]+"."+split_fdt[1]+"."+split_fdt[0]
249
250 />
251
252 <#if fdf == fdt>
253 ${fdf}
254 <#else>
255 <#if uuid == 'c8637ac5-e494-57ad-b04c-70a592de363c'>
256 ${d40.getLabel("dal")} 26.10.2024 ${d40.getLabel("al")} 27.10.2024
257 <#else>
258 ${d40.getLabel("dal")} ${fdf} ${d40.getLabel("al")} ${fdt}
259 </#if>
260 </#if>
261
262 <i class="fal fa-chevron-down fa-lg ml-5"></i>
263 </summary>
264
265 <#if doc.timetables.timeDescription[langId]?has_content>
266 <div class="card-body px-5 lg:px-15" style="display:none">
267 <div class="text-dark">
268 ${doc.timetables.timeDescription[langId]?keep_after('<br>')?keep_before("<br><p><b>")}
269 </div>
270 </div>
271 </#if>
272
273 <#-- <#if d40.isDev> -->
274 <#if doc.booking?has_content>
275 <#if doc.booking.bookable?has_content && doc.booking.bookable>
276 <#if doc.booking.standartPrices?has_content && doc.booking.standartPrices.iterator()?has_content>
277 <#attempt>
278 <div class="card-body px-5 lg:px-15">
279 <#list doc.booking.standartPrices.iterator() as single_price >
280 <#if single_price[langId]?has_content>
281
282 <#if single_price?index == 0>
283 <p class="mt-3"><b>${d40.getLabel("costo_biglietto")}:</b></p>
284 <ul style="padding-left:0;list-style: none;">
285 </#if>
286
287 <li>
288 • ${single_price[langId]}
289 </li>
290 </#if>
291 </#list>
292 </ul>
293 </div>
294 <#recover>
295 <div style="display:none !important;"></div>
296 </#attempt>
297 </#if>
298 </#if>
299 </#if>
300 <#-- </#if> -->
301
302 <div class="card-body px-5 lg:px-10" >
303 <ul>
304 <#list doc.timetables.timeInfos.iterator() as datetime>
305 <li class="text-dark mb-1">
306
307 <#assign
308 split_df = datetime.dateFrom?split('-')
309 split_dt = datetime.dateTo?split('-')
310 df = split_df[2]+"."+split_df[1]+"."+split_df[0]
311 dt = split_dt[2]+"."+split_dt[1]+"."+split_dt[0]
312 tf = datetime.timeFrom
313 tt = datetime.timeTo
314 />
315
316 <#if df == dt>
317 ${d40.getLabel("il")} ${df} - ${tf} - ${tt}
318 <#else>
319 ${d40.getLabel("dal")} ${df} ${d40.getLabel("al")} ${dt} - ${tf} - ${tt}
320 </#if>
321 </li>
322 </#list>
323 </ul>
324 </div>
325 </details>
326 </div>
327 </#if>
328
329 <div class="card-body px-5 lg:px-10">
330 <#if doc.contacts.getJSONObject(0).address.fulltext?? && doc.contacts.getJSONObject(0).address.fulltext?has_content>
331 <p class="text-dark font-bold uppercase text-lg mb-0">
332 ${d40.getLabel("organizzazione")}
333 </p>
334 </#if>
335
336 <#if doc.contacts.getJSONObject(0).supplierName?? && doc.contacts.getJSONObject(0).supplierName?has_content>
337 <p class="text-dark text-lg mb-1 font-bold">
338 ${doc.contacts.getJSONObject(0).supplierName}
339 </p>
340 </#if>
341
342 <#if doc.contacts.getJSONObject(0).address.fulltext?? && doc.contacts.getJSONObject(0).address.fulltext?has_content>
343 <p class="text-dark text-lg mb-1">
344 ${doc.contacts.getJSONObject(0).address.fulltext}
345 </p>
346 </#if>
347
348 <#if doc.contacts.getJSONObject(0).telephone?? && doc.contacts.getJSONObject(0).telephone?has_content>
349 <#list doc.contacts.getJSONObject(0).telephone.iterator() as phone>
350 <#if phone?? && phone?has_content>
351 <a href="tel:${phone}" class="block no-underline text-dark text-lg space-x-2 mb-0">
352 <#assign clear_phone = phone?replace('+39', '')/>
353 <#if clear_phone?starts_with("0461")>
354 <#assign display_phone = clear_phone?replace('0461', '0461 ')/>
355 <#else>
356 <#attempt>
357 <#assign
358 pre_chunk = clear_phone[0..2]
359 display_phone = pre_chunk+" "+clear_phone[3..]
360 />
361 <#recover>
362 </#attempt>
363 </#if>
364
365 <#if display_phone?? && display_phone?has_content>
366 <i class="far fa-phone text-dark"></i>
367 <u>${display_phone}</u>
368 </#if>
369 </a>
370 </#if>
371 </#list>
372 </#if>
373 <#if doc.contacts.getJSONObject(0).mail?? && doc.contacts.getJSONObject(0).mail?has_content>
374 <a href="mailto:${doc.contacts.getJSONObject(0).mail}" class="block no-underline text-dark text-lg space-x-2 mb-0">
375 <i class="far fa-envelope text-dark"></i>
376 <u>${doc.contacts.getJSONObject(0).mail}</u>
377 </a>
378 </#if>
379 <#if doc.contacts.getJSONObject(0).websiteUrl[langId]?? && doc.contacts.getJSONObject(0).websiteUrl[langId]?has_content>
380 <a href="${doc.contacts.getJSONObject(0).websiteUrl[langId]}" class="block no-underline text-dark text-lg space-x-2 mb-0" target="_blank">
381 <i class="far fa-external-link text-dark"></i>
382 <u>${d40.getLabel("sito_web")}</u>
383 </a>
384 </#if>
385
386 <#if doc.contacts.getJSONObject(0).socialRefs.facebook?? && doc.contacts.getJSONObject(0).socialRefs.facebook?has_content>
387 <a href="${doc.contacts.getJSONObject(0).socialRefs.facebook[langId]}" class="block no-underline text-dark text-lg space-x-2 mb-0" target="_blank">
388 <i class="fab fa-facebook-square text-dark"></i>
389 <u>facebook</u>
390 </a>
391 </#if>
392
393 <#if doc.contacts.getJSONObject(0).socialRefs.twitter?? && doc.contacts.getJSONObject(0).socialRefs.twitter?has_content>
394 <a href="${doc.contacts.getJSONObject(0).socialRefs.twitter[langId]}" class="block no-underline text-dark text-lg space-x-2 mb-0" target="_blank">
395 <i class="fab fa-twitter-square text-dark"></i>
396 <u>twitter</u>
397 </a>
398 </#if>
399
400 <#if doc.contacts.getJSONObject(0).socialRefs.instagram?? && doc.contacts.getJSONObject(0).socialRefs.instagram?has_content>
401 <a href="${doc.contacts.getJSONObject(0).socialRefs.instagram[langId]}" class="block no-underline text-dark text-lg space-x-2 mb-0" target="_blank">
402 <i class="fab fa-instagram-square text-dark"></i>
403 <u>instagram</u>
404 </a>
405 </#if>
406
407 <#if langId == 'en'>
408 <#assign ri_url = "/contact-tourist-office-trento" />
409 <#elseif langId == 'de'>
410 <#assign ri_url = "/kontakt-info-anfrage-trento" />
411 <#else>
412 <#assign ri_url = "/richiesta-informazioni" />
413 </#if>
414
415 <a href="#contact-form" class="btn bg-green text-white font-bold uppercase px-4 py-2 rounded-0 mt-10">
416 ${d40.getLabel("richiedi_info")}
417 </a>
418 </div>
419 <#if hasCoords>
420 <div class="relative flex h-70">
421 <div class="absolute w-full lg:w-105% h-full right-0">
422 <div id="suggesto-map" class="monochrome-map size-full border-0"></div>
423 </div>
424 </div>
425
426 <div class="card-body p-5 lg:px-10">
427 <!-- https://www.google.com/maps/@${lat},${lng},14z -->
428 <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">
429 <span class="font-bold text-dark uppercase">
430 ${d40.getLabel("indicazioni_stradali")}
431 </span>
432 <img src="${d40.icons_folder}/arrow_circle-dark.svg" class="w-20" />
433 </a>
434 </div>
435 </#if>
436 </div>
437 </div>
438 </div>
439 </div>
440 </section>
441
442 <#if doc.details.images?has_content>
443 <#assign usePreview = false>
444
445 <section id="gallery" class="relative overflow-x-hidden mt-20 lg:mt-40">
446 <div class="container">
447 <p class="text-dark uppercase text-lg lg:text-3xl mb-7">
448 ${d40.getLabel("galleria_immagini")}
449 </p>
450
451 <div class="swiper-container">
452 <div class="swiper-wrapper">
453 <#if doc.details.cover != "[]">
454 <#assign usePreview = true>
455
456 <#list doc.details.cover.iterator() as pic>
457 <div class="swiper-slide">
458 <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">
459 <div class="relative">
460 <img data-src="${d40.getKitPrefix(pic[langId], 'n-preview_h')}" loading="lazy" class="lazyload rounded-custom size-full fit-cover" alt="" />
461 </div>
462 </a>
463 </div>
464
465 <#-- assign z=request.setAttribute("ogImage","${pic[langId]}") -->
466 <#assign z=request.setAttribute("ogImage","${d40.getKitPrefix(pic[langId], 'n-preview_h')}")>
467
468 <#break>
469 </#list>
470 </#if>
471
472 <#list doc.details.images.iterator() as pic>
473 <#if usePreview>
474 <#assign counter = pic?counter>
475 <#else>
476 <#assign counter = pic?index>
477 </#if>
478
479 <div class="swiper-slide">
480 <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">
481 <div class="relative">
482 <img data-src="${d40.getKitPrefix(pic[langId], 'n-preview_h')}" loading="lazy" class="lazyload rounded-custom size-full fit-cover" alt="" />
483 </div>
484 </a>
485 </div>
486 </#list>
487 </div>
488 </div>
489 </div>
490 <div class="btn-square absolute btn-prev bg-white left-0">
491 <span class="sr-only">${d40.getLabel("precedente")}</span>
492 <i class="fas fa-chevron-left text-dark w-6 h-6"></i>
493 </div>
494 <div class="btn-square absolute btn-next bg-white right-0">
495 <span class="sr-only">${d40.getLabel("successivo")}</span>
496 <i class="fas fa-chevron-right text-dark w-6 h-6"></i>
497 </div>
498 </section>
499
500 <div id="lightbox-modal" tabindex="-1" role="dialog" class="modal fade">
501 <div class="modal-dialog modal-full-screen inset-0 border-0 shadow-none">
502 <div class="modal-content bg-transparent">
503 <div class="modal-body overflow-hidden">
504 <div class="absolute top-0 right-0 z-5">
505 <button type="button" data-dismiss="modal" class="btn btn-monospaced btn-secondary m-3">
506 <span class="sr-only">${d40.getLabel("chiudi")}</span>
507 <i class="fal fa-times fa-lg"></i>
508 </button>
509 </div>
510
511 <#-- lightbox -->
512 <div id="lightbox-swiper" class="swiper-container h-75 my-auto">
513 <div class="swiper-button-prev w-12 h-12">
514 <span class="sticker sticker-circle bg-green size-full">
515 <span class="sticker-overlay">
516 <i class="fas fa-chevron-left fa-2x text-white"></i>
517 </span>
518 </span>
519 </div>
520
521 <div class="swiper-button-next w-12 h-12">
522 <span class="sticker sticker-circle bg-green size-full">
523 <span class="sticker-overlay">
524 <i class="fas fa-chevron-right fa-2x text-white"></i>
525 </span>
526 </span>
527 </div>
528
529 <div class="swiper-wrapper h-full">
530 <#if doc.details.cover != "[]">
531 <#list doc.details.cover.iterator() as pic>
532 <div class="swiper-slide h-full">
533 <img data-src="${d40.getKitPrefix(pic[langId], 'n-full_hd')}" loading="lazy" class="lazyload flex h-full object-contain mx-auto" alt="">
534 </div>
535 <#break>
536 </#list>
537 </#if>
538
539 <#list doc.details.images.iterator() as pic>
540 <div class="swiper-slide h-full">
541 <img data-src="${d40.getKitPrefix(pic[langId], 'n-full_hd')}" loading="lazy" class="lazyload flex h-full object-contain mx-auto" alt="">
542 </div>
543 </#list>
544 </div>
545 </div>
546
547 <#-- thumbnails -->
548 <div id="thumbnail-swiper" class="swiper-container" thumbsSlider="">
549 <div class="swiper-wrapper">
550 <#if doc.details.cover != "[]">
551 <#list doc.details.cover.iterator() as pic>
552 <div class="swiper-slide">
553 <img data-src="${d40.getKitPrefix(pic[langId], 'n-preview_h')}" loading="lazy" class="lazyload object-cover cursor-pointer size-full" alt="">
554 </div>
555 <#break>
556 </#list>
557 </#if>
558
559 <#list doc.details.images.iterator() as pic>
560 <div class="swiper-slide">
561 <img data-src="${d40.getKitPrefix(pic[langId], 'n-preview_h')}" loading="lazy" class="lazyload object-cover cursor-pointer size-full" alt="">
562 </div>
563 </#list>
564 </div>
565 </div>
566 </div>
567 </div>
568 </div>
569 </div>
570 </#if>
571
572 <#-- SEZIONE NON USATA
573 <section class="mt-20">
574 <div class="container">
575 <div class="bg-light max-w-xl p-5 lg:p-10">
576 <div class="card-row space-x-5">
577 <div class="autofit-col">
578 <div class="autofit-section">
579 <i class="fas fa-download text-dark w-7 h-7"></i>
580 </div>
581 </div>
582 <div class="autofit-col autofit-col-expand">
583 <div class="autofit-section">
584 <p class="text-dark font-bold text-lg lg:text-xl uppercase mb-0"> Programma completo </p>
585 </div>
586 </div>
587 </div>
588 </div>
589
590 <div class="row mt-10 lg:mt-20">
591 <div class="col-12 col-lg-8">
592 <div class="space-y-10">
593 <p class="text-dark uppercase text-lg lg:text-3xl">
594 ${d40.getLabel("dettagli")}
595 </p>
596 <div class="space-y-5">
597 <div class="row">
598 <div class="col-12 col-md-3 col-lg-2">
599 <p class="text-dark font-bold uppercase">Data</p>
600 </div>
601 <div class="col-12 col-md-9 col-lg-10">
602 <div class="text-dark font-light text-lg">
603 Dettagli
604 </div>
605 </div>
606 </div>
607 </div>
608 </div>
609 </div>
610 </div>
611 </div>
612 </section>
613 -->
614
615 <#-- <section class="mt-20">
616 <div class="container">
617 <div class="bg-light">
618 <div class="space-y-10 p-5 lg:p-10">
619 <p class="text-dark uppercase text-lg lg:text-3xl mb-0">
620 ${d40.getLabel("organizzazione")}
621 </p>
622 <div class="space-y-2">
623 <#if doc.contacts.getJSONObject(0).address.fulltext?? && doc.contacts.getJSONObject(0).address.fulltext?has_content>
624 <p class="text-dark mb-0">
625 ${doc.contacts.getJSONObject(0).address.fulltext}
626 </p>
627 </#if>
628
629 <#if doc.contacts.getJSONObject(0).mail?? && doc.contacts.getJSONObject(0).mail?has_content>
630 <a href="mailto:${doc.contacts.getJSONObject(0).mail}" class="d-block text-dark underline">
631 ${doc.contacts.getJSONObject(0).mail}
632 </a>
633 </#if>
634
635 <#if doc.contacts.getJSONObject(0).telephone?? && doc.contacts.getJSONObject(0).telephone?has_content>
636 <#list doc.contacts.getJSONObject(0).telephone.iterator() as phone>
637 <p class="text-dark mb-0">
638 <span class="font-bold">${d40.getLabel("telefono")}:</span>
639 ${phone}
640 </p>
641 </#list>
642 </#if>
643
644 <#if doc.contacts.getJSONObject(0).socialRefs.facebook?? && doc.contacts.getJSONObject(0).socialRefs.facebook?has_content>
645 <a href="${doc.contacts.getJSONObject(0).socialRefs.facebook[langId]}" class="block no-underline text-dark text-lg space-x-2 mb-0" target="_blank">
646 <i class="fab fa-facebook-square text-dark"></i>
647 <u>facebook</u>
648 </a>
649 </#if>
650
651 <#if doc.contacts.getJSONObject(0).socialRefs.twitter?? && doc.contacts.getJSONObject(0).socialRefs.twitter?has_content>
652 <a href="${doc.contacts.getJSONObject(0).socialRefs.twitter[langId]}" class="block no-underline text-dark text-lg space-x-2 mb-0" target="_blank">
653 <i class="fab fa-twitter-square text-dark"></i>
654 <u>twitter</u>
655 </a>
656 </#if>
657
658 <#if doc.contacts.getJSONObject(0).socialRefs.instagram?? && doc.contacts.getJSONObject(0).socialRefs.instagram?has_content>
659 <a href="${doc.contacts.getJSONObject(0).socialRefs.instagram[langId]}" class="block no-underline text-dark text-lg space-x-2 mb-0" target="_blank">
660 <i class="fab fa-instagram-square text-dark"></i>
661 <u>instagram</u>
662 </a>
663 </#if>
664 </div>
665 </div>
666 </div>
667 </div>
668 </section> -->
669
670 <#-- SEZIONE NON USATA
671 <section class="mt-10">
672 <div class="container">
673 <p class="text-dark uppercase text-lg lg:text-3xl mb-7"> Info sezione </p>
674 <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>
675 </div>
676 </section>
677 -->
678 <#else>
679 <div class="text-center mt-35">
680 <p class="text-dark">
681 ${d40.getLabel("errore_caricamento_contenuto")}
682 </p>
683 </div>
684 </#if>
685</div>
686
687<script type="module">
688 import { createApp } from "https://cdnjs.cloudflare.com/ajax/libs/petite-vue/0.4.1/petite-vue.es.min.js";
689
690 createApp({
691 isMobile: window.innerWidth < 768,
692 favorites: [],
693 getFavorites() {
694 if(localStorage.getItem("favorites") !== null) {
695 this.favorites = JSON.parse(localStorage.getItem("favorites"));
696 }
697 },
698 setFavorite(e, item) {
699 e.preventDefault();
700 this.getFavorites();
701
702 var newFavorite = {
703 id: item.id,
704 contentJSON: {
705 title: item.contentJSON.title,
706 previewDescription: item.contentJSON.previewDescription,
707 description: item.contentJSON.description,
708 geoRef: item.contentJSON.geoRef,
709 previewPicture: item.contentJSON.previewPicture,
710 viewUrl: item.contentJSON.viewUrl,
711 type: "lfr",
712 }
713 };
714
715 this.favorites.push(newFavorite);
716 this.saveFavorites();
717 },
718 removeFavorite(e, itemId) {
719 e.preventDefault();
720 this.favorites = this.favorites.filter((obj) => obj.id !== itemId);
721 this.saveFavorites();
722 },
723 saveFavorites() {
724 localStorage.setItem("favorites", JSON.stringify(this.favorites));
725 },
726 isFavorite(itemId) {
727 if (this.favorites.some((e) => e.id == itemId)) {
728 return true;
729 }
730
731 return false;
732 },
733 buildMap(lat, lng) {
734 var map = new SuggestoMap("suggesto-map"),
735 location = [parseFloat(lat), parseFloat(lng)];
736
737 var svgIcon = L.divIcon({
738 html: `
739 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44.537 64.343">
740 <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"/>
741 <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"/>
742 <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"/>
743 <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"/>
744 </svg>`,
745 className: "",
746 iconSize: [44.537, 64.343],
747 iconAnchor: [22.287, 64.343],
748 });
749
750 var mapData = {
751 tilelayer: "osm",
752 gestureHandling: true,
753 fitBounds: false,
754 mapcenter: location,
755 zoom: 15,
756 markersFilter: "*",
757 markers: [],
758 layers: []
759 };
760
761 map.sm.createMap(mapData);
762
763 L.circleMarker(location, {
764 radius: 0,
765 color: "#000",
766 fillOpacity: 0,
767 weight: 0
768 }).addTo(map.sm.lmap);
769
770 L.marker(location, {
771 icon: svgIcon
772 }).addTo(map.sm.lmap);
773 },
774 share(title, desc, mode = "legacy") {
775 if (this.isMobile) {
776 var shareData = {
777 title: title,
778 text: desc,
779 url: window.location.href.replaceAll("{", "%7B").replaceAll("}", "%7D")
780 };
781
782 try {
783 navigator.share(shareData);
784 } catch (err) {
785 console.error("Error sharing: " + err);
786
787 if (mode == "legacy") {
788 this.legacyShare();
789 } else if (mode == "social") {
790 this.socialShare(title, desc);
791 }
792 }
793 } else {
794 if (mode == "legacy") {
795 this.legacyShare();
796 } else if (mode == "social") {
797 this.socialShare(title, desc);
798 }
799 }
800 },
801 legacyShare() {
802 var clip = document.createElement("input"),
803 toCopy = window.location.href.replaceAll("{", "%7B").replaceAll("}", "%7D");
804
805 document.body.appendChild(clip);
806 clip.value = toCopy;
807 clip.select();
808 clip.setSelectionRange(0, 999999);
809
810 navigator.clipboard.writeText(clip.value);
811 document.body.removeChild(clip);
812
813 alert("Link copiato");
814 },
815 socialShare(title, desc, image = "") {
816 var link = "#",
817 winHeight = 450,
818 winWidth = 600,
819 winTop = window.screen.height / 2 - winHeight / 2,
820 winLeft = window.screen.width / 2 - winWidth / 2,
821 params = "scrollbars=no,resizable=no,status=no,location=no,toolbar=no,menubar=no,width=" + winWidth + ",height=" + winHeight + ",left=" + winLeft + ",top=" + winTop;
822
823 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;
824
825 window.open(link, "Facebook", params);
826 }
827 }).mount("#${d40.portletNamespace}");
828</script>
829
830<#if doc?has_content>
831 <script>
832 document.addEventListener("DOMContentLoaded", function(){
833
834 document.querySelectorAll('a[href^="#contact"]').forEach(anchor => {
835 anchor.addEventListener('click', function (e) {
836 e.preventDefault();
837
838 document.querySelector(this.getAttribute('href')).scrollIntoView({
839 behavior: 'smooth'
840 });
841 });
842 });
843
844
845 if(${(doc.details.images?has_content)?c}){
846 new Swiper("#gallery .swiper-container", {
847 slidesPerView: 1,
848 spaceBetween: 50,
849 centerSlides: true,
850 centerInsufficientSlides: true,
851 breakpoints: {
852 768: {
853 slidesPerView: 2,
854 spaceBetween: 25
855 },
856 992: {
857 slidesPerView: 3,
858 spaceBetween: 25
859 }
860 },
861 navigation: {
862 prevEl: "#gallery .btn-prev",
863 nextEl: "#gallery .btn-next"
864 }
865 });
866
867 var thumbnails = new Swiper("#thumbnail-swiper", {
868 spaceBetween: 10,
869 slidesPerView: 2,
870 centerInsufficientSlides: true,
871 freeMode: true,
872 watchSlidesVisibility: true,
873 watchSlidesProgress: true,
874 breakpoints: {
875 768: {
876 slidesPerView: 3
877 },
878 992: {
879 slidesPerView: 4
880 },
881 1200: {
882 slidesPerView: 5
883 }
884 },
885 });
886
887 var lightbox = new Swiper("#lightbox-swiper", {
888 spaceBetween: 10,
889 autoHeight: true,
890 observer: true,
891 observeSlideChildren: true,
892 keyboard: {
893 enabled: true
894 },
895 navigation: {
896 nextEl: ".swiper-button-next",
897 prevEl: ".swiper-button-prev"
898 },
899 thumbs: {
900 swiper: thumbnails
901 }
902 });
903
904 $("#lightbox-modal").on("shown.bs.modal", function(e){
905 lightbox.update();
906 thumbnails.update();
907 lightbox.slideTo($(e.relatedTarget).data("slider"));
908 lightbox.update();
909 });
910
911 $("#lightbox-modal .swiper-wrapper").on("click", function(e){
912 if($(e.target).attr("class").includes("swiper-slide")){
913 $("#lightbox-modal").modal("hide");
914 }
915 });
916
917 if ($(window).width() > 991) {
918 var left_col_h = $(".relative.mt-20 > .container > .row > .col-lg-7").outerHeight();
919 var right_col_h = $(".relative.mt-20 > .container > .row > .col-lg-5").outerHeight();
920 var marg_h = right_col_h - left_col_h + 40;
921
922 if(right_col_h > left_col_h)
923 {
924 $('#gallery').removeClass('lg:mt-40 mt-20');
925 $('#gallery').css({'margin-top':marg_h+'px'});
926 }
927 }
928 }
929 });
930 </script>
931</#if>
L'invio della richiesta è andata a buon fine
L'invio della richiesta non è andata a buon fine
Acconsento al passaggio dei miei dati personali al destinatario della mia richiesta per l'invio delle informazioni richieste (privacy policy)