usability improvements
This commit is contained in:
parent
9e968215d5
commit
18c30de121
418
css/main.css
418
css/main.css
@ -570,6 +570,7 @@ sm-button[variant=primary] .icon {
|
||||
box-shadow: 0 0.1rem 0.1rem rgba(0, 0, 0, 0.06);
|
||||
border-radius: 2rem;
|
||||
text-transform: uppercase;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.group-icon {
|
||||
@ -650,6 +651,9 @@ sm-button[variant=primary] .icon {
|
||||
#contact_details_popup .copy-row h4 {
|
||||
font-weight: 400;
|
||||
}
|
||||
#contact_details_popup .group-icon {
|
||||
padding: 0.2rem !important;
|
||||
}
|
||||
#contact_details_popup #contact_initial {
|
||||
height: 3.6rem;
|
||||
width: 3.6rem;
|
||||
@ -668,7 +672,7 @@ sm-button[variant=primary] .icon {
|
||||
background: rgba(var(--text-color), 0.1);
|
||||
}
|
||||
|
||||
#warn_no_encryption, .date-card {
|
||||
#warn_no_encryption, .date-card, .group-event-card {
|
||||
padding: 0.4rem 0.8rem;
|
||||
background: rgba(var(--text-color), 0.1);
|
||||
font-weight: 500;
|
||||
@ -677,6 +681,12 @@ sm-button[variant=primary] .icon {
|
||||
margin: 1rem 0;
|
||||
justify-self: center;
|
||||
align-self: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.group-event-card {
|
||||
font-size: 0.8rem;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
#warn_no_encryption {
|
||||
@ -962,8 +972,10 @@ sm-button[variant=primary] .icon {
|
||||
|
||||
#selected_contacts_container {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr));
|
||||
grid-template-columns: repeat(auto-fill, minmax(3rem, 1fr));
|
||||
gap: 1rem;
|
||||
max-height: 8rem;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
#contacts, #mails {
|
||||
@ -1009,7 +1021,7 @@ sm-button[variant=primary] .icon {
|
||||
width: 0.9rem;
|
||||
}
|
||||
#contacts .header sm-input::part(input), #mails .header sm-input::part(input), #settings_page .header sm-input::part(input) {
|
||||
border-radius: 3rem;
|
||||
border-radius: 0.5rem;
|
||||
padding: 0.2rem 0.8rem;
|
||||
}
|
||||
#contacts .header h4, #mails .header h4, #settings_page .header h4 {
|
||||
@ -1052,114 +1064,101 @@ sm-button[variant=primary] .icon {
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
#chat {
|
||||
#chat_left,
|
||||
#chat_details_panel {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
#chat header {
|
||||
|
||||
#chat_details_panel {
|
||||
background: rgba(var(--text-color), 0.04);
|
||||
padding-bottom: 1.5rem;
|
||||
}
|
||||
#chat_details_panel .card {
|
||||
margin: 0 1rem;
|
||||
padding: 1.5rem 1rem;
|
||||
border-radius: 0.8rem;
|
||||
background: rgba(var(--text-color), 0.04);
|
||||
}
|
||||
#chat_details_panel .card:not(:last-of-type) {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
#chat_details_panel .card > h4 {
|
||||
font-weight: 400;
|
||||
font-size: 0.9rem;
|
||||
color: rgba(var(--text-color), 0.8);
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
#chat_details_panel header {
|
||||
padding: 1rem;
|
||||
min-height: 4rem;
|
||||
grid-template-columns: auto 1fr auto;
|
||||
}
|
||||
#chat header .back-button {
|
||||
padding: 0.1rem;
|
||||
stroke-width: 8;
|
||||
margin-right: 0.5rem;
|
||||
stroke: rgba(var(--text-color), 0.8);
|
||||
}
|
||||
#chat header .initial {
|
||||
#chat_details_panel header .icon {
|
||||
height: 2.3rem;
|
||||
width: 2.3rem;
|
||||
padding: 0.7rem;
|
||||
cursor: pointer;
|
||||
margin-right: 1rem;
|
||||
height: 2.2rem;
|
||||
width: 2.2rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
#chat header h4 {
|
||||
#chat_details_panel .contact {
|
||||
padding: 0.5rem 0;
|
||||
}
|
||||
#chat_details_panel #chat_profile {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
margin-top: 1.5rem;
|
||||
padding-bottom: 1.5rem;
|
||||
}
|
||||
#chat_details_panel #chat_profile .initial {
|
||||
margin-top: -5.5rem;
|
||||
margin-bottom: 1rem;
|
||||
height: 8rem;
|
||||
width: 8rem;
|
||||
border-radius: 50%;
|
||||
font-size: 4rem;
|
||||
}
|
||||
#chat_details_panel #chat_profile .initial .icon {
|
||||
height: 4rem;
|
||||
width: 4rem;
|
||||
}
|
||||
#chat_details_panel #chat_profile #chat_name {
|
||||
font-weight: 500;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
#chat_details_panel #chat_profile #last_interaction_time {
|
||||
color: rgba(var(--text-color), 0.7);
|
||||
font-size: 0.9rem;
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
#chat header #receiver_name {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
#chat_details_panel .copy {
|
||||
font-weight: 400;
|
||||
}
|
||||
#chat #scroll_to_bottom {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
bottom: 4rem;
|
||||
width: 2.6rem;
|
||||
height: 2.6rem;
|
||||
padding: 0.9rem;
|
||||
border-radius: 4rem;
|
||||
z-index: 1;
|
||||
margin: 1.5rem;
|
||||
stroke-width: 8;
|
||||
cursor: pointer;
|
||||
transform: scale(0);
|
||||
transition: transform 0.3s;
|
||||
}
|
||||
#chat footer #emoji_toggle {
|
||||
align-self: center;
|
||||
padding: 0.6rem;
|
||||
width: 2.6rem;
|
||||
height: 2.6rem;
|
||||
border-radius: 2rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
#chat footer #emoji_toggle path {
|
||||
fill: rgba(var(--text-color), 0.5);
|
||||
}
|
||||
#chat footer #emoji_toggle.active path {
|
||||
fill: var(--accent-color);
|
||||
}
|
||||
#chat footer .flex {
|
||||
align-items: flex-end;
|
||||
padding: 1rem 1rem 1rem 0.4rem;
|
||||
}
|
||||
#chat footer sm-textarea::part(textarea) {
|
||||
background: rgba(var(--text-color), 0.1);
|
||||
padding-right: 3rem;
|
||||
border-radius: 2rem;
|
||||
}
|
||||
#chat #send_message_button {
|
||||
position: absolute;
|
||||
right: 1.5rem;
|
||||
transform: scale(0);
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
z-index: 1;
|
||||
align-self: center;
|
||||
height: 2.4rem;
|
||||
width: 2.4rem;
|
||||
padding: 0.5rem;
|
||||
cursor: pointer;
|
||||
stroke: none;
|
||||
fill: rgba(var(--text-color), 0.4);
|
||||
margin-left: 1rem;
|
||||
transition: 0.3s;
|
||||
}
|
||||
#chat #send_message_button.active {
|
||||
opacity: 1;
|
||||
fill: var(--accent-color);
|
||||
transform: none;
|
||||
pointer-events: all;
|
||||
}
|
||||
#chat #type_message {
|
||||
margin: 0;
|
||||
|
||||
#chat {
|
||||
position: relative;
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
#chat .message {
|
||||
position: relative;
|
||||
display: grid;
|
||||
align-items: center;
|
||||
gap: 0.2rem;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: auto;
|
||||
font-size: 0.92rem;
|
||||
max-width: max-content;
|
||||
margin-bottom: 0.2rem;
|
||||
margin-top: 0.8rem;
|
||||
padding: 0.6em 1em;
|
||||
transition: opacity 0.3s, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||
}
|
||||
#chat .message .sender-name {
|
||||
font-size: 0.85rem;
|
||||
font-weight: 500;
|
||||
margin-bottom: 0.3rem;
|
||||
}
|
||||
#chat .message .message-body {
|
||||
display: inline-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
overflow-wrap: break-word;
|
||||
@ -1170,7 +1169,7 @@ sm-button[variant=primary] .icon {
|
||||
-webkit-hyphens: auto;
|
||||
hyphens: auto;
|
||||
white-space: pre-wrap;
|
||||
line-height: 1.6;
|
||||
line-height: 1.5;
|
||||
}
|
||||
#chat .message .message-body a {
|
||||
color: inherit;
|
||||
@ -1184,12 +1183,16 @@ sm-button[variant=primary] .icon {
|
||||
white-space: nowrap;
|
||||
font-size: 0.8em;
|
||||
opacity: 0.8;
|
||||
justify-self: flex-end;
|
||||
padding-left: 1rem;
|
||||
align-self: flex-end;
|
||||
margin-top: 0.2rem;
|
||||
}
|
||||
#chat .sent {
|
||||
margin-left: auto;
|
||||
color: #efefef;
|
||||
background: var(--accent-color);
|
||||
color: #f0f0f0;
|
||||
border-radius: 1em 0 1em 1em;
|
||||
border-radius: 0.8rem 0 0.8rem 0.8rem;
|
||||
}
|
||||
#chat .sent::after {
|
||||
content: "";
|
||||
@ -1202,12 +1205,9 @@ sm-button[variant=primary] .icon {
|
||||
border-width: 0.5em 0.3em 0 0;
|
||||
border-color: var(--accent-color) transparent transparent transparent;
|
||||
}
|
||||
#chat .sent .time {
|
||||
margin-left: auto;
|
||||
}
|
||||
#chat .received {
|
||||
background: rgba(var(--text-color), 0.1);
|
||||
border-radius: 0 1em 1em 1em;
|
||||
border-radius: 0 0.8rem 0.8rem 0.8rem;
|
||||
}
|
||||
#chat .received::after {
|
||||
content: "";
|
||||
@ -1230,31 +1230,144 @@ sm-button[variant=primary] .icon {
|
||||
}
|
||||
#chat .sent + .sent,
|
||||
#chat .received + .received {
|
||||
border-radius: 1em;
|
||||
border-radius: 0.8rem;
|
||||
}
|
||||
#chat .unconfirmed {
|
||||
opacity: 0.7;
|
||||
transform-origin: right;
|
||||
animation: slide-up 0.3s forwards;
|
||||
transform-origin: left;
|
||||
animation: pop 0.3s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||
}
|
||||
|
||||
@keyframes slide-up {
|
||||
from {
|
||||
transform: translateY(-2rem);
|
||||
@keyframes pop {
|
||||
0% {
|
||||
transform: rotate(5deg) translate(-0.5rem, 1rem);
|
||||
}
|
||||
to {
|
||||
transform: none;
|
||||
100% {
|
||||
transform: rotate(0) translate(0, 0);
|
||||
}
|
||||
}
|
||||
#chat_header {
|
||||
padding: 1rem;
|
||||
min-height: 4rem;
|
||||
grid-template-columns: auto 1fr auto;
|
||||
}
|
||||
#chat_header .back-button {
|
||||
height: 2rem;
|
||||
width: 2rem;
|
||||
padding: 0.5rem;
|
||||
stroke-width: 8;
|
||||
margin-right: 0.5rem;
|
||||
stroke: rgba(var(--text-color), 0.8);
|
||||
}
|
||||
#chat_header .initial {
|
||||
cursor: pointer;
|
||||
margin-right: 1rem;
|
||||
height: 2.2rem;
|
||||
width: 2.2rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
#chat_header #receiver_name {
|
||||
font-weight: 500;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#scroll_to_bottom {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
right: 0;
|
||||
bottom: 4rem;
|
||||
border-radius: 4rem;
|
||||
z-index: 1;
|
||||
aspect-ratio: 1/1;
|
||||
margin: 1.5rem;
|
||||
cursor: pointer;
|
||||
transform: scale(0);
|
||||
transition: transform 0.3s;
|
||||
}
|
||||
#scroll_to_bottom.new-message::after {
|
||||
position: absolute;
|
||||
content: "";
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 2;
|
||||
padding: 0.5rem;
|
||||
border-radius: 50%;
|
||||
background: #00E676;
|
||||
}
|
||||
#scroll_to_bottom .icon {
|
||||
width: 2.6rem;
|
||||
height: 2.6rem;
|
||||
padding: 0.9rem;
|
||||
stroke-width: 8;
|
||||
}
|
||||
|
||||
#chat_footer #emoji_toggle {
|
||||
align-self: center;
|
||||
padding: 0.6rem;
|
||||
margin-right: 0.5rem;
|
||||
width: 2.6rem;
|
||||
height: 2.6rem;
|
||||
border-radius: 2rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
#chat_footer #emoji_toggle path {
|
||||
fill: rgba(var(--text-color), 0.5);
|
||||
}
|
||||
#chat_footer #emoji_toggle.active path {
|
||||
fill: var(--accent-color);
|
||||
}
|
||||
#chat_footer .flex {
|
||||
align-items: flex-end;
|
||||
padding: 1rem 1rem 1rem 0.4rem;
|
||||
}
|
||||
#chat_footer sm-textarea::part(textarea) {
|
||||
padding-right: 3rem;
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
|
||||
#send_message_button {
|
||||
position: absolute;
|
||||
right: 1.5rem;
|
||||
transform: scale(0);
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
z-index: 1;
|
||||
align-self: center;
|
||||
height: 2.4rem;
|
||||
width: 2.4rem;
|
||||
padding: 0.5rem;
|
||||
cursor: pointer;
|
||||
stroke: none;
|
||||
fill: rgba(var(--text-color), 0.4);
|
||||
margin-left: 1rem;
|
||||
transition: 0.3s;
|
||||
}
|
||||
#send_message_button.active {
|
||||
opacity: 1;
|
||||
fill: var(--accent-color);
|
||||
transform: none;
|
||||
pointer-events: all;
|
||||
}
|
||||
|
||||
#type_message {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.big-emoji .message-body {
|
||||
font-size: 2.6rem;
|
||||
}
|
||||
|
||||
#messages_container {
|
||||
#chat_middle {
|
||||
flex: 1;
|
||||
padding: 0 1rem;
|
||||
}
|
||||
|
||||
#messages_container {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#emoji_picker {
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
@ -1279,6 +1392,7 @@ sm-button[variant=primary] .icon {
|
||||
background: linear-gradient(rgba(var(--text-color), 0.06), rgba(var(--text-color), 0.06)), rgba(var(--foreground-color), 1);
|
||||
padding: 1rem 0;
|
||||
z-index: 1;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.emoji {
|
||||
@ -1313,7 +1427,7 @@ sm-button[variant=primary] .icon {
|
||||
stroke: rgba(var(--text-color), 0.4);
|
||||
}
|
||||
|
||||
#messages_container,
|
||||
#chat_middle,
|
||||
#chat_container,
|
||||
#inbox_mail_container,
|
||||
#sent_mail_container,
|
||||
@ -1480,7 +1594,7 @@ sm-panel {
|
||||
}
|
||||
|
||||
#main_navbar {
|
||||
transform: translateX(-100%);
|
||||
transform: translateX(-110%);
|
||||
transition: transform 0.3s;
|
||||
z-index: 4;
|
||||
box-shadow: 0 0 1rem rgba(0, 0, 0, 0.3);
|
||||
@ -1522,18 +1636,6 @@ sm-panel {
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 640px) {
|
||||
::-webkit-scrollbar {
|
||||
width: 0.5rem;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: rgba(var(--text-color), 0.3);
|
||||
border-radius: 1rem;
|
||||
}
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: rgba(var(--text-color), 0.5);
|
||||
}
|
||||
|
||||
.hide-on-desktop {
|
||||
display: none !important;
|
||||
}
|
||||
@ -1575,11 +1677,13 @@ sm-panel {
|
||||
width: auto;
|
||||
padding-bottom: 0.5rem;
|
||||
background: rgba(var(--text-color), 0.06);
|
||||
margin: 0.5rem;
|
||||
border-radius: 0.8rem;
|
||||
}
|
||||
#main_navbar .logo-section {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin: 1.5rem 0;
|
||||
margin: 1rem 0 2rem 0;
|
||||
}
|
||||
#main_navbar .logo-section .main-logo {
|
||||
margin: 0;
|
||||
@ -1614,20 +1718,19 @@ sm-panel {
|
||||
max-height: 18rem;
|
||||
}
|
||||
|
||||
#chat .message .message-body {
|
||||
max-width: 65ch;
|
||||
#chat .message {
|
||||
width: auto;
|
||||
align-self: flex-start;
|
||||
max-width: 55ch;
|
||||
}
|
||||
|
||||
#chat_page, #mail_page {
|
||||
grid-template-columns: 20rem 1fr;
|
||||
box-shadow: 0 0 1rem rgba(0, 0, 0, 0.1);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
#settings_page {
|
||||
display: grid;
|
||||
height: 100vh;
|
||||
box-shadow: 0 0 1rem rgba(0, 0, 0, 0.1);
|
||||
grid-template-columns: 14rem 1fr;
|
||||
}
|
||||
#settings_page sm-button {
|
||||
@ -1655,6 +1758,16 @@ sm-panel {
|
||||
max-height: 100vh;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width: 1280px) {
|
||||
.hide-on-medium {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 1080px) {
|
||||
#chat #messages_container {
|
||||
padding: 1rem 5rem;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 1280px) {
|
||||
#landing {
|
||||
gap: 4vw;
|
||||
@ -1668,31 +1781,62 @@ sm-panel {
|
||||
grid-template-columns: 21rem 1fr;
|
||||
}
|
||||
|
||||
#chat header {
|
||||
padding: 0.8rem 1.5rem;
|
||||
#chat_details_panel {
|
||||
position: relative;
|
||||
}
|
||||
#chat #messages_container {
|
||||
padding: 1rem 5rem;
|
||||
|
||||
#chat.expand-side-panel {
|
||||
grid-template-columns: 1fr 24rem;
|
||||
}
|
||||
#chat.expand-side-panel #messages_container {
|
||||
padding: 1rem;
|
||||
}
|
||||
#chat .active {
|
||||
background: rgba(var(--text-color), 0.1);
|
||||
}
|
||||
|
||||
.contact.active,
|
||||
.mail-card.active {
|
||||
background: rgba(var(--text-color), 0.06);
|
||||
}
|
||||
|
||||
.card {
|
||||
display: inline-flex;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
#settings_panel {
|
||||
overflow-y: auto;
|
||||
max-height: 100vh;
|
||||
}
|
||||
}
|
||||
@media (hover: hover) {
|
||||
.contact:hover, .mail-card:hover, .navbar-item:hover {
|
||||
background: rgba(var(--text-color), 0.06);
|
||||
cursor: pointer;
|
||||
::-webkit-scrollbar {
|
||||
width: 0.5rem;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: rgba(var(--text-color), 0.3);
|
||||
border-radius: 1rem;
|
||||
}
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: rgba(var(--text-color), 0.5);
|
||||
}
|
||||
|
||||
.contact {
|
||||
cursor: pointer;
|
||||
}
|
||||
.contact .menu {
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s;
|
||||
}
|
||||
|
||||
.contact:hover {
|
||||
background: rgba(var(--text-color), 0.06);
|
||||
}
|
||||
.contact:hover .menu {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.emoji:hover {
|
||||
background: rgba(var(--text-color), 0.1);
|
||||
}
|
||||
}
|
||||
@media (hover: none) {
|
||||
.contact .menu {
|
||||
|
||||
2
css/main.min.css
vendored
2
css/main.min.css
vendored
File diff suppressed because one or more lines are too long
415
css/main.scss
415
css/main.scss
@ -520,6 +520,7 @@ sm-button[variant="primary"]{
|
||||
box-shadow: 0 0.1rem 0.1rem rgba(0, 0, 0, 0.06);
|
||||
border-radius: 2rem;
|
||||
text-transform: uppercase;
|
||||
user-select: none;
|
||||
}
|
||||
.group-icon{
|
||||
height: 1.6rem;
|
||||
@ -602,6 +603,9 @@ sm-button[variant="primary"]{
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
.group-icon{
|
||||
padding: 0.2rem !important;
|
||||
}
|
||||
#contact_initial{
|
||||
height: 3.6rem;
|
||||
width: 3.6rem;
|
||||
@ -620,7 +624,7 @@ sm-button[variant="primary"]{
|
||||
}
|
||||
}
|
||||
}
|
||||
#warn_no_encryption, .date-card{
|
||||
#warn_no_encryption, .date-card, .group-event-card{
|
||||
padding: 0.4rem 0.8rem;
|
||||
background: rgba(var(--text-color), 0.1);
|
||||
font-weight: 500;
|
||||
@ -629,6 +633,11 @@ sm-button[variant="primary"]{
|
||||
margin: 1rem 0;
|
||||
justify-self: center;
|
||||
align-self: center;
|
||||
text-align: center;
|
||||
}
|
||||
.group-event-card{
|
||||
font-size: 0.8rem;
|
||||
font-weight: 400;
|
||||
}
|
||||
#warn_no_encryption{
|
||||
background: rgb(255, 253, 141);
|
||||
@ -900,8 +909,10 @@ sm-button[variant="primary"]{
|
||||
}
|
||||
#selected_contacts_container{
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr));
|
||||
grid-template-columns: repeat(auto-fill, minmax(3rem, 1fr));
|
||||
gap: 1rem;
|
||||
max-height: 8rem;
|
||||
overflow-y: auto;
|
||||
}
|
||||
#contacts, #mails{
|
||||
position: relative;
|
||||
@ -945,7 +956,7 @@ sm-button[variant="primary"]{
|
||||
}
|
||||
}
|
||||
sm-input::part(input){
|
||||
border-radius: 3rem;
|
||||
border-radius: 0.5rem;
|
||||
padding: 0.2rem 0.8rem;
|
||||
}
|
||||
h4{
|
||||
@ -990,114 +1001,97 @@ sm-button[variant="primary"]{
|
||||
#chat_page{
|
||||
overflow-y: hidden;
|
||||
}
|
||||
#chat{
|
||||
#chat_left,
|
||||
#chat_details_panel{
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
}
|
||||
#chat_details_panel{
|
||||
background: rgba(var(--text-color), 0.04);
|
||||
padding-bottom: 1.5rem;
|
||||
.card{
|
||||
margin: 0 1rem;
|
||||
padding: 1.5rem 1rem;
|
||||
border-radius: 0.8rem;
|
||||
background: rgba(var(--text-color), 0.04);
|
||||
&:not(:last-of-type){
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
& > h4{
|
||||
font-weight: 400;
|
||||
font-size: 0.9rem;
|
||||
color: rgba(var(--text-color), 0.8);
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
}
|
||||
header{
|
||||
padding: 1rem;
|
||||
min-height: 4rem;
|
||||
grid-template-columns: auto 1fr auto;
|
||||
.back-button{
|
||||
padding: 0.1rem;
|
||||
stroke-width: 8;
|
||||
margin-right: 0.5rem;
|
||||
stroke: rgba(var(--text-color), 0.8);
|
||||
.icon{
|
||||
height: 2.3rem;
|
||||
width: 2.3rem;
|
||||
padding: 0.7rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.contact{
|
||||
padding: 0.5rem 0;
|
||||
}
|
||||
#chat_profile{
|
||||
display: grid;
|
||||
place-items: center;
|
||||
margin-top: 1.5rem;
|
||||
padding-bottom: 1.5rem;
|
||||
.initial{
|
||||
cursor: pointer;
|
||||
margin-right: 1rem;
|
||||
height: 2.2rem;
|
||||
width: 2.2rem;
|
||||
flex-shrink: 0;
|
||||
margin-top: -5.5rem;
|
||||
margin-bottom: 1rem;
|
||||
height: 8rem;
|
||||
width: 8rem;
|
||||
border-radius: 50%;
|
||||
font-size: 4rem;
|
||||
.icon{
|
||||
height: 4rem;
|
||||
width: 4rem;
|
||||
}
|
||||
}
|
||||
h4{
|
||||
#chat_name{
|
||||
font-weight: 500;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
#last_interaction_time{
|
||||
color: rgba(var(--text-color), 0.7);
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
#receiver_name{
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
}
|
||||
#scroll_to_bottom{
|
||||
position: fixed;
|
||||
right: 0;
|
||||
bottom: 4rem;
|
||||
width: 2.6rem;
|
||||
height: 2.6rem;
|
||||
padding: 0.9rem;
|
||||
border-radius: 4rem;
|
||||
z-index: 1;
|
||||
margin: 1.5rem;
|
||||
stroke-width: 8;
|
||||
cursor: pointer;
|
||||
transform: scale(0);
|
||||
transition: transform 0.3s;
|
||||
}
|
||||
footer{
|
||||
#emoji_toggle{
|
||||
align-self: center;
|
||||
padding: 0.6rem;
|
||||
width: 2.6rem;
|
||||
height: 2.6rem;
|
||||
border-radius: 2rem;
|
||||
cursor: pointer;
|
||||
path{
|
||||
fill: rgba(var(--text-color), 0.5);
|
||||
}
|
||||
&.active path{
|
||||
fill: var(--accent-color);
|
||||
}
|
||||
}
|
||||
.flex{
|
||||
align-items: flex-end;
|
||||
padding: 1rem 1rem 1rem 0.4rem;
|
||||
}
|
||||
sm-textarea::part(textarea){
|
||||
background: rgba(var(--text-color), 0.1);
|
||||
padding-right: 3rem;
|
||||
border-radius: 2rem;
|
||||
}
|
||||
}
|
||||
#send_message_button{
|
||||
position: absolute;
|
||||
right: 1.5rem;
|
||||
transform: scale(0);
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
z-index: 1;
|
||||
align-self: center;
|
||||
height: 2.4rem;
|
||||
width: 2.4rem;
|
||||
padding: 0.5rem;
|
||||
cursor: pointer;
|
||||
stroke: none;
|
||||
fill: rgba(var(--text-color), 0.4);
|
||||
margin-left: 1rem;
|
||||
transition: 0.3s;
|
||||
&.active{
|
||||
opacity: 1;
|
||||
fill: var(--accent-color);
|
||||
transform: none;
|
||||
pointer-events: all;
|
||||
}
|
||||
}
|
||||
#type_message{
|
||||
margin: 0;
|
||||
.copy{
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
#chat{
|
||||
position: relative;
|
||||
grid-template-columns: 1fr;
|
||||
.message{
|
||||
position: relative;
|
||||
display: grid;
|
||||
align-items: center;
|
||||
gap: 0.2rem;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: auto;
|
||||
font-size: 0.92rem;
|
||||
max-width: max-content;
|
||||
margin-bottom: 0.2rem;
|
||||
margin-top: 0.8rem;
|
||||
padding: 0.6em 1em;
|
||||
transition: opacity 0.3s, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||
.sender-name{
|
||||
font-size: 0.85rem;
|
||||
font-weight: 500;
|
||||
margin-bottom: 0.3rem;
|
||||
}
|
||||
.message-body{
|
||||
display: inline-flex;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
overflow-wrap: break-word;
|
||||
@ -1108,7 +1102,7 @@ sm-button[variant="primary"]{
|
||||
-webkit-hyphens: auto;
|
||||
hyphens: auto;
|
||||
white-space: pre-wrap;
|
||||
line-height: 1.6;
|
||||
line-height: 1.5;
|
||||
a{
|
||||
color: inherit;
|
||||
}
|
||||
@ -1122,13 +1116,17 @@ sm-button[variant="primary"]{
|
||||
white-space: nowrap;
|
||||
font-size: 0.8em;
|
||||
opacity: 0.8;
|
||||
justify-self: flex-end;
|
||||
padding-left: 1rem;
|
||||
align-self: flex-end;
|
||||
margin-top: 0.2rem;
|
||||
}
|
||||
}
|
||||
.sent{
|
||||
margin-left: auto;
|
||||
color: #efefef;
|
||||
background: var(--accent-color);
|
||||
color: #f0f0f0;
|
||||
border-radius: 1em 0 1em 1em;
|
||||
border-radius: 0.8rem 0 0.8rem 0.8rem;
|
||||
&::after{
|
||||
content: '';
|
||||
position: absolute;
|
||||
@ -1140,13 +1138,10 @@ sm-button[variant="primary"]{
|
||||
border-width: 0.5em 0.3em 0 0;
|
||||
border-color: var(--accent-color) transparent transparent transparent;
|
||||
}
|
||||
.time{
|
||||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
.received{
|
||||
background: rgba(var(--text-color), 0.1);
|
||||
border-radius: 0 1em 1em 1em;
|
||||
border-radius: 0 0.8rem 0.8rem 0.8rem;
|
||||
&::after{
|
||||
content: '';
|
||||
position: absolute;
|
||||
@ -1169,31 +1164,140 @@ sm-button[variant="primary"]{
|
||||
}
|
||||
.sent + .sent,
|
||||
.received + .received{
|
||||
border-radius: 1em;
|
||||
border-radius: 0.8rem;
|
||||
}
|
||||
.unconfirmed{
|
||||
opacity: 0.7;
|
||||
transform-origin: right;
|
||||
animation: slide-up 0.3s forwards;
|
||||
transform-origin: left;
|
||||
animation: pop .3s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||
}
|
||||
}
|
||||
@keyframes slide-up{
|
||||
from{
|
||||
transform: translateY(-2rem);
|
||||
@keyframes pop{
|
||||
0%{
|
||||
transform: rotate(5deg) translate(-0.5rem, 1rem)
|
||||
}
|
||||
to{
|
||||
100%{
|
||||
transform: rotate(0) translate(0, 0)
|
||||
}
|
||||
}
|
||||
#chat_header{
|
||||
padding: 1rem;
|
||||
min-height: 4rem;
|
||||
grid-template-columns: auto 1fr auto;
|
||||
.back-button{
|
||||
height: 2rem;
|
||||
width: 2rem;
|
||||
padding: 0.5rem;
|
||||
stroke-width: 8;
|
||||
margin-right: 0.5rem;
|
||||
stroke: rgba(var(--text-color), 0.8);
|
||||
}
|
||||
.initial{
|
||||
cursor: pointer;
|
||||
margin-right: 1rem;
|
||||
height: 2.2rem;
|
||||
width: 2.2rem;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
#receiver_name{
|
||||
font-weight: 500;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
#scroll_to_bottom{
|
||||
position: absolute;
|
||||
display: flex;
|
||||
right: 0;
|
||||
bottom: 4rem;
|
||||
border-radius: 4rem;
|
||||
z-index: 1;
|
||||
aspect-ratio: 1/1;
|
||||
margin: 1.5rem;
|
||||
cursor: pointer;
|
||||
transform: scale(0);
|
||||
transition: transform 0.3s;
|
||||
&.new-message::after{
|
||||
position: absolute;
|
||||
content: '';
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 2;
|
||||
padding: 0.5rem;
|
||||
border-radius: 50%;
|
||||
background: #00E676;
|
||||
}
|
||||
.icon{
|
||||
width: 2.6rem;
|
||||
height: 2.6rem;
|
||||
padding: 0.9rem;
|
||||
stroke-width: 8;
|
||||
}
|
||||
}
|
||||
#chat_footer{
|
||||
#emoji_toggle{
|
||||
align-self: center;
|
||||
padding: 0.6rem;
|
||||
margin-right: 0.5rem;
|
||||
width: 2.6rem;
|
||||
height: 2.6rem;
|
||||
border-radius: 2rem;
|
||||
cursor: pointer;
|
||||
path{
|
||||
fill: rgba(var(--text-color), 0.5);
|
||||
}
|
||||
&.active path{
|
||||
fill: var(--accent-color);
|
||||
}
|
||||
}
|
||||
.flex{
|
||||
align-items: flex-end;
|
||||
padding: 1rem 1rem 1rem 0.4rem;
|
||||
}
|
||||
sm-textarea::part(textarea){
|
||||
padding-right: 3rem;
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
}
|
||||
#send_message_button{
|
||||
position: absolute;
|
||||
right: 1.5rem;
|
||||
transform: scale(0);
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
z-index: 1;
|
||||
align-self: center;
|
||||
height: 2.4rem;
|
||||
width: 2.4rem;
|
||||
padding: 0.5rem;
|
||||
cursor: pointer;
|
||||
stroke: none;
|
||||
fill: rgba(var(--text-color), 0.4);
|
||||
margin-left: 1rem;
|
||||
transition: 0.3s;
|
||||
&.active{
|
||||
opacity: 1;
|
||||
fill: var(--accent-color);
|
||||
transform: none;
|
||||
pointer-events: all;
|
||||
}
|
||||
}
|
||||
#type_message{
|
||||
margin: 0;
|
||||
}
|
||||
.big-emoji{
|
||||
.message-body{
|
||||
font-size: 2.6rem;
|
||||
}
|
||||
}
|
||||
#messages_container{
|
||||
#chat_middle{
|
||||
flex: 1;
|
||||
padding: 0 1rem;
|
||||
}
|
||||
#messages_container{
|
||||
height: 100%;
|
||||
}
|
||||
#emoji_picker{
|
||||
display: grid;
|
||||
gap: 1rem;
|
||||
@ -1217,6 +1321,7 @@ sm-button[variant="primary"]{
|
||||
background: linear-gradient(rgba(var(--text-color), 0.06), rgba(var(--text-color), 0.06)), rgba(var(--foreground-color), 1);
|
||||
padding: 1rem 0;
|
||||
z-index: 1;
|
||||
user-select: none;
|
||||
}
|
||||
}
|
||||
.emoji{
|
||||
@ -1249,7 +1354,7 @@ sm-button[variant="primary"]{
|
||||
stroke-width: 16;
|
||||
stroke: rgba(var(--text-color), 0.4);
|
||||
}
|
||||
#messages_container,
|
||||
#chat_middle,
|
||||
#chat_container,
|
||||
#inbox_mail_container,
|
||||
#sent_mail_container,
|
||||
@ -1405,7 +1510,7 @@ sm-panel{
|
||||
grid-area: illustration;
|
||||
}
|
||||
#main_navbar{
|
||||
transform: translateX(-100%);
|
||||
transform: translateX(-110%);
|
||||
transition: transform 0.3s;
|
||||
z-index: 4;
|
||||
box-shadow: 0 0 1rem rgba(0, 0, 0, 0.3);
|
||||
@ -1445,17 +1550,6 @@ sm-panel{
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 640px){
|
||||
::-webkit-scrollbar{
|
||||
width: 0.5rem;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb{
|
||||
background: rgba(var(--text-color), 0.3);
|
||||
border-radius: 1rem;
|
||||
&:hover{
|
||||
background: rgba(var(--text-color), 0.5);
|
||||
}
|
||||
}
|
||||
.hide-on-desktop{
|
||||
display: none !important;
|
||||
}
|
||||
@ -1494,10 +1588,12 @@ sm-panel{
|
||||
width: auto;
|
||||
padding-bottom: 0.5rem;
|
||||
background: rgba(var(--text-color), 0.06);
|
||||
margin: 0.5rem;
|
||||
border-radius: 0.8rem;
|
||||
.logo-section{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin: 1.5rem 0;
|
||||
margin: 1rem 0 2rem 0;
|
||||
.main-logo{
|
||||
margin: 0;
|
||||
}
|
||||
@ -1530,20 +1626,17 @@ sm-panel{
|
||||
}
|
||||
#chat{
|
||||
.message{
|
||||
.message-body{
|
||||
max-width: 65ch ;
|
||||
}
|
||||
width: auto;
|
||||
align-self: flex-start;
|
||||
max-width: 55ch;
|
||||
}
|
||||
}
|
||||
#chat_page, #mail_page{
|
||||
grid-template-columns: 20rem 1fr;
|
||||
box-shadow: 0 0 1rem rgba(0, 0, 0, 0.1);
|
||||
z-index: 1;
|
||||
}
|
||||
#settings_page{
|
||||
display: grid;
|
||||
height: 100vh;
|
||||
box-shadow: 0 0 1rem rgba(0, 0, 0, 0.1);
|
||||
grid-template-columns: 14rem 1fr;
|
||||
sm-button{
|
||||
width: max-content;
|
||||
@ -1568,6 +1661,18 @@ sm-panel{
|
||||
max-height: 100vh;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width: 1280px){
|
||||
.hide-on-medium{
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 1080px){
|
||||
#chat{
|
||||
#messages_container{
|
||||
padding: 1rem 5rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 1280px){
|
||||
#landing{
|
||||
gap: 4vw;
|
||||
@ -1579,29 +1684,57 @@ sm-panel{
|
||||
#chat_page, #mail_page{
|
||||
grid-template-columns: 21rem 1fr;
|
||||
}
|
||||
#chat_details_panel{
|
||||
position: relative;
|
||||
}
|
||||
#chat{
|
||||
header{
|
||||
padding: 0.8rem 1.5rem;
|
||||
&.expand-side-panel{
|
||||
grid-template-columns: 1fr 24rem;
|
||||
#messages_container{
|
||||
padding: 1rem;
|
||||
}
|
||||
}
|
||||
#messages_container{
|
||||
padding: 1rem 5rem;
|
||||
.active{
|
||||
background: rgba(var(--text-color), 0.1);
|
||||
}
|
||||
}
|
||||
.contact.active,
|
||||
.mail-card.active{
|
||||
background: rgba(var(--text-color), 0.06);
|
||||
}
|
||||
.card{
|
||||
display: inline-flex;
|
||||
width: auto;
|
||||
}
|
||||
#settings_panel{
|
||||
overflow-y: auto;
|
||||
max-height: 100vh;
|
||||
}
|
||||
}
|
||||
@media (hover: hover){
|
||||
.contact:hover, .mail-card:hover, .navbar-item:hover{
|
||||
background: rgba(var(--text-color), 0.06);
|
||||
::-webkit-scrollbar{
|
||||
width: 0.5rem;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb{
|
||||
background: rgba(var(--text-color), 0.3);
|
||||
border-radius: 1rem;
|
||||
&:hover{
|
||||
background: rgba(var(--text-color), 0.5);
|
||||
}
|
||||
}
|
||||
.contact{
|
||||
cursor: pointer;
|
||||
.menu{
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s;
|
||||
}
|
||||
}
|
||||
.contact .menu{
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s;
|
||||
}
|
||||
.contact:hover .menu{
|
||||
opacity: 1;
|
||||
}
|
||||
.emoji:hover{
|
||||
background: rgba(var(--text-color), 0.1);
|
||||
.contact:hover{
|
||||
background: rgba(var(--text-color), 0.06);
|
||||
.menu{
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@media (hover: none){
|
||||
|
||||
788
index.html
788
index.html
File diff suppressed because it is too large
Load Diff
@ -2070,6 +2070,7 @@ customElements.define('sm-popup', class extends HTMLElement {
|
||||
cancelAnimationFrame(this.touchEndAnimataion)
|
||||
this.touchEndY = e.changedTouches[0].clientY
|
||||
this.popup.style.transition = 'transform 0.3s'
|
||||
this.threshold = this.popup.getBoundingClientRect().height * 0.3
|
||||
if (this.touchEndTime - this.touchStartTime > 200) {
|
||||
if (this.touchEndY - this.touchStartY > this.threshold) {
|
||||
if (this.pinned) {
|
||||
@ -2108,7 +2109,7 @@ customElements.define('sm-popup', class extends HTMLElement {
|
||||
this.touchStartTime = 0
|
||||
this.touchEndTime = 0
|
||||
this.touchEndAnimataion;
|
||||
this.threshold
|
||||
this.threshold = this.popup.getBoundingClientRect().height * 0.3
|
||||
|
||||
if (this.hasAttribute('open'))
|
||||
this.show()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user