AIRA/src/frontend/index.css

523 lines
10 KiB
CSS

:root {
--button-background: #52585C
}
body {
margin: 0;
height: 100%;
}
main {
display: grid;
grid-template-columns: 25% auto;
height: 100%;
}
.panel {
padding-left: 20px;
padding-right: 20px;
display: flex;
flex-direction: column;
}
ul {
list-style-type: none;
padding: 0;
margin: 0;
}
button {
background-color: var(--transparent);
border: none;
cursor: pointer;
}
button::after {
background-color: var(--button-background);
border-radius: 100%;
display: block;
width: 20px;
height: 20px;
padding: 8px;
}
button:hover::after {
background-color: var(--accent);
}
.classic_button {
background-color: var(--button-background);
color: white;
cursor: pointer;
padding: 10px 20px;
border-radius: 8px;
font-weight: bold;
}
.classic_button:hover {
background-color: var(--accent);
}
input[type="file"] {
display: none;
}
.file_picker {
display: flex;
align-items: center;
cursor: pointer;
}
.file_picker::after {
content: url("/static/imgs/icons/attach/ACCENT_COLOR");
width: 2em;
}
.popup {
position: absolute;
top: 50%;
transform: translateY(-50%);
left: 0;
right: 0;
margin: auto;
width: 40vw;
max-height: 90vh;
overflow: auto;
box-sizing: border-box;
padding: 20px 70px 10px;
background-color: #2B2F31;
border-radius: 10px;
font-size: 1.2em;
}
.popup:last-child::after {
content: "";
display: block;
height: 20px;
width: 100%;
}
.popup_background {
height: 100%;
width: 100%;
position: absolute;
background-color: rgba(0, 0, 0, .5);
z-index: 2;
}
.popup .close {
background-color: unset;
position: absolute;
right: 0;
top: 6px;
}
.popup .close:hover {
background-color: unset;
}
.popup .close::after {
content: url("/static/imgs/icons/cancel");
background-color: unset;
}
.popup h2.warning::before {
content: url("/static/imgs/icons/warning/ACCENT_COLOR");
width: 9%;
display: inline-block;
vertical-align: middle;
}
label {
cursor: pointer;
}
.switch_preference {
display: flex;
align-items: center;
}
.preference_description {
flex-grow: 1;
width: 0; /*fix unknown display bug of .switch*/
margin-right: 20px;
}
.preference_description p:last-of-type {
font-size: .8em;
}
.switch {
position: relative;
display: inline-block;
width: 60px;
height: 34px;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.switch span {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
border-radius: 34px;
transition: .3s;
}
.switch span::before {
position: absolute;
content: "";
height: 26px;
width: 26px;
left: 4px;
bottom: 4px;
background-color: white;
border-radius: 50%;
transition: .3s;
}
.switch input:checked + span {
background-color: var(--accent);
}
.switch input:focus + span {
box-shadow: 0 0 1px var(--accent);
}
.switch input:checked + span:before {
transform: translateX(26px);
}
#avatarContainer {
display: flex;
justify-content: center;
}
#avatarContainer .avatar {
font-size: 4em;
margin-right: unset;
}
#avatarContainer label:hover .avatar {
opacity: .4;
}
#avatarContainer>label {
position: relative;
}
#avatarContainer .avatar + p {
display: none;
position: absolute;
top: 50%;
transform: translateY(-50%);
left: 0;
right: 0;
margin: auto;
text-align: center;
}
#avatarContainer label:hover p {
display: block;
}
#profile_info section {
display: block;
margin-bottom: 20px;
border-top: 1px solid black;
}
#profile_info section:first-of-type {
border-top: unset;
}
#profile_info input {
margin: 10px;
}
#profile_info span {
font-weight: bold;
}
#profile_info>div>div p {
font-weight: normal;
font-size: 0.9em;
}
#session_info .avatar {
width: 6em;
height: 6em;
display: block;
margin: auto;
}
#session_info .name {
display: flex;
justify-content: center;
}
#session_info .name button::after {
content: url("/static/imgs/icons/refresh");
}
#session_info .session_field {
display: flex;
gap: .3em;
}
#session_info .session_field p {
margin-top: 0;
}
#session_info .session_field p:first-child {
color: #34db4a;
}
#session_info .session_field p:last-child {
font-weight: bold;
}
.button_row {
display: flex;
gap: 15px;
}
.section_title {
margin-left: 8px;
font-weight: bold;
opacity: 0.5;
}
.section_title:first-of-type {
margin-top: 25px;
}
#left_panel {
background-color: #1D2228;
}
#right_panel {
background-color: #15191E;
overflow: hidden;
}
#me {
border-bottom: 2px solid var(--accent);
padding: 10px;
display: flex;
align-items: center;
font-size: 1.7em;
cursor: pointer;
}
#me>div {
display: flex;
align-items: center;
flex-grow: 1;
}
#me p {
margin: 0;
font-weight: bold;
display: inline;
}
#me>div:hover p {
color: var(--accent);
}
#identity_fingerprint {
text-align: center;
margin-bottom: 0;
}
#left_panel ul:last-of-type, #msg_log {
flex-grow: 1;
}
#left_panel ul li {
font-size: 1.1em;
padding: 15px;
height: 50px;
box-sizing: border-box;
margin-left: 8px;
margin-bottom: 10px;
border-radius: 8px;
cursor: pointer;
display: flex;
align-items: center;
}
#left_panel ul li>p {
display: inline;
font-weight: bold;
flex-grow: 1;
}
#left_panel ul li .avatar {
width: 2em;
height: 2em;
}
#left_panel ul li:hover, #left_panel ul li.current {
background-color: #333940;
}
#left_panel ul li p::after {
content: url("/static/imgs/icons/warning/ACCENT_COLOR");
display: inline-block;
width: 1em;
margin-left: 5px;
vertical-align: middle;
}
#left_panel ul li.is_contact p::after {
content: unset;
}
#left_panel ul li.is_verified p::after {
content: url("/static/imgs/icons/verified/ACCENT_COLOR");
}
#left_panel ul li .not_seen_marker {
width: 12px;
height: 12px;
background-color: var(--accent);
border-radius: 12px;
}
#aira_version {
opacity: 0.5;
font-weight: bold;
margin: 8px;
}
#refresher button::after {
content: url("/static/imgs/icons/refresh");
}
#refresher, #connect_box>div {
position: relative;
}
#show_local_ips, #refresher button {
position: absolute;
right: 10px;
top: 15px;
z-index: 1;
}
#show_local_ips::after {
content: url("/static/imgs/icons/info/52585C");
background-color: unset;
padding: unset;
width: 38px;
height: 38px;
}
#show_local_ips:hover::after {
background-color: unset;
content: url("/static/imgs/icons/info/ACCENT_COLOR");
}
.popup ul {
list-style-type: unset;
}
#chat_header {
flex-direction: row;
align-items: center;
padding: 20px 20px;
font-size: 1.5em;
}
#chat_header>div {
display: flex;
align-items: center;
flex-grow: 1;
cursor: pointer;
}
#chat_header>div:hover p {
color: var(--accent);
}
#chat_header>div>p { /*name*/
font-weight: bold;
margin: 0;
}
#chat_header p::after {
content: url("/static/imgs/icons/warning/ACCENT_COLOR");
display: inline-block;
width: 1.2em;
vertical-align: middle;
margin-left: 10px;
}
#chat_header.is_contact p::after {
content: unset;
}
#chat_header.is_verified p::after {
content: url("/static/imgs/icons/verified/ACCENT_COLOR");
}
#chat_header.is_contact #delete_conversation::after {
content: url("/static/imgs/icons/delete_conversation");
}
#add_contact::after {
content: url("/static/imgs/icons/add_contact");
}
#chat_header.is_contact #remove_contact::after {
content: url("/static/imgs/icons/remove_contact");
}
#chat_header.is_contact #verify {
display: unset;
}
#chat_header #verify,
#chat_header.is_verified #verify,
#chat_header.is_contact #add_contact,
#chat_header.offline #add_contact {
display: none;
}
#chat_header.is_contact #verify::after {
content: url("/static/imgs/icons/verified");
}
#logout::after {
content: url("/static/imgs/icons/logout");
}
#message_input {
border: unset;
padding: 20px;
font-size: 1.1em;
}
#file_transfer {
border-top: 2px solid var(--accent);
display: none;
position: relative;
}
#file_transfer.active {
display: block;
}
#file_transfer span {
font-weight: bold;
}
#file_control {
display: flex;
align-items: center;
}
#file_cancel {
padding: 0;
}
#file_cancel::after {
background-color: unset;
width: 20px;
content: url("/static/imgs/icons/cancel/ACCENT_COLOR");
}
#file_progress {
display: none;
gap: 10px;
align-items: center;
margin-bottom: 15px;
}
#file_transfer.active>#file_progress {
display: flex;
}
#file_status {
margin-top: 0;
}
#file_percent, #file_speed {
font-weight: bold;
margin: 0;
border-left: 2px solid var(--accent);
padding-left: 10px;
}
#file_progress_bar {
flex-grow: 1;
height: 25px;
}
#file_progress_bar div {
height: 100%;
background-color: var(--accent);
}
#message_box {
border-top: 2px solid var(--accent);
margin-bottom: 0;
}
#msg_log {
font-size: 1.1em;
overflow-y: scroll;
white-space: pre;
}
#msg_log p {
margin: 0;
}
#msg_log li .header {
display: flex;
align-items: center;
margin-top: 15px;
}
#msg_log li .header p {
color: var(--accent);
font-weight: bold;
}
#msg_log li .content {
margin-left: 2em;
margin-top: 5px;
margin-bottom: 10px;
}
#msg_log a {
color: #238cf5;
}
#msg_log .file {
display: flex;
align-items: end;
border-left: 3px solid var(--accent);
padding-left: 15px;
}
#msg_log .file div { /*title and filename container*/
display: flex;
flex-direction: column;
}
#msg_log .file h4 {
margin: 0;
}
#msg_log .file p {
color: var(--accent);
}
#msg_log .file a::after {
content: url("/static/imgs/icons/download/ACCENT_COLOR");
display: block;
width: 2em;
margin-left: 15px;
}
#message_box, #chat_header, #msg_log {
display: none;
}