diff --git a/_redirects b/_redirects index 9e5acd4..a2959b8 100644 --- a/_redirects +++ b/_redirects @@ -1,3 +1,4 @@ /sitemap /sitemap.xml /dani /admin/dani/servizi.html -/seta_menu/zone.html /service/comingsoon.html \ No newline at end of file +/seta_menu/zone.html /service/comingsoon.html +/seta_menu/frequenze/index.html /service/comingsoon.html \ No newline at end of file diff --git a/index.html b/index.html index cd98e83..a5ea683 100644 --- a/index.html +++ b/index.html @@ -41,6 +41,7 @@ Servizi rapidi: Cerca orario

Nuove foto: Solaris Urbino 18 III ex START.

Ora è possibile cliccare sul nome della fermata nei dettagli per ottenere gli arrivi a quella fermata nel Monitor bus in servizio. + In sviluppo il servizio "Frequenze e tempi di percorrenza".

diff --git a/service/comingsoon.html b/service/comingsoon.html index a4b402c..eb80876 100644 --- a/service/comingsoon.html +++ b/service/comingsoon.html @@ -19,6 +19,6 @@ Server foto non raggiungibile. -

Novità in arrivo!

+

Novità presto in arrivo in questa sezione!

\ No newline at end of file diff --git a/seta_menu/frequenze/css/style.css b/seta_menu/frequenze/css/style.css new file mode 100644 index 0000000..8c2dd01 --- /dev/null +++ b/seta_menu/frequenze/css/style.css @@ -0,0 +1,221 @@ +body { + background-color: #282828; + text-align: center; + color: white; + font-family: Titillium Web; +} + +.search-result { + border: 2px solid white; + border-radius: 8px; + width: 20vw; + margin: auto; + margin-left: 5px; + margin-right: 5px; + margin-top: 10px; + cursor: pointer; + display: inline-block; +} + +table { + border-collapse: collapse; + border-radius: 8px; + min-width: 85%; + max-width: 100%; + margin: auto; + margin-top: 18px; +} + +th { + background-color: rgb(204, 132, 0); +} + +th,td { + border: 2px solid #444; + padding: .7vw; + padding-top: .6vw; + padding-bottom: .6vw; + text-align: left; +} + +td.uguale{ + width: 50%; +} + +hr{ + margin-top:19px; +} + +h1.warning { + color:red; + font-size: 16px; +} + +h1.yellow-warning { + color:rgb(255, 205, 0); + font-size: 16px; +} + +header { + font-size: 67%; + background-color: #333; + height: auto; + padding: 0px 0px; + align-items: start; + width: 100%; + border-radius: 10px; +} + +nav ul { + list-style-type: none; + margin: 0; + padding: 0; + display: flex; + justify-content: left; +} + +nav { + text-align: center; + flex-shrink: 0; +} + +nav.index{ + display: flex; + min-height: 46px; +} + +nav#corsie-nav ul{ + justify-content: center; +} +nav#corsie-nav ul li a{ + color: white; + text-decoration: underline; +} +nav#corsie-nav ul li{ + margin-left: 8px; + margin-right: 7px; +} +nav ul li { + margin-left: 20px; + margin-right: 20px; +} + +nav ul li a { + color: #fff; + text-decoration: none; + font-size: 16px; +} + +nav ul li a:hover { + text-decoration: underline; +} + +.bus-card-red { + background-color: rgb(55,0,0) !important; +} +.bus-card-yellow { + background-color: rgb(65, 65, 0) !important; +} +.bus-card-green { + background-color: rgb(0, 55, 0) !important; +} + +a { + color: orange; +} + +a.bianco{ + color: white; + text-decoration: none; +} + +a.rosso{ + color:white; + text-decoration: none; +} + +a.rosso div{ + background-color: rgb(55,0,0) !important; +} + +a.biancosott{ + color: white; +} +a.link-cell { + display: block; + width: 100%; + height: 100%; + color: white; +} + +img{ + height:300px; +} + +@media (max-width: 768px) { + .search-result { + display: block; + width: 96.5%; + } + .container { + flex-direction: column; + } + th,td { + font-size: 90%; + } + nav#corsie-nav ul li a{ + font-size: 75%; + margin: 0; + } + table { + width: 100%; + } + h2{ + margin-bottom: 0; + } + h2.noreduction{ + margin-bottom: 16px; + } + #searchBar { + width: 80%; + } + #stopCodeBar { + width: 80%; + } + hr{ + margin-bottom:19px; + } + img{ + width: 98%; + height: auto; + } + nav ul:last-child li { + margin-right: 20px; + } + nav ul li { + margin-right: 8px; + } +} + +@media (max-width: 512px) { + th,td { + font-size: 3.2vw; + } + table{ + margin-top:10px; + } +} + +footer { + position: relative; + bottom: 0; + left: 0; + width: 100%; +} +div.search-result div{ + margin-left: 10px; + margin-right: 10px; +} +p.space{ + width: 20px; +} \ No newline at end of file diff --git a/seta_menu/frequenze/index.html b/seta_menu/frequenze/index.html new file mode 100644 index 0000000..074ff6d --- /dev/null +++ b/seta_menu/frequenze/index.html @@ -0,0 +1,35 @@ + + + + + + + + SETA Modena - Tempi di percorrenza + + + + + + + + +
+ +
+

Frequenze e tempi di percorrenza linee urbane SETA Modena

+

Scegli una linea:

+
+ + + + \ No newline at end of file diff --git a/seta_menu/frequenze/infolinea.html b/seta_menu/frequenze/infolinea.html new file mode 100644 index 0000000..3437c98 --- /dev/null +++ b/seta_menu/frequenze/infolinea.html @@ -0,0 +1,35 @@ + + + + + + + + SETA Modena - Percorsi + + + + + + + + +
+ +
+

Frequenze e tempi di percorrenza linea:

+
+ + + + \ No newline at end of file diff --git a/seta_menu/frequenze/js/infos.js b/seta_menu/frequenze/js/infos.js new file mode 100644 index 0000000..3ecbef8 --- /dev/null +++ b/seta_menu/frequenze/js/infos.js @@ -0,0 +1,11 @@ +const params = new URLSearchParams(window.location.search); +const num = params.get('routenum'); +const lineaSpan = document.getElementById('linea-span'); + +const urlDesc = "https://setaapi.serverissimo.freeddns.org/frequencydescription/"+num; + +//Display numero linea +lineaSpan.innerHTML=num; + +//Contenuto del testo +fetch(urlDesc) \ No newline at end of file diff --git a/seta_menu/frequenze/js/script.js b/seta_menu/frequenze/js/script.js new file mode 100644 index 0000000..c000a05 --- /dev/null +++ b/seta_menu/frequenze/js/script.js @@ -0,0 +1,28 @@ +const uContainer = document.getElementById('urbano-container'); + +const url = "https://setaapi.serverissimo.freeddns.org/routenumberslist"; + +//Elenco linee urbano +fetch(url) + .then(response => { + if (!response.ok) throw new Error("Errore nel caricamento dei dati."); + return response.json(); + }) + .then(data => { + allresults = data; + allresults.forEach(element => { + if(element<100){ + const result = document.createElement('a'); + result.setAttribute("class","bianco"); + if(element.includes("(")){ + result.setAttribute("class","rosso"); + } + result.setAttribute("href","infolinea.html?routenum="+element); + result.innerHTML = ` +

${element}

+ `; + uContainer.appendChild(result); + } + }); + }) + .catch(error => console.error('Errore nel caricamento dei dati:', error)); \ No newline at end of file diff --git a/seta_menu/seta.html b/seta_menu/seta.html index 4a0ef8c..1469abb 100644 --- a/seta_menu/seta.html +++ b/seta_menu/seta.html @@ -53,6 +53,7 @@ Orari in tempo reale Monitor autobus in servizio Percorsi + Frequenze e percorrenza (BETA) Zone (BETA)