mirror of
https://github.com/TheErrorExe/blockattack
synced 2025-09-06 05:20:59 +02:00
Update index.html
This commit is contained in:
parent
51ebe112a6
commit
86336a9d4a
10
index.html
10
index.html
@ -69,8 +69,6 @@ This Website was developed by TheErrorExe for Blockattack. TheErrorExe is and wi
|
||||
|
||||
const newsContainer = document.getElementById('news-container');
|
||||
newsContainer.innerHTML = '';
|
||||
|
||||
|
||||
const latestNews = data.slice(0, 2);
|
||||
|
||||
if (latestNews.length === 0) {
|
||||
@ -78,7 +76,11 @@ This Website was developed by TheErrorExe for Blockattack. TheErrorExe is and wi
|
||||
} else {
|
||||
latestNews.forEach(newsItem => {
|
||||
const newsElement = document.createElement('div');
|
||||
newsElement.innerHTML = `<h3>${newsItem.title}</h3><p>${newsItem.content}</p>`;
|
||||
newsElement.classList.add('news-item');
|
||||
newsElement.innerHTML = `
|
||||
<h3>${newsItem.title}</h3>
|
||||
<p>${newsItem.content}</p>
|
||||
`;
|
||||
newsContainer.appendChild(newsElement);
|
||||
});
|
||||
}
|
||||
@ -88,6 +90,8 @@ This Website was developed by TheErrorExe for Blockattack. TheErrorExe is and wi
|
||||
}
|
||||
}
|
||||
|
||||
loadNews();
|
||||
|
||||
</script>
|
||||
<section id="news-section" style="margin-bottom: 50px; border-bottom: 2px solid #ccc; padding-bottom: 20px;">
|
||||
<main style="padding: 20px;">
|
||||
|
Loading…
x
Reference in New Issue
Block a user