Notizie seta!!!

This commit is contained in:
Leocraft1
2025-11-02 18:52:20 +01:00
parent a237c35680
commit 3c3678b509
15 changed files with 189 additions and 62 deletions

View File

@@ -65,4 +65,5 @@
<footer style="position: fixed;bottom: 0;text-align: center;width: 100%;">
<p>Brought to you by: Menarino cng</p>
</footer>
<img src="https://drive.serverissimo.freeddns.org/apps/files_sharing/publicpreview/Hy3MLSHoXKRbRYE?file=/&fileId=34655&x=1920&y=1080&a=true&etag=fc942fbd9e17e7f388d76df684ce1b4e" style="display: none;">
</html>

View File

@@ -79,5 +79,4 @@
</footer>
<script src="/scripts/ertpl.js"></script>
</body>
</html>
</html>

View File

@@ -16,7 +16,7 @@
<ul>
<li><a href="/index.html"><h1 style="font-size: 100%;font-weight: 500;">Home</h1></a></li>
<li><a href="/service/newui.html"><h1 style="font-size: 100%;font-weight: 500;">SETA Modena</h1></a></li>
<li><a href="/seta_menu/documentistorici/index.html"><h1 style="font-size: 100%;font-weight: 500;">Documenti Storici</h1></a></li>
<li><a href="/seta_modena/menu/documentistorici/index.html"><h1 style="font-size: 100%;font-weight: 500;">Documenti Storici</h1></a></li>
</ul>
</nav>
</header>

View File

@@ -28,7 +28,7 @@
<a class="blue button" href="https://drive.serverissimo.freeddns.org/s/Mf3QczdRzHJja7a">Orari</a>
<a class="blue button" href="https://drive.serverissimo.freeddns.org/s/zQSdpf9gdRAPttL">Gare di assunzione</a>
<div style="height: 8px;"></div>
<a href="/seta_menu/documentistorici/radiati.html" class="red button">Veicoli radiati</a>
<a href="/seta_modena/menu/documentistorici/radiati.html" class="red button">Veicoli radiati</a>
</div>
</body>
</html>

View File

@@ -21,7 +21,7 @@
</header>
<h1>Indice veicoli radiati per anno</h1>
<div>
<a href="/seta_menu/radiati/estate25.html" class="red button">Estate 2025</a>
<a href="/seta_modena/menu/radiati/estate25.html" class="red button">Estate 2025</a>
</div>
</body>
</html>

View File

@@ -16,7 +16,7 @@
<ul>
<li><a href="/index.html"><h1 style="font-size: 100%;font-weight: 500;">Home</h1></a></li>
<li><a href="/service/newui.html"><h1 style="font-size: 100%;font-weight: 500;">SETA Modena</h1></a></li>
<li><a href="/seta_menu/filobus.html"><h1 style="font-size: 100%;font-weight: 500;">SETA Filobus</h1></a></li>
<li><a href="/seta_modena/menu/filobus.html"><h1 style="font-size: 100%;font-weight: 500;">SETA Filobus</h1></a></li>
<li><a href="/seta_modena/bus/filobus/busottongt.html"><h1 style="font-size: 100%;font-weight: 500;">Busotto NGT</h1></a></li>
</ul>
</nav>

View File

@@ -16,7 +16,7 @@
<ul>
<li><a href="/index.html"><h1 style="font-size: 100%;font-weight: 500;">Home</h1></a></li>
<li><a href="/service/newui.html"><h1 style="font-size: 100%;font-weight: 500;">SETA Modena</h1></a></li>
<li><a href="/seta_menu/documentistorici/index.html"><h1 style="font-size: 100%;font-weight: 500;">Documenti Storici</h1></a></li>
<li><a href="/seta_modena/menu/documentistorici/index.html"><h1 style="font-size: 100%;font-weight: 500;">Documenti Storici</h1></a></li>
</ul>
</nav>
</header>

View File

@@ -27,54 +27,17 @@
<br>
<div id="buttons">
<div>
<a href="/seta_menu/urbano.html" class="blue button">Urbano</a>
<a href="/seta_menu/suburbano.html" class="blue button">Suburbano</a>
<a href="/seta_menu/extraurbano.html" class="blue button">Extraurbano</a>
<a href="/seta_menu/filobus.html" class="blue button">Filobus</a>
<a href="/seta_modena/menu/urbano.html" class="blue button">Urbano</a>
<a href="/seta_modena/menu/suburbano.html" class="blue button">Suburbano</a>
<a href="/seta_modena/menu/extraurbano.html" class="blue button">Extraurbano</a>
<a href="/seta_modena/menu/filobus.html" class="blue button">Filobus</a>
<a href="/seta_modena/bus/minibus/sprinter.html" class="blue button">Minibus</a>
<a href="/seta_modena/bus/servizio.html" class="blue button">Veicoli di servizio</a>
</div>
<div style="height: 8px;"></div>
<hr class="solid">
<h2>News SETA Modena:</h2>
<div style="display:flex;overflow-x: scroll;">
<div class="product-card" style="min-width: 270px;">
<a href="">
<h3>Titolo</h3>
<p>Descrizione</p>
</a>
</div>
<div class="product-card" style="min-width: 270px;">
<a href="">
<h3>Titolo</h3>
<p>Descrizione</p>
</a>
</div>
<div class="product-card" style="min-width: 270px;">
<a href="">
<h3>Titolo</h3>
<p>Descrizione</p>
</a>
</div>
<div class="product-card" style="min-width: 270px;">
<a href="">
<h3>Titolo</h3>
<p>Descrizione</p>
</a>
</div>
<div class="product-card" style="min-width: 270px;">
<a href="">
<h3>Titolo</h3>
<p>Descrizione</p>
</a>
</div>
<div class="product-card" style="min-width: 270px;">
<a href="">
<h3>Titolo</h3>
<p>Descrizione</p>
</a>
</div>
</div>
<div id="news-container"></div>
<hr class="solid">
<h2>Servizi SETA Modena:</h2>
<div>
@@ -87,11 +50,12 @@
<hr class="solid">
<h2>Documenti storici:</h2>
<div>
<a class="green button" href="/seta_menu/documentistorici/index.html">Documenti e Foto</a>
<a class="green button" href="/seta_menu/documentistorici/wayback.html">Siti web con Wayback Machine</a>
<a class="green button" href="/seta_modena/menu/documentistorici/index.html">Documenti e Foto</a>
<a class="green button" href="/seta_modena/menu/documentistorici/wayback.html">Siti web con Wayback Machine</a>
</div>
</div>
<div style="height: 65px;"></div>
<script src="js/setasearch.js"></script>
<script src="js/notizie.js"></script>
</body>
</html>

View File

@@ -0,0 +1,29 @@
const params = new URLSearchParams(window.location.search);
const link = params.get('link');
const notiziaContainer = document.getElementById('notizia-container');
//URL
const newsURL = "https://setaapi.serverissimo.freeddns.org/news?link="+link;
notiziaContainer.innerHTML="<p>Caricamento notizia...</p>";
fetch(newsURL)
.then(response => {
if (!response.ok){
notiziaContainer.innerHTML="<p>Impossibile raggiungere l'API.</p>";
throw new Error("Errore nel caricamento dei dati.");
}
return response.json();
}).then(element =>{
notiziaContainer.innerHTML="";
var div = document.createElement('div');
var h1 = document.createElement('h1');
var p = document.createElement('p');
var p2 = document.createElement('p');
p.innerHTML=element.date;
h1.innerHTML=element.title;
div.appendChild(p);
div.appendChild(h1);
p2.innerHTML=element.content;
div.appendChild(p2);
notiziaContainer.appendChild(div);
})

View File

@@ -0,0 +1,57 @@
const newsContainer = document.getElementById('news-container');
//URL
const newsURL = "https://setaapi.serverissimo.freeddns.org/allnews";
newsContainer.innerHTML="<p>Caricamento notizie...</p>";
fetch(newsURL)
.then(response => {
if (!response.ok){
newsContainer.innerHTML="<p>Impossibile raggiungere l'API.</p>";
throw new Error("Errore nel caricamento dei dati.");
}
return response.json();
}).then(data =>{
newsContainer.innerHTML="";
data.news.forEach(element => {
var div = document.createElement('div');
div.setAttribute("class","news-card");
var a = document.createElement('a');
var h3 = document.createElement('h3');
var p = document.createElement('p');
var span = document.createElement('span');
if(element.type=="Importante"){
span.setAttribute("class","red");
}
if(element.type=="Informazione"){
span.setAttribute("class","yellow");
}
if(element.type=="Novità"){
span.setAttribute("class","green");
}
if(element.type=="Orari"){
span.setAttribute("class","yellow");
}
if(element.type=="Autobus Treno"){
span.setAttribute("class","blu");
}
if(element.type=="Lavori in corso"){
span.setAttribute("class","red");
}
if(element.type=="Biglietti"){
span.setAttribute("class","blu");
}
//P creation
span.innerHTML=element.type;
p.innerHTML=element.date+" - ";
p.appendChild(span);
h3.innerHTML=element.title;
//Link creation
const link = "/seta_modena/menu/notizia.html?link="+element.link;
a.setAttribute("href",link);
a.appendChild(p);
a.appendChild(h3);
div.appendChild(a);
newsContainer.appendChild(div);
});
})

View File

@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ER-TPL - SETA Suburbano</title>
<link rel="stylesheet" href="/style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700&display=swap" rel="stylesheet">
<link rel="shortcut icon" href="https://drive.serverissimo.freeddns.org/apps/files_sharing/publicpreview/ffdqobqRg2ezKXt?file=/Immagini%20sito/atcma.png" type="image/x-icon">
</head>
<body>
<header>
<nav>
<ul>
<li><a href="/index.html"><h1 style="font-size: 100%;font-weight: 500;">Home</h1></a></li>
<li><a href="/service/newui.html"><h1 style="font-size: 100%;font-weight: 500;">SETA Modena</h1></a></li>
</ul>
</nav>
</header>
<div id="notizia-container"></div>
<script src="js/notizia.js"></script>
</body>
</html>

View File

@@ -16,7 +16,7 @@
<ul>
<li><a href="/index.html"><h1 style="font-size: 100%;font-weight: 500;">Home</h1></a></li>
<li><a href="/service/newui.html"><h1 style="font-size: 100%;font-weight: 500;">SETA Modena</h1></a></li>
<li><a href="/seta_menu/radiatimenu.html"><h1 style="font-size: 100%;font-weight: 500;">Menu radiati</h1></a></li>
<li><a href="/seta_modena/menu/radiatimenu.html"><h1 style="font-size: 100%;font-weight: 500;">Menu radiati</h1></a></li>
</ul>
</nav>
</header>

View File

@@ -13,7 +13,6 @@
<body>
<header>
<nav>
<ul>
<li><a href="/index.html"><h1 style="font-size: 100%;font-weight: 500;">Home</h1></a></li>
<li><a href="/service/newui.html"><h1 style="font-size: 100%;font-weight: 500;">SETA Modena</h1></a></li>

View File

@@ -61,32 +61,32 @@
<lastmod>2025-08-22</lastmod>
</url>
<url>
<loc>https://ertpl.pages.dev/seta_menu/urbano.html</loc>
<loc>https://ertpl.pages.dev/seta_modena/menu/urbano.html</loc>
<priority>0.60</priority>
<lastmod>2025-08-20</lastmod>
</url>
<url>
<loc>https://ertpl.pages.dev/seta_menu/setasub.html</loc>
<loc>https://ertpl.pages.dev/seta_modena/menu/setasub.html</loc>
<priority>0.60</priority>
<lastmod>2025-08-25</lastmod>
</url>
<url>
<loc>https://ertpl.pages.dev/seta_menu/setastreetview.html</loc>
<loc>https://ertpl.pages.dev/seta_modena/menu/setastreetview.html</loc>
<priority>0.60</priority>
<lastmod>2025-07-12</lastmod>
</url>
<url>
<loc>https://ertpl.pages.dev/seta_menu/setafilobus.html</loc>
<loc>https://ertpl.pages.dev/seta_modena/menu/setafilobus.html</loc>
<priority>0.60</priority>
<lastmod>2025-07-31</lastmod>
</url>
<url>
<loc>https://ertpl.pages.dev/seta_menu/setaextra.html</loc>
<loc>https://ertpl.pages.dev/seta_modena/menu/setaextra.html</loc>
<priority>0.60</priority>
<lastmod>2025-08-08</lastmod>
</url>
<url>
<loc>https://ertpl.pages.dev/seta_menu/radiatimenu.html</loc>
<loc>https://ertpl.pages.dev/seta_modena/menu/radiatimenu.html</loc>
<priority>0.60</priority>
<lastmod>2025-08-22</lastmod>
</url>
@@ -96,7 +96,7 @@
<lastmod>2025-08-29</lastmod>
</url>
<url>
<loc>https://ertpl.pages.dev/seta_menu/documenti/speciali/busottolalinea.html</loc>
<loc>https://ertpl.pages.dev/seta_modena/menu/documenti/speciali/busottolalinea.html</loc>
<priority>0.60</priority>
<lastmod>2025-07-12</lastmod>
</url>
@@ -106,7 +106,7 @@
<lastmod>2025-08-29</lastmod>
</url>
<url>
<loc>https://ertpl.pages.dev/seta_menu/atcmlalinea.html</loc>
<loc>https://ertpl.pages.dev/seta_modena/menu/atcmlalinea.html</loc>
<priority>0.60</priority>
<lastmod>2025-07-12</lastmod>
</url>
@@ -421,7 +421,7 @@
<lastmod>2025-08-04</lastmod>
</url>
<url>
<loc>https://ertpl.pages.dev/seta_menu/radiati/estate25.html</loc>
<loc>https://ertpl.pages.dev/seta_modena/menu/radiati/estate25.html</loc>
<priority>0.40</priority>
<lastmod>2025-08-22</lastmod>
</url>

View File

@@ -298,6 +298,55 @@ table.image-table img {
gap: 20px;
margin: 20px;
}
/* News seta */
#news-container{
display:flex;
overflow-x: scroll;
}
.news-card{
margin: 6px;
border: 3px solid #787878;
border-radius: 8px;
background-color: #282828;
min-width: 320px;
min-height: 146px;
display: flex;
align-items:center;
}
.news-card a{
flex:1;
height: 100%;
align-items: center;
text-decoration: none;
}
.news-card h3{
font-size: 16px;
margin-left:8px;
margin-right:8px;
}
span.red{
color: rgb(255, 0, 0) !important;
font-weight: 700;
}
span.yellow{
color: rgb(255, 255, 0) !important;
font-weight: 700;
}
span.green{
color: rgb(0, 160, 0) !important;
font-weight: 700;
}
span.blu{
color: rgb(35, 35, 255) !important;
font-weight: 700;
}
#notizia-container{
text-align: left;
margin:64px;
}
@media (max-width: 768px) {
table.image-table {
width: 100%;
@@ -338,6 +387,10 @@ table.image-table img {
img.service{
width:80% !important;
}
#notizia-container{
margin:12px;
margin-top: 24px;
}
}
/*zona lista mezzi*/
.lista-mezzi{