Update CSS layout and Syles

This commit is contained in:
Raven Scott 2024-06-08 20:38:18 -04:00
parent 4cc087fae2
commit 4e961aebb7

210
style.css
View File

@ -12,49 +12,83 @@ body {
transition: background-color 0.3s ease, color 0.3s ease; transition: background-color 0.3s ease, color 0.3s ease;
} }
#messages-container { main {
height: 45vh; /* Adjust as needed */
overflow-y: auto;
}
/* body {
display: flex; display: flex;
} */ flex: 1;
overflow: hidden; /* Ensure no overflow in main */
}
#sidebar { #sidebar {
width: 200px; width: 200px;
background-color: #2f3136; background-color: #2f3136;
color: white; color: white;
height: 100vh; height: 100%;
padding: 10px; padding: 10px;
box-sizing: border-box; box-sizing: border-box;
} }
#room-list { #content {
list-style: none;
padding: 0;
margin-bottom: 20px;
}
#room-list li {
padding: 10px;
cursor: pointer;
margin-bottom: 5px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
#room-list li:hover {
background-color: #40444b;
}
#content {
flex: 1; flex: 1;
display: flex;
flex-direction: column;
height: 100%;
padding: 10px; padding: 10px;
} }
#sidebar button { #register, #setup, #chat {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 2rem;
background-color: #1f1f1f;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
#chat {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
padding: 1rem;
background-color: #1e1e1e;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
width: 100%;
}
#messages-container {
flex: 1;
overflow-y: auto;
width: 100%;
}
#message-form {
display: flex;
margin-top: 1rem;
margin-right: 1rem;
width: 100%;
}
#message {
flex: 1;
margin-right: 0.5rem;
padding-right: 0.5rem;
height: 1.5rem; /* Initial single line height */
overflow-y: hidden; /* Hide scrollbar */
}
#message:focus {
height: auto; /* Allow the textarea to grow dynamically when focused */
}
#message:empty {
height: 1.5rem; /* Ensure single line height when empty */
}
#sidebar button {
width: 100%; width: 100%;
padding: 10px; padding: 10px;
margin-bottom: 10px; margin-bottom: 10px;
@ -64,13 +98,13 @@ body {
color: white; color: white;
font-size: 14px; font-size: 14px;
border-radius: 5px; border-radius: 5px;
} }
#sidebar button:hover { #sidebar button:hover {
background-color: #5b6eae; background-color: #5b6eae;
} }
#remove-room-btn { #remove-room-btn {
margin-top: 10px; margin-top: 10px;
padding: 10px; padding: 10px;
background-color: #f04747; background-color: #f04747;
@ -78,15 +112,15 @@ body {
color: white; color: white;
cursor: pointer; cursor: pointer;
border-radius: 5px; border-radius: 5px;
} }
#remove-room-btn:hover { #remove-room-btn:hover {
background-color: #c03535; background-color: #c03535;
} }
.hidden { .hidden {
display: none; display: none;
} }
/* Header styles */ /* Header styles */
header { header {
@ -130,10 +164,10 @@ textarea {
border: 1px solid #b0d944; border: 1px solid #b0d944;
background-color: #333; background-color: #333;
color: #b0d944; color: #b0d944;
padding: 0.75rem; padding: 0.5rem; /* Reduced padding */
font-family: 'Roboto Mono', monospace; font-family: 'Roboto Mono', monospace;
font-size: 1rem; font-size: 1rem;
line-height: 1.5rem; line-height: 1.25rem; /* Adjusted line height */
border-radius: 4px; border-radius: 4px;
transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
resize: none; /* Prevent resizing */ resize: none; /* Prevent resizing */
@ -204,6 +238,7 @@ main {
} }
#header { #header {
width: 100%;
margin-bottom: 1rem; margin-bottom: 1rem;
} }
@ -229,9 +264,17 @@ main {
#details { #details {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center;
padding: 1rem; padding: 1rem;
background-color: #2b2b2b; background-color: #2b2b2b;
border-radius: 4px; border-radius: 4px;
width: 100%;
box-sizing: border-box; /* Added to ensure box model includes padding */
}
#details > div {
display: flex;
flex-direction: column; /* Allow peers count to stack */
} }
#submit-button { #submit-button {
@ -242,17 +285,19 @@ main {
flex: 1; flex: 1;
min-height: 200px; min-height: 200px;
overflow-y: auto; overflow-y: auto;
padding: 1rem; padding: 0.5rem; /* Reduced padding */
background-color: #262626; background-color: #262626;
border-radius: 4px; border-radius: 4px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 100%;
} }
#message-form { #message-form {
display: flex; display: flex;
margin-top: 1rem; margin-top: 1rem;
margin-right: 1rem; margin-right: 1rem;
width: 100%;
} }
#message { #message {
@ -282,28 +327,29 @@ main {
.message { .message {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 1rem; margin-bottom: 0.5rem; /* Reduced margin */
} }
.message img { .message img {
width: 40px; width: 32px; /* Reduced size */
height: 40px; height: 32px; /* Reduced size */
border-radius: 50%; border-radius: 50%;
margin-right: 0.75rem; margin-right: 0.5rem; /* Reduced margin */
border: 2px solid #b0d944; border: 2px solid #b0d944;
} }
.message-content { .message-content {
max-width: 70%; max-width: 70%;
background-color: #2e2e2e; background-color: #2e2e2e;
padding: 0.5rem; padding: 0.5rem; /* Reduced padding */
border-radius: 10px; border-radius: 8px; /* Reduced border radius */
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
} }
.message-header { .message-header {
font-weight: bold; font-weight: bold;
color: #b0d944; color: #b0d944;
font-size: 0.9rem; /* Reduced font size */
} }
.message-time { .message-time {
@ -311,67 +357,3 @@ main {
font-size: 0.75rem; font-size: 0.75rem;
margin-left: 0.5rem; margin-left: 0.5rem;
} }
/* Button and input styles */
button,
input,
textarea {
border: 1px solid #b0d944;
background-color: #333;
color: #b0d944;
padding: 0.75rem;
font-family: 'Roboto Mono', monospace;
font-size: 1rem;
line-height: 1.5rem;
border-radius: 4px;
transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
resize: none; /* Prevent resizing */
overflow-y: hidden; /* Hide scrollbar */
}
textarea {
height: auto; /* Allow the textarea to grow dynamically */
}
textarea:focus {
outline: none; /* Remove focus outline */
}
textarea::placeholder {
color: #a0a0a0;
}
/* Chat container styles */
#chat {
display: flex;
flex-direction: column;
flex: 1;
width: 100%;
padding: 1rem;
background-color: #1e1e1e;
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
overflow: hidden;
}
#message-form {
display: flex;
margin-top: 1rem;
margin-right: 1rem;
}
#message {
flex: 1;
margin-right: 0.5rem;
padding-right: 0.5rem;
height: 1.5rem; /* Initial single line height */
overflow-y: hidden; /* Hide scrollbar */
}
#message:focus {
height: auto; /* Allow the textarea to grow dynamically when focused */
}
#message:empty {
height: 1.5rem; /* Ensure single line height when empty */
}