fix: javascript for login/signup popups
This commit is contained in:
parent
fbc6dbf283
commit
434342bc86
|
@ -1,5 +1,5 @@
|
|||
.login,
|
||||
.signup {
|
||||
#login,
|
||||
#signup {
|
||||
display: none;
|
||||
background: #fff;
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
|||
font-size: 18px;
|
||||
}
|
||||
|
||||
.login > button,
|
||||
.signup > button {
|
||||
#login > button,
|
||||
#signup > button {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<link rel="stylesheet" href="css/title-bar.css" />
|
||||
<link rel="stylesheet" href="css/login-signup.css" />
|
||||
<link rel="stylesheet" href="css/pixels.css" />
|
||||
<!-- <script type="text/javascript" src="js/ixels.js"></script> -->
|
||||
<script src="js/login-signup.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -15,10 +15,10 @@
|
|||
<img src="assets/logo.png" />
|
||||
|
||||
<span class="profil">
|
||||
<button onclick="toggleLogin()">Login</button>
|
||||
<button onclick="toggleSignup()">Signup</button>
|
||||
<button onclick="toggleLogin();">Login</button>
|
||||
<button onclick="toggleSignup();">Signup</button>
|
||||
|
||||
<div class="login">
|
||||
<div id="login">
|
||||
<button onclick="toggleLogin()" class="close">X</button>
|
||||
|
||||
Login
|
||||
|
@ -38,7 +38,7 @@
|
|||
</form>
|
||||
</div>
|
||||
|
||||
<div class="signup">
|
||||
<div id="signup">
|
||||
<button onclick="toggleSignup()" class="close">X</button>
|
||||
|
||||
Signup
|
||||
|
|
22
src/main/webapp/js/login-signup.js
Normal file
22
src/main/webapp/js/login-signup.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
function toggleLogin() {
|
||||
signup = document.getElementById("signup");
|
||||
signup.style.display = "none";
|
||||
|
||||
toggleElement("login");
|
||||
}
|
||||
|
||||
function toggleSignup() {
|
||||
login = document.getElementById("login");
|
||||
login.style.display = "none";
|
||||
|
||||
toggleElement("signup");
|
||||
}
|
||||
|
||||
function toggleElement(id) {
|
||||
element = document.getElementById(id);
|
||||
if (element.style.display === "none" || element.style.display === "") {
|
||||
element.style.display = "unset";
|
||||
} else {
|
||||
element.style.display = "none";
|
||||
}
|
||||
}
|
|
@ -222,12 +222,3 @@ function updatePixelBuyPreview(pixel) {
|
|||
}
|
||||
|
||||
initBuyPixel();
|
||||
|
||||
/////////////////////////
|
||||
// LoginSignup stuff ? //
|
||||
/////////////////////////
|
||||
|
||||
function toggleLoginSignup(l, s) {
|
||||
document.getElementById("show-login").checked = l;
|
||||
document.getElementById("show-signup").checked = s;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue