Show the build date in the screenshot gallery footer

The gallery gave no indication of how old the screenshots on the page were,
which is one of the remaining items on the GitHub Pages improvement list.

The generator now writes the time it ran alongside the screenshot data, and the
page renders it in the footer next to the existing links.
This commit is contained in:
hayaksi1
2026-08-25 15:56:16 +03:00
parent 23437e4427
commit 76b19a158f
4 changed files with 16 additions and 1 deletions
+1
View File
@@ -1,4 +1,5 @@
// Generated file, do not edit
export const buildDate = 1787667600;
export const screenshots = [
["en","en-dark","de",],
["features.messages.impl.timeline.components.event_ATimelineItemEventRow_Day_0_en","features.messages.impl.timeline.components.event_ATimelineItemEventRow_Night_0_en",20675,],
+5
View File
@@ -150,6 +150,11 @@ input {
height: 40px;
}
.build-date {
margin-right: 20px;
font-size: 13px;
}
a:link {
color: white;
font-size: 14px;
+9 -1
View File
@@ -5,7 +5,7 @@
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
* Please see LICENSE files in the repository root for full details.
*/
import { screenshots } from './data.js';
import { buildDate, screenshots } from './data.js';
const URL_PARAM_LANGUAGES = "l";
const URL_PARAM_IMAGE_WIDTH = "w";
@@ -360,5 +360,13 @@ function addTable() {
document.getElementById('lines').textContent = `${linesCounter} lines`;
}
function addBuildDate() {
const element = document.createElement('div');
element.className = 'build-date';
element.textContent = `Built on ${new Date(buildDate * 1000).toLocaleDateString()}`;
document.getElementById('footer').appendChild(element);
}
addForm();
addBuildDate();
addTable();
+1
View File
@@ -167,6 +167,7 @@ def generateJavascriptFile():
with open("screenshots/html/data.js", "w") as f:
f.write("// Generated file, do not edit\n")
f.write("export const buildDate = %d;\n" % int(time.time()))
f.write("export const screenshots = [\n")
for line in data:
f.write("[")