-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Chirag <[email protected]>
- Loading branch information
Showing
27 changed files
with
1,521 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
## Describe your changes | ||
## Describe your changes (Mandatory) | ||
|
||
## Issue ticket number and link | ||
## Issue ticket number and link (Mandatory) | ||
|
||
## Screenshots of your project, whatever you have added. (Mandatory) | ||
|
||
## Checklist before requesting a review | ||
- [ ] I have performed a self-review of my code | ||
- [ ] If it is a new project, I have added thorough tests. | ||
- [ ] If it is a new project, I have done thorough tests. | ||
- [ ] Have you updated the README file of the repository and added the name of the project in it? | ||
- [ ] Have you added a `README.md` file inside the directory of your project and explained it there properly? | ||
- [ ] Have you added a `README.md` file inside the directory of your project and explained it there properly (with images)? | ||
- [ ] Have you updated the `script.js` file so that the project is visible in the website? | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"git.ignoreLimitWarning": true | ||
} |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Snake-Game | ||
Its a basics Javascript snake game using DOM Event |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
let food =document.querySelector(".food"); | ||
let snake=document.querySelector(".snake"); | ||
let move=document.querySelector("input"); | ||
let h1=document.querySelector("h1"); | ||
let mh=0; | ||
let mv=0; | ||
let fh=0; | ||
let fv=0; | ||
let count =-1; | ||
move.addEventListener("keydown",function(event){ | ||
if(mv==fv&&mh==fh){ | ||
fv=Math.floor(Math.random()*19)*30; | ||
fh=Math.floor(Math.random()*29)*30; | ||
food.style.marginTop=`${fv}px`; | ||
food.style.marginLeft=`${fh}px`; | ||
count++; | ||
h1.innerText=`SCORE : ${count}`; | ||
} | ||
if(event.code=="ArrowUp"&&mv>0){ | ||
mv-=30; | ||
} | ||
if(event.code=="ArrowDown"&&mv<560){ | ||
mv+=30; | ||
} | ||
if(event.code=="ArrowLeft"&&mh>0){ | ||
mh-=30; | ||
} | ||
if(event.code=="ArrowRight"&&mh<860){ | ||
mh+=30; | ||
} | ||
snake.style.marginTop=`${mv}px`; | ||
snake.style.marginLeft=`${mh}px`; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Snake Game</title> | ||
<link rel="stylesheet" href="style.css"> | ||
</head> | ||
<body> | ||
<div class="playground"> | ||
|
||
</div> | ||
<div class="snake"></div> | ||
<div class="food"></div> | ||
<div class="score"> | ||
<div class="input">MOVE<input type="text"></div> | ||
<br><br> | ||
<h1>SCORE : 0 </h1> | ||
</div> | ||
|
||
<Script src="app.js"></Script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
*{ | ||
margin: 0px; | ||
padding: 0px; | ||
} | ||
.playground{ | ||
height:600px; | ||
width: 900px; | ||
background-image: url(Assets/grass.jpg); | ||
background-size: cover; | ||
position: absolute; | ||
opacity: 0.8; | ||
} | ||
|
||
.food{ | ||
height: 50px; | ||
width:70px; | ||
background-image: url(Assets/food.png); | ||
background-size: cover; | ||
position: absolute; | ||
} | ||
|
||
.snake{ | ||
height: 60px; | ||
width: 60px; | ||
position: absolute; | ||
background-image: url(Assets/snake.png); | ||
background-size: cover; | ||
position: absolute; | ||
} | ||
.score{ | ||
|
||
height: 300px; | ||
width: 300px; | ||
position: absolute; | ||
margin-left: 903px; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"liveServer.settings.port": 5501 | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.