From 55131e8356a25551a410cd945d951aa44ec88f0d Mon Sep 17 00:00:00 2001
From: Helen Chong <119173961+helenclx@users.noreply.github.com>
Date: Sun, 2 Jun 2024 08:48:59 +0800
Subject: [PATCH] Add fallback email to guestbook
---
src/assets/css/comments.css | 4 ++++
src/assets/js/comments.js | 17 +++++++++++++++++
src/pages/guestbook.njk | 1 +
3 files changed, 22 insertions(+)
diff --git a/src/assets/css/comments.css b/src/assets/css/comments.css
index d3be79ff..e5188c7b 100644
--- a/src/assets/css/comments.css
+++ b/src/assets/css/comments.css
@@ -55,6 +55,10 @@
background-color: var(--clr-quote-bg);
}
+.inline-banner.warning {
+ background-color: #9e0f00;
+}
+
.form-footer,
.comment-footer {
display: flex;
diff --git a/src/assets/js/comments.js b/src/assets/js/comments.js
index e4d418b0..454107c7 100644
--- a/src/assets/js/comments.js
+++ b/src/assets/js/comments.js
@@ -192,6 +192,23 @@ registerNamespace("GW.Controls", function (ns)
if (request.readyState == 4)
{
console.log(request.responseText);
+
+ this.bannerEl.classList.add("warning");
+ this.bannerEl.innerHTML =
+ `
+