firnnauriel commited on
Commit
6cda22b
·
1 Parent(s): 9883d55

style: Make chat UI full-screen

Browse files
Files changed (1) hide show
  1. static/style.css +34 -48
static/style.css CHANGED
@@ -1,21 +1,22 @@
1
  body {
2
  font-family: sans-serif;
3
  background-color: #f4f7f6;
4
- margin: 0;
5
  display: flex;
6
- justify-content: center;
7
- align-items: center;
8
- min-height: 100vh;
 
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);
19
  display: flex;
20
  flex-direction: column;
21
  overflow: hidden;
@@ -23,7 +24,7 @@ body {
23
 
24
  .chat-messages {
25
  flex-grow: 1;
26
- padding: 1.5em;
27
  overflow-y: auto;
28
  display: flex;
29
  flex-direction: column;
@@ -49,7 +50,7 @@ body {
49
  }
50
 
51
  .input-area {
52
- padding: 1.5em;
53
  border-top: 1px solid #e0e0e0;
54
  display: flex;
55
  }
@@ -80,63 +81,53 @@ body {
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 {
@@ -145,9 +136,6 @@ body {
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
 
@@ -157,8 +145,6 @@ body {
157
 
158
  #message-input,
159
  #send-button {
160
- padding: 0.7em;
161
- border-radius: 1em;
162
  font-size: 0.9em;
163
  }
164
  }
 
1
  body {
2
  font-family: sans-serif;
3
  background-color: #f4f7f6;
4
+ margin: 0; /* Remove default body margin */
5
  display: flex;
6
+ justify-content: center; /* Center content horizontally */
7
+ align-items: center; /* Center content vertically */
8
+ min-height: 100vh; /* Ensure body is at least viewport height */
9
+ overflow: hidden; /* Prevent scrollbars if content overflows slightly */
10
  }
11
 
12
  .chat-container {
13
+ width: 100vw; /* Take full viewport width */
14
+ height: 100vh; /* Take full viewport height */
15
+ max-width: none; /* Remove max-width restriction */
16
+ max-height: none; /* Remove max-height restriction */
17
  background-color: #fff;
18
+ border-radius: 0; /* Remove border-radius */
19
+ box-shadow: none; /* Remove box-shadow */
20
  display: flex;
21
  flex-direction: column;
22
  overflow: hidden;
 
24
 
25
  .chat-messages {
26
  flex-grow: 1;
27
+ padding: 1em; /* Keep some padding inside chat messages */
28
  overflow-y: auto;
29
  display: flex;
30
  flex-direction: column;
 
50
  }
51
 
52
  .input-area {
53
+ padding: 1em; /* Keep some padding in input area */
54
  border-top: 1px solid #e0e0e0;
55
  display: flex;
56
  }
 
81
  /* Media Query for screens wider than 768px (typical tablets/desktops) */
82
  @media (min-width: 769px) {
83
  body {
84
+ justify-content: center; /* Re-center on wider screens if needed, or keep as flex-start */
85
+ padding-left: 0; /* Remove left padding for full width */
86
+ background-color: #f4f7f6; /* Revert to default background for consistency */
87
  }
88
 
89
  .chat-container {
90
+ max-width: 100vw; /* Ensure full viewport width on wider screens */
91
+ max-height: 100vh; /* Ensure full viewport height on wider screens */
92
+ margin: 0; /* Remove margins for full screen */
93
+ border-radius: 0; /* Remove border-radius */
94
+ box-shadow: none; /* Remove box-shadow */
 
95
  }
96
 
97
  .chat-messages {
98
+ padding: 1.5em; /* Adjust padding if needed for wider screens */
99
+ font-size: 1.1em;
100
  }
101
 
102
  .message {
103
+ font-size: 1.1em;
104
+ max-width: 80%; /* Keep message max-width for readability */
 
 
 
105
  }
106
 
107
  .input-area {
108
+ padding: 1.5em; /* Adjust input area padding if needed for wider screens */
109
  }
110
 
111
  #message-input {
112
+ font-size: 1.1em;
 
 
113
  }
114
 
115
  #send-button {
116
+ font-size: 1.1em;
 
 
117
  }
118
  }
119
 
120
+ /* Media Query for smaller screens (e.g., phones) - existing styles remain, but ensure full screen */
121
  @media (max-width: 480px) {
122
  body {
123
+ align-items: flex-end; /* Keep align-items: flex-end if you want input at bottom on small screens */
124
  }
125
 
126
  .chat-container {
127
+ width: 100vw; /* Ensure full viewport width on small screens */
128
+ height: 100vh; /* Ensure full viewport height on small screens */
129
+ border-radius: 0; /* Remove border-radius */
130
+ box-shadow: none; /* Remove box-shadow */
 
 
131
  }
132
 
133
  .chat-messages {
 
136
  }
137
 
138
  .message {
 
 
 
139
  font-size: 0.9em;
140
  }
141
 
 
145
 
146
  #message-input,
147
  #send-button {
 
 
148
  font-size: 0.9em;
149
  }
150
  }