_chatbox.scss 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476
  1. #conversejs {
  2. .flyout {
  3. border-radius: $chatbox-border-radius;
  4. bottom: $chatbox-hover-height;
  5. position: absolute;
  6. @media screen and (max-height: $mobile-landscape-height) {
  7. border-radius: 0;
  8. }
  9. @media screen and (max-width: $mobile-portrait-length) {
  10. border-radius: 0;
  11. }
  12. @media screen and (max-height: $mobile-landscape-height) {
  13. bottom: 0;
  14. }
  15. @media screen and (max-width: $mobile-portrait-length) {
  16. bottom: 0;
  17. }
  18. }
  19. .chatbox-btn {
  20. border-radius: 25%;
  21. border: none;
  22. cursor: pointer;
  23. font-size: $chatbox-button-size;
  24. margin: 0 0.2em;
  25. padding: 0 0 0 0.5em;
  26. text-decoration: none;
  27. &:active {
  28. position: relative;
  29. top: 1px;
  30. }
  31. }
  32. .chat-head {
  33. flex-wrap: nowrap;
  34. color: #ffffff;
  35. font-size: 100%;
  36. height: $chat-head-height;
  37. margin: 0;
  38. padding: 0.5em;
  39. position: relative;
  40. &.chat-head-chatbox {
  41. background-color: $chat-head-color;
  42. }
  43. .avatar {
  44. height: 36px;
  45. width: 36px;
  46. margin-right: 0.5em;
  47. }
  48. .chatbox-buttons {
  49. flex-direction: row-reverse;
  50. @include make-col-ready();
  51. @include make-col(4);
  52. padding: 0;
  53. }
  54. .user-custom-message {
  55. color: white;
  56. font-size: 75%;
  57. font-style: italic;
  58. overflow: hidden;
  59. text-overflow: ellipsis;
  60. white-space: nowrap;
  61. margin: 0;
  62. padding-top: 0.2em;
  63. }
  64. a, a:visited, a:hover, a:not([href]):not([tabindex]) {
  65. &.chatbox-btn {
  66. &.fa {
  67. color: white;
  68. &.button-on:before {
  69. padding: 0.2em;
  70. background-color: $chat-head-text-color;
  71. color: $chat-head-color;
  72. }
  73. }
  74. }
  75. }
  76. .chatbox-btn {
  77. color: white;
  78. &.fa {
  79. color: white;
  80. }
  81. &:active {
  82. position: relative;
  83. top: 1px;
  84. }
  85. &.button-on:before {
  86. border-radius: 5%;
  87. background-color: $chat-head-text-color;
  88. color: $chat-head-color;
  89. }
  90. }
  91. }
  92. .chatbox {
  93. text-align: left;
  94. margin: 0 $chat-gutter;
  95. @media screen and (max-height: $mobile-landscape-height) {
  96. margin: 0;
  97. width: $mobile-chat-width;
  98. }
  99. @media screen and (max-width: $mobile-portrait-length) {
  100. margin: 0;
  101. width: $mobile-chat-width;
  102. }
  103. .box-flyout {
  104. display: flex;
  105. flex-direction: column;
  106. justify-content: space-between;
  107. background-color: $chat-head-color;
  108. box-shadow: 1px 3px 5px 3px rgba(0, 0, 0, 0.4);
  109. height: $chat-height;
  110. min-height: $chat-height/2;
  111. z-index: 1;
  112. overflow-y: scroll;
  113. width: 100%;
  114. @media screen and (max-height: $mobile-landscape-height) {
  115. height: $mobile-chat-height;
  116. width: $mobile-chat-width;
  117. height: 100vh;
  118. }
  119. @media screen and (max-width: $mobile-portrait-length) {
  120. height: $mobile-chat-height;
  121. width: $mobile-chat-width;
  122. height: 100vh;
  123. }
  124. }
  125. .chat-title {
  126. font-family: $heading-font;
  127. color: white;
  128. display: block;
  129. line-height: $line-height-large;
  130. overflow: hidden;
  131. text-overflow: ellipsis;
  132. white-space: nowrap;
  133. a {
  134. color: $chat-head-text-color;
  135. width: 100%;
  136. }
  137. }
  138. .chat-body {
  139. display: flex;
  140. flex-direction: column;
  141. justify-content: space-between;
  142. height: 100%;
  143. background-color: $chat-head-color;
  144. border-bottom-left-radius: $chatbox-border-radius;
  145. border-bottom-right-radius: $chatbox-border-radius;
  146. @media screen and (max-height: $mobile-landscape-height) {
  147. border-bottom-left-radius: 0;
  148. border-bottom-right-radius: 0;
  149. }
  150. @media screen and (max-width: $mobile-portrait-length) {
  151. border-bottom-left-radius: 0;
  152. border-bottom-right-radius: 0;
  153. }
  154. border-top: 0;
  155. p {
  156. color: $text-color;
  157. font-size: $message-font-size;
  158. margin: 0;
  159. padding: 5px;
  160. }
  161. }
  162. .new-msgs-indicator {
  163. position: relative;
  164. width: 100%;
  165. cursor: pointer;
  166. background-color: $chat-head-color;
  167. color: $light-background-color;
  168. padding: 0.5em;
  169. font-size: 0.9em;
  170. text-align: center;
  171. z-index: 20;
  172. white-space: nowrap;
  173. margin-bottom: 0.25em;
  174. }
  175. .chat-content {
  176. height: 100%;
  177. font-size: $message-font-size;
  178. color: $text-color;
  179. overflow-y: auto;
  180. border: 0;
  181. background-color: #ffffff;
  182. line-height: 1.3em;
  183. video {
  184. width: 100%
  185. }
  186. progress {
  187. margin: 0.5em 0;
  188. width: 100%
  189. }
  190. }
  191. .chat-content-sendbutton {
  192. height: calc(100% - #{$chat-textarea-height + $send-button-height + 2*$send-button-margin});
  193. }
  194. .dropdown { /* status dropdown styles */
  195. background-color: $light-background-color;
  196. dd {
  197. margin: 0;
  198. padding: 0;
  199. position: relative;
  200. }
  201. }
  202. .sendXMPPMessage {
  203. -moz-background-clip: padding;
  204. -webkit-background-clip: padding-box;
  205. @include border-bottom-radius($chatbox-border-radius);
  206. background-clip: padding-box;
  207. background-color: white;
  208. border: 0;
  209. margin: 0;
  210. padding: 0;
  211. @media screen and (max-height: $mobile-landscape-height) {
  212. width: 100%;
  213. }
  214. @media screen and (max-width: $mobile-portrait-length) {
  215. width: 100%;
  216. }
  217. .spoiler-hint {
  218. width: 100%;
  219. }
  220. .chat-textarea {
  221. border-top-left-radius: 0;
  222. border-top-right-radius: 0;
  223. @include border-bottom-radius($chatbox-border-radius);
  224. padding: 0.5em;
  225. width: 100%;
  226. border: none;
  227. min-height: $chat-textarea-height;
  228. max-height: $max-chat-textarea-height;
  229. margin-bottom: -4px; // Not clear why this is necessar :(
  230. &.spoiler {
  231. height: 42px;
  232. }
  233. }
  234. .send-button {
  235. position: absolute;
  236. left: $send-button-margin;
  237. @include calc(width, '100% - #{2*$send-button-margin}');
  238. background-color: $chat-head-color;
  239. color: $inverse-link-color;
  240. font-size: 80%;
  241. height: $send-button-height;
  242. bottom: -$send-button-height - $send-button-margin;
  243. }
  244. .chat-toolbar {
  245. box-sizing: border-box;
  246. margin: 0;
  247. padding: 0.25em;
  248. display: block;
  249. border-top: 8px solid $chat-head-color;
  250. background-color: white;
  251. color: $chat-head-color;
  252. .fa, .fa:hover {
  253. color: $chat-head-color;
  254. font-size: $font-size-large;
  255. }
  256. .unencrypted a,
  257. .unencrypted {
  258. color: $text-color;
  259. .toolbar-menu {
  260. a {
  261. color: $link-color;
  262. }
  263. }
  264. }
  265. .unverified a,
  266. .unverified {
  267. color: #cf5300;
  268. }
  269. .private a,
  270. .private {
  271. color: #4b7003;
  272. }
  273. .toggle-occupants {
  274. float: right;
  275. }
  276. li {
  277. cursor: pointer;
  278. display: inline-block;
  279. list-style: none;
  280. padding: 0 0.5em;
  281. &:hover {
  282. cursor: pointer;
  283. }
  284. .toolbar-menu {
  285. background-color: #fff;
  286. bottom: 2rem;
  287. box-shadow: -1px -1px 2px 0 rgba(0, 0, 0, 0.4);
  288. margin-bottom: 0;
  289. min-width: 20rem;
  290. position: absolute;
  291. right: 0;
  292. top: auto;
  293. z-index: $zindex-dropdown;
  294. &.otr-menu {
  295. left: -6em;
  296. min-width: 15rem;
  297. &.show {
  298. display: flex;
  299. flex-direction: column;
  300. }
  301. }
  302. a {
  303. color: $link-color;
  304. }
  305. ul {
  306. &.emoji-picker {
  307. height: $emoji-picker-height;
  308. overflow: scroll;
  309. padding: 0.5em;
  310. }
  311. li {
  312. margin-left: 0;
  313. cursor: pointer;
  314. list-style: none;
  315. position: relative;
  316. &.emoji-skintone {
  317. }
  318. &.insert-emoji {
  319. padding: 0.2em;
  320. &.picked {
  321. background-color: $highlight-color;
  322. }
  323. &:hover {
  324. background-color: $highlight-color;
  325. }
  326. a {
  327. font-size: $font-size-huge;
  328. &:hover {
  329. color: #8f2831;
  330. }
  331. }
  332. }
  333. }
  334. }
  335. }
  336. &.toggle-smiley {
  337. a.toggle-smiley {
  338. padding: 0;
  339. }
  340. .emoji-toolbar {
  341. box-shadow: 0 -1px 1px 0 rgba(0, 0, 0, 0.4);
  342. .emoji-category-picker {
  343. padding-top: 0.5em;
  344. ul {
  345. display: flex;
  346. flex-direction: row;
  347. justify-content: space-between;
  348. }
  349. }
  350. .emoji-category-picker,
  351. .emoji-skintone-picker {
  352. li {
  353. padding: 0.2em;
  354. font-size: $font-size-huge;
  355. &:hover {
  356. background-color: $highlight-color;
  357. }
  358. }
  359. }
  360. }
  361. }
  362. &.toggle-otr {
  363. ul {
  364. z-index: 99;
  365. li {
  366. &:hover {
  367. background-color: $highlight-color;
  368. }
  369. display: block;
  370. padding: 7px;
  371. a {
  372. display: block;
  373. }
  374. }
  375. }
  376. }
  377. }
  378. }
  379. }
  380. .dragresize {
  381. background: transparent;
  382. border: 0;
  383. margin: 0;
  384. position: absolute;
  385. top: 0;
  386. z-index: 20;
  387. &-top {
  388. cursor: n-resize;
  389. height: 5px;
  390. width: 100%;
  391. }
  392. &-left {
  393. cursor: w-resize;
  394. width: 5px;
  395. height: 100%;
  396. left: 0;
  397. }
  398. &-topleft {
  399. cursor: nw-resize;
  400. width: 15px;
  401. height: 15px;
  402. top: 0;
  403. left: 0;
  404. }
  405. }
  406. }
  407. }
  408. #conversejs.converse-fullscreen {
  409. .chatbox-btn {
  410. font-size: $fullpage-chatbox-button-size;
  411. }
  412. .chat-head {
  413. .chatbox-buttons {
  414. @include make-col(3);
  415. }
  416. }
  417. }
  418. @media screen and (max-width: 767px) {
  419. #conversejs:not(.converse-embedded) {
  420. > .row {
  421. flex-direction: row-reverse;
  422. }
  423. #converse-login-panel {
  424. .converse-form {
  425. padding: 3em 2em 3em;
  426. }
  427. }
  428. .sidebar {
  429. display: block;
  430. }
  431. .chatbox {
  432. width: calc(100% - 50px);
  433. .row {
  434. .box-flyout {
  435. left: 50px;
  436. bottom: 0;
  437. height: 100vh;
  438. box-shadow: none;
  439. }
  440. }
  441. }
  442. }
  443. }