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

Added password toggle #1581

Merged
merged 2 commits into from
Oct 23, 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
15 changes: 14 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -959,11 +959,24 @@ <h3 class="card-heading">QR Generator</h3>
<div class="card-content">
<h3 class="card-heading">Age calculator</h3>
<p class="card-description">
Calculates age
Calculates age
</p>
</div>
</a>

<a href="./projects/Password Toggle/index.html" class="card" target="_blank">
<div class="card-cover">
<img src="https://cdn-icons-png.flaticon.com/512/5582/5582931.png" alt="Password Generator logo">
</div>
<div class="card-content">
<h3 class="card-heading">Password Toggle</h3>
<p class="card-description">
Toggles password
</p>
</div>
</a>


<!-- START -->
<a href="./projects/githubProfileViewer/index.html" class="card" target="_blank">
<div class="card-cover">
Expand Down
39 changes: 39 additions & 0 deletions projects/Password Toggle/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Password Toggle</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="input-box">
<input type="password" placeholder="password" id="password">
<img src="https://github.com/shriyadindi/password-toggle/blob/main/eye-close.png?raw=true" id="eyeicon">
</div>


<script>


let eyeicon = document.getElementById("eyeicon");
let password = document.getElementById("password");

eyeicon.onclick = function(){
if(password.type == "password")
{
password.type = "text";
eyeicon.src = "https://github.com/shriyadindi/password-toggle/blob/main/eye-open.png?raw=true";
}
else
{
password.type = "password";
eyeicon.src = "https://github.com/shriyadindi/password-toggle/blob/main/eye-close.png?raw=true";
}

}


</script>
</body>
</html>
35 changes: 35 additions & 0 deletions projects/Password Toggle/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
*{
margin: 0;
padding: 0;
font-family: 'Poppins', sans-serif;
box-sizing: border-box;
}

body{
background: #250057;
}

.input-box{
background: #fff;
width: 90%;
max-width: 500px;
border-radius: 5px;
padding: 10px 20px;
margin: 300px auto;
display: flex;
align-items: center;
}

.input-box input{
width: 100%;
padding: 10px 0;
border: 0;
outline: 0;
font-size: 24px;
color: #555;
}

.input-box img{
width: 35px;
cursor: pointer;
}
Loading