_chatbox.scss 18 KB

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