_chatbox.scss 20 KB

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