Spaces:
Running
Running
Commit
·
9883d55
1
Parent(s):
8f63cc5
feat: Add wide screen support and improve UI
Browse files- static/style.css +106 -14
static/style.css
CHANGED
@@ -9,8 +9,10 @@ body {
|
|
9 |
}
|
10 |
|
11 |
.chat-container {
|
12 |
-
width:
|
13 |
-
|
|
|
|
|
14 |
background-color: #fff;
|
15 |
border-radius: 10px;
|
16 |
box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
|
@@ -21,52 +23,142 @@ body {
|
|
21 |
|
22 |
.chat-messages {
|
23 |
flex-grow: 1;
|
24 |
-
padding:
|
25 |
overflow-y: auto;
|
26 |
display: flex;
|
27 |
flex-direction: column;
|
|
|
28 |
}
|
29 |
|
30 |
.message {
|
31 |
background-color: #e0e0e0;
|
32 |
color: #333;
|
33 |
-
padding:
|
34 |
-
border-radius:
|
35 |
-
margin-bottom:
|
36 |
-
align-self: flex-start;
|
37 |
max-width: 80%;
|
38 |
word-wrap: break-word;
|
|
|
39 |
}
|
40 |
|
41 |
.message.bot {
|
42 |
background-color: #007bff;
|
43 |
color: white;
|
44 |
-
align-self: flex-end;
|
45 |
}
|
46 |
|
47 |
.input-area {
|
48 |
-
padding:
|
49 |
border-top: 1px solid #e0e0e0;
|
50 |
display: flex;
|
51 |
}
|
52 |
|
53 |
#message-input {
|
54 |
flex-grow: 1;
|
55 |
-
padding:
|
56 |
-
border-radius:
|
57 |
border: 1px solid #ccc;
|
58 |
-
margin-right:
|
|
|
59 |
}
|
60 |
|
61 |
#send-button {
|
62 |
background-color: #007bff;
|
63 |
color: white;
|
64 |
border: none;
|
65 |
-
padding:
|
66 |
-
border-radius:
|
67 |
cursor: pointer;
|
|
|
68 |
}
|
69 |
|
70 |
#send-button:hover {
|
71 |
background-color: #0056b3;
|
72 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
}
|
10 |
|
11 |
.chat-container {
|
12 |
+
width: 90%; /* Use percentage for width */
|
13 |
+
max-width: 400px; /* Keep a maximum width for smaller screens */
|
14 |
+
height: 80vh; /* Use viewport height for height */
|
15 |
+
max-height: 600px; /* Keep a maximum height for smaller screens */
|
16 |
background-color: #fff;
|
17 |
border-radius: 10px;
|
18 |
box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
|
|
|
23 |
|
24 |
.chat-messages {
|
25 |
flex-grow: 1;
|
26 |
+
padding: 1.5em;
|
27 |
overflow-y: auto;
|
28 |
display: flex;
|
29 |
flex-direction: column;
|
30 |
+
font-size: 1em;
|
31 |
}
|
32 |
|
33 |
.message {
|
34 |
background-color: #e0e0e0;
|
35 |
color: #333;
|
36 |
+
padding: 0.8em 1em;
|
37 |
+
border-radius: 1.5em;
|
38 |
+
margin-bottom: 0.8em;
|
39 |
+
align-self: flex-start;
|
40 |
max-width: 80%;
|
41 |
word-wrap: break-word;
|
42 |
+
font-size: 1em;
|
43 |
}
|
44 |
|
45 |
.message.bot {
|
46 |
background-color: #007bff;
|
47 |
color: white;
|
48 |
+
align-self: flex-end;
|
49 |
}
|
50 |
|
51 |
.input-area {
|
52 |
+
padding: 1.5em;
|
53 |
border-top: 1px solid #e0e0e0;
|
54 |
display: flex;
|
55 |
}
|
56 |
|
57 |
#message-input {
|
58 |
flex-grow: 1;
|
59 |
+
padding: 0.8em;
|
60 |
+
border-radius: 1.5em;
|
61 |
border: 1px solid #ccc;
|
62 |
+
margin-right: 1em;
|
63 |
+
font-size: 1em;
|
64 |
}
|
65 |
|
66 |
#send-button {
|
67 |
background-color: #007bff;
|
68 |
color: white;
|
69 |
border: none;
|
70 |
+
padding: 0.8em 1.5em;
|
71 |
+
border-radius: 1.5em;
|
72 |
cursor: pointer;
|
73 |
+
font-size: 1em;
|
74 |
}
|
75 |
|
76 |
#send-button:hover {
|
77 |
background-color: #0056b3;
|
78 |
}
|
79 |
+
|
80 |
+
/* Media Query for screens wider than 768px (typical tablets/desktops) */
|
81 |
+
@media (min-width: 769px) {
|
82 |
+
body {
|
83 |
+
justify-content: flex-start; /* Align to the start on wider screens */
|
84 |
+
padding-left: 20px; /* Add some padding on the left */
|
85 |
+
background-color: #e9f5f3; /* Slightly different background for wider screens */
|
86 |
+
}
|
87 |
+
|
88 |
+
.chat-container {
|
89 |
+
max-width: 90%; /* Let it take more width on wider screens */
|
90 |
+
max-height: 90vh; /* Increase max height for larger screens */
|
91 |
+
height: auto; /* Adjust height automatically based on content */
|
92 |
+
margin: 20px; /* Add margin around the chat container */
|
93 |
+
border-radius: 15px; /* Slightly larger border-radius */
|
94 |
+
box-shadow: 0 0 20px rgba(0, 0, 0, 0.15); /* Slightly stronger shadow */
|
95 |
+
}
|
96 |
+
|
97 |
+
.chat-messages {
|
98 |
+
font-size: 1.1em; /* Slightly larger font size for messages */
|
99 |
+
padding: 2em; /* More padding in chat messages area */
|
100 |
+
}
|
101 |
+
|
102 |
+
.message {
|
103 |
+
padding: 1em 1.2em; /* Adjust message padding */
|
104 |
+
border-radius: 1.8em; /* Slightly larger message border-radius */
|
105 |
+
margin-bottom: 1em; /* Slightly larger message margin */
|
106 |
+
font-size: 1.1em; /* Slightly larger font size for messages */
|
107 |
+
max-width: 60%; /* Reduce max width for messages on wider screens */
|
108 |
+
}
|
109 |
+
|
110 |
+
.input-area {
|
111 |
+
padding: 2em; /* More padding in input area */
|
112 |
+
}
|
113 |
+
|
114 |
+
#message-input {
|
115 |
+
padding: 1em; /* Adjust input padding */
|
116 |
+
border-radius: 1.8em; /* Slightly larger input border-radius */
|
117 |
+
font-size: 1.1em; /* Slightly larger font size for input */
|
118 |
+
}
|
119 |
+
|
120 |
+
#send-button {
|
121 |
+
padding: 1em 2em; /* Adjust button padding */
|
122 |
+
border-radius: 1.8em; /* Slightly larger button border-radius */
|
123 |
+
font-size: 1.1em; /* Slightly larger font size for button */
|
124 |
+
}
|
125 |
+
}
|
126 |
+
|
127 |
+
/* Media Query for smaller screens (e.g., phones) - existing styles remain */
|
128 |
+
@media (max-width: 480px) {
|
129 |
+
body {
|
130 |
+
align-items: flex-end; /* Align to the bottom on small screens */
|
131 |
+
}
|
132 |
+
|
133 |
+
.chat-container {
|
134 |
+
width: 100%;
|
135 |
+
height: 100vh;
|
136 |
+
max-width: none;
|
137 |
+
max-height: none;
|
138 |
+
border-radius: 0;
|
139 |
+
box-shadow: none;
|
140 |
+
}
|
141 |
+
|
142 |
+
.chat-messages {
|
143 |
+
padding: 1em;
|
144 |
+
font-size: 0.9em;
|
145 |
+
}
|
146 |
+
|
147 |
+
.message {
|
148 |
+
padding: 0.7em 0.9em;
|
149 |
+
border-radius: 1em;
|
150 |
+
margin-bottom: 0.7em;
|
151 |
+
font-size: 0.9em;
|
152 |
+
}
|
153 |
+
|
154 |
+
.input-area {
|
155 |
+
padding: 1em;
|
156 |
+
}
|
157 |
+
|
158 |
+
#message-input,
|
159 |
+
#send-button {
|
160 |
+
padding: 0.7em;
|
161 |
+
border-radius: 1em;
|
162 |
+
font-size: 0.9em;
|
163 |
+
}
|
164 |
+
}
|