forked from Anishkagupta04/RAPIDOC-HEALTHCARE-WEBSITE-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Rate us Option (Anishkagupta04#566)
- Loading branch information
1 parent
1c097e6
commit 94ce46a
Showing
4 changed files
with
225 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
body { | ||
font-family: Arial, sans-serif; | ||
background-color: black; | ||
color: #fff; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
.header_container { | ||
background-color: #022a2d; | ||
opacity: 0.9; | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
align-items: center; | ||
height: 85px; | ||
margin: auto; | ||
margin-top: 5px; | ||
} | ||
|
||
.img { | ||
flex: 0 0 auto; | ||
} | ||
|
||
.nav_link li { | ||
margin-right: 1px; | ||
padding: 4px 6px; | ||
display: inline-block; | ||
} | ||
|
||
.nav_link li a { | ||
transition: all 0.3s ease 0s; | ||
color: white; | ||
text-decoration: none; | ||
} | ||
|
||
.container { | ||
background-color: #022a2d; | ||
padding: 20px; | ||
border-radius: 8px; | ||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); | ||
text-align: center; | ||
width: 450px; | ||
margin: 20px auto; | ||
transition: box-shadow 0.3s, transform 0.3s; | ||
position: relative; | ||
} | ||
|
||
.container:hover { | ||
box-shadow: 0 0 20px rgba(0, 0, 0, 0.2), 0 0 30px rgba(255, 255, 255, 0.6); | ||
transform: scale(1.05); | ||
} | ||
|
||
.container h2 { | ||
color: white; | ||
} | ||
|
||
.rating { | ||
margin: 20px 0; | ||
} | ||
|
||
.rating .star { | ||
cursor: pointer; | ||
font-size: 30px; | ||
color: #ccc; | ||
transition: color 0.3s, transform 0.3s, box-shadow 0.3s; | ||
} | ||
|
||
.rating .star.selected { | ||
color: #f7d32e; | ||
transform: scale(1.2); | ||
font-size: 33px; | ||
|
||
} | ||
|
||
.rating .star:hover { | ||
color: #f7d32e; | ||
} | ||
|
||
textarea { | ||
width: 90%; | ||
height: 110px; | ||
margin: 20px auto; | ||
padding: 10px; | ||
border: 1px solid #ccc; | ||
border-radius: 4px; | ||
transition: box-shadow 0.3s, transform 0.3s; | ||
background-color: #fff; | ||
color: #333; | ||
} | ||
|
||
textarea:hover { | ||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); | ||
transform: scale(1.02); | ||
} | ||
|
||
button { | ||
background-color: #4bb6b7; | ||
color: white; | ||
padding: 10px 20px; | ||
border: none; | ||
border-radius: 4px; | ||
cursor: pointer; | ||
transition: background-color 0.3s; | ||
} | ||
|
||
button:hover { | ||
background-color: #3aa5a6; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Rate Us</title> | ||
<link rel="stylesheet" href="rateus.css"> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.8.1/font/bootstrap-icons.min.css"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/toastify-js/src/toastify.min.css"> | ||
</head> | ||
<body> | ||
<header class="header_container"> | ||
<div class="img"> | ||
<img id="rd-logo" style="width: 90px; height: auto;" src="images/rd.png"> | ||
</div> | ||
<nav class="nav_menu"> | ||
<ul class="nav_link"> | ||
<li><a href="index.html"><i class="bi bi-house-door-fill"></i> Home</a></li> | ||
<li><a href="#about"><i class="bi bi-info-circle-fill"></i> About</a></li> | ||
<li><a href="Html-Files/news.html"><i class="bi bi-newspaper"></i> News</a></li> | ||
<li><a href="dex.html"><i class="bi bi-gear"></i> Service</a></li> | ||
<li><a href="#patient-portal"><i class="bi bi-person"></i> Patient Portal</a></li> | ||
<li><a href="#doctors"><i class="bi bi-person-circle"></i> Doctor</a></li> | ||
<li><a href="Html-Files/contact.html"><i class="bi bi-telephone"></i> Contact us</a></li> | ||
<li><a href="Html-Files/rateus.html"><i class="bi bi-star"></i> Rate Us</a></li> | ||
<li><a href="login.html"><i class="bi bi-box-arrow-right"></i> Sign in/Sign up</a></li> | ||
<li><a href="./Html-Files/Doctor Experience.html"><button>Find a Doctor</button></a></li> | ||
</ul> | ||
</nav> | ||
</header> | ||
|
||
<div class="container"> | ||
<h2>Rate Us</h2> | ||
<div class="rating"> | ||
<span class="star" data-value="1">★</span> | ||
<span class="star" data-value="2">★</span> | ||
<span class="star" data-value="3">★</span> | ||
<span class="star" data-value="4">★</span> | ||
<span class="star" data-value="5">★</span> | ||
</div> | ||
<textarea id="comment" placeholder="Give Us Your Feedback :) "></textarea> | ||
<button onclick="submitRating()">Submit</button> | ||
</div> | ||
|
||
<script src="https://cdn.jsdelivr.net/npm/toastify-js"></script> | ||
<script> | ||
document.addEventListener('DOMContentLoaded', () => { | ||
const stars = document.querySelectorAll('.star'); | ||
|
||
stars.forEach(star => { | ||
star.addEventListener('click', () => { | ||
const value = star.getAttribute('data-value'); | ||
highlightStars(value); | ||
}); | ||
}); | ||
|
||
function highlightStars(value) { | ||
stars.forEach((star, index) => { | ||
if (index < value) { | ||
star.classList.add('selected'); | ||
} else { | ||
star.classList.remove('selected'); | ||
} | ||
}); | ||
} | ||
}); | ||
|
||
function submitRating() { | ||
const selectedStars = document.querySelectorAll('.star.selected'); | ||
const comment = document.getElementById('comment').value; | ||
|
||
if (selectedStars.length > 0 && comment.trim() !== '') { | ||
Toastify({ | ||
text: "Thanks For Your Feedback :)", | ||
duration: 3000, | ||
close: true, | ||
gravity: "top", | ||
position: "center", | ||
backgroundColor: "#4CAF50", | ||
}).showToast(); | ||
} else { | ||
Toastify({ | ||
text: "Please Fill All The Details :(", | ||
duration: 3000, | ||
close: true, | ||
gravity: "top", | ||
position: "center", | ||
backgroundColor: "#FF0000", | ||
}).showToast(); | ||
} | ||
} | ||
</script> | ||
</body> | ||
</html> |
Oops, something went wrong.