mirror of
https://github.com/nikdoof/website-hugo.git
synced 2025-12-13 14:32:25 +00:00
Add NoJS warning for the events page, resolves #48
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
var events = [];
|
var events = [];
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
$('div#calendar p#nojs').hide(); // Hide the NoJS message
|
||||||
$.getJSON('https://api.leighhack.org/events', function (data) {
|
$.getJSON('https://api.leighhack.org/events', function (data) {
|
||||||
data.forEach(function (event) {
|
data.forEach(function (event) {
|
||||||
events.push({
|
events.push({
|
||||||
|
|||||||
@@ -18,6 +18,6 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ define "content" }}
|
{{ define "content" }}
|
||||||
<div id="calendar"></div>
|
<div id="calendar"><p id="nojs">Your browser doesn't support (or has disabled) Javascript. If you wish to see the upcoming event calendar you can use our <a href="https://api.leighhack.org/events.ics">iCal Feed</a> with your calendar or mail software.</p></div>
|
||||||
{{ printf "<!--# include virtual='%s' -->" ("/cgi/events.cgi" | relURL) | safeHTML }}
|
{{ printf "<!--# include virtual='%s' -->" ("/cgi/events.cgi" | relURL) | safeHTML }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
Reference in New Issue
Block a user