Skip to content
Open
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
6 changes: 5 additions & 1 deletion CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,5 +281,9 @@
[@RedNoodle325](https://github.com/RedNoodle325)

[@bunnyBites](https://github.com/bunnyBites)
-[@Vigneshwaar](https://github.com/V6g1)

[@Vigneshwaar](https://github.com/V6g1)

[@proton029](https://github.com/proton029)

[@SoilihBenSoilih](https://github.com/SoilihBenSoilih)
31 changes: 31 additions & 0 deletions soilih/space-invadors/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>Challenge-1</title>
</head>

<body>
<div class="container">
</div>
<script>
const checkedSet = new Set([123, 124, 125, 126, 129, 130, 131, 132, 135, 136, 137, 138, 143, 149, 152, 155, 163, 169, 172, 175, 183, 184, 185, 186, 189, 192, 195, 196, 197, 198, 206, 209, 212, 218, 226, 229, 232, 238, 243, 244, 245, 246, 249, 250, 251, 252, 255, 256, 257, 258])
const container = document.querySelector('.container');
for (let i = 1; i <= 400; i++) {
const pixel = document.createElement('div');
pixel.classList.add('pixel');
const checkbox = document.createElement('input');
checkbox.type = 'checkbox';
checkbox.id = `pixel-${i}`;
checkbox.checked = true
if(checkedSet.has(i)){
checkbox.checked = false;
}
pixel.appendChild(checkbox);
container.appendChild(pixel);
}
</script>
</body>
</html>
44 changes: 44 additions & 0 deletions soilih/space-invadors/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
* {
margin: 0;
padding: 0;
background-color: #f5f5dc;
}

.container {
position: absolute;
top: 50%;
right: 50%;
margin-right: -200px;
margin-top: -200px;
height: 400px;
width: 400px;
display: grid;
grid-template-columns: repeat(20, 20px);
grid-auto-rows: repeat(20, 20px);
}

.container > div {
border: none;
}

input[type="checkbox"]{
height: 100%;
width: 100%;
margin: 0;
padding: 0;
border: none;
outline: none;
appearance: none;
background-color: #fff;
border: 1px solid #E24E3F;
}

input[type="checkbox"]:checked{
background-color: #EC5142;
border: none;
}

input[type="checkbox"]:checked:hover{
background: #e86458;
border-color: #E24E3F;
}