_chatbox.scss 22 KB

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