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

Navbar styled enhnaced in Rate Us page #1339

Merged
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
128 changes: 97 additions & 31 deletions RateUs.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
background-color: #1a1a2e;
}

.navbar {
/* .navbar {
background-color: #16213e;
color: white;
padding: 15px 0;
Expand Down Expand Up @@ -56,8 +56,73 @@

.navbar .nav-link i {
margin-right: 8px;
} */
.navbar {
background-color: #16213e;
/* Dark background for the navbar */
color: white;
padding: 15px 0;
position: fixed;
top: 0;
width: 100%;
display: flex;
justify-content: center;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
z-index: 1000;

}

.navbar .nav-wrapper {
display: flex;
gap: 160px;
margin-top: 7px;
}

.navbar .nav-link {
position: relative;

color: white;
text-decoration: none;
font-size: 1.4rem;
display: flex;
align-items: center;
padding: 5px;

transition: color 0.3s ease;

}

.navbar .nav-link i {
margin-right: 8px;
}

.navbar .nav-link::after {
content: "";
position: absolute;
left: 0;
bottom: -2px;

width: 0%;

height: 2px;

background-color: #007bff;

transition: width 0.4s ease;

}

.navbar .nav-link:hover {
color: #007bff;

}

.navbar .nav-link:hover::after {
width: 100%;

}


.container {
border: 2px solid black;
padding: 20px;
Expand Down Expand Up @@ -123,28 +188,29 @@
background-color: #333;
} */
.submit-button {
background-color: #007bff;
color: white;
padding: 10px 20px;
border: 2px solid transparent; /* Invisible border initially */
border-radius: 5px;
font-size: 16px;
cursor: pointer;
transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.4s ease;
}

.submit-button:hover {
background-color: #0056b3;
transform: scale(1.1);
box-shadow: 0px 4px 15px rgba(0, 123, 255, 0.4);
border-color: #00aaff; /* Border appears on hover */
}

.submit-button:active {
transform: scale(1);
box-shadow: none;
}
background-color: #007bff;
color: white;
padding: 10px 20px;
border: 2px solid transparent;
/* Invisible border initially */
border-radius: 5px;
font-size: 16px;
cursor: pointer;
transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.4s ease;
}

.submit-button:hover {
background-color: #0056b3;
transform: scale(1.1);
box-shadow: 0px 4px 15px rgba(0, 123, 255, 0.4);
border-color: #00aaff;
/* Border appears on hover */
}

.submit-button:active {
transform: scale(1);
box-shadow: none;
}
</style>
</head>

Expand Down Expand Up @@ -184,7 +250,7 @@
<script src="https://cdn.jsdelivr.net/npm/toastify-js"></script>
<script>
let feedbackSubmitted = false;

document.querySelectorAll('.emoji').forEach(emoji => {
emoji.addEventListener('click', () => {
if (feedbackSubmitted) {
Expand All @@ -197,11 +263,11 @@
}
});
});

document.querySelector('.submit-button').addEventListener('click', () => {
const selectedEmoji = document.querySelector('.emoji.selected');
const feedback = document.querySelector('textarea').value;

if (feedbackSubmitted) {
Toastify({
text: "Review already submitted.",
Expand All @@ -210,15 +276,15 @@
position: "center",
duration: 3000
}).showToast();

// Clear textarea and stop emoji blinking on resubmit attempt
document.querySelector('textarea').value = '';
if (selectedEmoji) {
selectedEmoji.classList.remove('selected');
}
return;
}

if (selectedEmoji && feedback.trim() !== '') {
Toastify({
text: "Feedback submitted successfully!",
Expand All @@ -227,13 +293,13 @@
position: "center",
duration: 3000
}).showToast();

// Clear the textarea
document.querySelector('textarea').value = '';

// Remove the 'selected' class from the emoji to stop blinking
selectedEmoji.classList.remove('selected');

// Mark feedback as submitted
feedbackSubmitted = true;
} else {
Expand All @@ -248,5 +314,5 @@
});
</script>
</body>
</html>

</html>