_chatbox.scss 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780
  1. #conversejs {
  2. .chatbox-navback {
  3. display: none;
  4. }
  5. .flyout {
  6. border-radius: var(--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: var(--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: var(--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: var(--chat-head-color-lighten-50-percent);
  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: var(--chat-head-text-color);
  78. color: var(--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: var(--chat-head-text-color);
  95. color: var(--chat-head-color);
  96. }
  97. }
  98. }
  99. .chatbox {
  100. text-align: left;
  101. margin: 0 var(--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: var(--mobile-chat-width);
  113. }
  114. @media screen and (max-width: $mobile-portrait-length) {
  115. margin: 0;
  116. width: var(--mobile-chat-width);
  117. }
  118. .box-flyout {
  119. display: flex;
  120. flex-direction: column;
  121. justify-content: space-between;
  122. background-color: var(--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: var(--mobile-chat-height);
  129. width: var(--mobile-chat-width);
  130. height: 100vh;
  131. }
  132. @media screen and (max-width: $mobile-portrait-length) {
  133. height: var(--mobile-chat-height);
  134. width: var(--mobile-chat-width);
  135. height: 100vh;
  136. }
  137. }
  138. .chat-title {
  139. display: var(--heading-display);
  140. font-family: var(--heading-font);
  141. color: var(--heading-color);
  142. display: block;
  143. line-height: var(--line-height-large);
  144. overflow: hidden;
  145. text-overflow: ellipsis;
  146. white-space: nowrap;
  147. &.groupchat {
  148. padding-right: var(--chatroom-head-title-padding-right);
  149. }
  150. a {
  151. color: var(--chat-head-text-color);
  152. width: 100%;
  153. }
  154. }
  155. .chat-body {
  156. display: flex;
  157. flex-direction: column;
  158. justify-content: space-between;
  159. height: 100%;
  160. background-color: var(--chat-head-color);
  161. border-bottom-left-radius: var(--chatbox-border-radius);
  162. border-bottom-right-radius: var(--chatbox-border-radius);
  163. @media screen and (max-height: $mobile-landscape-height) {
  164. border-bottom-left-radius: 0;
  165. border-bottom-right-radius: 0;
  166. }
  167. @media screen and (max-width: $mobile-portrait-length) {
  168. border-bottom-left-radius: 0;
  169. border-bottom-right-radius: 0;
  170. }
  171. border-top: 0;
  172. p {
  173. color: var(--text-color);
  174. font-size: var(--message-font-size);
  175. margin: 0;
  176. padding: 5px;
  177. }
  178. }
  179. .new-msgs-indicator {
  180. position: relative;
  181. width: 100%;
  182. cursor: pointer;
  183. background-color: var(--chat-head-color);
  184. color: var(--light-background-color);
  185. padding: 0.5em;
  186. font-size: 0.9em;
  187. text-align: center;
  188. z-index: 20;
  189. white-space: nowrap;
  190. margin-bottom: 0.25em;
  191. }
  192. .chat-content {
  193. padding: 1em 0;
  194. height: 100%;
  195. font-size: var(--message-font-size);
  196. color: var(--text-color);
  197. overflow-y: auto;
  198. border: 0;
  199. background-color: #ffffff;
  200. line-height: 1.3em;
  201. video {
  202. width: 100%
  203. }
  204. progress {
  205. margin: 0.5em 0;
  206. width: 100%
  207. }
  208. }
  209. .chat-content-sendbutton {
  210. height: calc(100% - (var(--chat-textarea-height) + var(--send-button-height) + 2 * var(--send-button-margin)));
  211. }
  212. .dropdown { /* status dropdown styles */
  213. background-color: var(--light-background-color);
  214. dd {
  215. margin: 0;
  216. padding: 0;
  217. position: relative;
  218. }
  219. }
  220. .sendXMPPMessage {
  221. -moz-background-clip: padding;
  222. -webkit-background-clip: padding-box;
  223. border-bottom-radius: var(--chatbox-border-radius);
  224. background-clip: padding-box;
  225. background-color: white;
  226. border: 0;
  227. margin: 0;
  228. padding: 0;
  229. @media screen and (max-height: $mobile-landscape-height) {
  230. width: 100%;
  231. }
  232. @media screen and (max-width: $mobile-portrait-length) {
  233. width: 100%;
  234. }
  235. .suggestion-box__results {
  236. &:after {
  237. display: none;
  238. }
  239. }
  240. .spoiler-hint {
  241. width: 100%;
  242. }
  243. .chat-textarea {
  244. color: var(--chat-textarea-color);
  245. background-color: var(--chat-textarea-background-color);
  246. border-top-left-radius: 0;
  247. border-top-right-radius: 0;
  248. border-bottom-radius: var(--chatbox-border-radius);
  249. padding: 0.5em;
  250. width: 100%;
  251. border: none;
  252. min-height: var(--chat-textarea-height);
  253. margin-bottom: -4px; // Not clear why this is necessar :(
  254. resize: none;
  255. &:active, &:focus{
  256. outline-color: var(--chat-head-color);
  257. }
  258. &.spoiler {
  259. height: 42px;
  260. }
  261. &.correcting {
  262. background-color: var(--chat-correcting-color);
  263. }
  264. }
  265. .send-button {
  266. position: static;
  267. left: var(--send-button-margin);
  268. width: 100%;
  269. background-color: var(--chat-head-color);
  270. color: var(--inverse-link-color);
  271. font-size: 80%;
  272. height: var(--send-button-height);
  273. bottom: calc(-var(--send-button-height) - var(--send-button-margin));
  274. }
  275. .chat-toolbar {
  276. box-sizing: border-box;
  277. margin: 0;
  278. padding: 0.25em;
  279. display: block;
  280. border-top: 4px solid var(--chat-head-color);
  281. background-color: white;
  282. color: var(--chat-head-color);
  283. .fa, .fa:hover,
  284. .far, .far:hover,
  285. .fas, .fas:hover {
  286. color: var(--chat-head-color);
  287. font-size: var(--font-size-large);
  288. }
  289. .disabled {
  290. color: var(--text-color-lighten-15-percent) !important;
  291. }
  292. .unencrypted a,
  293. .unencrypted {
  294. color: var(--text-color);
  295. .toolbar-menu {
  296. a {
  297. color: var(--link-color);
  298. }
  299. }
  300. }
  301. .unverified a,
  302. .unverified {
  303. color: #cf5300;
  304. }
  305. .private a,
  306. .private {
  307. color: #4b7003;
  308. }
  309. li {
  310. cursor: pointer;
  311. display: inline-block;
  312. list-style: none;
  313. padding: 0 0.5em;
  314. &:hover {
  315. cursor: pointer;
  316. }
  317. .toolbar-menu {
  318. background-color: #fff;
  319. bottom: 2rem;
  320. box-shadow: -1px -1px 2px 0 rgba(0, 0, 0, 0.4);
  321. height: auto;
  322. margin-bottom: 0;
  323. min-width: 21rem;
  324. position: absolute;
  325. right: 0;
  326. top: auto;
  327. z-index: $zindex-dropdown;
  328. &.otr-menu {
  329. left: -6em;
  330. min-width: 15rem;
  331. &.show {
  332. display: flex;
  333. flex-direction: column;
  334. }
  335. }
  336. a {
  337. color: var(--link-color);
  338. }
  339. .emoji-picker-container {
  340. background: white;
  341. }
  342. ul {
  343. &.emoji-picker {
  344. overflow-y: scroll;
  345. overflow-x: hidden;
  346. padding: 0.5em;
  347. }
  348. li {
  349. margin-left: 0;
  350. cursor: pointer;
  351. list-style: none;
  352. position: relative;
  353. &.insert-emoji {
  354. padding: 0.2em;
  355. &.picked {
  356. background-color: var(--highlight-color);
  357. }
  358. &:hover {
  359. background-color: var(--highlight-color);
  360. }
  361. a {
  362. font-size: var(--font-size-huge);
  363. &:hover {
  364. color: #8f2831;
  365. }
  366. }
  367. }
  368. }
  369. }
  370. }
  371. &.toggle-smiley {
  372. a.toggle-smiley {
  373. padding: 0;
  374. }
  375. .emoji-toolbar {
  376. box-shadow: 0 -1px 1px 0 rgba(0, 0, 0, 0.4);
  377. .emoji-category-picker {
  378. padding-top: 0.5em;
  379. ul {
  380. display: flex;
  381. flex-direction: row;
  382. justify-content: space-between;
  383. }
  384. }
  385. .emoji-category-picker,
  386. .emoji-skintone-picker {
  387. li {
  388. padding: 0.25em;
  389. font-size: var(--font-size-huge);
  390. &:hover {
  391. background-color: var(--highlight-color);
  392. }
  393. }
  394. }
  395. }
  396. }
  397. &.toggle-otr {
  398. ul {
  399. z-index: 99;
  400. li {
  401. &:hover {
  402. background-color: var(--highlight-color);
  403. }
  404. display: block;
  405. padding: 7px;
  406. a {
  407. display: block;
  408. }
  409. }
  410. }
  411. }
  412. }
  413. }
  414. }
  415. .dragresize {
  416. background: transparent;
  417. border: 0;
  418. margin: 0;
  419. position: absolute;
  420. top: 0;
  421. z-index: 20;
  422. &-top {
  423. cursor: n-resize;
  424. height: 5px;
  425. width: 100%;
  426. }
  427. &-left {
  428. cursor: w-resize;
  429. width: 5px;
  430. height: 100%;
  431. left: 0;
  432. }
  433. &-topleft {
  434. cursor: nw-resize;
  435. width: 15px;
  436. height: 15px;
  437. top: 0;
  438. left: 0;
  439. }
  440. }
  441. }
  442. }
  443. /* ******************* Overlay and embedded styles *************************** */
  444. #conversejs.converse-embedded,
  445. #conversejs.converse-overlayed {
  446. .chat-head {
  447. border-top-left-radius: var(--chatbox-border-radius);
  448. border-top-right-radius: var(--chatbox-border-radius);
  449. @media screen and (max-height: $mobile-landscape-height) {
  450. border-top-left-radius: 0;
  451. border-top-right-radius: 0;
  452. }
  453. @media screen and (max-width: $mobile-portrait-length) {
  454. border-top-left-radius: 0;
  455. border-top-right-radius: 0;
  456. }
  457. .chatbox-title {
  458. @include make-col(8);
  459. }
  460. .chatbox-buttons {
  461. @include make-col(4);
  462. }
  463. }
  464. .emoji-picker {
  465. height: var(--embedded-emoji-picker-height);
  466. }
  467. .chatbox {
  468. min-width: var(--overlayed-chat-width) !important;
  469. width: var(--overlayed-chat-width);
  470. .box-flyout {
  471. min-width: var(--overlayed-chat-width) !important;
  472. width: var(--overlayed-chat-width);
  473. .chat-body {
  474. height: calc(100% - var(--overlayed-chat-head-height));
  475. }
  476. }
  477. }
  478. }
  479. #conversejs.converse-overlayed {
  480. .flyout {
  481. bottom: var(--overlayed-chatbox-hover-height);
  482. }
  483. .box-flyout {
  484. height: var(--overlayed-chat-height);
  485. min-height: calc(var(--overlayed-chat-height) / 2);
  486. }
  487. .chat-head {
  488. height: var(--overlayed-chat-head-height);
  489. }
  490. .chat-textarea {
  491. max-height: var(--overlayed-max-chat-textarea-height);
  492. }
  493. .emoji-picker {
  494. height: var(--overlayed-emoji-picker-height);
  495. }
  496. .chatbox {
  497. .sendXMPPMessage {
  498. .chat-toolbar {
  499. li {
  500. .toolbar-menu {
  501. min-width: 235px;
  502. ul {
  503. &.emoji-toolbar {
  504. width: 100%;
  505. .emoji-category {
  506. float: left;
  507. }
  508. }
  509. }
  510. }
  511. &.toggle-smiley {
  512. .emoji-toolbar {
  513. .emoji-category-picker {
  514. ul {
  515. flex-wrap: wrap;
  516. justify-content: flex-start;
  517. }
  518. }
  519. }
  520. }
  521. }
  522. }
  523. }
  524. }
  525. }
  526. @include media-breakpoint-down(sm) {
  527. #conversejs.converse-overlayed {
  528. > .row {
  529. flex-direction: column;
  530. &.no-gutters {
  531. margin: -1em;
  532. }
  533. }
  534. }
  535. }
  536. #conversejs.converse-embedded.converse-singleton {
  537. .flyout {
  538. border: none !important;
  539. }
  540. .chat-head {
  541. height: var(--fullpage-chat-head-height);
  542. padding: 0.5em;
  543. }
  544. .chatbox {
  545. margin: 0;
  546. @include make-col-ready();
  547. @include media-breakpoint-up(md) {
  548. @include make-col(12);
  549. }
  550. @include media-breakpoint-up(lg) {
  551. @include make-col(12);
  552. }
  553. @include media-breakpoint-up(xl) {
  554. @include make-col(12);
  555. }
  556. }
  557. }
  558. #conversejs.converse-embedded,
  559. #conversejs.converse-fullscreen {
  560. .flyout {
  561. border-radius: 0;
  562. border-top: 0.8em solid var(--chat-head-color);
  563. border: var(--flyout-padding) solid var(--chat-head-color);
  564. bottom: 0;
  565. }
  566. .chat-head {
  567. height: var(--fullpage-chat-head-height);
  568. padding: 0;
  569. .user-custom-message {
  570. font-size: 70%;
  571. height: auto;
  572. line-height: var(--line-height);
  573. }
  574. .chatbox-title {
  575. @include make-col(10);
  576. }
  577. .chatbox-buttons {
  578. @include make-col(2);
  579. }
  580. }
  581. .chatbox {
  582. margin: 0;
  583. @include make-col-ready();
  584. @include media-breakpoint-up(md) {
  585. @include make-col(8);
  586. }
  587. @include media-breakpoint-up(lg) {
  588. @include make-col(9);
  589. }
  590. @include media-breakpoint-up(xl) {
  591. @include make-col(10);
  592. }
  593. .box-flyout {
  594. box-shadow: none;
  595. overflow: hidden;
  596. }
  597. }
  598. }
  599. #conversejs.converse-embedded {
  600. .converse-chatboxes {
  601. z-index: 1031; // One more than bootstrap navbar
  602. position: inherit;
  603. flex-wrap: nowrap;
  604. bottom: auto;
  605. height: 100%;
  606. width: 100%;
  607. margin-left: -15px;
  608. }
  609. .chatbox {
  610. .box-flyout {
  611. bottom: 0;
  612. height: 100%;
  613. min-width: auto;
  614. width: 100%;
  615. }
  616. .chat-title {
  617. padding: 0.3em;
  618. font-size: 120%;
  619. }
  620. }
  621. .chat-textarea {
  622. max-height: var(--fullpage-max-chat-textarea-height);
  623. }
  624. }
  625. /* ******************* Fullpage styles *************************** */
  626. #conversejs.converse-fullscreen {
  627. .chatbox-btn {
  628. font-size: var(--fullpage-chatbox-button-size);
  629. margin: 0 0.3em;
  630. }
  631. .chat-head {
  632. font-size: var(--font-size-huge);
  633. }
  634. .chat-textarea {
  635. max-height: var(--fullpage-max-chat-textarea-height);
  636. }
  637. .emoji-picker {
  638. height: var(--fullpage-emoji-picker-height);
  639. }
  640. .chatbox {
  641. .box-flyout {
  642. background-color: var(--chat-head-color);
  643. box-shadow: none;
  644. height: var(--fullpage-chat-height);
  645. min-height: calc(var(--fullpage-chat-height) / 2);
  646. width: var(--fullpage-chat-width);
  647. overflow: hidden;
  648. }
  649. .chat-body {
  650. height: calc(100% - var(--fullpage-chat-head-height));
  651. background-color: var(--chat-head-color);
  652. border-top-left-radius: var(--chatbox-border-radius);
  653. border-top-right-radius: var(--chatbox-border-radius);
  654. }
  655. .chat-content {
  656. border-top-left-radius: var(--chatbox-border-radius);
  657. border-top-right-radius: var(--chatbox-border-radius);
  658. }
  659. .chat-title {
  660. font-size: var(--font-size-huge);
  661. line-height: var(--line-height-huge);
  662. }
  663. .sendXMPPMessage {
  664. ul {
  665. width: 100%;
  666. }
  667. .toggle-smiley {
  668. ul {
  669. &.emoji-toolbar {
  670. .emoji-category-picker {
  671. margin-right: 5em;
  672. }
  673. .emoji-category {
  674. padding-left: 10px;
  675. padding-right: 10px;
  676. }
  677. }
  678. }
  679. }
  680. }
  681. }
  682. }
  683. @include media-breakpoint-down(sm) {
  684. #conversejs:not(.converse-embedded) {
  685. > .row {
  686. flex-direction: row-reverse;
  687. }
  688. #converse-login-panel {
  689. .converse-form {
  690. padding: 3em 2em 3em;
  691. }
  692. }
  693. .chatbox {
  694. width: calc(100% - 50px);
  695. .row {
  696. .box-flyout {
  697. left: 50px;
  698. bottom: 0;
  699. height: 100vh;
  700. box-shadow: none;
  701. }
  702. }
  703. }
  704. }
  705. #conversejs.converse-mobile,
  706. #conversejs.converse-overlayed,
  707. #conversejs.converse-fullscreen {
  708. .chatbox {
  709. .box-flyout {
  710. .chatbox-navback {
  711. display: flex;
  712. @include make-col(2);
  713. .fa-arrow-left {
  714. &:before {
  715. color: white;
  716. }
  717. }
  718. }
  719. .chatbox-title {
  720. @include make-col(7);
  721. }
  722. .chatbox-buttons {
  723. @include make-col(3);
  724. }
  725. }
  726. }
  727. }
  728. }