* allow users to choose file names * route top level requests to the docs/s/filename path * fixup csp headers for hosted things * ics calendar view for the main page * set perms on upload directory during creationsingle-dockerfile
parent
d50f9e26af
commit
8e0a8b7304
@ -0,0 +1,53 @@ |
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta charset='utf-8' /> |
||||
<meta http-equiv="Content-Security-Policy" content="frame-src '*'"> |
||||
<title> |
||||
Hackerspace.Zone calendar viewer |
||||
</title> |
||||
<style> |
||||
html, body { |
||||
margin: 0; |
||||
padding: 0; |
||||
font-family: Arial, Helvetica Neue, Helvetica, sans-serif; |
||||
font-size: 14px; |
||||
} |
||||
#calendar { |
||||
max-width: 800px; |
||||
margin: 00px auto; |
||||
} |
||||
</style> |
||||
<link href='https://cdn.jsdelivr.net/npm/fullcalendar@5.11.0/main.min.css' rel='stylesheet' /> |
||||
<script src='https://cdn.jsdelivr.net/npm/fullcalendar@5.11.0/main.min.js'></script> |
||||
<script src='https://github.com/mozilla-comm/ical.js/releases/download/v1.4.0/ical.js'></script> |
||||
<script src='https://cdn.jsdelivr.net/npm/@fullcalendar/icalendar@5.11.0/main.global.min.js'></script> |
||||
<script> |
||||
// 'https://events.hackerspace.zone/@events/feed/ics', |
||||
const param = new URL(location).searchParams; |
||||
const ics = param.get("ics") || 'https://events.hackerspace.zone/@events/feed/ics'; |
||||
const view = param.get("view") || "dayGridMonth"; |
||||
|
||||
document.addEventListener('DOMContentLoaded', function() { |
||||
var calendarEl = document.getElementById('calendar'); |
||||
var calendar = new FullCalendar.Calendar(calendarEl, { |
||||
initialView: view, |
||||
headerToolbar: { |
||||
left: 'prev,next today', |
||||
center: 'title', |
||||
right: 'dayGridMonth,timeGridWeek,timeGridDay' |
||||
}, |
||||
events: { |
||||
url: ics, |
||||
format: 'ics' |
||||
} |
||||
}); |
||||
calendar.render(); |
||||
}); |
||||
</script> |
||||
|
||||
</head> |
||||
<body> |
||||
<div id='calendar'></div> |
||||
</html> |
||||
|
Loading…
Reference in new issue