Skip to content

Commit

Permalink
Merge branch 'main' into ai_chatbot
Browse files Browse the repository at this point in the history
  • Loading branch information
SrijaVuppala295 authored Oct 23, 2024
2 parents d613ce5 + 28204f6 commit ae0f340
Show file tree
Hide file tree
Showing 13 changed files with 757 additions and 431 deletions.
183 changes: 40 additions & 143 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@
top: 70px;
/* Adjust based on your navbar height */
left: 20px;
background-color: #3b82f6;
--tw-bg-opacity: 1;
background-color: rgb(59 130 246 / var(--tw-bg-opacity));

color: white;
border-radius: 50%;
width: 50px;
Expand Down Expand Up @@ -96,7 +98,7 @@

/* Modal Content */
.modal-content {
background-color: #3b82f6;
background-color: #4d90fe;
padding: 20px;
border-radius: 8px;
box-shadow: 0px 8px 12px rgba(0, 0, 0, 0.2);
Expand All @@ -121,11 +123,11 @@
}

/* Close Button */
.close-btn {
/* .close-btn {
position: absolute;
top: 10px;
right: 10px;
background-color: #f87171;
background-color: #ff0909;
color: white;
border: none;
border-radius: 50%;
Expand All @@ -136,13 +138,13 @@
align-items: center;
cursor: pointer;
z-index: 1001;
}
} */

/* Google Translate Element Styling */
/* Google Translate Element Styling
#google_translate_element {
margin-top: 20px;
text-align: center;
}
} */

.chatbot {
position: fixed;
Expand Down Expand Up @@ -260,115 +262,7 @@


}
#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>
Expand Down Expand Up @@ -401,9 +295,9 @@
<div class="circle"></div>
<div class="circle"></div>
<div class="circle"></div>
<div id="languageIcon" title="Change Language">
🌐 <!-- This is the icon for language, you can replace this with any icon (SVG, FontAwesome, etc.) -->
</div>
<!-- <div id="languageIcon" title="Change Language">
🌐
</div> -->
<!-- <div class="chatbot-container"></div>
<div class="chatbot" id="chatbotIcon">
<img src="https://cdn-icons-png.flaticon.com/512/8943/8943377.png" alt="Chatbot Icon" />
Expand Down Expand Up @@ -515,16 +409,15 @@ <h3>Saarthi</h3>



<div id="google_translate_modal" class="flex">
<!-- <div id="google_translate_modal" class="flex">
<div class="modal-content">
<!-- Close Button -->
<button class="close-btn" id="closeBtn">✖</button>
<!-- Google Translate Widget -->
<div id="google_translate_element"></div>
</div>
</div>

</div> -->
<!--
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({ pageLanguage: 'en' }, 'google_translate_element');
Expand All @@ -533,7 +426,7 @@ <h3>Saarthi</h3>
<script type="text/javascript"
src="https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<!-- JavaScript for toggling modal -->
<script>
const circle = document.querySelector('.circle');
Expand Down Expand Up @@ -596,7 +489,7 @@ <h3>Saarthi</h3>
});
});
</script>
</script> -->

<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
Expand Down Expand Up @@ -668,26 +561,26 @@ <h3>Saarthi</h3>
</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">
<div id="popup" class="popup">
<div class="popupcontent">
<div class="close-button">X</div>
<div class="popup-left">
<img src="src/assets/railways.png" alt="Railways">
</div>
<div class="popup-right">
<p class="h1">Welcome to Station Saarthi</p>
<p class="h2"> Travel without stress Sign in now</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>
<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 href="#">Terms of Service</a> and <a href="#">Privacy Policy</a>.</p>
</div>
</div>
</div>

<script>
// Close button functionality for the popup
document.querySelector('.close-button').addEventListener('click', function() {
document.getElementById('popup').style.display = 'none';
Expand All @@ -696,6 +589,10 @@ <h3>Saarthi</h3>
// Email form submission handling
document.getElementById('emailForm').addEventListener('submit', function(event) {
event.preventDefault();
// Add further handling here, such as AJAX to submit email or showing confirmation
});
</script>


const email = document.getElementById('email').value;
if (email) {
Expand Down
31 changes: 16 additions & 15 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
"axios": "^1.7.7",
"dotenv": "^16.4.5",
"framer-motion": "^11.11.8",
"google-translate-api-x": "^10.7.1",
"jwt-decode": "^4.0.0",
"leaflet": "^1.9.4",
"react": "^18.3.1",
"react-datepicker": "^7.4.0",
"react-dom": "^18.3.1",
Expand Down
Loading

0 comments on commit ae0f340

Please sign in to comment.