cryptpad/www/contacts/app-contacts.less

253 lines
7 KiB
Text
Raw Normal View History

2017-09-18 13:09:01 +00:00
@import (once) "../../customize/src/less2/include/browser.less";
@import (once) "../../customize/src/less2/include/toolbar.less";
@import (once) "../../customize/src/less2/include/markdown.less";
@import (once) '../../customize/src/less2/include/fileupload.less';
@import (once) '../../customize/src/less2/include/alertify.less';
@import (once) '../../customize/src/less2/include/avatar.less';
.toolbar_main(
@bg-color: @colortheme_friends-bg,
@warn-color: @colortheme_friends-warn,
@color: @colortheme_friends-color
);
2017-09-18 13:09:01 +00:00
.fileupload_main();
.alertify_main();
// body
&.cp-app-contacts {
@keyframes example {
0% {
background: rgba(0,0,0,0.1);
}
50% {
background: rgba(0,0,0,0.3);
}
100% {
background: rgba(0,0,0,0.1);
}
}
display: flex;
flex-flow: column;
background-color: red !important;
@button-border: 2px;
@bg-color: @colortheme_friends-bg;
@color: @colortheme_friends-color;
2017-10-19 07:58:28 +00:00
#cp-app-contacts-container {
2017-09-18 13:09:01 +00:00
flex: 1;
display: flex;
justify-content: center;
align-items: center;
min-height: 0;
&.ready {
background-size: cover;
background-position: center;
}
}
2017-10-19 07:58:28 +00:00
#cp-toolbar {
2017-09-18 13:09:01 +00:00
display: flex; // We need this to remove a 3px border at the bottom of the toolbar
}
2017-10-19 07:58:28 +00:00
#cp-app-contacts-friendlist {
2017-09-18 13:09:01 +00:00
width: 350px;
height: 100%;
background-color: lighten(@bg-color, 10%);
overflow-y: auto;
2017-10-19 07:58:28 +00:00
.cp-app-contacts-friend {
2017-09-18 13:09:01 +00:00
background: rgba(0,0,0,0.1);
padding: 5px;
margin: 10px;
cursor: pointer;
2017-10-19 07:58:28 +00:00
position: relative;
.cp-app-contacts-right-col {
2017-10-03 15:53:28 +00:00
margin-left: 5px;
display: flex;
flex-flow: column;
}
2017-09-18 13:09:01 +00:00
&:hover {
background-color: rgba(0,0,0,0.3);
}
2017-10-19 07:58:28 +00:00
&.cp-app-contacts-notify {
2017-09-18 13:09:01 +00:00
animation: example 2s ease-in-out infinite;
}
}
2017-10-19 07:58:28 +00:00
.cp-app-contacts-remove {
cursor: pointer;
width: 20px;
&:hover {
color: darken(@color, 20%);
}
}
2017-09-18 13:09:01 +00:00
}
2017-10-19 07:58:28 +00:00
#cp-app-contacts-friendlist .cp-app-contacts-friend, #cp-app-contacts-messaging .cp-avatar {
2017-09-18 13:09:01 +00:00
.avatar_main(30px);
2017-10-03 15:53:28 +00:00
&.cp-avatar {
2017-09-18 13:09:01 +00:00
display: flex;
}
cursor: pointer;
color: @color;
media-tag {
img {
color: #000;
}
}
2017-10-19 07:58:28 +00:00
media-tag, .cp-avatar-default {
2017-09-18 13:09:01 +00:00
margin-right: 5px;
}
2017-10-19 07:58:28 +00:00
.cp-app-contacts-status {
2017-09-18 13:09:01 +00:00
width: 5px;
display: inline-block;
position: absolute;
right: 0;
top: 0;
bottom: 0;
opacity: 0.7;
background-color: #777;
2017-10-19 07:58:28 +00:00
&.cp-app-contacts-online {
2017-09-18 13:09:01 +00:00
background-color: green;
}
2017-10-19 07:58:28 +00:00
&.cp-app-contacts-offline {
2017-09-18 13:09:01 +00:00
background-color: red;
}
}
}
.placeholder (@color: #bbb) {
&::-webkit-input-placeholder { /* WebKit, Blink, Edge */
color: @color;
}
&:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color: @color;
opacity: 1;
}
&::-moz-placeholder { /* Mozilla Firefox 19+ */
color: @color;
opacity: 1;
}
&:-ms-input-placeholder { /* Internet Explorer 10-11 */
color: @color;
}
&::-ms-input-placeholder { /* Microsoft Edge */
color: @color;
}
}
2017-10-19 07:58:28 +00:00
#cp-app-contacts-messaging {
2017-09-18 13:09:01 +00:00
flex: 1;
height: 100%;
background-color: lighten(@bg-color, 20%);
min-width: 0;
2017-10-19 07:58:28 +00:00
.cp-app-contacts-info {
2017-09-18 13:09:01 +00:00
padding: 20px;
}
2017-10-19 07:58:28 +00:00
.cp-app-contacts-header {
2017-09-18 13:09:01 +00:00
background-color: lighten(@bg-color, 15%);
padding: 0;
display: flex;
justify-content: space-between;
align-items: center;
height: 50px;
.hover () {
height: 100%;
line-height: 30px;
padding: 10px;
&:hover {
background-color: rgba(50,50,50,0.3);
}
}
2017-10-19 07:58:28 +00:00
.cp-avatar,
.cp-app-contacts-right-col {
2017-09-18 13:09:01 +00:00
flex:1 1 auto;
}
2017-10-19 07:58:28 +00:00
.cp-app-contacts-remove-history {
2017-09-18 13:09:01 +00:00
.hover;
}
2017-10-03 15:53:28 +00:00
.cp-avatar {
2017-09-18 13:09:01 +00:00
margin: 10px;
}
2017-10-19 07:58:28 +00:00
.cp-app-contacts-more-history {
2017-09-18 13:09:01 +00:00
//display: none;
.hover;
2017-10-19 07:58:28 +00:00
&.cp-app-contacts-faded {
2017-09-18 13:09:01 +00:00
color: darken(@bg-color, 5%);
}
}
}
2017-10-19 07:58:28 +00:00
.cp-app-contacts-chat {
2017-09-18 13:09:01 +00:00
height: 100%;
display: flex;
flex-flow: column;
2017-10-19 07:58:28 +00:00
.cp-app-contacts-messages {
2017-09-18 13:09:01 +00:00
padding: 0 20px;
margin: 10px 0;
flex: 1;
overflow-x: auto;
2017-10-19 07:58:28 +00:00
.cp-app-contacts-message {
2017-09-18 13:09:01 +00:00
& > div {
padding: 0 10px;
}
2017-10-19 07:58:28 +00:00
.cp-app-contacts-content {
2017-09-18 13:09:01 +00:00
overflow: hidden;
word-wrap: break-word;
&> * {
margin: 0;
}
}
2017-10-19 07:58:28 +00:00
.cp-app-contacts-date {
2017-09-18 13:09:01 +00:00
display: none;
font-style: italic;
}
2017-10-19 07:58:28 +00:00
.cp-app-contacts-sender {
2017-09-18 13:09:01 +00:00
margin-top: 10px;
font-weight: bold;
background-color: rgba(0,0,0,0.1);
}
}
}
}
2017-10-19 07:58:28 +00:00
.cp-app-contacts-input {
2017-09-18 13:09:01 +00:00
background-color: lighten(@bg-color, 15%);
height: auto;
min-height: 50px;
display: flex;
align-items: center;
justify-content: center;
padding: 0 75px;
textarea {
margin: 5px 0;
padding: 0 10px;
border: none;
height: 50px;
flex: 1;
background-color: darken(@bg-color, 10%);
color: @color;
resize: none;
line-height: 50px;
overflow-y: auto;
.placeholder(#bbb);
&[disabled=true] {
.placeholder(#999);
}
&:placeholder-shown { line-height: 50px; }
}
button {
height: 50px;
border-radius: 0;
border: none;
background-color: darken(@bg-color, 15%);
&:hover {
background-color: darken(@bg-color, 20%);
}
}
}
}
}