_chatbox.scss 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704
  1. #conversejs {
  2. .chatbox-navback {
  3. display: none;
  4. }
  5. .flyout {
  6. border-radius: $chatbox-border-radius;
  7. position: absolute;
  8. @media screen and (max-height: $mobile-landscape-height) {
  9. border-radius: 0;
  10. }
  11. @media screen and (max-width: $mobile-portrait-length) {
  12. border-radius: 0;
  13. }
  14. @media screen and (max-height: $mobile-landscape-height) {
  15. bottom: 0;
  16. }
  17. @media screen and (max-width: $mobile-portrait-length) {
  18. bottom: 0;
  19. }
  20. }
  21. .chatbox-btn {
  22. border-radius: 25%;
  23. border: none;
  24. cursor: pointer;
  25. font-size: $chatbox-button-size;
  26. margin: 0 0.2em;
  27. padding: 0 0 0 0.5em;
  28. text-decoration: none;
  29. &:active {
  30. position: relative;
  31. top: 1px;
  32. }
  33. }
  34. .chat-head {
  35. flex-wrap: nowrap;
  36. color: #ffffff;
  37. font-size: 100%;
  38. margin: 0;
  39. padding: 0.5em;
  40. position: relative;
  41. &.chat-head-chatbox {
  42. background-color: $chat-head-color;
  43. }
  44. .avatar {
  45. height: 36px;
  46. width: 36px;
  47. margin-right: 0.5em;
  48. }
  49. .chatbox-title {
  50. .chatroom-description {
  51. font-size: 80%;
  52. }
  53. }
  54. .chatbox-buttons {
  55. flex-direction: row-reverse;
  56. @include make-col-ready();
  57. @include make-col(3);
  58. padding: 0;
  59. }
  60. .user-custom-message {
  61. color: lighten($chat-head-color, 50%);
  62. font-size: 75%;
  63. overflow: hidden;
  64. text-overflow: ellipsis;
  65. white-space: nowrap;
  66. margin: 0;
  67. padding-top: 0.2em;
  68. }
  69. a, a:visited, a:hover, a:not([href]):not([tabindex]) {
  70. &.chatbox-btn {
  71. &.fa,
  72. &.fas,
  73. &.far {
  74. color: white;
  75. &.button-on:before {
  76. padding: 0.2em;
  77. background-color: $chat-head-text-color;
  78. color: $chat-head-color;
  79. }
  80. }
  81. }
  82. }
  83. .chatbox-btn {
  84. color: white;
  85. &.fa, &.far, &.fas {
  86. color: white;
  87. }
  88. &:active {
  89. position: relative;
  90. top: 1px;
  91. }
  92. &.button-on:before {
  93. border-radius: 5%;
  94. background-color: $chat-head-text-color;
  95. color: $chat-head-color;
  96. }
  97. }
  98. }
  99. .chatbox {
  100. text-align: left;
  101. margin: 0 $chat-gutter;
  102. img {
  103. &.emoji {
  104. height: 1.2em;
  105. width: 1.2em;
  106. margin: 0 .05em 0 .1em;
  107. vertical-align: -0.1em;
  108. }
  109. }
  110. @media screen and (max-height: $mobile-landscape-height) {
  111. margin: 0;
  112. width: $mobile-chat-width;
  113. }
  114. @media screen and (max-width: $mobile-portrait-length) {
  115. margin: 0;
  116. width: $mobile-chat-width;
  117. }
  118. .box-flyout {
  119. display: flex;
  120. flex-direction: column;
  121. justify-content: space-between;
  122. background-color: $chat-head-color;
  123. box-shadow: 1px 3px 5px 3px rgba(0, 0, 0, 0.4);
  124. z-index: 1;
  125. overflow-y: hidden;
  126. width: 100%;
  127. @media screen and (max-height: $mobile-landscape-height) {
  128. height: $mobile-chat-height;
  129. width: $mobile-chat-width;
  130. height: 100vh;
  131. }
  132. @media screen and (max-width: $mobile-portrait-length) {
  133. height: $mobile-chat-height;
  134. width: $mobile-chat-width;
  135. height: 100vh;
  136. }
  137. }
  138. .chat-title {
  139. font-family: $heading-font;
  140. color: white;
  141. display: block;
  142. line-height: $line-height-large;
  143. overflow: hidden;
  144. text-overflow: ellipsis;
  145. white-space: nowrap;
  146. a {
  147. color: $chat-head-text-color;
  148. width: 100%;
  149. }
  150. }
  151. .chat-body {
  152. display: flex;
  153. flex-direction: column;
  154. justify-content: space-between;
  155. height: 100%;
  156. background-color: $chat-head-color;
  157. border-bottom-left-radius: $chatbox-border-radius;
  158. border-bottom-right-radius: $chatbox-border-radius;
  159. @media screen and (max-height: $mobile-landscape-height) {
  160. border-bottom-left-radius: 0;
  161. border-bottom-right-radius: 0;
  162. }
  163. @media screen and (max-width: $mobile-portrait-length) {
  164. border-bottom-left-radius: 0;
  165. border-bottom-right-radius: 0;
  166. }
  167. border-top: 0;
  168. p {
  169. color: $text-color;
  170. font-size: $message-font-size;
  171. margin: 0;
  172. padding: 5px;
  173. }
  174. }
  175. .new-msgs-indicator {
  176. position: relative;
  177. width: 100%;
  178. cursor: pointer;
  179. background-color: $chat-head-color;
  180. color: $light-background-color;
  181. padding: 0.5em;
  182. font-size: 0.9em;
  183. text-align: center;
  184. z-index: 20;
  185. white-space: nowrap;
  186. margin-bottom: 0.25em;
  187. }
  188. .chat-content {
  189. height: 100%;
  190. font-size: $message-font-size;
  191. color: $text-color;
  192. overflow-y: auto;
  193. border: 0;
  194. background-color: #ffffff;
  195. line-height: 1.3em;
  196. video {
  197. width: 100%
  198. }
  199. progress {
  200. margin: 0.5em 0;
  201. width: 100%
  202. }
  203. }
  204. .chat-content-sendbutton {
  205. height: calc(100% - #{$chat-textarea-height + $send-button-height + 2*$send-button-margin});
  206. }
  207. .dropdown { /* status dropdown styles */
  208. background-color: $light-background-color;
  209. dd {
  210. margin: 0;
  211. padding: 0;
  212. position: relative;
  213. }
  214. }
  215. .sendXMPPMessage {
  216. -moz-background-clip: padding;
  217. -webkit-background-clip: padding-box;
  218. @include border-bottom-radius($chatbox-border-radius);
  219. background-clip: padding-box;
  220. background-color: white;
  221. border: 0;
  222. margin: 0;
  223. padding: 0;
  224. @media screen and (max-height: $mobile-landscape-height) {
  225. width: 100%;
  226. }
  227. @media screen and (max-width: $mobile-portrait-length) {
  228. width: 100%;
  229. }
  230. .suggestion-box__results {
  231. &:after {
  232. display: none;
  233. }
  234. }
  235. .spoiler-hint {
  236. width: 100%;
  237. }
  238. .chat-textarea {
  239. color: $chat-textarea-color;
  240. border-top-left-radius: 0;
  241. border-top-right-radius: 0;
  242. @include border-bottom-radius($chatbox-border-radius);
  243. padding: 0.5em;
  244. width: 100%;
  245. border: none;
  246. min-height: $chat-textarea-height;
  247. margin-bottom: -4px; // Not clear why this is necessar :(
  248. resize: none;
  249. &.spoiler {
  250. height: 42px;
  251. }
  252. &.correcting {
  253. background-color: lighten($chat-head-color, 50%);
  254. }
  255. }
  256. .send-button {
  257. position: absolute;
  258. left: $send-button-margin;
  259. @include calc(width, '100% - #{2*$send-button-margin}');
  260. background-color: $chat-head-color;
  261. color: $inverse-link-color;
  262. font-size: 80%;
  263. height: $send-button-height;
  264. bottom: -$send-button-height - $send-button-margin;
  265. }
  266. .chat-toolbar {
  267. box-sizing: border-box;
  268. margin: 0;
  269. padding: 0.25em;
  270. display: block;
  271. border-top: 4px solid $chat-head-color;
  272. background-color: white;
  273. color: $chat-head-color;
  274. .fa, .fa:hover,
  275. .far, .far:hover,
  276. .fas, .fas:hover {
  277. color: $chat-head-color;
  278. font-size: $font-size-large;
  279. }
  280. .unencrypted a,
  281. .unencrypted {
  282. color: $text-color;
  283. .toolbar-menu {
  284. a {
  285. color: $link-color;
  286. }
  287. }
  288. }
  289. .unverified a,
  290. .unverified {
  291. color: #cf5300;
  292. }
  293. .private a,
  294. .private {
  295. color: #4b7003;
  296. }
  297. .toggle-occupants {
  298. float: right;
  299. }
  300. li {
  301. cursor: pointer;
  302. display: inline-block;
  303. list-style: none;
  304. padding: 0 0.5em;
  305. &:hover {
  306. cursor: pointer;
  307. }
  308. .toolbar-menu {
  309. background-color: #fff;
  310. bottom: 2rem;
  311. box-shadow: -1px -1px 2px 0 rgba(0, 0, 0, 0.4);
  312. height: auto;
  313. margin-bottom: 0;
  314. min-width: 21rem;
  315. position: absolute;
  316. right: 0;
  317. top: auto;
  318. z-index: $zindex-dropdown;
  319. &.otr-menu {
  320. left: -6em;
  321. min-width: 15rem;
  322. &.show {
  323. display: flex;
  324. flex-direction: column;
  325. }
  326. }
  327. a {
  328. color: $link-color;
  329. }
  330. .emoji-picker-container {
  331. background: white;
  332. }
  333. ul {
  334. &.emoji-picker {
  335. overflow-y: scroll;
  336. overflow-x: hidden;
  337. padding: 0.5em;
  338. }
  339. li {
  340. margin-left: 0;
  341. cursor: pointer;
  342. list-style: none;
  343. position: relative;
  344. &.insert-emoji {
  345. padding: 0.2em;
  346. &.picked {
  347. background-color: $highlight-color;
  348. }
  349. &:hover {
  350. background-color: $highlight-color;
  351. }
  352. a {
  353. font-size: $font-size-huge;
  354. &:hover {
  355. color: #8f2831;
  356. }
  357. }
  358. }
  359. }
  360. }
  361. }
  362. &.toggle-smiley {
  363. a.toggle-smiley {
  364. padding: 0;
  365. }
  366. .emoji-toolbar {
  367. box-shadow: 0 -1px 1px 0 rgba(0, 0, 0, 0.4);
  368. .emoji-category-picker {
  369. padding-top: 0.5em;
  370. ul {
  371. display: flex;
  372. flex-direction: row;
  373. justify-content: space-between;
  374. }
  375. }
  376. .emoji-category-picker,
  377. .emoji-skintone-picker {
  378. li {
  379. padding: 0.25em;
  380. font-size: $font-size-huge;
  381. &:hover {
  382. background-color: $highlight-color;
  383. }
  384. }
  385. }
  386. }
  387. }
  388. &.toggle-otr {
  389. ul {
  390. z-index: 99;
  391. li {
  392. &:hover {
  393. background-color: $highlight-color;
  394. }
  395. display: block;
  396. padding: 7px;
  397. a {
  398. display: block;
  399. }
  400. }
  401. }
  402. }
  403. }
  404. }
  405. }
  406. .dragresize {
  407. background: transparent;
  408. border: 0;
  409. margin: 0;
  410. position: absolute;
  411. top: 0;
  412. z-index: 20;
  413. &-top {
  414. cursor: n-resize;
  415. height: 5px;
  416. width: 100%;
  417. }
  418. &-left {
  419. cursor: w-resize;
  420. width: 5px;
  421. height: 100%;
  422. left: 0;
  423. }
  424. &-topleft {
  425. cursor: nw-resize;
  426. width: 15px;
  427. height: 15px;
  428. top: 0;
  429. left: 0;
  430. }
  431. }
  432. }
  433. }
  434. /* ******************* Overlay and embedded styles *************************** */
  435. #conversejs.converse-embedded {
  436. .chat-textarea {
  437. max-height: $fullpage-max-chat-textarea-height;
  438. }
  439. }
  440. #conversejs.converse-embedded,
  441. #conversejs.converse-overlayed {
  442. .chat-head {
  443. border-top-left-radius: $chatbox-border-radius;
  444. border-top-right-radius: $chatbox-border-radius;
  445. @media screen and (max-height: $mobile-landscape-height) {
  446. border-top-left-radius: 0;
  447. border-top-right-radius: 0;
  448. }
  449. @media screen and (max-width: $mobile-portrait-length) {
  450. border-top-left-radius: 0;
  451. border-top-right-radius: 0;
  452. }
  453. .chatbox-title {
  454. @include make-col(8);
  455. }
  456. .chatbox-buttons {
  457. @include make-col(4);
  458. }
  459. }
  460. .emoji-picker {
  461. height: $embedded-emoji-picker-height;
  462. }
  463. .chatbox {
  464. min-width: $overlayed-chat-width !important;
  465. width: $overlayed-chat-width;
  466. .box-flyout {
  467. min-width: $overlayed-chat-width !important;
  468. width: $overlayed-chat-width;
  469. .chat-body {
  470. height: calc(100% - #{$overlayed-chat-head-height});
  471. }
  472. }
  473. }
  474. }
  475. #conversejs.converse-overlayed {
  476. .flyout {
  477. bottom: $overlayed-chatbox-hover-height;
  478. }
  479. .box-flyout {
  480. height: $overlayed-chat-height;
  481. min-height: $overlayed-chat-height/2;
  482. }
  483. .chat-head {
  484. height: $overlayed-chat-head-height;
  485. }
  486. .chat-textarea {
  487. max-height: $overlayed-max-chat-textarea-height;
  488. }
  489. .emoji-picker {
  490. height: $overlayed-emoji-picker-height;
  491. }
  492. .chatbox {
  493. form.sendXMPPMessage {
  494. .chat-toolbar {
  495. li {
  496. .toolbar-menu {
  497. min-width: 235px;
  498. ul {
  499. &.emoji-toolbar {
  500. width: 100%;
  501. .emoji-category {
  502. float: left;
  503. }
  504. }
  505. }
  506. }
  507. }
  508. }
  509. }
  510. }
  511. }
  512. @include media-breakpoint-down(sm) {
  513. #conversejs.converse-overlayed {
  514. > .row {
  515. flex-direction: column;
  516. &.no-gutters {
  517. margin: -1em;
  518. }
  519. }
  520. }
  521. }
  522. /* ******************* Fullpage styles *************************** */
  523. #conversejs.converse-fullscreen {
  524. .flyout {
  525. border-radius: 0;
  526. border-top: 0.8em solid $chat-head-color;
  527. border: $flyout-padding solid $chat-head-color;
  528. bottom: 0;
  529. }
  530. .chatbox-btn {
  531. font-size: $fullpage-chatbox-button-size;
  532. margin: 0 0.3em;
  533. }
  534. .chat-head {
  535. height: $fullpage-chat-head-height;
  536. font-size: $font-size-huge;
  537. padding: 0;
  538. .user-custom-message {
  539. font-size: 70%;
  540. height: auto;
  541. line-height: $line-height;
  542. }
  543. .chatbox-title {
  544. @include make-col(10);
  545. }
  546. .chatbox-buttons {
  547. @include make-col(2);
  548. }
  549. }
  550. .chat-textarea {
  551. max-height: $fullpage-max-chat-textarea-height;
  552. }
  553. .emoji-picker {
  554. height: $fullpage-emoji-picker-height;
  555. }
  556. .chatbox {
  557. width: 100%;
  558. height: 100%;
  559. margin: 0;
  560. @include make-col-ready();
  561. @include media-breakpoint-up(md) {
  562. @include make-col(8);
  563. }
  564. @include media-breakpoint-up(lg) {
  565. @include make-col(9);
  566. }
  567. @include media-breakpoint-up(xl) {
  568. @include make-col(10);
  569. }
  570. .box-flyout {
  571. background-color: $chat-head-color;
  572. box-shadow: none;
  573. height: $fullpage-chat-height;
  574. min-height: $fullpage-chat-height/2;
  575. width: $fullpage-chat-width;
  576. overflow: hidden;
  577. }
  578. .chat-body {
  579. height: calc(100% - #{$fullpage-chat-head-height});
  580. background-color: $chat-head-color;
  581. border-top-left-radius: $chatbox-border-radius;
  582. border-top-right-radius: $chatbox-border-radius;
  583. }
  584. .chat-content {
  585. border-top-left-radius: $chatbox-border-radius;
  586. border-top-right-radius: $chatbox-border-radius;
  587. }
  588. .chat-title {
  589. font-size: $font-size-huge;
  590. line-height: $line-height-huge;
  591. }
  592. .sendXMPPMessage {
  593. ul {
  594. width: 100%;
  595. }
  596. .toggle-smiley {
  597. ul {
  598. &.emoji-toolbar {
  599. .emoji-category-picker {
  600. margin-right: 5em;
  601. }
  602. .emoji-category {
  603. padding-left: 10px;
  604. padding-right: 10px;
  605. }
  606. }
  607. }
  608. }
  609. }
  610. }
  611. }
  612. @include media-breakpoint-down(sm) {
  613. #conversejs:not(.converse-embedded) {
  614. > .row {
  615. flex-direction: row-reverse;
  616. }
  617. #converse-login-panel {
  618. .converse-form {
  619. padding: 3em 2em 3em;
  620. }
  621. }
  622. .chatbox {
  623. width: calc(100% - 50px);
  624. .row {
  625. .box-flyout {
  626. left: 50px;
  627. bottom: 0;
  628. height: 100vh;
  629. box-shadow: none;
  630. }
  631. }
  632. }
  633. }
  634. #conversejs.converse-mobile,
  635. #conversejs.converse-overlayed,
  636. #conversejs.converse-embedded,
  637. #conversejs.converse-fullscreen {
  638. .chatbox {
  639. .box-flyout {
  640. .chatbox-navback {
  641. display: flex;
  642. @include make-col(2);
  643. .fa-arrow-left {
  644. &:before {
  645. color: white;
  646. }
  647. }
  648. }
  649. .chatbox-title {
  650. @include make-col(7);
  651. }
  652. .chatbox-buttons {
  653. @include make-col(3);
  654. }
  655. }
  656. }
  657. }
  658. }