From 94a7c81f9d8016cc774550622c02650204fbd0ff Mon Sep 17 00:00:00 2001 From: JoLoZ Date: Mon, 17 Jul 2023 00:29:35 +0200 Subject: [PATCH] Added branch and commit info in footer --- src/exporter/template.ts | 3 +++ static/assets/css/global.css | 6 ++++++ templates/main.html | 1 + 3 files changed, 10 insertions(+) diff --git a/src/exporter/template.ts b/src/exporter/template.ts index 2670700..2f57f39 100644 --- a/src/exporter/template.ts +++ b/src/exporter/template.ts @@ -28,6 +28,9 @@ export class Templater { replacers.game = slug.game; + replacers.commit = process.env.CF_PAGES_COMMIT_SHA || 'UNAVAILABLE'; + replacers.branch = process.env.CF_PAGES_BRANCH || 'UNAVAILABLE'; + // Read template HTML let res: HTMLString = fs.readFileSync('templates/main.html', 'utf8'); diff --git a/static/assets/css/global.css b/static/assets/css/global.css index b92ac61..6ca5a93 100644 --- a/static/assets/css/global.css +++ b/static/assets/css/global.css @@ -20,6 +20,12 @@ body { float: right; } +.footer { + border-top: 0.1rem solid #555; + margin-top: 1rem; + padding-top: 0.5rem; +} + .content { margin-top: 5rem; margin-left: 20rem; diff --git a/templates/main.html b/templates/main.html index 433f5fd..2efafb9 100644 --- a/templates/main.html +++ b/templates/main.html @@ -53,6 +53,7 @@

Documentation

%CONTENT%
+