Fix info page layout

This commit is contained in:
Christoph Hagen 2022-03-26 22:53:18 +01:00
parent dca9daf219
commit 6cd15dfb33
3 changed files with 15 additions and 5 deletions

View File

@ -275,6 +275,7 @@ input[type=text] {
max-width: 800px;
padding: 0 20px;
height: 100%;
margin: 0 auto;
}
.content-grid {

View File

@ -1,5 +1,8 @@
var isPlaying = false;
registeredName = localStorage.getItem('name');
didAcceptInvitation = localStorage.getItem('registered');
var currentLang = 'de';
if (window.navigator.language != 'de') {
currentLang = 'en';
@ -61,18 +64,24 @@ async function participate(isParticipating) {
document.getElementById("name-form").style.display = 'none'
document.getElementById("info-button").style.display = 'inherit'
console.log("Registering: " + name);
localStorage.removeItem('name');
localStorage.removeItem('registered');
if (isParticipating) {
let registered = await performRequest(name, "register")
if (registered) {
document.getElementById("registered-text").style.display = 'inherit'
document.getElementById("add-calender-event").style.display = 'inherit'
document.getElementById("registered-text").style.display = 'inherit';
document.getElementById("add-calender-event").style.display = 'inherit';
localStorage.setItem('name', name);
localStorage.setItem('registered', 'true');
} else {
document.getElementById("error-text").style.display = 'inherit'
}
} else {
let declined = await performRequest(name, "decline")
if (declined) {
document.getElementById("declined-text").style.display = 'inherit'
document.getElementById("declined-text").style.display = 'inherit';
localStorage.setItem('name', name);
localStorage.setItem('registered', 'false');
} else {
document.getElementById("error-text").style.display = 'inherit'
}

View File

@ -16,7 +16,7 @@
<link rel="canonical" href="https://christophhagen.de/festival/info.html" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="assets/festival.css?v=2">
<link rel="stylesheet" type="text/css" href="assets/festival.css?v=3">
<script src="assets/festival.js?v=10"></script>
</head>
<body>
@ -41,7 +41,7 @@
</div>
<div class="content">
<div class="content-grid">
<a class="back-link" href="/festival/festival.html">
<a class="back-link" href="/festival/register.html">
<div class="back-icon"></div>
<div class="back-text">Zurück</div>
</a>