Updates
This commit is contained in:
@@ -47,20 +47,9 @@
|
||||
<p>ReviveSparc is released under the BSD 2-Clause License.</p>
|
||||
</div>
|
||||
|
||||
<script type="text/json" id="news-data">[
|
||||
{
|
||||
"date": "2026-06-15",
|
||||
"title": "ReviveSparc Initial Development",
|
||||
"body": "The project has officially started. We are currently in the research phase, working hard to make this work.",
|
||||
"link": "index.html",
|
||||
"linkText": "Read More"
|
||||
}
|
||||
]</script>
|
||||
|
||||
<script>
|
||||
function renderNews() {
|
||||
function renderNews(entries) {
|
||||
var container = document.getElementById("news-container");
|
||||
var entries = JSON.parse(document.getElementById("news-data").textContent);
|
||||
var html = "";
|
||||
entries.forEach(function (e) {
|
||||
html += '<div class="news-item">';
|
||||
@@ -79,7 +68,14 @@ function renderNews() {
|
||||
});
|
||||
container.innerHTML = html;
|
||||
}
|
||||
renderNews();
|
||||
|
||||
fetch("news.json")
|
||||
.then(function (response) { return response.json(); })
|
||||
.then(renderNews)
|
||||
.catch(function () {
|
||||
document.getElementById("news-container").innerHTML =
|
||||
'<p class="meta">Failed to load news.</p>';
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user