_chatbox.scss 19 KB

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