_chatbox.scss 23 KB

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