Add version of software to footer

The version also includes a link to the github repo tag of that
version's release build.
This commit is contained in:
Wolvan 2022-01-12 19:53:19 +01:00
parent ab151cb732
commit ce2601642b
5 changed files with 16 additions and 4 deletions

View file

@ -56,7 +56,7 @@
<ul>
{{ FOOTER_LINKS }}
</ul>
<div class="copyright">{{ FOOTER_COPYRIGHT }}</div>
<div class="copyright"><a href="https://github.com/Wolvan/poll.horse/releases/tag/v{{ SYSTEM_VERSION }}">v{{ SYSTEM_VERSION }}</a> {{ FOOTER_COPYRIGHT }}</div>
</footer>
</body>
</html>

View file

@ -54,7 +54,7 @@
<ul>
{{ FOOTER_LINKS }}
</ul>
<div class="copyright">{{ FOOTER_COPYRIGHT }}</div>
<div class="copyright"><a href="https://github.com/Wolvan/poll.horse/releases/tag/v{{ SYSTEM_VERSION }}">v{{ SYSTEM_VERSION }}</a> {{ FOOTER_COPYRIGHT }}</div>
</footer>
</body>
</html>

View file

@ -43,7 +43,7 @@
<ul>
{{ FOOTER_LINKS }}
</ul>
<div class="copyright">{{ FOOTER_COPYRIGHT }}</div>
<div class="copyright"><a href="https://github.com/Wolvan/poll.horse/releases/tag/v{{ SYSTEM_VERSION }}">v{{ SYSTEM_VERSION }}</a> {{ FOOTER_COPYRIGHT }}</div>
</footer>
</body>
</html>

View file

@ -248,4 +248,8 @@ footer .copyright {
color: #fff;
padding: 5px;
}
footer .copyright a {
color: #fff;
text-decoration: none;
}
/* #endregion Footer */

View file

@ -61,7 +61,15 @@ const defaultReplacements = {
<li><a href="https://github.com/Wolvan/poll.horse" target="_blank">Github Repo</a></li>
<li><a href="https://www.mppp.horse/" target="_blank">/mppp/ - Mass Production plushies</a></li>
<li><a href="https://www.pon3.stream/" target="_blank">Pon3.Stream</a></li>
`
`,
"SYSTEM_VERSION": ((): string => {
try {
const packageJson = JSON.parse(fs.readFileSync(resolve(__dirname, "../package.json"), "utf8"));
return packageJson.version;
} catch (error) {
return "0.0.0";
}
})()
};
class Defaults2RenderTransform extends MinificationTransform {
constructor(replacements = {}) {