diff --git a/public/single.html b/public/single.html
index ca74371..cf47345 100644
--- a/public/single.html
+++ b/public/single.html
@@ -52,6 +52,11 @@
+
diff --git a/public/single.js b/public/single.js
index b3e2dfb..0c8308b 100644
--- a/public/single.js
+++ b/public/single.js
@@ -58,8 +58,33 @@ async function main() {
if (event.location)
$event.querySelector('.event-location').appendChild(getDirectionLink(event.location));
+ else
+ $event.querySelector('.event-location').innerText = 'There is no location specified for this event';
- $event.querySelector('.event-notes').innerText = event.notes ?? '';
+ $event.querySelector('.event-notes').innerText = event.notes ?? 'There are no notes for this event';
+
+ const uploads = $event.querySelector('.event-uploads');
+
+ if (event.uploads && event.uploads.length > 0) {
+ for (const { upload } of event.uploads) {
+ if (typeof upload === 'string') {
+ uploads.classList.add('text-red-600');
+ uploads.innerText = 'Please log in to view uploads';
+ break;
+ }
+
+ const $elem = document.createElement('a');
+
+ $elem.setAttribute('href', upload.url);
+ $elem.innerText = upload.filename;
+
+ $elem.classList.add('underline');
+
+ uploads.appendChild($elem);
+ }
+ } else {
+ uploads.innerText = 'There are no uploads for this event';
+ }
}
main();