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; max-width: 800px;
padding: 0 20px; padding: 0 20px;
height: 100%; height: 100%;
margin: 0 auto;
} }
.content-grid { .content-grid {

View File

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

View File

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