From 289b95d957544e8ea839e64f27b6f1f81bfe9370 Mon Sep 17 00:00:00 2001 From: Mike Smith <89040888+smiggiddy@users.noreply.github.com> Date: Wed, 1 Jan 2025 16:40:49 -0500 Subject: [PATCH] feat: add footer and styling --- .../src/public/script.js | 2 ++ .../src/public/styles.css | 19 +++++++++++++++++++ .../src/views/footer.ejs | 6 ++++++ nodejs-mini-message-board/src/views/index.ejs | 2 +- 4 files changed, 28 insertions(+), 1 deletion(-) diff --git a/nodejs-mini-message-board/src/public/script.js b/nodejs-mini-message-board/src/public/script.js index 6255a17..1905d3a 100644 --- a/nodejs-mini-message-board/src/public/script.js +++ b/nodejs-mini-message-board/src/public/script.js @@ -2,3 +2,5 @@ function test(event) { const messageId = event.target.dataset.messageId; window.location.href = `comment?id=${messageId}`; } + +document.getElementById("year").textContent = `${new Date().getFullYear()}`; diff --git a/nodejs-mini-message-board/src/public/styles.css b/nodejs-mini-message-board/src/public/styles.css index aca9886..9e25743 100644 --- a/nodejs-mini-message-board/src/public/styles.css +++ b/nodejs-mini-message-board/src/public/styles.css @@ -4,6 +4,25 @@ background-color: #eff3ea; } +html, +body { + min-height: 100vh; + margin: 0; +} + +body { + display: flex; + flex-direction: column; +} + +footer { + flex: 1; + align-self: center; + align-items: end; + display: flex; + margin-bottom: 5px; +} + a { color: #86a788; font-weight: 600; diff --git a/nodejs-mini-message-board/src/views/footer.ejs b/nodejs-mini-message-board/src/views/footer.ejs index 6b0fb5c..bc0a86f 100644 --- a/nodejs-mini-message-board/src/views/footer.ejs +++ b/nodejs-mini-message-board/src/views/footer.ejs @@ -1,3 +1,9 @@ + diff --git a/nodejs-mini-message-board/src/views/index.ejs b/nodejs-mini-message-board/src/views/index.ejs index d82f0da..509d25c 100644 --- a/nodejs-mini-message-board/src/views/index.ejs +++ b/nodejs-mini-message-board/src/views/index.ejs @@ -2,7 +2,7 @@ <%- include('header') %>
-

Join the chat!

+

Click here to chat!

<% msgs.forEach((msg) => { %>