Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hide functionality added in signup page #514

Merged
merged 1 commit into from
May 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Css-files/signup1.css
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,13 @@ body * {
align-items: flex-start;
justify-content: center;
margin: 10px 0px;
position: relative;
}
.icon1{
position: absolute;
top:calc(55%);
left:80.5%;
font-size: 25px;
}

.textfield > input {
Expand Down
1 change: 1 addition & 0 deletions Html-files/scriptsignup.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,4 @@ function validateEmail(email) {
const re = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
return re.test(email);
}

23 changes: 23 additions & 0 deletions Html-files/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ <h1>SIGN UP</h1>
<title>Sign up</title>
<script src="scriptsignup.js" defer type="module"></script>
<link rel="stylesheet" href="../Css-files/signup1.css">
<link href='https://unpkg.com/[email protected]/css/boxicons.min.css' rel='stylesheet'>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" integrity="sha512-iecdLmaskl7CVkqkXNQ/ZH/XLlvWZOJyj7Yy7tcenmpD1ypASozpmT/E0iPtmFIB46ZmdtAc9eNBvH0H/ZpiBw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
<body>
<div class="main-login">
Expand All @@ -65,6 +67,9 @@ <h1>SIGN UP</h1>
<div class="textfield">
<label for="password">Password</label>
<input type="password" id="password" name="password" placeholder="Enter Password" required>
<span id="signup-hide">
<i class='icon1 bx bxs-hide'></i>
</span>
</div>
<button type="submit" class="btn-login">Register</button>
</form>
Expand All @@ -73,4 +78,22 @@ <h1>SIGN UP</h1>
</div>
</div>
</body>
<script>
const pswinput=document.getElementById('password');
const toggle=document.getElementById('signup-hide');
toggle.addEventListener("click",function()
{
const pswfield=this.querySelector('i');
if(pswinput.getAttribute("type")=="password")
{
pswinput.setAttribute('type','text');
pswfield.classList.replace("bxs-hide","bxs-show");
}
else
{
pswinput.setAttribute('type','password');
pswfield.classList.replace("bxs-show","bxs-hide");
}
});
</script>
</html>