LinkUp-P2P-Chat/style.css

360 lines
6.5 KiB
CSS
Raw Normal View History

2024-06-03 19:23:14 -04:00
/* Base styles */
body {
background-color: #121212;
2024-06-04 00:03:14 -04:00
color: #e0e0e0;
2024-06-03 19:23:14 -04:00
font-family: 'Roboto', sans-serif;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
height: 100vh;
overflow: hidden;
transition: background-color 0.3s ease, color 0.3s ease;
}
2024-06-08 20:38:18 -04:00
main {
display: flex;
2024-06-08 20:38:18 -04:00
flex: 1;
overflow: hidden; /* Ensure no overflow in main */
}
#sidebar {
width: 200px;
background-color: #2f3136;
color: white;
2024-06-08 20:38:18 -04:00
height: 100%;
padding: 10px;
box-sizing: border-box;
2024-06-08 20:38:18 -04:00
}
#content {
flex: 1;
display: flex;
flex-direction: column;
height: 100%;
padding: 10px;
2024-06-08 20:38:18 -04:00
}
#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;
2024-06-08 20:38:18 -04:00
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;
2024-06-08 20:38:18 -04:00
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%;
padding: 10px;
margin-bottom: 10px;
cursor: pointer;
background-color: #7289da;
border: none;
color: white;
font-size: 14px;
border-radius: 5px;
2024-06-08 20:38:18 -04:00
}
#sidebar button:hover {
background-color: #5b6eae;
2024-06-08 20:38:18 -04:00
}
#remove-room-btn {
margin-top: 10px;
padding: 10px;
background-color: #f04747;
border: none;
color: white;
cursor: pointer;
border-radius: 5px;
2024-06-08 20:38:18 -04:00
}
#remove-room-btn:hover {
background-color: #c03535;
2024-06-08 20:38:18 -04:00
}
.hidden {
display: none;
2024-06-08 20:38:18 -04:00
}
2024-06-03 19:23:14 -04:00
/* Header styles */
header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem;
2024-06-04 00:03:14 -04:00
background-color: #1f1f1f;
color: #fff;
2024-06-03 19:23:14 -04:00
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
cursor: move;
-webkit-app-region: drag;
}
.window-controls {
display: flex;
align-items: center;
-webkit-app-region: no-drag;
}
.window-controls button {
2024-06-04 00:03:14 -04:00
background-color: #2e2e2e;
2024-06-03 19:23:14 -04:00
border: none;
2024-06-04 00:03:14 -04:00
color: #fff;
2024-06-03 19:23:14 -04:00
font-size: 1.25rem;
margin-left: 0.5rem;
padding: 0.5rem;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.3s ease;
}
.window-controls button:hover {
2024-06-04 00:03:14 -04:00
background-color: #3e3e3e;
2024-06-03 19:23:14 -04:00
}
/* Button and input styles */
2024-06-04 00:03:14 -04:00
button,
input,
textarea {
border: 1px solid #b0d944;
2024-06-03 19:23:14 -04:00
background-color: #333;
2024-06-04 00:03:14 -04:00
color: #b0d944;
2024-06-08 20:38:18 -04:00
padding: 0.5rem; /* Reduced padding */
2024-06-03 19:23:14 -04:00
font-family: 'Roboto Mono', monospace;
font-size: 1rem;
2024-06-08 20:38:18 -04:00
line-height: 1.25rem; /* Adjusted line height */
2024-06-03 19:23:14 -04:00
border-radius: 4px;
transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
2024-06-04 00:03:14 -04:00
resize: none; /* Prevent resizing */
overflow-y: hidden; /* Hide scrollbar */
2024-06-03 19:23:14 -04:00
}
2024-06-04 00:03:14 -04:00
textarea {
height: auto; /* Allow the textarea to grow dynamically */
2024-06-03 19:23:14 -04:00
}
2024-06-04 00:03:14 -04:00
textarea:focus {
outline: none; /* Remove focus outline */
}
textarea::placeholder {
color: #a0a0a0;
2024-06-03 19:23:14 -04:00
}
/* Main container styles */
main {
display: flex;
2024-06-03 22:49:52 -04:00
flex: 1;
2024-06-03 19:23:14 -04:00
justify-content: center;
align-items: center;
2024-06-03 22:49:52 -04:00
padding: 1rem;
2024-06-03 19:23:14 -04:00
}
2024-06-03 22:49:52 -04:00
/* Hidden class */
2024-06-03 19:23:14 -04:00
.hidden {
display: none !important;
}
/* Form container styles */
2024-06-04 00:03:14 -04:00
#register,
#setup {
2024-06-03 19:23:14 -04:00
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 2rem;
2024-06-04 00:03:14 -04:00
background-color: #1f1f1f;
2024-06-03 19:23:14 -04:00
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
#or {
margin: 1.5rem 0;
2024-06-04 00:03:14 -04:00
color: #b0d944;
2024-06-03 19:23:14 -04:00
}
#loading {
align-self: center;
font-size: 1.5rem;
font-weight: bold;
}
/* Chat container styles */
#chat {
display: flex;
flex-direction: column;
2024-06-03 22:49:52 -04:00
flex: 1;
2024-06-03 19:23:14 -04:00
width: 100%;
padding: 1rem;
2024-06-04 00:03:14 -04:00
background-color: #1e1e1e;
2024-06-03 19:23:14 -04:00
border-radius: 8px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
2024-06-03 22:49:52 -04:00
overflow: hidden;
2024-06-03 19:23:14 -04:00
}
#header {
2024-06-08 20:38:18 -04:00
width: 100%;
2024-06-03 19:23:14 -04:00
margin-bottom: 1rem;
}
2024-06-03 23:05:03 -04:00
#join-chat-room-container {
display: flex;
align-items: center;
2024-06-04 00:03:14 -04:00
margin-top: 1rem;
2024-06-03 23:05:03 -04:00
}
#join-chat-room-container label {
2024-06-04 00:03:14 -04:00
margin-right: 0.5rem;
2024-06-03 23:05:03 -04:00
}
2024-06-04 00:03:14 -04:00
#join-chat-room-container input,
#join-chat-room-container textarea {
margin-right: 0.5rem;
2024-06-03 23:05:03 -04:00
}
#join-chat-room-container button {
2024-06-04 00:03:14 -04:00
margin-left: 0.5rem;
2024-06-03 23:05:03 -04:00
}
2024-06-03 19:23:14 -04:00
#details {
display: flex;
justify-content: space-between;
2024-06-08 20:38:18 -04:00
align-items: center;
2024-06-03 19:23:14 -04:00
padding: 1rem;
2024-06-04 00:03:14 -04:00
background-color: #2b2b2b;
2024-06-03 19:23:14 -04:00
border-radius: 4px;
2024-06-08 20:38:18 -04:00
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 */
2024-06-03 19:23:14 -04:00
}
2024-06-03 23:05:03 -04:00
#submit-button {
2024-06-04 00:03:14 -04:00
margin-left: 1rem;
2024-06-03 23:05:03 -04:00
}
2024-06-03 19:23:14 -04:00
#messages {
flex: 1;
2024-06-04 00:03:14 -04:00
min-height: 200px;
2024-06-03 19:23:14 -04:00
overflow-y: auto;
2024-06-08 20:38:18 -04:00
padding: 0.5rem; /* Reduced padding */
2024-06-03 19:23:14 -04:00
background-color: #262626;
border-radius: 4px;
2024-06-03 22:49:52 -04:00
display: flex;
flex-direction: column;
2024-06-08 20:38:18 -04:00
width: 100%;
2024-06-03 19:23:14 -04:00
}
#message-form {
display: flex;
margin-top: 1rem;
2024-06-04 00:03:14 -04:00
margin-right: 1rem;
2024-06-08 20:38:18 -04:00
width: 100%;
2024-06-03 19:23:14 -04:00
}
#message {
flex: 1;
margin-right: 0.5rem;
2024-06-04 00:03:14 -04:00
padding-right: 0.5rem;
2024-06-03 19:23:14 -04:00
}
#user-info {
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 1rem;
}
#user-info input {
margin: 0 0.5rem;
}
#user-list {
margin-top: 1rem;
display: flex;
flex-direction: column;
}
/* Message styles */
.message {
display: flex;
2024-06-04 00:03:14 -04:00
align-items: center;
2024-06-08 20:38:18 -04:00
margin-bottom: 0.5rem; /* Reduced margin */
2024-06-03 19:23:14 -04:00
}
.message img {
2024-06-08 20:38:18 -04:00
width: 32px; /* Reduced size */
height: 32px; /* Reduced size */
2024-06-03 19:23:14 -04:00
border-radius: 50%;
2024-06-08 20:38:18 -04:00
margin-right: 0.5rem; /* Reduced margin */
2024-06-04 00:03:14 -04:00
border: 2px solid #b0d944;
2024-06-03 19:23:14 -04:00
}
.message-content {
2024-06-04 00:03:14 -04:00
max-width: 70%;
background-color: #2e2e2e;
2024-06-08 20:38:18 -04:00
padding: 0.5rem; /* Reduced padding */
border-radius: 8px; /* Reduced border radius */
2024-06-03 19:23:14 -04:00
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.message-header {
font-weight: bold;
2024-06-04 00:03:14 -04:00
color: #b0d944;
2024-06-08 20:38:18 -04:00
font-size: 0.9rem; /* Reduced font size */
2024-06-03 19:23:14 -04:00
}
.message-time {
2024-06-04 00:03:14 -04:00
color: #a0a0a0;
2024-06-03 19:23:14 -04:00
font-size: 0.75rem;
margin-left: 0.5rem;
}