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> <script src="burgerIcon.js"></script>
</head> </head>
<body> <body>
<header> <header>
<h1 class="kopf" > <h1 class="kopf" >
<br><br> <br><br>
@ -79,22 +81,16 @@
</div> </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--> <!--If it was small and got big, it calls the function only one time and doesn't do it all the time-->
<script> <script>
var widthissue = false; var widthissue = false;
window.addEventListener("resize", function(event) { window.addEventListener("resize", function(event) {
if(window.innerWidth > 800 && widthissue) { if(window.innerWidth > 800 && widthissue) {
widthissue = false widthissue = false
unset() unset()
} }
else if(window.innerWidth < 800) widthissue = true; else if(window.innerWidth < 800) widthissue = true;
}) })
</script> </script>
<nav id="activeid" class="active"> <nav id="activeid" class="active">
@ -116,5 +112,6 @@
</div> </div>
</footer> </footer>
</body> </body>
<script src="anmelden.js"></script>
</html> </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> <title>Candle Bibliothek</title>
</head> </head>
<body> <body>
<script>
if (sessionStorage.getItem("loggedIn") == "true") {
} else {
sessionStorage.setItem("clicked-last", "meinebuecher.html")
window.location ="anmelden.html"
}
</script>
<header> <header>
<h1 class="kopf" > <h1 class="kopf" >
<br><br> <br><br>

View File

@ -9,6 +9,13 @@
<title>Candle Bibliothek</title> <title>Candle Bibliothek</title>
</head> </head>
<body style="background-color:#987554;"> <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> <header>
<script src="burgerIcon.js"></script> <script src="burgerIcon.js"></script>