Skip to content

Commit

Permalink
Merge pull request #116 from Gaurav0203Shetty/patch-3
Browse files Browse the repository at this point in the history
Update script.js
  • Loading branch information
shrey141102 authored Dec 11, 2023
2 parents c3d443c + e428077 commit 2e3a156
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 0 deletions.
Binary file added Hide-show-pass/.DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions Hide-show-pass/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"git.ignoreLimitWarning": true
}
Binary file added Hide-show-pass/Images/.DS_Store
Binary file not shown.
Binary file added Hide-show-pass/Images/open.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Hide-show-pass/Images/shut.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions Hide-show-pass/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Hide/Show password
A project made using HTML, CSS and JS which can be integrated easily to your website for better security when entering password in public spaces.}
16 changes: 16 additions & 0 deletions Hide-show-pass/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Hide/Show pass</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="input-box">
<input type="password" placeholder="Enter password" id="password">
<img src="./Images/shut.png" alt="error" id="eyeicon">
</div>
<script src="script.js"></script>
</body>
</html>
13 changes: 13 additions & 0 deletions Hide-show-pass/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
let eyeicon = document.getElementById("eyeicon");
let password = document.getElementById("password");

eyeicon.onclick = function(){
if(password.type == "password"){
password.type = "text";
eyeicon.src = "./Images/open.png";
}
else{
password.type = "password";
eyeicon.src = "./Images/shut.png";
}
}
40 changes: 40 additions & 0 deletions Hide-show-pass/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
*{
margin: 0;
padding: 0;
font-family: 'Poppins', sans-serif;
box-sizing: border-box;
}

body{
background: #00008B;
}

.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;
}

img{
width: 35px;
cursor: pointer;
}

0 comments on commit 2e3a156

Please sign in to comment.