Improved stats section

This commit is contained in:
bingus_violet 2024-05-20 11:34:25 -05:00
parent e22005dc86
commit 97f7234f92
3 changed files with 31 additions and 2 deletions

View file

@ -112,7 +112,8 @@ function converter(html, query) {
"RELOAD_COUNT": reloads, "RELOAD_COUNT": reloads,
"WEATHER_MODIFIER": "", "WEATHER_MODIFIER": "",
"WEATHER_TEXT": "", "WEATHER_TEXT": "",
"ANNOUNCEMENT": fs.readFileSync(path.join(__dirname, "config/announcement.html")) "ANNOUNCEMENT": fs.readFileSync(path.join(__dirname, "config/announcement.html")),
"CACHED_IMAGES": fs.readdirSync(path.join(__dirname, "cached")).length.toString()
} }
replacers.ALL_KEYWORDS = "{" + Object.keys(replacers).join("}{") + "} " replacers.ALL_KEYWORDS = "{" + Object.keys(replacers).join("}{") + "} "

View file

@ -35,7 +35,13 @@
<ul> <ul>
<li>Page generation time: {LOAD_TIME}</li> <li>Page generation time: {LOAD_TIME}</li>
<li>Uptime: {UPTIME}</li> <li>Uptime: {UPTIME}</li>
<li>Total reloads: {RELOAD_COUNT}</li> <li>Total reloads: {RELOAD_COUNT} <sup>*1</sup></li>
<li>Cached Images: {CACHED_IMAGES} <sup>*2</sup></li>
</ul>
<br><br><br>
<ol class="noteList">
<li>Increments by 1 <em>EVERY</em> time <em>ANY</em> page is loaded.</li>
<li>Cached Images are cleared on server restart.</li>
</ul> </ul>
</main> </main>
</div> </div>

View file

@ -268,3 +268,25 @@ video {
width: 95%; width: 95%;
max-height: 90vh; max-height: 90vh;
} }
sup {
color: gray;
}
.noteList {
list-style: none;
}
.noteList > * {
counter-increment: noteList;
color: gray;
font-size: 1rem;
}
.noteList > li::before {
content: "*" counter(noteList) ". ";
}
em {
color: inherit;
}