xmpp.chapril.org-conversejs/sass/_chatbox.scss

544 lines
16 KiB
SCSS
Raw Normal View History

2017-01-16 22:15:07 +01:00
#converse-embedded-chat,
#conversejs {
.flyout {
border-radius: $chatbox-border-radius;
@media screen and (max-height: $mobile-landscape-height) {
border-radius: 0;
}
@media screen and (max-width: $mobile-portrait-length) {
border-radius: 0;
}
bottom: $chatbox-hover-height;
position: absolute;
@media screen and (max-height: $mobile-landscape-height) {
bottom: 0;
}
@media screen and (max-width: $mobile-portrait-length) {
bottom: 0;
}
}
2018-02-20 16:41:55 +01:00
.chatbox-btn {
border-radius: 25%;
border: none;
cursor: pointer;
font-size: $box-close-font-size;
margin: 0 0.2em;
padding: 0 0 0 0.5em;
2018-02-20 16:41:55 +01:00
text-decoration: none;
&:active {
position: relative;
top: 1px;
}
}
.chat-head {
flex-wrap: nowrap;
color: #ffffff;
font-size: 100%;
height: $chat-head-height;
margin: 0;
padding: 0.5em;
position: relative;
2018-01-27 10:07:54 +01:00
&.chat-head-chatbox {
background-color: $chat-head-color;
}
.avatar {
margin-right: 0.5em;
}
2018-01-27 10:07:54 +01:00
.chatbox-buttons {
flex-direction: row-reverse;
@include make-col-ready();
@include make-col(3);
padding: 0;
}
2018-01-27 10:07:54 +01:00
.user-custom-message {
color: white;
2017-04-04 13:20:22 +02:00
font-size: 75%;
font-style: italic;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin: 0;
2017-04-04 13:20:22 +02:00
padding-top: 0.2em;
}
2018-02-20 16:41:55 +01:00
a, a:visited, a:hover, a:not([href]):not([tabindex]) {
&.chatbox-btn {
&.fa {
color: white;
2018-03-16 20:41:00 +01:00
&.button-on:before {
padding: 0.2em;
background-color: $chat-head-text-color;
2018-02-20 16:41:55 +01:00
color: $chat-head-color;
}
}
}
}
2018-02-20 16:41:55 +01:00
.chatbox-btn {
color: white;
&.fa {
color: white;
}
&:active {
position: relative;
top: 1px;
}
2018-03-16 20:41:00 +01:00
&.button-on:before {
border-radius: 5%;
background-color: $chat-head-text-color;
2018-02-20 16:41:55 +01:00
color: $chat-head-color;
}
}
}
2018-02-20 16:41:55 +01:00
.chatbox {
2017-01-16 22:15:07 +01:00
text-align: left;
margin: 0 $chat-gutter;
@media screen and (max-height: $mobile-landscape-height) {
margin: 0;
width: $mobile-chat-width;
}
@media screen and (max-width: $mobile-portrait-length) {
margin: 0;
width: $mobile-chat-width;
}
2018-02-07 10:30:06 +01:00
.spoiler {
background-color: lighten($chat-head-color, 50%);
}
.box-flyout {
display: flex;
flex-direction: column;
justify-content: space-between;
background-color: $chat-head-color;
box-shadow: 1px 3px 5px 3px rgba(0, 0, 0, 0.4);
height: $chat-height;
min-height: $chat-height/2;
z-index: 1;
overflow-y: scroll;
width: 100%;
@media screen and (max-height: $mobile-landscape-height) {
height: $mobile-chat-height;
width: $mobile-chat-width;
height: 100vh;
}
@media screen and (max-width: $mobile-portrait-length) {
height: $mobile-chat-height;
width: $mobile-chat-width;
height: 100vh;
}
}
.chat-title {
color: $chat-head-text-color;
display: block;
2018-01-27 10:07:54 +01:00
line-height: $line-height-large;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
a {
color: $chat-head-text-color;
width: 100%;
}
}
.chat-body {
display: flex;
flex-direction: column;
justify-content: space-between;
height: 100%;
background-color: $chat-head-color;
border-bottom-left-radius: $chatbox-border-radius;
border-bottom-right-radius: $chatbox-border-radius;
@media screen and (max-height: $mobile-landscape-height) {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
@media screen and (max-width: $mobile-portrait-length) {
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
border-top: 0;
p {
color: $text-color;
font-size: $font-size;
margin: 0;
padding: 5px;
}
.chat-info {
2017-06-20 11:43:54 +02:00
line-height: $line-height-small;
color: $chat-head-color;
2017-06-20 11:43:54 +02:00
font-size: $font-size-small;
2018-03-07 10:42:15 +01:00
margin: 0.5em;
&.badge {
color: $chat-head-text-color;
}
&.chat-state-notification {
font-style: italic;
}
2015-10-28 09:49:28 +01:00
&.chat-event {
clear: left;
2015-10-29 10:21:31 +01:00
font-style: italic;
2015-10-28 09:49:28 +01:00
}
&.chat-error {
color: $warning-color;
font-weight: bold;
}
&.chat-date {
display: inline-block;
margin-top: 1em;
2015-10-28 09:49:28 +01:00
}
}
2016-05-28 13:13:49 +02:00
.chat-image {
2018-02-04 09:18:42 +01:00
height: auto;
width: auto;
max-height: 24em;
2016-05-28 13:13:49 +02:00
max-width: 100%;
}
.chat-action {
font-style: italic;
}
.chat-message {
overflow: auto; // Ensures that content stays inside
margin: 0.3em;
&.onload {
animation: colorchange-chatmessage 1s;
-webkit-animation: colorchange-chatmessage 1s;
}
canvas {
vertical-align: middle;
background: $gray-color;
}
.chat-msg-author {
font-weight: bold;
}
.chat-msg-them {
color: $message-them-color;
}
.chat-msg-me {
color: $link-color;
}
.chat-msg-content {
max-width: 100%;
word-wrap: break-word;
2018-02-07 10:30:06 +01:00
&.spoiler {
border-radius: $chatbox-border-radius;
padding: 0.5em;
}
.emojione {
margin-bottom: -6px;
2015-10-28 09:49:28 +01:00
}
}
}
2015-10-28 09:49:28 +01:00
.delayed {
.chat-msg-them {
color: lighten($message-them-color, 5%);
2015-10-28 09:49:28 +01:00
}
.chat-msg-me {
color: lighten($link-color, 5%);
2015-10-28 09:49:28 +01:00
}
}
}
.new-msgs-indicator {
position: absolute;
width: 100%;
cursor: pointer;
background-color: $chat-head-color;
color: $light-background-color;
padding: 0.5em;
font-size: 0.9em;
text-align: center;
z-index: 20;
white-space: nowrap;
}
.chat-content {
height: 100%;
padding: 0.5em;
font-size: 13px;
color: $text-color;
overflow-y: auto;
border: 0;
background-color: #ffffff;
line-height: 1.3em;
.toggle-spoiler:before {
padding-right: 0.25em;
whitespace: nowrap;
}
}
.chat-content-sendbutton {
height: calc(100% - #{$chat-textarea-height + $send-button-height + 2*$send-button-margin});
}
.dropdown { /* status dropdown styles */
background-color: $light-background-color;
dd {
margin: 0;
padding: 0;
position: relative;
}
}
2018-01-25 12:36:13 +01:00
.sendXMPPMessage {
-moz-background-clip: padding;
-webkit-background-clip: padding-box;
@include border-bottom-radius($chatbox-border-radius);
background-clip: padding-box;
2018-03-06 14:48:23 +01:00
background-color: white;
border: 0;
margin: 0;
padding: 0;
@media screen and (max-height: $mobile-landscape-height) {
width: 100%;
}
@media screen and (max-width: $mobile-portrait-length) {
width: 100%;
}
2018-01-25 12:36:13 +01:00
.spoiler-hint {
2018-02-04 18:33:39 +01:00
width: 100%;
}
.chat-textarea {
border-top-left-radius: 0;
border-top-right-radius: 0;
@include border-bottom-radius($chatbox-border-radius);
padding: 0.5em;
width: 100%;
border: none;
min-height: $chat-textarea-height;
2018-02-04 18:33:39 +01:00
&.spoiler {
height: 42px;
}
}
2018-01-25 12:36:13 +01:00
.send-button {
position: absolute;
left: $send-button-margin;
@include calc(width, '100% - #{2*$send-button-margin}');
background-color: $chat-head-color;
color: $inverse-link-color;
font-size: 80%;
height: $send-button-height;
bottom: -$send-button-height - $send-button-margin;
}
.chat-toolbar {
2017-02-03 00:16:15 +01:00
box-sizing: border-box;
margin: 0;
2018-02-07 13:12:35 +01:00
padding: 0.25em;
display: block;
2018-03-06 14:48:23 +01:00
border-top: 8px solid $chat-head-color;
background-color: white;
color: $chat-head-color;
.fa, .fa:hover {
color: $chat-head-color;
2018-02-07 13:29:54 +01:00
font-size: $font-size-large;
}
.unencrypted a,
.unencrypted {
color: $text-color;
.toolbar-menu {
a {
color: $link-color;
}
}
}
.unverified a,
.unverified {
color: #cf5300;
}
.private a,
.private {
color: #4b7003;
}
.toggle-occupants {
float: right;
}
li {
cursor: pointer;
display: inline-block;
list-style: none;
padding: 0 0.5em;
&:hover {
cursor: pointer;
}
.toolbar-menu {
background-color: #fff;
bottom: 2rem;
box-shadow: -1px -1px 2px 0 rgba(0, 0, 0, 0.4);
margin-bottom: 0;
min-width: 20rem;
position: absolute;
right: 0;
top: auto;
z-index: $zindex-dropdown;
&.otr-menu {
left: -6em;
min-width: 15rem;
&.show {
display: flex;
flex-direction: column;
}
}
a {
color: $link-color;
2017-06-16 11:31:57 +02:00
}
ul {
&.emoji-picker {
height: $emoji-picker-height;
overflow: scroll;
padding: 0.5em;
}
li {
margin-left: 0;
cursor: pointer;
list-style: none;
position: relative;
&.emoji-skintone {
}
&.insert-emoji {
padding: 0.2em;
&.picked {
background-color: $highlight-color;
}
&:hover {
background-color: $highlight-color;
}
a {
font-size: $font-size-huge;
&:hover {
color: #8f2831;
}
}
}
}
2017-06-16 11:31:57 +02:00
}
}
2017-07-18 08:23:55 +02:00
&.toggle-smiley {
.emoji-toolbar {
box-shadow: 0 -1px 1px 0 rgba(0, 0, 0, 0.4);
.emoji-category-picker {
padding-top: 0.5em;
ul {
display: flex;
flex-direction: row;
justify-content: space-between;
}
}
2017-07-18 08:23:55 +02:00
.emoji-category-picker,
.emoji-skintone-picker {
li {
padding: 0.2em;
font-size: $font-size-huge;
&:hover {
background-color: $highlight-color;
}
}
}
}
}
&.toggle-otr {
ul {
z-index: 99;
li {
2017-07-18 08:23:55 +02:00
&:hover {
background-color: $highlight-color;
}
display: block;
padding: 7px;
a {
display: block;
}
}
}
}
}
}
}
.dragresize {
background: transparent;
border: 0;
margin: 0;
position: absolute;
top: 0;
z-index: 20;
&-top {
cursor: n-resize;
height: 5px;
width: 100%;
}
&-left {
cursor: w-resize;
width: 5px;
height: 100%;
left: 0;
}
&-topleft {
cursor: nw-resize;
width: 15px;
height: 15px;
top: 0;
left: 0;
}
}
}
}
2018-01-25 12:36:13 +01:00
@media screen and (max-width: 767px) {
#conversejs {
2018-01-26 20:50:11 +01:00
> .row {
flex-direction: row-reverse;
}
#converse-login-panel {
.converse-form {
2018-01-25 12:36:13 +01:00
padding: 3em 2em 3em;
}
}
2018-01-26 20:50:11 +01:00
.sidebar {
display: block;
}
.chatbox {
2018-01-26 20:50:11 +01:00
width: calc(100% - 50px);
.chat-body {
.chat-message {
.chat-msg-author {
white-space: normal;
}
}
}
.row {
.box-flyout {
left: 50px;
bottom: 0;
height: 100vh;
box-shadow: none;
2018-01-25 12:36:13 +01:00
}
}
}
}
}