-
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.
Merge branch 'main' of https://github.com/Voltz-Corp/Eceeltec-G4
- Loading branch information
Showing
16 changed files
with
855 additions
and
162 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,128 @@ | ||
:root { | ||
--red-100: #fee2e2; | ||
--red-600: #DC2626; | ||
--red-700: #b91c1c; | ||
--green-100: #dcfce7; | ||
--green-500: #22c55e; | ||
--green-700: #108519; | ||
--white: #f7f7f7; | ||
--gray-50: #f9fafb; | ||
--gray-200: #e5e7eb; | ||
--gray-300: #d1d5db; | ||
--gray-400: #9ca3af; | ||
--gray-500: #6b7280; | ||
--gray-600: #4b5563; | ||
--gray-700: #374151; | ||
--gray-800: #1f2937; | ||
--blue-500: #155ec8; | ||
--blue-200: #bfdbfe; | ||
--yellow-700: #a16207; | ||
--yellow-100: #fef9c3; | ||
--yellow-300: #fde047; | ||
--yellow-400: #facc15; | ||
} | ||
|
||
* { | ||
padding: 0; | ||
margin: 0; | ||
box-sizing: border-box; | ||
} | ||
|
||
.mainRating { | ||
position: fixed; | ||
z-index: 999; | ||
left: 0; | ||
top: 0; | ||
width: 100%; | ||
height: 100%; | ||
overflow: auto; | ||
background-color: rgba(0,0,0,0.4); | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
.rating { | ||
background-color: var(--white); | ||
display: flex; | ||
flex-direction: column; | ||
margin: 10% auto 15% auto; | ||
padding: 24px 20px; | ||
border: 1px solid #888; | ||
width: 800px; | ||
height: fit-content; | ||
position: relative; | ||
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19); | ||
justify-content: center; | ||
border-radius: 4px; | ||
} | ||
|
||
.rating h1 { | ||
text-align: center; | ||
font-size: 28px; | ||
} | ||
|
||
.rating label { | ||
color: var(--gray-700); | ||
font-weight: 500; | ||
font-size: 18px; | ||
} | ||
|
||
.rating svg { | ||
fill: transparent; | ||
} | ||
|
||
.ratingContent button { | ||
background-color: transparent; | ||
border: none; | ||
padding-right: 8px; | ||
} | ||
|
||
.rating button svg { | ||
color: transparent; | ||
fill: var(--gray-300); | ||
width: 40px; | ||
height: 40px; | ||
transition: all .2s; | ||
} | ||
|
||
.rating button.active svg { | ||
fill: var(--yellow-400); | ||
} | ||
|
||
|
||
.rating button.hover svg { | ||
fill: var(--yellow-400); | ||
} | ||
|
||
.ratingContent { | ||
margin-top: 32px; | ||
} | ||
|
||
.inputContainer { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
margin-bottom: 20px; | ||
} | ||
|
||
.ratingContent textarea { | ||
width: 100%; | ||
height: 200px; | ||
resize: none; | ||
border-radius: 8px; | ||
border: 1px solid var(--gray-200); | ||
margin-top: 8px; | ||
padding: 16px; | ||
} | ||
|
||
.rating-submit { | ||
padding: 8px 16px; | ||
background-color: var(--green-700); | ||
color: var(--white); | ||
font-weight: 600; | ||
border-radius: 4px; | ||
border: none; | ||
float: right; | ||
margin-top: 24px; | ||
} |
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,119 @@ | ||
const attendanceStars = document.querySelectorAll(".attendance"); | ||
const serviceStars = document.querySelectorAll(".service"); | ||
const timeStars = document.querySelectorAll(".time"); | ||
|
||
const attendanceInput = document.querySelector("#attendance") | ||
const serviceInput = document.querySelector("#service") | ||
const timeInput = document.querySelector("#time") | ||
|
||
// Attendance | ||
attendanceStars.forEach((star, firstIndex) => { | ||
star.addEventListener("click", () => { | ||
attendanceStars.forEach((star, secondIndex) => { | ||
|
||
if (firstIndex >= secondIndex) { | ||
attendanceInput.value = secondIndex + 1; | ||
star.classList.add("active"); | ||
} else { | ||
star.classList.remove("active"); | ||
} | ||
}); | ||
}) | ||
}); | ||
|
||
attendanceStars.forEach((star, firstIndex) => { | ||
star.addEventListener("mouseover", () => { | ||
attendanceStars.forEach((star, secondIndex) => { | ||
|
||
if (firstIndex >= secondIndex) { | ||
star.classList.add("hover"); | ||
} | ||
}); | ||
}) | ||
}); | ||
|
||
attendanceStars.forEach((star, firstIndex) => { | ||
star.addEventListener("mouseout", () => { | ||
attendanceStars.forEach((star, secondIndex) => { | ||
|
||
if (firstIndex >= secondIndex) { | ||
star.classList.remove("hover"); | ||
} | ||
}); | ||
}) | ||
}); | ||
|
||
|
||
// Service | ||
serviceStars.forEach((star, firstIndex) => { | ||
star.addEventListener("click", () => { | ||
serviceStars.forEach((star, secondIndex) => { | ||
if (firstIndex >= secondIndex) { | ||
serviceInput.value = secondIndex + 1; | ||
star.classList.add("active"); | ||
} else { | ||
star.classList.remove("active"); | ||
} | ||
}); | ||
}) | ||
}); | ||
|
||
serviceStars.forEach((star, firstIndex) => { | ||
star.addEventListener("mouseover", () => { | ||
serviceStars.forEach((star, secondIndex) => { | ||
|
||
if (firstIndex >= secondIndex) { | ||
star.classList.add("hover"); | ||
} | ||
}); | ||
}) | ||
}); | ||
|
||
serviceStars.forEach((star, firstIndex) => { | ||
star.addEventListener("mouseout", () => { | ||
serviceStars.forEach((star, secondIndex) => { | ||
|
||
if (firstIndex >= secondIndex) { | ||
star.classList.remove("hover"); | ||
} | ||
}); | ||
}) | ||
}); | ||
|
||
|
||
// Time | ||
timeStars.forEach((star, firstIndex) => { | ||
star.addEventListener("click", () => { | ||
timeStars.forEach((star, secondIndex) => { | ||
if (firstIndex >= secondIndex) { | ||
timeInput.value = secondIndex + 1; | ||
star.classList.add("active"); | ||
} else { | ||
star.classList.remove("active"); | ||
} | ||
}); | ||
}) | ||
}); | ||
|
||
timeStars.forEach((star, firstIndex) => { | ||
star.addEventListener("mouseover", () => { | ||
timeStars.forEach((star, secondIndex) => { | ||
|
||
if (firstIndex >= secondIndex) { | ||
star.classList.add("hover"); | ||
} | ||
}); | ||
}) | ||
}); | ||
|
||
timeStars.forEach((star, firstIndex) => { | ||
star.addEventListener("mouseout", () => { | ||
timeStars.forEach((star, secondIndex) => { | ||
|
||
if (firstIndex >= secondIndex) { | ||
star.classList.remove("hover"); | ||
} | ||
}); | ||
}) | ||
}); | ||
|
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
Oops, something went wrong.