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

Fix: Resolved issue of responsiveness of both the pages. #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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 ayurveda/src/components/ChatScreen.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const ChatScreen = () => {
const updatedMessages = [...messages, { text: newMessage, sender: 'user' }];
setMessages(updatedMessages);
handleGPTResponse("Mock GPT Response");
setNewMessage(''); // Clear input after sending
};

const handleGPTResponse = (response) => {
Expand All @@ -35,10 +36,10 @@ const ChatScreen = () => {
placeholder="Type your message..."
/>
<button onClick={handleSendMessage}>Send</button>
<Link to="/">Back to Home</Link>
</div>
<Link className={styles['back-link']} to="/">Back to Home</Link>
</div>
);
};

export default ChatScreen;
export default ChatScreen;
26 changes: 25 additions & 1 deletion ayurveda/src/styles/App.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,28 @@
padding-top: 20px;
border-top: 1px solid #555;
font-size: 14px;
}
}

@media (max-width: 768px) {
.carouselBtn {
font-size: 18px;
}

.ctaButton {
font-size: 14px;
padding: 8px 16px;
}

.features h2 {
font-size: 28px;
}

.footer-content {
flex-direction: column;
text-align: center;
}

.footer-section {
margin-bottom: 30px;
}
}
135 changes: 77 additions & 58 deletions ayurveda/src/styles/ChatScreen.module.css
Original file line number Diff line number Diff line change
@@ -1,59 +1,78 @@
/* ChatScreen.module.css */

.chat-screen {
background-color: #f9f9f9;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
margin: auto;
max-width: 900px;
width: 100%;
}

.chat-messages {
flex-grow: 1;
overflow-y: auto;
padding: 20px;
}

.user-message {
background-color: #4caf50;
color: white;
padding: 10px;
margin-bottom: 10px;
border-radius: 5px;
}

.gpt-message {
background-color: #ffffff;
border: 1px solid #e0e0e0;
padding: 10px;
margin-bottom: 10px;
border-radius: 5px;
}

.chat-input {
display: flex;
padding: 10px;
}

.chat-input input {
flex-grow: 1;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
margin-right: 10px;
}

.chat-input button {
background-color: #008080;
color: white;
border: none;
padding: 10px 20px;
cursor: pointer;
border-radius: 5px;
}

.chat-input button:hover {
background-color: #005555;
}

background-color: #f9f9f9;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
margin: 20px auto; /* Add margin for spacing */
max-width: 900px;
width: 100%;
display: flex;
flex-direction: column;
height: auto; /* Allow the height to adjust based on content */
}

.chat-messages {
flex-grow: 1;
overflow-y: auto;
padding: 20px;
border-bottom: 1px solid #e0e0e0; /* Divider line */
}

.user-message {
background-color: #4caf50;
color: white;
padding: 10px;
margin-bottom: 10px;
border-radius: 5px;
max-width: 80%; /* Limit width */
align-self: flex-end; /* Align user messages to the right */
}

.gpt-message {
background-color: #ffffff;
border: 1px solid #e0e0e0;
padding: 10px;
margin-bottom: 10px;
border-radius: 5px;
max-width: 80%; /* Limit width */
align-self: flex-start; /* Align GPT messages to the left */
}

.chat-input {
display: flex;
padding: 10px;
border-top: 1px solid #e0e0e0; /* Top border for input */
}

.chat-input input {
flex-grow: 1;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
margin-right: 10px;
}

.chat-input button {
background-color: #008080;
color: white;
border: none;
padding: 10px 20px;
cursor: pointer;
border-radius: 5px;
transition: background-color 0.3s ease;
}

.chat-input button:hover {
background-color: #005555;
}

.back-link {
margin-top: 10px; /* Space above the link */
color: #008080;
text-align: center;
text-decoration: none; /* Remove underline */
font-weight: bold; /* Make it bold */
}

.back-link:hover {
text-decoration: underline; /* Underline on hover */
}