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

Station/popup #361

Merged
merged 16 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from 15 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
164 changes: 160 additions & 4 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
onerror="handleError(this)"
></script> -->

<title>Station Saarthi</title>
<title>Station Saarthi</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" /> <style>
/* Style for the Google Translate element */
#google_element {
Expand Down Expand Up @@ -256,7 +256,120 @@
50% {
opacity: 1;
}


}
#popup {
position: fixed;
bottom: 20px; /* Position 20px from the bottom */
right: 20px; /* Position 20px from the right */
height: auto; /* Adjust height based on content */
width: 400px; /* Set width for the popup box */
background-color: rgb(252 249 249 / 80%); /* Semi-transparent background */
justify-content: center;
display: flex;
z-index: 1000;
align-items: center;
border-radius: 10px; /* Rounded corners */
box-shadow: 0px 4px 10px #4d90fea3; /* Box shadow */
}

.popup-content {
position: relative;
width: 100%; /* Full width of the container */
background-color: rgb(240, 238, 238);
border-radius: 10px;
overflow: hidden;
display: flex;
flex-direction: row;
}

.popup-left img {
height: 100%;
width: 100%;
object-fit: cover;
padding: 24px;
border-radius: 59px;
}


.popup-right {
padding: 20px;
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}

.popup-right .h1 {
font-size: 24px; /* Adjust size for better fit */
margin-bottom: 10px;
color: #131010;
text-align: center;
font-weight: bolder;
}

.popup-right .h2 {
font-size: 18px;
color: #261d1d;
text-align: center;
margin-bottom: 15px;
font-weight: bold;
}

#emailForm {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
}

#popup-email {
padding: 10px;
width: 80%;
border: 1px solid #bbbbbb;
border-radius: 5px;
margin-bottom: 15px;
font-size: 16px;
}

.signup-btn {
width: 80%;
padding: 10px;
background-color: #0b42e9;
color: aliceblue;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
font-weight: bolder;
}

.terms {
color: #0e0a0a;
text-align: center;
font-size: 12px;
margin-top: 10px;
}

.terms a {
color: #1278d8;
text-decoration: none;
}

.close-button {
position: absolute;
top: 10px;
right: 10px;
font-size: 24px;
font-weight: bolder;
cursor: pointer;
color: #000000;
z-index: 1001;
}


</style>
</head>
<body class="load">
Expand Down Expand Up @@ -518,11 +631,54 @@ <h3>Saarthi</h3>
// Repeat the animation
requestAnimationFrame(animateCircles);
}
// Start the animation
animateCircles();
</script>

<!--pop up html part-->
<div id="popup" class="popup" >
<div class="popupcontent">
<div class="close-button">X</div>
<div class="popup-left">
<img src="src/assets/railways.png">
</div>
<div class="popup-right">
<p class="h1">Welcome to Station Saarthi</p>
<p class="h2"> Travel without stress Sign in now</p>
<!-- email part-->
<form id="emailForm">
<input type="email" id="popup-email" placeholder="Enter Email" required>
<button type="submit" class="signup-btn">Sign me up!</button>
</form>
<p class="terms">By signing in, I agree to station saarthi's <a herf="#">Terms of Service</a> and <a herf="#">Privacy Policy</a>.</p>
</div>
</div>

<script>window.onload = function() {
document.getElementById('popup').style.display = 'flex';
};
//load on website pop up added


document.querySelector('.close-button').addEventListener('click', function() {
document.getElementById('popup').style.display = 'none';
});

document.getElementById('emailForm').addEventListener('submit', function(event) {
event.preventDefault();

const email = document.getElementById('email').value;
if (email) {
alert(`Welcome ! To Station Sarthi , May you have a wonderful Journey ${email}`);
document.getElementById('popup').style.display = 'none';
}

});</script>


// Start the animation
animateCircles();
</script>
</div>


</body>
</html>
</html>
Binary file added frontend/src/assets/railways.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.