forked from andyburke/autonomous.contact
refactor: talk => chat
This commit is contained in:
parent
b6b4fefa34
commit
525568d368
8 changed files with 1675 additions and 83 deletions
390
public/tabs/chat/chat.css
Normal file
390
public/tabs/chat/chat.css
Normal file
|
|
@ -0,0 +1,390 @@
|
|||
#chat .tab-content {
|
||||
display: grid;
|
||||
grid-template-columns: auto 1fr;
|
||||
}
|
||||
|
||||
.room-list {
|
||||
margin: 1rem 0;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.room-list > li.room a:before {
|
||||
position: absolute;
|
||||
left: -1.75rem;
|
||||
top: 0;
|
||||
font-weight: bold;
|
||||
font-size: x-large;
|
||||
content: "#";
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.room-list > li.room a {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 100%;
|
||||
min-height: 1.5rem;
|
||||
line-height: 1.5rem;
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin-left: 1.75rem;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.room-list > li.room.active a {
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
#chat .sidebar {
|
||||
position: relative;
|
||||
width: min-content;
|
||||
min-width: 10rem;
|
||||
max-width: 32rem;
|
||||
overflow-x: scroll;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
#chat .sidebar #sidebar-toggle,
|
||||
#chat .sidebar #sidebar-toggle-icon {
|
||||
opacity: 0;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#chat .sidebar .title {
|
||||
text-transform: uppercase;
|
||||
font-size: small;
|
||||
font-weight: bold;
|
||||
line-height: 2rem;
|
||||
}
|
||||
|
||||
#chat #room-chat-container {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#chat #room-chat-content {
|
||||
overflow-y: scroll;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 5rem;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
#chat #room-chat-entry-container {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 5rem;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
#chat #room-chat-entry-container form {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
padding: 0.75rem;
|
||||
}
|
||||
|
||||
#chat #room-chat-entry-container form input[type="file"] {
|
||||
opacity: 0;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#chat #room-chat-entry-container form button,
|
||||
#chat #room-chat-entry-container form label {
|
||||
position: relative;
|
||||
top: inherit;
|
||||
font-size: inherit;
|
||||
transition: inherit;
|
||||
width: 50px;
|
||||
padding: inherit;
|
||||
margin: 0 1rem;
|
||||
cursor: pointer;
|
||||
align-content: center;
|
||||
border-radius: var(--border-radius);
|
||||
border: 1px solid var(--text);
|
||||
}
|
||||
|
||||
#chat #room-chat-entry-container form textarea {
|
||||
width: 100%;
|
||||
flex-grow: 1;
|
||||
background: inherit;
|
||||
color: inherit;
|
||||
border-radius: var(--border-radius);
|
||||
}
|
||||
|
||||
#chat .message-container {
|
||||
position: relative;
|
||||
transition: all 0.33s;
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
margin-top: 0.75rem;
|
||||
padding: 2px;
|
||||
border-radius: var(--border-radius);
|
||||
}
|
||||
|
||||
#chat .message-container.user-tick.time-tick + .message-container.user-tick.time-tick,
|
||||
#chat .message-container.user-tick.time-tock + .message-container.user-tick.time-tock,
|
||||
#chat .message-container.user-tock.time-tick + .message-container.user-tock.time-tick,
|
||||
#chat .message-container.user-tock.time-tock + .message-container.user-tock.time-tock {
|
||||
margin-top: 0;
|
||||
padding: 0 2px;
|
||||
}
|
||||
|
||||
#chat
|
||||
.message-container.user-tick.time-tick
|
||||
+ .message-container.user-tick.time-tick
|
||||
.info-container,
|
||||
#chat
|
||||
.message-container.user-tick.time-tock
|
||||
+ .message-container.user-tick.time-tock
|
||||
.info-container,
|
||||
#chat
|
||||
.message-container.user-tock.time-tick
|
||||
+ .message-container.user-tock.time-tick
|
||||
.info-container,
|
||||
#chat
|
||||
.message-container.user-tock.time-tock
|
||||
+ .message-container.user-tock.time-tock
|
||||
.info-container {
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
height: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#chat .message-container.sending {
|
||||
opacity: 0.75;
|
||||
}
|
||||
|
||||
#chat .message-container .message-actions-container {
|
||||
position: absolute;
|
||||
top: 0.5rem;
|
||||
right: 0.5rem;
|
||||
display: none; /* flex; */
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
#chat .message-container .message-actions-container .message-action {
|
||||
opacity: 0;
|
||||
transition: 0.2s ease-in-out;
|
||||
width: 0;
|
||||
height: 4rem;
|
||||
overflow: hidden;
|
||||
order: -1;
|
||||
cursor: pointer;
|
||||
margin-right: 1.25rem;
|
||||
padding-top: 0.25rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#chat .message-container .message-actions-container label {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#chat .message-container .message-actions-container input[type="checkbox"] {
|
||||
opacity: 0;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#chat
|
||||
.message-container
|
||||
.message-actions-container
|
||||
input[type="checkbox"]:checked
|
||||
~ .message-action {
|
||||
opacity: 1;
|
||||
width: 4rem;
|
||||
}
|
||||
|
||||
#chat .message-container .message-actions-container .message-action .action-name {
|
||||
font-size: x-small;
|
||||
}
|
||||
|
||||
#chat .message-container .info-container {
|
||||
display: flex;
|
||||
margin-bottom: -1.75rem;
|
||||
height: 3.75rem;
|
||||
}
|
||||
|
||||
#chat .message-container .info-container .avatar-container {
|
||||
display: inline-block;
|
||||
margin: 0 4px;
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
border-radius: 16%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#chat .message-container .info-container .avatar-container img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#chat .message-container .info-container .username-container {
|
||||
margin: 0 4px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#chat .message-container .info-container .datetime-container {
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
#chat .message-container .info-container .datetime-container .long {
|
||||
font-size: x-small;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
#chat .message-container .info-container .datetime-container .short {
|
||||
font-size: xx-small;
|
||||
visibility: hidden;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#chat .message-container .message-content-container {
|
||||
padding-left: 8rem;
|
||||
}
|
||||
|
||||
#chat .embed-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
max-width: 640px;
|
||||
}
|
||||
|
||||
#chat .embed-container .embed-actions-container {
|
||||
position: absolute;
|
||||
z-index: 100;
|
||||
top: 0.25rem;
|
||||
right: 0.25rem;
|
||||
height: 2rem;
|
||||
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
#chat .embed-container audio {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#chat .embed-container.rounded {
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
#chat .embed-container.short {
|
||||
height: 120px;
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
#chat .embed-container.tidal {
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
#chat .embed-container.vertical {
|
||||
max-width: 320px;
|
||||
overflow: hidden;
|
||||
aspect-ratio: 9 / 16 !important;
|
||||
}
|
||||
|
||||
#chat .embed-container.letterbox {
|
||||
/* height: 0; */
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
/* padding-bottom: 33%; */
|
||||
aspect-ratio: 16 / 9 !important;
|
||||
}
|
||||
|
||||
#chat .embed-container.square {
|
||||
overflow: hidden;
|
||||
overflow-y: auto;
|
||||
aspect-ratio: 1 / 1 !important;
|
||||
}
|
||||
|
||||
#chat .embed-container iframe,
|
||||
#chat .embed-container video {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
#chat .sidebar {
|
||||
z-index: 100;
|
||||
background: var(--bg);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
left: -100%;
|
||||
overflow-y: scroll;
|
||||
overflow: visible;
|
||||
transition: all ease-in-out 0.33s;
|
||||
}
|
||||
|
||||
#chat .sidebar #sidebar-toggle-icon {
|
||||
opacity: 1;
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 1rem;
|
||||
right: -2.5rem;
|
||||
cursor: pointer;
|
||||
transition: all ease-in-out 0.33s;
|
||||
background: rgba(128, 128, 128, 0.5);
|
||||
border-radius: 0 1rem 1rem 0;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
#chat .sidebar .icon {
|
||||
transition: all ease-in-out 0.33s;
|
||||
}
|
||||
|
||||
#chat .sidebar:has(#sidebar-toggle:checked) {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
#chat .sidebar:has(#sidebar-toggle:checked) #sidebar-toggle-icon {
|
||||
right: 0;
|
||||
rotate: 180deg;
|
||||
}
|
||||
|
||||
#chat #room-chat-container {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
#chat #room-chat-container #room-chat-entry-container,
|
||||
#chat #room-chat-container #room-chat-entry-container form {
|
||||
padding: 0.25rem;
|
||||
}
|
||||
|
||||
#chat #room-chat-container #room-chat-entry-container form button,
|
||||
#chat #room-chat-container #room-chat-entry-container form label {
|
||||
margin: 0 0.5rem;
|
||||
}
|
||||
|
||||
#chat .message-container .message-content-container {
|
||||
padding-left: 4rem;
|
||||
}
|
||||
|
||||
#chat .message-container .info-container .datetime-container .long {
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#chat .message-container .info-container .datetime-container .short {
|
||||
display: inline-block;
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue