Updated LE & RR Sites

The following stats are now pulled through the NodeJS Backend:

- CurrentVersion
- ThunderstoreRating
This commit is contained in:
2025-04-08 10:53:04 -05:00
parent fdf79ac2e4
commit 79820216e0
8 changed files with 187 additions and 12 deletions

View File

@@ -24,7 +24,7 @@
<a href="./aboutus.html" class="desktop_navbar_link">About Us</a>
<a href="./credits.html" class="desktop_navbar_link">Credits</a>
<a href="./projects.html" class="desktop_navbar_link">Projects</a>
<a class="desktop_navbar_link scroll">Current Version: 0.6.6</a>
<a class="desktop_navbar_link scroll" id="version-text">Current Version:</a>
<div class="desktop_navbar_link2_div">
<a href="./downloads.html" class="desktop_navbar_link2">Download</a>
</div>
@@ -143,6 +143,19 @@
<a class="main2_feature_text" href=""></a>
</div>
</div>
<script>
// Fetch the latest version from the provided API URL
fetch('https://lethunderstore.lethal-extended.com/api/downloads')
.then(response => response.json())
.then(data => {
const latestVersion = data.latest_version;
document.getElementById('version-text').innerText = `Current Version: ${latestVersion.toLocaleString()}`;
})
.catch(error => {
console.error('Error fetching latest version:', error);
document.getElementById('version-text').innerText = 'Failed to load latest version';
});
</script>
</div>
</body>
</html>