From 5b5dc9d922617f1ccb17f164f063df92733a586a Mon Sep 17 00:00:00 2001 From: Wolvan Date: Tue, 4 Jan 2022 22:11:27 +0100 Subject: [PATCH] Serverside render footer This way it's easy to add new links or a changed copyright to the footer on all pages. --- frontend/html/index.html | 4 ++-- src/frontend.ts | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/frontend/html/index.html b/frontend/html/index.html index 8383618..1e3f783 100644 --- a/frontend/html/index.html +++ b/frontend/html/index.html @@ -51,9 +51,9 @@ \ No newline at end of file diff --git a/src/frontend.ts b/src/frontend.ts index 07bfb7e..68dd7b5 100644 --- a/src/frontend.ts +++ b/src/frontend.ts @@ -55,7 +55,11 @@ class MinificationTransform extends RenderTransform { const defaultReplacements = { "TITLE": "Poll Horse", - "DEVELOPER_CONTACT_INFO": "developer@poll.horse" + "DEVELOPER_CONTACT_INFO": "developer@poll.horse", + "FOOTER_COPYRIGHT": `© ${ (new Date()).getFullYear() } Wolvan`, + "FOOTER_LINKS": ` +
  • Github Repo
  • + ` }; class Defaults2RenderTransform extends MinificationTransform { constructor(replacements = {}) {