From bd2c7ad66efe5ecb5507aa9f6c79e59adc2257f8 Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Wed, 3 Apr 2024 15:26:06 +0100 Subject: [PATCH] Add NoJS warning for the events page, resolves #48 --- assets/js/calendar.js | 1 + layouts/page/calendar.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/js/calendar.js b/assets/js/calendar.js index 4a39add..edf6e8c 100644 --- a/assets/js/calendar.js +++ b/assets/js/calendar.js @@ -1,6 +1,7 @@ var events = []; $(document).ready(function () { + $('div#calendar p#nojs').hide(); // Hide the NoJS message $.getJSON('https://api.leighhack.org/events', function (data) { data.forEach(function (event) { events.push({ diff --git a/layouts/page/calendar.html b/layouts/page/calendar.html index eb09729..63bcd8e 100644 --- a/layouts/page/calendar.html +++ b/layouts/page/calendar.html @@ -18,6 +18,6 @@ {{ end }} {{ define "content" }} -
+

Your browser doesn't support (or has disabled) Javascript. If you wish to see the upcoming event calendar you can use our iCal Feed with your calendar or mail software.

{{ printf "" ("/cgi/events.cgi" | relURL) | safeHTML }} {{ end }} \ No newline at end of file