Anmeldung fertig

master_stand_10_05_23
Sebastian Greil 2023-05-09 18:53:49 +02:00
parent 28a7d917f2
commit d670233b7d
4 changed files with 35 additions and 13 deletions

View File

@ -10,6 +10,8 @@
<script src="burgerIcon.js"></script>
</head>
<body>
<header>
<h1 class="kopf" >
<br><br>
@ -79,22 +81,16 @@
</div>
<!--Link JS file-->
<!--If it was small and got big, it calls the function only one time and doesn't do it all the time-->
<script>
var widthissue = false;
window.addEventListener("resize", function(event) {
if(window.innerWidth > 800 && widthissue) {
widthissue = false
unset()
}
else if(window.innerWidth < 800) widthissue = true;
})
window.addEventListener("resize", function(event) {
if(window.innerWidth > 800 && widthissue) {
widthissue = false
unset()
}
else if(window.innerWidth < 800) widthissue = true;
})
</script>
<nav id="activeid" class="active">
@ -116,5 +112,6 @@
</div>
</footer>
</body>
<script src="anmelden.js"></script>
</html>

9
anmelden.js 100644
View File

@ -0,0 +1,9 @@
document.getElementById("anmeldebutton").addEventListener("mousedown", Redirect);
function Redirect() {
sessionStorage.setItem("loggedIn", "true")
window.location = sessionStorage.getItem("clicked-last")
sessionStorage.removeItem("clicked-last")
return true
}

View File

@ -9,6 +9,15 @@
<title>Candle Bibliothek</title>
</head>
<body>
<script>
if (sessionStorage.getItem("loggedIn") == "true") {
} else {
sessionStorage.setItem("clicked-last", "meinebuecher.html")
window.location ="anmelden.html"
}
</script>
<header>
<h1 class="kopf" >
<br><br>

View File

@ -9,6 +9,13 @@
<title>Candle Bibliothek</title>
</head>
<body style="background-color:#987554;">
<script type="text/javascript">
if (sessionStorage.getItem("loggedIn") == "true") {
} else {
sessionStorage.setItem("clicked-last", "warenkorb.html")
window.location ="anmelden.html"
}
</script>
<header>
<script src="burgerIcon.js"></script>