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

ui changes and bug fixing #3003

Merged
merged 1 commit into from
Aug 31, 2024
Merged
Show file tree
Hide file tree
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
5 changes: 3 additions & 2 deletions frontend/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
transition: background-color 0.2s;
}

cursor: pointer;
/* cursor: pointer;
transition: background-color 0.2s;
}
}
}}}} */
6 changes: 3 additions & 3 deletions frontend/src/ChatAssistant/ChatAssistant.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
margin-right: 20px;
margin-bottom: 12px;
/* z-index: 999; */
cursor:none;
/* cursor:none; */
}
.chatbot-close-animation {
animation: animate-close ease-in 0.3s forwards;
Expand Down Expand Up @@ -148,7 +148,7 @@
.Logo {
height: 50px;
width: 50px;
cursor: none;
/* cursor: none; */
height:50px;
width:50px;
}
Expand Down Expand Up @@ -183,7 +183,7 @@
border-radius: 50px;
color: black;
font-size: 20px;
cursor: none;
/* cursor: none; */
position: absolute;
z-index: 5;
margin-left: 130px;
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/Component/Navbar/NavbarCenter.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ function NavbarCenter() {
<li className="nav-item">
<NavbarItem description={<><FontAwesomeIcon icon={faInfoCircle} /> About Us</>} to="/about" />
</li>
<li className="nav-item">
{/* <li className="nav-item">
<NavbarItem description={<><FontAwesomeIcon icon={faQuestionCircle} /> FAQ's</>} to="/faq" />
</li>
</li> */}
<li className="nav-item" onClick={handleRateUsClick}>
<NavbarItem description={<><FontAwesomeIcon icon={faStar} /> Rate Us</>} to="#" />
</li>
Expand Down
142 changes: 71 additions & 71 deletions frontend/src/Component/TrailingCursor/TrailingCursor.jsx
Original file line number Diff line number Diff line change
@@ -1,72 +1,72 @@
import React, { useEffect, useState } from 'react';
import Styles from './TrailingCursor.module.css';
import { PiCursorFill } from "react-icons/pi";
import { FaHandPointer } from "react-icons/fa";
import { LuTextCursor } from "react-icons/lu";
const TrailingCursor = () => {
const [cursorPosition, setCursorPosition] = useState({ x: 0, y: 0 });
const [isPointer, setIsPointer] = useState('default');
const handleMouseMove = (event) => {
const scrollLeft = window.pageXOffset;
const scrollTop = window.pageYOffset;
setCursorPosition({ x: event.clientX + scrollLeft, y: event.clientY + scrollTop });
createTrailing(event.clientX + 40, event.clientY + 40);
};
const handleMouseOver = (event) => {
if (event.target.tagName === 'A' || event.target.tagName === 'BUTTON') {
setIsPointer('pointer');
} else if (event.target.tagName === 'INPUT' || event.target.tagName === 'TEXTAREA') {
setIsPointer('text');
} else {
setIsPointer('default');
}
};
const createTrailing = (x, y) => {
const trailingContainer = document.createElement('div');
trailingContainer.className = 'trailing-container';
for (let i = 0; i < 2; i++) {
const trailing = document.createElement('div');
trailing.className = Styles['trailing'];
const relativeX = x + Math.random() * 20 - 10; // Randomize position within a range
const relativeY = y + Math.random() * 20 - 10; // Randomize position within a range
trailing.style.left = `${relativeX - 5}px`;
trailing.style.top = `${relativeY - 5}px`;
trailingContainer.appendChild(trailing);
}
document.body.appendChild(trailingContainer);
// Remove the trailing elements after the animation ends
setTimeout(() => {
trailingContainer.remove();
}, 400);
};
useEffect(() => {
document.addEventListener('mousemove', handleMouseMove);
document.addEventListener('mouseover', handleMouseOver);
// import React, { useEffect, useState } from 'react';
// import Styles from './TrailingCursor.module.css';
// import { PiCursorFill } from "react-icons/pi";
// import { FaHandPointer } from "react-icons/fa";
// import { LuTextCursor } from "react-icons/lu";
// const TrailingCursor = () => {
// const [cursorPosition, setCursorPosition] = useState({ x: 0, y: 0 });
// const [isPointer, setIsPointer] = useState('default');
// const handleMouseMove = (event) => {
// const scrollLeft = window.pageXOffset;
// const scrollTop = window.pageYOffset;
// setCursorPosition({ x: event.clientX + scrollLeft, y: event.clientY + scrollTop });
// createTrailing(event.clientX + 40, event.clientY + 40);
// };
// const handleMouseOver = (event) => {
// if (event.target.tagName === 'A' || event.target.tagName === 'BUTTON') {
// setIsPointer('pointer');
// } else if (event.target.tagName === 'INPUT' || event.target.tagName === 'TEXTAREA') {
// setIsPointer('text');
// } else {
// setIsPointer('default');
// }
// };
// const createTrailing = (x, y) => {
// const trailingContainer = document.createElement('div');
// trailingContainer.className = 'trailing-container';
// for (let i = 0; i < 2; i++) {
// const trailing = document.createElement('div');
// trailing.className = Styles['trailing'];
// const relativeX = x + Math.random() * 20 - 10; // Randomize position within a range
// const relativeY = y + Math.random() * 20 - 10; // Randomize position within a range
// trailing.style.left = `${relativeX - 5}px`;
// trailing.style.top = `${relativeY - 5}px`;
// trailingContainer.appendChild(trailing);
// }
// document.body.appendChild(trailingContainer);
// // Remove the trailing elements after the animation ends
// setTimeout(() => {
// trailingContainer.remove();
// }, 400);
// };
// useEffect(() => {
// document.addEventListener('mousemove', handleMouseMove);
// document.addEventListener('mouseover', handleMouseOver);

return () => {
document.removeEventListener('mousemove', handleMouseMove);
document.removeEventListener('mouseover', handleMouseOver);
};
}, []);
return (
<div>
<div className={Styles["cursor-container"]}
style={{
left: `${cursorPosition.x}px`,
top: `${cursorPosition.y}px`,
position: 'absolute',
}}>
{isPointer === 'pointer' ? (
<FaHandPointer className={Styles["custom-cursor"]} />
) : (
isPointer === 'default' ? (
<PiCursorFill className={Styles["custom-cursor"]} style={{ transform: 'rotate(13deg)' }} />
) : (
<LuTextCursor className={Styles["custom-cursor"]} />
)
)}
</div>
</div>
);
};
export default TrailingCursor;
// return () => {
// document.removeEventListener('mousemove', handleMouseMove);
// document.removeEventListener('mouseover', handleMouseOver);
// };
// }, []);
// return (
// <div>
// <div className={Styles["cursor-container"]}
// style={{
// left: `${cursorPosition.x}px`,
// top: `${cursorPosition.y}px`,
// position: 'absolute',
// }}>
// {isPointer === 'pointer' ? (
// <FaHandPointer className={Styles["custom-cursor"]} />
// ) : (
// isPointer === 'default' ? (
// <PiCursorFill className={Styles["custom-cursor"]} style={{ transform: 'rotate(13deg)' }} />
// ) : (
// <LuTextCursor className={Styles["custom-cursor"]} />
// )
// )}
// </div>
// </div>
// );
// };
// // export default TrailingCursor;
16 changes: 8 additions & 8 deletions frontend/src/Component/TrailingCursor/TrailingCursor.module.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.cursor-container {
/* .cursor-container {
position: absolute;
pointer-events: none;
z-index: 12;
transform: translate(0,10%);
}

} */
/*
.custom-cursor {
width: 33px;
height: 33px;
Expand All @@ -17,9 +17,9 @@
position: absolute;
pointer-events: none;
animation: trailing-animation 0.4s linear;
}
} */

.trailing {
/* .trailing {
position: absolute;
width: 8px;
height: 8px;
Expand All @@ -30,8 +30,8 @@
transition: transform 1.2s, opacity 1s;
pointer-events: none;
/* z-index: 9998; */
}

/* } */
/*
@keyframes trailing-effect {
from {
transform: scale(1);
Expand All @@ -50,4 +50,4 @@
opacity: 0;
}
}

*/
4 changes: 2 additions & 2 deletions frontend/src/Component/TrailingCursor/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// index.js in frontend/src/Component/TrailingCursor/

// Importing the TrailingCursor component from its file
import TrailingCursor from './TrailingCursor';
// import TrailingCursor from './TrailingCursor';

// Exporting the component to be used in other parts of the application
export default TrailingCursor;
// export default TrailingCursor;
6 changes: 3 additions & 3 deletions frontend/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ body,
html {
scrollbar-width: none;
height: 100%;
cursor: none;
/* cursor: none; */
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
cursor: none;
/* cursor: none; */
}

body {
Expand All @@ -36,7 +36,7 @@ body {
bottom: 18px !important;
}
.darkmode-toggle:hover {
cursor: none;
/* cursor: none; */

}

Expand Down
12 changes: 6 additions & 6 deletions frontend/src/style/Home.css
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
border: 2px solid #804afe;
color: white;
box-shadow: -1px 2px 8px #c5aff899,0px 2px 8px #6943c392;
cursor: none;
/* cursor: none; */
}
.hero-button a:hover {
color: white;
Expand Down Expand Up @@ -437,18 +437,18 @@
border-radius: 6px;
box-shadow: 1px 1px rgb(0, 0, 0, 0.5);
background-color: #8b5cf6;
cursor: none;
/* cursor: none; */
}
.btn-booked-box {
border: 2px dashed #8b5cf6;
color: white;
cursor: none;
/* cursor: none; */
background: transparent;
}

.btn-booked-box:hover {
color: white;
cursor: none;
/* cursor: none; */
background-color: #8b5cf6;
box-shadow: 10px 10px 30px rgba(139, 92, 246, 0.8),
-10px -10px 30px rgba(139, 92, 246, 0.3);
Expand All @@ -457,7 +457,7 @@
.btn-b-box:hover {
color: #fff;
background: transparent;
cursor: none;
/* cursor: none; */
box-shadow: 2px 2px 1px #8b5cf6;
}

Expand Down Expand Up @@ -631,7 +631,7 @@
border: 2px solid #8b5cf6;
color: white;
box-shadow: 4px 4px 2px #8b5cf6;
cursor: none;
/* cursor: none; */
}

.hero-button a:hover {
Expand Down
13 changes: 7 additions & 6 deletions frontend/src/style/Navbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
padding: 0;
margin: 0;
justify-content: space-between; /* Add space between items */
width: 109%; /* Make the navbar items stretch along the width */
width: 100%; /* Make the navbar items stretch along the width */
}

.card-body img {
Expand All @@ -81,11 +81,11 @@
box-shadow: 0 0 10px rgba(255, 255, 255, 0); /* Initially no shadow */
}

.nav-item:hover {
transform: scale(1.05); /* Scale up slightly on hover */
filter: brightness(1.2); /* Brighten on hover for shine effect */
box-shadow: 0 0 20px rgba(255, 255, 255, 0.8); /* Add glowing effect */
}
.nav-item:hover {
/* transform: scale(1.05); Scale up slightly on hover */
filter: brightness(1.2);/* Brighten on hover for shine effect */
/* box-shadow: 0 0 20px rgba(255, 255, 255, 0.8); Add glowing effect */
}



Expand Down Expand Up @@ -222,6 +222,7 @@
height: 2px;
background-color: black;
transition: width 0.2s ease-in-out;
transform-origin:center ;
}

.sidebar.active {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/style/Profile.css
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,9 @@
backdrop-filter: blur(5px); /* Add blur effect */
}

@media (max-width: 600px) {
/* @media (max-width: 600px) {
.TrailingCursor_cursor-container__iOCry{
display: none;
}

}
} */
Loading