{"id":3580,"date":"2025-12-22T16:36:47","date_gmt":"2025-12-22T14:36:47","guid":{"rendered":"https:\/\/incomecapital.biz\/?page_id=3580"},"modified":"2026-06-22T04:47:58","modified_gmt":"2026-06-22T08:47:58","slug":"app","status":"publish","type":"page","link":"https:\/\/incomecapital.biz\/it\/app\/","title":{"rendered":"App"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"3580\" class=\"elementor elementor-3580\">\n\t\t\t\t<div class=\"elementor-element elementor-element-306cace e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-column-slider-no wpr-equal-height-no e-con e-parent\" data-id=\"306cace\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-b77653c elementor-widget elementor-widget-html\" data-id=\"b77653c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<style>\r\n  html, body { margin:0; padding:0; height:100%; }\r\n\r\n  .app-shell{\r\n    height:100vh;\r\n    display:flex;\r\n    flex-direction:column;\r\n    background:#fff;\r\n  }\r\n\r\n  .content{\r\n    flex:1;\r\n    overflow:hidden;\r\n  }\r\n\r\n  .content iframe{\r\n    width:100%;\r\n    height:100%;\r\n    border:0;\r\n    display:block;\r\n  }\r\n\r\n  .bottombar{\r\n    height:64px;\r\n    display:flex;\r\n    justify-content:space-around;\r\n    align-items:center;\r\n    border-top:1px solid rgba(0,0,0,.08);\r\n    background:#fff;\r\n  }\r\n\r\n  .bottombar a{\r\n    text-decoration:none;\r\n    font-size:12px;\r\n    padding:8px 10px;\r\n  }\r\n<\/style>\r\n\r\n<div class=\"app-shell\">\r\n  <div class=\"content\">\r\n    <iframe id=\"appFrame\" src=\"\/login\/?app=1\"><\/iframe>\r\n  <\/div>\r\n\r\n  <div class=\"bottombar\">\r\n    <a href=\"#\" data-url=\"\/area-riservata\/\">Home<\/a>\r\n    <a href=\"#\" data-url=\"\/area-riservata\/report\/\">Report<\/a>\r\n    <a href=\"#\" data-url=\"\/area-riservata\/performance\/\">Performance<\/a>\r\n    <a href=\"#\" data-url=\"\/area-riservata\/profilo\/\">Profilo<\/a>\r\n  <\/div>\r\n<\/div>\r\n\r\n<script>\r\n(function () {\r\n  const iframe = document.getElementById('appFrame');\r\n\r\n  function withApp(url){\r\n    const u = new URL(url, window.location.origin);\r\n    u.searchParams.set('app','1');\r\n    return u.pathname + u.search + u.hash;\r\n  }\r\n\r\n  function go(url){\r\n    iframe.src = withApp(url);\r\n  }\r\n\r\n  \/\/ bottom bar: cambia solo l'iframe e forza app=1\r\n  document.querySelectorAll('.bottombar a[data-url]').forEach(a=>{\r\n    a.addEventListener('click', e=>{\r\n      e.preventDefault();\r\n      go(a.dataset.url);\r\n    });\r\n  });\r\n\r\n  \/\/ ad ogni pagina caricata nell'iframe, forziamo app=1 su link e form\r\n  iframe.addEventListener('load', function(){\r\n    try{\r\n      const w = iframe.contentWindow;\r\n      const d = w.document;\r\n\r\n      \/\/ Se la pagina dentro iframe perde app=1, ricarica con app=1\r\n      if (!w.location.search.includes('app=1')) {\r\n        iframe.src = withApp(w.location.href);\r\n        return;\r\n      }\r\n\r\n      \/\/ Intercetta click su link interni\r\n      d.querySelectorAll('a[href]').forEach(a=>{\r\n        a.addEventListener('click', function(e){\r\n          const href = a.getAttribute('href');\r\n          if(!href || href.startsWith('#')) return;\r\n\r\n          const abs = new URL(href, w.location.href);\r\n\r\n          \/\/ esterni: lasciali stare\r\n          if(abs.origin !== window.location.origin) return;\r\n\r\n          e.preventDefault();\r\n          go(abs.pathname + abs.search + abs.hash);\r\n        }, true);\r\n      });\r\n\r\n      \/\/ Intercetta submit form (login incluso)\r\n      d.querySelectorAll('form').forEach(f=>{\r\n        f.addEventListener('submit', function(){\r\n          if (this.action) this.action = withApp(this.action);\r\n        }, true);\r\n      });\r\n\r\n    }catch(e){\r\n      \/\/ se non si pu\u00f2 accedere al DOM dell'iframe, non blocchiamo nulla\r\n    }\r\n  });\r\n})();\r\n<\/script>\r\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Home Report Performance Profilo<\/p>","protected":false},"author":4,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_header_footer","meta":{"_acf_changed":false,"two_page_speed":[],"_joinchat":[],"footnotes":"","_members_access_role":[],"_members_access_error":""},"class_list":["post-3580","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/incomecapital.biz\/it\/wp-json\/wp\/v2\/pages\/3580","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/incomecapital.biz\/it\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/incomecapital.biz\/it\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/incomecapital.biz\/it\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/incomecapital.biz\/it\/wp-json\/wp\/v2\/comments?post=3580"}],"version-history":[{"count":23,"href":"https:\/\/incomecapital.biz\/it\/wp-json\/wp\/v2\/pages\/3580\/revisions"}],"predecessor-version":[{"id":3604,"href":"https:\/\/incomecapital.biz\/it\/wp-json\/wp\/v2\/pages\/3580\/revisions\/3604"}],"wp:attachment":[{"href":"https:\/\/incomecapital.biz\/it\/wp-json\/wp\/v2\/media?parent=3580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}