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
Binary file added login/Expanding Cards/Images/image-1.jpg
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 login/Expanding Cards/Images/image-2.jpg
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 login/Expanding Cards/Images/image-3.jpg
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 login/Expanding Cards/Images/image-4.jpg
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 login/Expanding Cards/Images/image-5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions login/Expanding Cards/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="./style.css" />
<title>Expanding Cards</title>
</head>
<body>
<div class="container">
<div class="pannel" style="background-image: url(./Images/image-1.jpg)">
<h3>Beautiful Girl</h3>
</div>
<div class="pannel" style="background-image: url(./Images/image-2.jpg)">
<h3>Nightmare Girl</h3>
</div>
<div class="pannel" style="background-image: url(./Images/image-3.jpg)">
<h3>Witch Eyed Girl</h3>
</div>
<div class="pannel" style="background-image: url(./Images/image-4.jpg)">
<h3>Science Trick</h3>
</div>
<div class="pannel" style="background-image: url(./Images/image-5.jpg)">
<h3>Gully with Effects</h3>
</div>
</div>
<script src="./script.js"></script>
</body>
</html>
14 changes: 14 additions & 0 deletions login/Expanding Cards/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const pannels = document.querySelectorAll(".pannel");

pannels.forEach((pannel) => {
pannel.addEventListener("click", (event) => {
removePannelClass();
pannel.classList.toggle("active");
});
});

function removePannelClass() {
pannels.forEach((pannel) => {
pannel.classList.remove("active");
});
}
58 changes: 58 additions & 0 deletions login/Expanding Cards/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,700;1,400&display=swap");
* {
box-sizing: border-box;
}

body {
font-family: "Roboto", sans-serif;
display: flex;
margin: 0;
}

.container {
display: flex;
width: 90vw;
}

.pannel {
height: 80vh;
background-size: auto 100%;
background-position: center center;
background-repeat: no-repeat;
color: white;
border-radius: 50px;
cursor: pointer;
flex: 0.5;
margin: 10px;
transition: flex 0.5s ease-in;
position: relative;
}

.pannel h3 {
font-size: 24px;
position: absolute;
margin: 0;
bottom: 20px;
left: 20px;
opacity: 0;
}

.pannel.active {
flex: 5;
}

.pannel.active h3 {
opacity: 1;
transition: opacity 0.3s ease-in 0.4s;
}

@media (max-width: 480px) {
.container {
width: 100vw;
}

.pannel:nth-of-type(4),
.pannel:nth-of-type(5) {
display: none;
}
}