{"id":5055,"date":"2025-10-02T16:12:13","date_gmt":"2025-10-02T16:12:13","guid":{"rendered":"https:\/\/paragliding-in-madeira.com\/weather\/?page_id=5055"},"modified":"2025-10-18T20:56:53","modified_gmt":"2025-10-18T19:56:53","slug":"trails-status","status":"publish","type":"page","link":"https:\/\/paragliding-in-madeira.com\/weather\/trails-status\/","title":{"rendered":"Trail status"},"content":{"rendered":"\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1999\" height=\"1024\" src=\"https:\/\/paragliding-in-madeira.com\/weather\/wp-content\/uploads\/2025\/10\/Hiker-in-nature-by-gpt-wide-banner.webp\" alt=\"Hiker in nature by gpt wide banner\" class=\"wp-image-5101\" style=\"width:610px;height:auto\" srcset=\"https:\/\/paragliding-in-madeira.com\/weather\/wp-content\/uploads\/2025\/10\/Hiker-in-nature-by-gpt-wide-banner.webp 1999w, https:\/\/paragliding-in-madeira.com\/weather\/wp-content\/uploads\/2025\/10\/Hiker-in-nature-by-gpt-wide-banner-300x154.webp 300w, https:\/\/paragliding-in-madeira.com\/weather\/wp-content\/uploads\/2025\/10\/Hiker-in-nature-by-gpt-wide-banner-1024x525.webp 1024w, https:\/\/paragliding-in-madeira.com\/weather\/wp-content\/uploads\/2025\/10\/Hiker-in-nature-by-gpt-wide-banner-768x393.webp 768w, https:\/\/paragliding-in-madeira.com\/weather\/wp-content\/uploads\/2025\/10\/Hiker-in-nature-by-gpt-wide-banner-1536x787.webp 1536w\" sizes=\"auto, (max-width: 1999px) 100vw, 1999px\" \/><\/figure>\n\n\n\n<div class=\"wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-a89b3969 wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/www.paragliding-in-madeira.com\/weather\">Home<\/a><\/div>\n\n\n\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/paragliding-in-madeira.com\/weather\/weather-info\/\">Weather info<\/a><\/div>\n<\/div>\n\n\n\n<p class=\"has-text-align-center\"><strong>Trail Status<\/strong> | <a href=\"https:\/\/paragliding-in-madeira.com\/weather\/trails-info\/user-feedback\/#user-info\" title=\"\">Hikers feedback<\/a><\/p>\n\n\n\n<div style=\"height:13px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<p class=\"has-text-align-center\">Madeira PR trail status info <br>Powered by <a href=\"https:\/\/ifcn.madeira.gov.pt\/en\/atividades-de-natureza\/percursos-pedestres-recomendados\/percursos-pedestres-recomendados\" target=\"_blank\" rel=\"noopener\" title=\"\">IFCN<\/a><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<p class=\"has-text-align-center\">Find out which trails are open and plan your hikes accordingly<\/p>\n<\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<div style=\"height:13px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><a href=\"https:\/\/ifcn.madeira.gov.pt\/en\/atividades-de-natureza\/percursos-pedestres-recomendados\/percursos-pedestres-recomendados\" target=\"_blank\" rel=\" noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"808\" height=\"345\" src=\"https:\/\/paragliding-in-madeira.com\/weather\/wp-content\/uploads\/2025\/10\/Logo-IFCN.webp\" alt=\"Logo ifcn\" class=\"wp-image-5094\" style=\"width:222px;height:auto\" srcset=\"https:\/\/paragliding-in-madeira.com\/weather\/wp-content\/uploads\/2025\/10\/Logo-IFCN.webp 808w, https:\/\/paragliding-in-madeira.com\/weather\/wp-content\/uploads\/2025\/10\/Logo-IFCN-300x128.webp 300w, https:\/\/paragliding-in-madeira.com\/weather\/wp-content\/uploads\/2025\/10\/Logo-IFCN-768x328.webp 768w\" sizes=\"auto, (max-width: 808px) 100vw, 808px\" \/><\/a><\/figure>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<div id=\"trail-status-widget\" style=\"overflow-x:auto;\">\n  <p id=\"last-updated\" style=\"text-align:center; font-weight:bold;\"><\/p>\n  <table id=\"trail-table\" style=\"width:100%; border-collapse: collapse; margin:auto;\">\n    <thead>\n      <tr>\n        <th style=\"text-align:left; padding:6px;\">Trail<\/th>\n        <th style=\"text-align:left; padding:6px;\">Status<\/th>\n      <\/tr>\n    <\/thead>\n    <tbody><\/tbody>\n  <\/table>\n<\/div>\n\n<script>\nconst statusColors = [\n  { keyword: 'parcialmente aberto', color: '#f9a825', translate: 'Partially Open' },\n  { keyword: 'parcialmente transit\u00e1vel', color: '#f9a825', translate: 'Partially Open' },\n  { keyword: 'aberto', color: '#2e7d32', translate: 'Open' },\n  { keyword: 'encerrado', color: '#c62828', translate: 'Closed' },\n{ keyword: 'condicionado', color: '#ef6c00', translate: 'Conditioned' }\n];\n\nfetch('\/weather\/wp-content\/trail-status\/trail-status.json')\n  .then(response => response.json())\n  .then(data => {\n    document.getElementById('last-updated').textContent = 'Last Updated: ' + data.last_updated;\n    const tbody = document.querySelector('#trail-table tbody');\n    tbody.innerHTML = '';\n\n    data.trails.forEach(trail => {\n      \/\/ Main row\n      const row = document.createElement('tr');\n\n      const nameCell = document.createElement('td');\n      nameCell.textContent = `PR${trail.id} \u2013 ${trail.trail}`;\n      nameCell.style.padding = '6px';\n      nameCell.style.wordBreak = 'break-word'; \/\/ allow wrap on small screens\n\n      const statusCell = document.createElement('td');\n      statusCell.style.padding = '6px';\n      statusCell.style.whiteSpace = 'nowrap';\n      statusCell.style.overflow = 'hidden';\n      statusCell.style.textOverflow = 'ellipsis';\n\n      let lowerStatus = trail.status.toLowerCase();\n      let mainStatus = trail.status;\n      let notes = '';\n\n      for (const s of statusColors) {\n        if (lowerStatus.includes(s.keyword)) {\n          mainStatus = s.translate;\n          notes = trail.status.slice(trail.status.toLowerCase().indexOf(s.keyword) + s.keyword.length).trim();\n          statusCell.style.color = s.color;\n          break;\n        }\n      }\n\n      statusCell.textContent = mainStatus;\n\n      row.appendChild(nameCell);\n      row.appendChild(statusCell);\n      tbody.appendChild(row);\n\n      \/\/ Notes row\n      if (notes) {\n        const noteRow = document.createElement('tr');\n        const noteCell = document.createElement('td');\n        noteCell.setAttribute('colspan', 2);\n        noteCell.style.padding = '4px 12px';\n        noteCell.style.fontStyle = 'italic';\n        noteCell.style.display = 'none';\n        noteCell.style.transition = 'all 0.3s ease';\n        noteCell.textContent = notes;\n\n        noteRow.appendChild(noteCell);\n        tbody.appendChild(noteRow);\n\n        \/\/ Toggle button\n        const toggleButton = document.createElement('button');\n        toggleButton.textContent = '+';\n        toggleButton.style.marginTop = '2px';\n        toggleButton.style.fontSize = '0.85em';\n        toggleButton.addEventListener('click', () => {\n          if(noteCell.style.display === 'none'){\n            noteCell.style.display = 'table-cell';\n            toggleButton.textContent = '\u2212';\n          } else {\n            noteCell.style.display = 'none';\n            toggleButton.textContent = '+';\n          }\n        });\n\n        const br = document.createElement('br');\n        statusCell.appendChild(br);\n        statusCell.appendChild(toggleButton);\n      }\n    });\n  })\n  .catch(error => {\n    console.error('Error loading trail data:', error);\n    document.getElementById('trail-status-widget').textContent = 'Unable to load trail data at this time.';\n  });\n<\/script>\n<\/div>\n\n\n\n<p><em><sup>*these last 3 PR are from Porto Santo Island<\/sup><\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Trail Status | Hikers feedback Madeira PR trail status info Powered by IFCN Find out which trails are open and plan your hikes accordingly Trail Status *these last 3 PR are from Porto Santo Island<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"slim_seo":{"title":"Madeira trail status information","description":"Madeira official PR Trail status information. Find out whether the trails are open or closed and plan your route accordingly."},"footnotes":""},"class_list":["post-5055","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/paragliding-in-madeira.com\/weather\/wp-json\/wp\/v2\/pages\/5055","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/paragliding-in-madeira.com\/weather\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/paragliding-in-madeira.com\/weather\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/paragliding-in-madeira.com\/weather\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/paragliding-in-madeira.com\/weather\/wp-json\/wp\/v2\/comments?post=5055"}],"version-history":[{"count":52,"href":"https:\/\/paragliding-in-madeira.com\/weather\/wp-json\/wp\/v2\/pages\/5055\/revisions"}],"predecessor-version":[{"id":6929,"href":"https:\/\/paragliding-in-madeira.com\/weather\/wp-json\/wp\/v2\/pages\/5055\/revisions\/6929"}],"wp:attachment":[{"href":"https:\/\/paragliding-in-madeira.com\/weather\/wp-json\/wp\/v2\/media?parent=5055"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}