{"id":1368,"date":"2023-02-20T14:23:11","date_gmt":"2023-02-20T13:23:11","guid":{"rendered":"https:\/\/www.guideturistichepavia.it\/?page_id=1368"},"modified":"2023-02-20T15:34:14","modified_gmt":"2023-02-20T14:34:14","slug":"piecal","status":"publish","type":"page","link":"https:\/\/www.guideturistichepavia.it\/fr\/piecal\/","title":{"rendered":"Piecal"},"content":{"rendered":"    <script>\n            let piecalAJAX = {\n            ajaxURL: \"https:\/\/www.guideturistichepavia.it\/wp-admin\/admin-ajax.php\",\n            ajaxNonce: \"c8cf00ca69\"\n            }\n\n            let alreadyExpandedOccurrences = [];\n\n            function piecalPrepareCustomViewsForCalendar( views ) {\n                let supportedEventHandlers = [\n                    'eventDataTransform',\n                    'dateClick',\n                    'eventClick', \n                    'eventDidMount', \n                    'dayCellDidMount', \n                    'viewDidMount', \n                    'viewWillUnmount',\n                    'dayHeaderContent',\n                    'dayHeaderDidMount'\n                ];\n\n                for( let view in views ) {\n                    let viewProps = views[view];\n\n                    for( let prop in viewProps ) {\n                        if( supportedEventHandlers.includes( prop ) ) {\n                            let eventHandlerCode = viewProps[prop];\n\n                            let handlerFunction = new Function( 'info', eventHandlerCode );\n\n                            viewProps[prop] = handlerFunction;\n                        }\n                    }\n\n                    \/\/ Remove customProps since we don't want those output inside the calendar object\n                    delete viewProps.customProps;\n\n                    \/\/ Add in the $atts['duration'] value if the view has a duration property.\n                    if( viewProps.duration ) {\n                        viewProps.duration = {\n                            months: 2                        };\n                    }\n                }\n\n                return views;\n            }\n            \n            document.addEventListener('DOMContentLoaded', function() {\n                var pieCalendarFirstLoad = true;\n                var calendarEl = document.getElementById('calendar');\n                var calendar = new FullCalendar.Calendar(calendarEl, {\n                    headerToolbar: false,\n                    initialView: \"dayGridMonth\",\n                    editable: false,\n                    eventSources: [[{\"title\":\"Sui Passi del Giubileo a Pavia\",\"start\":\"2025-10-31T14:30:00\",\"end\":\"2025-10-31T17:30:00\",\"details\":\"Trekking Urbano il 31 ottobre 2025\\n\\n\\n\\nIn occasione della XXII Giornata Nazionale del Trekking Urbano, Pavia invita cittadini e visitatori a scoprire la citt\\u00e0 \\\"Sui Passi del Giubileo\\\" un percorso che u...\",\"permalink\":\"https:\\\/\\\/www.guideturistichepavia.it\\\/fr\\\/sui-passi-del-giubileo-a-pavia\\\/\",\"postType\":\"Article\",\"postId\":1841},{\"title\":\"Alla scoperta di Romagnese &ndash; Uno dei borghi pi&ugrave; affascinanti dell&rsquo;Oltrep&ograve; Pavese\",\"start\":\"2025-08-24T12:00:00\",\"end\":\"2025-08-24T13:00:00\",\"details\":\"Storie, leggende e sapori nel cuore dell\\u2019Oltrep\\u00f2 Pavese\\n\\n\\n\\nC\\u2019\\u00e8 un luogo, tra le colline dell\\u2019Oltrep\\u00f2 Pavese, dove il tempo sembra essersi fermato, e dove ogni pietra ha una storia da raccontare: Romag...\",\"permalink\":\"https:\\\/\\\/www.guideturistichepavia.it\\\/fr\\\/alla-scoperta-di-romagnese-uno-dei-borghi-piu-affascinanti-delloltrepo-pavese\\\/\",\"postType\":\"Article\",\"postId\":1803,\"allDay\":\"1\"},{\"title\":\"Le storie dietro: quando il giallo incontra la memoria\",\"start\":\"2025-04-12T17:00:00\",\"end\":\"2025-04-12T19:00:00\",\"details\":\"Il sapore della vita nei dialetti e nei delitti\\n\\n\\n\\nHo conosciuto Vittorio Nichilo durante una visita guidata: arrivava con i suoi alunni di prima media da Brescia, dove vive e lavora. Tra un monumento...\",\"permalink\":\"https:\\\/\\\/www.guideturistichepavia.it\\\/fr\\\/le-storie-dietro-quando-il-giallo-incontra-la-memoria\\\/\",\"postType\":\"Article\",\"postId\":1778},{\"title\":\"Esplora Romagnese con una Visita Guidata al Profumo di Lavanda\",\"start\":\"2024-08-25T10:30:00\",\"end\":\"2024-08-25T11:30:00\",\"details\":\"Questo agosto, unisciti a noi nel meraviglioso borgo di Romagnese per una serie di visite guidate ed esperienze uniche. Immergiti nella storia, nelle leggende e nella bellezza naturale di questa affas...\",\"permalink\":\"https:\\\/\\\/www.guideturistichepavia.it\\\/fr\\\/esplora-romagnese-con-una-visita-guidata-al-profumo-di-lavanda\\\/\",\"postType\":\"Article\",\"postId\":1556},{\"title\":\"Scopri Romagnese con una Visita Guidata e un Bagno di Bosco\",\"start\":\"2024-08-18T10:30:00\",\"end\":\"2024-08-18T11:30:00\",\"details\":\"Appuntamento il 18 agosto 2024\\n\\n\\n\\nQuesto agosto, unisciti a noi nel meraviglioso borgo di Romagnese per una serie di visite guidate ed esperienze uniche. Immergiti nella storia, nelle leggende e nella...\",\"permalink\":\"https:\\\/\\\/www.guideturistichepavia.it\\\/fr\\\/scopri-romagnese-con-una-visita-guidata-e-un-bagno-di-bosco\\\/\",\"postType\":\"Article\",\"postId\":1550},{\"title\":\"Serata di Degustazione di Cioccolato a Pavia\",\"start\":\"2024-04-19T18:00:00\",\"end\":\"2024-04-19T19:00:00\",\"details\":\"Se sei un appassionato del cioccolato e ami esplorare nuovi gusti in compagnia di esperti del settore, segna questa data sul tuo calendario: venerd\\u00ec 19 aprile alle ore 18:00. \\u00c8 l'occasione perfetta pe...\",\"permalink\":\"https:\\\/\\\/www.guideturistichepavia.it\\\/fr\\\/serata-di-degustazione-di-cioccolato-a-pavia\\\/\",\"postType\":\"Article\",\"postId\":1528},{\"title\":\"Bagno di Bosco a San Pietro in Verzolo!\",\"start\":\"2023-10-22T10:00:00\",\"end\":\"2023-10-22T11:00:00\",\"details\":\"In collaborazione con Guide Turistiche Pavia di Samantha Maggi\\n\\n\\n\\nRilassati, rigenerati e riconnettiti con la natura in un'incredibile avventura nel cuore del parco di San Pietro in Verzolo! Unisciti ...\",\"permalink\":\"https:\\\/\\\/www.guideturistichepavia.it\\\/fr\\\/bagno-di-bosco-a-san-pietro-in-verzolo\\\/\",\"postType\":\"Article\",\"postId\":1506},{\"title\":\"Scopri l&#039;incanto di Romagnese con un&#039;esperienza unica di &quot;Forest Bathing&quot;\",\"start\":\"2023-08-20T10:30:00\",\"end\":\"2023-08-20T11:30:00\",\"details\":\"Carissimi lettori,\\n\\n\\n\\nsiete alla ricerca di un modo speciale per trascorrere una giornata indimenticabile, immersi nella storia, nella natura e nella tranquillit\\u00e0 di un antico borgo? Abbiamo la soluzi...\",\"permalink\":\"https:\\\/\\\/www.guideturistichepavia.it\\\/fr\\\/scopri-lincanto-di-romagnese-con-unesperienza-unica-di-forest-bathing\\\/\",\"postType\":\"Article\",\"postId\":1461},{\"title\":\"Scopri Romagnese con visite guidate ed esperienze indimenticabili!\",\"start\":\"2023-08-13T10:30:00\",\"end\":\"2023-08-13T11:30:00\",\"details\":\"Ciao a tutti gli appassionati di viaggi e cultura! Siete pronti a immergervi nella magia di Romagnese con le nostre visite guidate ed esperienze uniche? Non perdete l'opportunit\\u00e0 di scoprire questo in...\",\"permalink\":\"https:\\\/\\\/www.guideturistichepavia.it\\\/fr\\\/scopri-romagnese-con-visite-guidate-ed-esperienze-indimenticabili\\\/\",\"postType\":\"Article\",\"postId\":1456}]],\n                    direction: \"ltr\",\n                    contentHeight: \"auto\",\n                    locale: \"fr-FR\",\n                    eventTimeFormat: {\"hour\":\"2-digit\",\"minute\":\"2-digit\"},\n                    dayHeaderFormat: { weekday: 'long' },\n                    views: piecalPrepareCustomViewsForCalendar({\"listUpcoming\":{\"type\":\"listMonth\",\"duration\":{\"months\":2},\"customProps\":{\"niceName\":\"List - Upcoming\"}}}),\n                    eventClick: function( info ) {\n                        info = piecalJS.eventClick( info, {\n                            appendOffset: false                        } );\n\n                                            },\n                    eventDataTransform: function(event) {  \n                        event = piecalJS.eventDataTransform( event );\n\n                        \n                        return event;  \n                    },\n                    dateClick: function( info ) {\n                        info = piecalJS.dateClick( info );\n\n                                            },\n                    eventDidMount: function( info ) {\n                        info = piecalJS.eventDidMount( info );\n\n                                            },\n                    dayCellDidMount: function( info ) {\n                        info = piecalJS.dayCellDidMount( info );\n\n                                            },\n                    dayHeaderContent: function( info ) {\n                        info = piecalJS.dayHeaderContent( info );\n\n                        \n                        return info.text;\n                    },\n                    dayHeaderDidMount: function( info ) {\n                        let defaultOptions = {\n                            showDates: true,\n                            locale: \"fr-FR\"\n                        };\n\n                        info = piecalJS.dayHeaderDidMount( info, defaultOptions );\n\n                                            },\n                                    });\n                    calendar.render();\n                    window.calendar = calendar;\n            });\n\n            function piecalChangeView( view ) {\n                piecalCleanView( document.querySelector('.piecal-wrapper').getAttribute('data-view'), view );\n                document.querySelector('.piecal-wrapper').setAttribute('data-view', view);\n                window.calendar.changeView(view);\n                Alpine.store('calendarEngine').calendarView = view;\n                Alpine.store('calendarEngine').viewTitle = window.calendar.currentData.viewTitle;\n                Alpine.store('calendarEngine').viewSpec = window.calendar.currentData.viewSpec.buttonTextDefault;\n            }\n\n            \/\/ This function forces the calendar to re-render events when the view is changed, but only\n            \/\/ when necessary. This prevents artifacts from custom views from persisting between view changes\n            \/\/ when those views have the same or similar types, e.g. listMonth and listUpcoming.\n            function piecalCleanView( oldView, newView ) {\n                if( oldView.toLowerCase().includes( 'list' ) && newView.toLowerCase().includes( 'grid' ) ) {\n                    return false;\n                }\n\n                if( oldView.toLowerCase().includes( 'list' ) && newView.toLowerCase().includes( 'list' ) ) {\n                    window.calendar.changeView('dayGridMonth');\n                }\n\n                if( oldView.toLowerCase().includes( 'grid' ) && newView.toLowerCase().includes( 'grid' ) ) {\n                    window.calendar.changeView('listMonth');\n                }\n            }\n\n            function piecalGotoToday() {\n                console.log('today');\n            }\n\n            function piecalNextInView() {\n                window.calendar.next();\n            }\n\n            function piecalPreviousInView() {\n                console.log('prev');\n            }\n\n            function piecalSkipCalendar() {\n                let focusedCalendar = document.querySelector('.piecal-wrapper:focus-within');\n                let focusablesInCalendar = focusedCalendar.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"]');\n                let lastFocusable = focusablesInCalendar[focusablesInCalendar.length - 1];\n\n                let focusablesInDocument = document.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"]');\n                let targetFocusable = Array.prototype.indexOf.call(focusablesInDocument, lastFocusable) + 1;\n\n                focusablesInDocument[targetFocusable].focus();\n            }\n\n            document.addEventListener('alpine:init', () => {\n                Alpine.store('calendarEngine', {\n                    viewTitle: \"Loading\",\n                    viewSpec: \"Loading\",\n                    buttonText: {},\n                    showPopover: false,\n                    locale: \"fr-FR\",\n                    localeDateStringFormat: {\"hour\":\"2-digit\",\"minute\":\"2-digit\"},\n                    allDayLocaleDateStringFormat: [],\n                    calendarView: \"dayGridMonth\",\n                    eventTitle: \"Loading...\",\n                    eventDetails: \"Loading...\",\n                    eventType: \"Loading...\",\n                    eventStart: \"Loading...\",\n                    eventAllDay: false,\n                    eventActualEnd: null,\n                    eventEnd: \"Loading...\",\n                    eventUrl: \"\/\",\n                    safeOutput( input ) {\n                        let scrubber = document.createElement('textarea');\n                        scrubber.innerHTML = input;\n                        return scrubber.value;\n                    }\n                })\n            })\n\n            window.addEventListener('DOMContentLoaded', () => {\n                Alpine.store('calendarEngine').viewTitle = window.calendar.currentData.viewTitle;\n                Alpine.store('calendarEngine').viewSpec = window.calendar.currentData.viewSpec.buttonTextDefault;\n                Alpine.store('calendarEngine').buttonText = window.calendar.currentData.localeDefaults.buttonText;\n            })\n\n            window.addEventListener('keydown', (e) => {\n                if( e.keyCode == 27 || e.key == 'Escape' ) Alpine.store('calendarEngine').showPopover = false;\n\n            })\n        <\/script>\n        <div\n        class=\"piecal-wrapper\"\n        data-view=\"dayGridMonth\";\n        x-data\n        >\n            <div class=\"piecal-controls fc\">\n                <button\n                    class=\"piecal-controls__skip-calendar fc-button fc-button-primary\"\n                    onClick=\"piecalSkipCalendar()\">\n                        Skip Calendar                <\/button>\n                <div\n                class=\"piecal-controls__view-title\" \n                aria-live=\"polite\"\n                role=\"status\"\n                >\n                  <span class=\"visually-hidden\" x-text=\"$store.calendarEngine.viewTitle + ' - current view is ' + $store.calendarEngine.calendarView\"><\/span>\n                  <span aria-hidden=\"true\" x-text=\"$store.calendarEngine.viewTitle\"><\/span>\n                <\/div>\n                <label class=\"piecal-controls__view-chooser\">\n                    Choose View                    <select x-model=\"$store.calendarEngine.calendarView\" @change=\"piecalChangeView($store.calendarEngine.calendarView)\">\n                                                    <option value=\"dayGridMonth\">\n                                Month - Classic                            <\/option>\n                                                    <option value=\"listMonth\">\n                                Month - List                            <\/option>\n                                                    <option value=\"timeGridWeek\">\n                                Week - Time Grid                            <\/option>\n                                                    <option value=\"listWeek\">\n                                Week - List                            <\/option>\n                                                    <option value=\"dayGridWeek\">\n                                Week - Day Grid                            <\/option>\n                                                    <option value=\"listDay\">\n                                Day - List                            <\/option>\n                                                    <option value=\"listUpcoming\">\n                                List - Upcoming                            <\/option>\n                                            <\/select>\n                <\/label>\n                <div class=\"piecal-controls__navigation-button-group\">\n                    <button \n                        class=\"piecal-controls__back-to-month fc-button fc-button-primary\"\n                        aria-label=\"Back to full month view.\"\n                        onClick=\"piecalChangeView('dayGridMonth')\">\n                            Back To Full Month                    <\/button>\n                    <button \n                    class=\"fc-button fc-button-primary piecal-controls__today-button\"\n                    @click=\"window.calendar.today(); $store.calendarEngine.viewTitle = window.calendar.currentData.viewTitle\"\n                    x-text=\"$store.calendarEngine.buttonText.today ?? 'Today'\">\n                    <\/button>\n                    <button \n                    class=\"fc-button fc-button-primary piecal-controls__prev-button\"\n                    @click=\"window.calendar.prev(); $store.calendarEngine.viewTitle = window.calendar.currentData.viewTitle\"\n                    :aria-label=\"$store.calendarEngine.buttonText.prev + ' ' + $store.calendarEngine.viewSpec\"><<\/button>\n                    <button \n                    class=\"fc-button fc-button-primary piecal-controls__next-button\"\n                    @click=\"window.calendar.next(); $store.calendarEngine.viewTitle = window.calendar.currentData.viewTitle\" \n                    :aria-label=\"$store.calendarEngine.buttonText.next + ' ' + $store.calendarEngine.viewSpec\">><\/button>\n                <\/div>\n            <\/div>\n            <div id=\"calendar\"><\/div>\n            <div \n                class=\"piecal-popover\" \n                x-show=\"$store.calendarEngine.showPopover\"\n                style=\"display: none;\">\n                    <div \n                    class=\"piecal-popover__inner\" \n                    role=\"dialog\"\n                    aria-labelledby=\"piecal-popover__title--01\"\n                    aria-describedby=\"piecal-popover__details--01\"\n                    @click.outside=\"$store.calendarEngine.showPopover = false\"\n                    x-trap.noscroll=\"$store.calendarEngine.showPopover\">\n                        <button \n                        class=\"piecal-popover__close-button\" \n                        title=\"Close event details\"\n                        @click=\"$store.calendarEngine.showPopover = false\">\n                        <\/button>\n                                                <p class=\"piecal-popover__title\" id=\"piecal-popover__title--01\" x-text=\"$store.calendarEngine.safeOutput( $store.calendarEngine.eventTitle )\">Event Title<\/p>\n                                                <hr>\n                        <div class=\"piecal-popover__meta\">\n                                                        <p>\n                            Starts                            <\/p>\n                            <p \n                            aria-labelledby=\"piecal-event-start-date\" \n                            x-text=\"!$store.calendarEngine.eventAllDay ? new Date($store.calendarEngine.eventStart).toLocaleDateString( $store.calendarEngine.locale, $store.calendarEngine.localeDateStringFormat ) : new Date($store.calendarEngine.eventStart).toLocaleDateString( $store.calendarEngine.locale, $store.calendarEngine.allDayLocaleDateStringFormat )\"><\/p>\n                            <p x-show=\"$store.calendarEngine.eventEnd\">\n                            Ends                            <\/p>\n                            <p \n                            x-show=\"$store.calendarEngine.eventEnd\" \n                            x-text=\"!$store.calendarEngine.eventAllDay ? new Date($store.calendarEngine.eventEnd).toLocaleDateString( $store.calendarEngine.locale, $store.calendarEngine.localeDateStringFormat ) : new Date($store.calendarEngine.eventActualEnd).toLocaleDateString( $store.calendarEngine.locale, $store.calendarEngine.allDayLocaleDateStringFormat )\"><\/p>\n                                                    <\/div>\n                        <hr>\n                                                <p x-show=\"$store.calendarEngine.eventDetails\" class=\"piecal-popover__details\" id=\"piecal-popover__details--01\" x-text=\"$store.calendarEngine.safeOutput( $store.calendarEngine.eventDetails )\"><\/p>                                                                        <a x-show=\"$store.calendarEngine.eventUrl\" class=\"piecal-popover__view-link\" :href=\"$store.calendarEngine.eventUrl\">\n                        Leggi Tutto                        <\/a>\n                                            <\/div>\n            <\/div>\n        <\/div>\n        <div class=\"piecal-footer\">\n                    <\/div>\n        \n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"_piecal_is_event":false,"_piecal_start_date":"","_piecal_end_date":"","_piecal_is_allday":false,"footnotes":""},"class_list":["post-1368","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.guideturistichepavia.it\/fr\/wp-json\/wp\/v2\/pages\/1368","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.guideturistichepavia.it\/fr\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.guideturistichepavia.it\/fr\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.guideturistichepavia.it\/fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.guideturistichepavia.it\/fr\/wp-json\/wp\/v2\/comments?post=1368"}],"version-history":[{"count":0,"href":"https:\/\/www.guideturistichepavia.it\/fr\/wp-json\/wp\/v2\/pages\/1368\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.guideturistichepavia.it\/fr\/wp-json\/wp\/v2\/media?parent=1368"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}