Add all resources, change paths
This commit is contained in:
parent
7d49e8a7ed
commit
4e7e01f203
@ -47,7 +47,7 @@ function catchErrors(error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function performRequest(name, path) {
|
async function performRequest(name, path) {
|
||||||
let text = await fetch("festival/api/" + path, {
|
let text = await fetch("/festival/api/" + path, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: name
|
body: name
|
||||||
}).then(handleErrors).catch(catchErrors);
|
}).then(handleErrors).catch(catchErrors);
|
||||||
@ -59,6 +59,6 @@ async function performRequest(name, path) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function downloadEvent(file) {
|
function download(file) {
|
||||||
window.location= "files/" + file
|
window.location = file
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||||
<link rel="stylesheet" type="text/css" href="assets/festival.css">
|
<link rel="stylesheet" type="text/css" href="assets/festival.css">
|
||||||
<script src="assets/festival.js?v=8"></script>
|
<script src="assets/festival.js?v=9"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
@ -54,10 +54,10 @@
|
|||||||
<div class="error-text normal-text final-text" id="error-text">Registration failed</div>
|
<div class="error-text normal-text final-text" id="error-text">Registration failed</div>
|
||||||
<div class="registered-text normal-text final-text" id="registered-text">Registration successful</div>
|
<div class="registered-text normal-text final-text" id="registered-text">Registration successful</div>
|
||||||
<div class="declined-text normal-text final-text" id="declined-text">Invitation declined</div>
|
<div class="declined-text normal-text final-text" id="declined-text">Invitation declined</div>
|
||||||
<div class="add-calender-event button normal-text" id="add-calender-event" onclick="downloadEvent('festival-en.ics')">Add to calendar</div>
|
<div class="add-calender-event button normal-text" id="add-calender-event" onclick="download('/festival/festival-en.ics')">Add to calendar</div>
|
||||||
</div>
|
</div>
|
||||||
<audio loop autoplay id="audio">
|
<audio loop autoplay id="audio">
|
||||||
<source src="audio/since77.mp3" type="audio/mp3">
|
<source src="/festival/since77.mp3" type="audio/mp3">
|
||||||
</audio>
|
</audio>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
35
Public/festival-en.ics
Normal file
35
Public/festival-en.ics
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
BEGIN:VCALENDAR
|
||||||
|
VERSION:2.0
|
||||||
|
PRODID:-//christophhagen.de
|
||||||
|
CALSCALE:GREGORIAN
|
||||||
|
BEGIN:VTIMEZONE
|
||||||
|
TZID:Europe/Berlin
|
||||||
|
LAST-MODIFIED:20201011T015911Z
|
||||||
|
TZURL:http://tzurl.org/zoneinfo-outlook/Europe/Berlin
|
||||||
|
X-LIC-LOCATION:Europe/Berlin
|
||||||
|
BEGIN:DAYLIGHT
|
||||||
|
TZNAME:CEST
|
||||||
|
TZOFFSETFROM:+0100
|
||||||
|
TZOFFSETTO:+0200
|
||||||
|
DTSTART:19700329T020000
|
||||||
|
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
|
||||||
|
END:DAYLIGHT
|
||||||
|
BEGIN:STANDARD
|
||||||
|
TZNAME:CET
|
||||||
|
TZOFFSETFROM:+0200
|
||||||
|
TZOFFSETTO:+0100
|
||||||
|
DTSTART:19701025T030000
|
||||||
|
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
|
||||||
|
END:STANDARD
|
||||||
|
END:VTIMEZONE
|
||||||
|
BEGIN:VEVENT
|
||||||
|
DTSTAMP:20211002T121707Z
|
||||||
|
UID:20211002T121707Z-230813577@christophhagen.de
|
||||||
|
DTSTART;TZID=Europe/Berlin:20220730T140000
|
||||||
|
DTEND;TZID=Europe/Berlin:20220731T120000
|
||||||
|
SUMMARY:CC Festival
|
||||||
|
URL:https://christophhagen.de/festival-en
|
||||||
|
DESCRIPTION:A summer party
|
||||||
|
LOCATION:Scheinfelder Straße 10\, 96160 Geiselwind, Germany
|
||||||
|
END:VEVENT
|
||||||
|
END:VCALENDAR
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||||
<link rel="stylesheet" type="text/css" href="assets/festival.css">
|
<link rel="stylesheet" type="text/css" href="assets/festival.css">
|
||||||
<script src="assets/festival.js?v=8"></script>
|
<script src="assets/festival.js?v=9"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
@ -54,10 +54,10 @@
|
|||||||
<div class="error-text normal-text final-text" id="error-text">Registrierung fehlgeschlagen</div>
|
<div class="error-text normal-text final-text" id="error-text">Registrierung fehlgeschlagen</div>
|
||||||
<div class="registered-text normal-text final-text" id="registered-text">Registrierung erfolgreich</div>
|
<div class="registered-text normal-text final-text" id="registered-text">Registrierung erfolgreich</div>
|
||||||
<div class="declined-text normal-text final-text" id="declined-text">Einladung abgelehnt</div>
|
<div class="declined-text normal-text final-text" id="declined-text">Einladung abgelehnt</div>
|
||||||
<div class="add-calender-event button normal-text" id="add-calender-event" onclick="downloadEvent('festival.ics')">Kalendereintrag</div>
|
<div class="add-calender-event button normal-text" id="add-calender-event" onclick="download('/festival/festival.ics')">Kalendereintrag</div>
|
||||||
</div>
|
</div>
|
||||||
<audio loop autoplay id="audio">
|
<audio loop autoplay id="audio">
|
||||||
<source src="audio/since77.mp3" type="audio/mp3">
|
<source src="/festival/since77.mp3" type="audio/mp3">
|
||||||
</audio>
|
</audio>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
35
Public/festival.ics
Normal file
35
Public/festival.ics
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
BEGIN:VCALENDAR
|
||||||
|
VERSION:2.0
|
||||||
|
PRODID:-//christophhagen.de
|
||||||
|
CALSCALE:GREGORIAN
|
||||||
|
BEGIN:VTIMEZONE
|
||||||
|
TZID:Europe/Berlin
|
||||||
|
LAST-MODIFIED:20201011T015911Z
|
||||||
|
TZURL:http://tzurl.org/zoneinfo-outlook/Europe/Berlin
|
||||||
|
X-LIC-LOCATION:Europe/Berlin
|
||||||
|
BEGIN:DAYLIGHT
|
||||||
|
TZNAME:CEST
|
||||||
|
TZOFFSETFROM:+0100
|
||||||
|
TZOFFSETTO:+0200
|
||||||
|
DTSTART:19700329T020000
|
||||||
|
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
|
||||||
|
END:DAYLIGHT
|
||||||
|
BEGIN:STANDARD
|
||||||
|
TZNAME:CET
|
||||||
|
TZOFFSETFROM:+0200
|
||||||
|
TZOFFSETTO:+0100
|
||||||
|
DTSTART:19701025T030000
|
||||||
|
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
|
||||||
|
END:STANDARD
|
||||||
|
END:VTIMEZONE
|
||||||
|
BEGIN:VEVENT
|
||||||
|
DTSTAMP:20211002T121707Z
|
||||||
|
UID:20211002T121707Z-230813577@christophhagen.de
|
||||||
|
DTSTART;TZID=Europe/Berlin:20220730T140000
|
||||||
|
DTEND;TZID=Europe/Berlin:20220731T120000
|
||||||
|
SUMMARY:CC Festival
|
||||||
|
URL:https://christophhagen.de/festival
|
||||||
|
DESCRIPTION:A summer party
|
||||||
|
LOCATION:Scheinfelder Straße 10\, 96160 Geiselwind
|
||||||
|
END:VEVENT
|
||||||
|
END:VCALENDAR
|
BIN
Public/since77.mp3
Normal file
BIN
Public/since77.mp3
Normal file
Binary file not shown.
@ -1,3 +1 @@
|
|||||||
/data/logs/festival/server.log
|
/data/logs/festival/server.log
|
||||||
/data/public/festival/lists
|
|
||||||
|
|
||||||
|
@ -96,15 +96,11 @@ public func configure(_ app: Application) throws {
|
|||||||
|
|
||||||
let configFile = URL(fileURLWithPath: app.directory.resourcesDirectory)
|
let configFile = URL(fileURLWithPath: app.directory.resourcesDirectory)
|
||||||
.appendingPathComponent("paths.conf")
|
.appendingPathComponent("paths.conf")
|
||||||
let configData = try String(contentsOf: configFile)
|
let logPath = try String(contentsOf: configFile)
|
||||||
.components(separatedBy: "\n")
|
.trimmingCharacters(in: .whitespaces)
|
||||||
.map { $0.trimmingCharacters(in: .whitespaces) }
|
let logFile = URL(fileURLWithPath: logPath)
|
||||||
.filter { !$0.isEmpty }
|
let listDirectory = URL(fileURLWithPath: app.directory.publicDirectory)
|
||||||
guard configData.count == 2 else {
|
.appendingPathComponent("lists")
|
||||||
throw FestivalError.invalidConfiguration
|
|
||||||
}
|
|
||||||
let logFile = URL(fileURLWithPath: configData[0])
|
|
||||||
let listDirectory = URL(fileURLWithPath: configData[1])
|
|
||||||
|
|
||||||
try Log.set(logFile: logFile.path)
|
try Log.set(logFile: logFile.path)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user