Skip to content

Commit ae47b09

Browse files
committed
added version to pages
1 parent 2345e10 commit ae47b09

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

docs/site/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
<!-- Hero Section -->
5959
<header class="hero" id="hero">
6060
<div class="hero-content">
61-
<div class="hero-badge">Open Source &bull; Free Forever</div>
61+
<div class="hero-badge">Open Source &bull; Free Forever &bull; <span id="app-version">v0.0.5</span></div>
6262
<h1 class="hero-title">
6363
Your Desktop.<br />
6464
<span class="gradient-text">Your Weather.</span>

docs/site/js/main.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,20 @@
7171
}
7272
});
7373
});
74+
75+
// --- Fetch current version ---
76+
const versionUrl = "https://raw.githubusercontent.com/gcclinux/WeatherWidget/refs/heads/main/release";
77+
const versionElement = document.getElementById("app-version");
78+
if (versionElement) {
79+
fetch(versionUrl)
80+
.then(response => response.text())
81+
.then(version => {
82+
if (version) {
83+
versionElement.textContent = `v${version.trim()}`;
84+
}
85+
})
86+
.catch(err => {
87+
console.error("Failed to fetch version:", err);
88+
});
89+
}
7490
})();

0 commit comments

Comments
 (0)