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 = + ` + + + That didn't work. + ${this.fallbackEmail + ? `Click here to send as an email instead.` + : "" + } + + `; + } + else + { + alert("Your comment has been submitted!"); } }; diff --git a/src/pages/guestbook.njk b/src/pages/guestbook.njk index 577ac1c0..e493003d 100644 --- a/src/pages/guestbook.njk +++ b/src/pages/guestbook.njk @@ -20,6 +20,7 @@ eleventyComputed: id="guestbookForm" titleText="Sign the Guestbook" discordURL="https://discord.com/api/webhooks/1243241310664659076/JQNvj369B_d8DipyooUrYA7gSfd01lBcUb7-U45OVLXkHoEkMFdjrY555B-WZYG9CwL0" + fallbackEmail="{{ sitemeta.siteAuthor.email }}" >

Guest Messages