_chatbox.scss 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671
  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. @media screen and (max-height: $mobile-landscape-height) {
  103. margin: 0;
  104. width: var(--mobile-chat-width);
  105. }
  106. @media screen and (max-width: $mobile-portrait-length) {
  107. margin: 0;
  108. width: var(--mobile-chat-width);
  109. }
  110. .box-flyout {
  111. display: flex;
  112. flex-direction: column;
  113. justify-content: space-between;
  114. background-color: var(--chat-head-color);
  115. box-shadow: 1px 3px 5px 3px rgba(0, 0, 0, 0.4);
  116. z-index: 2;
  117. overflow-y: hidden;
  118. width: 100%;
  119. @media screen and (max-height: $mobile-landscape-height) {
  120. height: var(--mobile-chat-height);
  121. width: var(--mobile-chat-width);
  122. height: 100vh;
  123. }
  124. @media screen and (max-width: $mobile-portrait-length) {
  125. height: var(--mobile-chat-height);
  126. width: var(--mobile-chat-width);
  127. height: 100vh;
  128. }
  129. }
  130. .chat-title {
  131. display: var(--heading-display);
  132. font-family: var(--heading-font);
  133. color: var(--heading-color);
  134. display: block;
  135. line-height: var(--line-height-large);
  136. overflow: hidden;
  137. text-overflow: ellipsis;
  138. white-space: nowrap;
  139. &.groupchat {
  140. padding-right: var(--chatroom-head-title-padding-right);
  141. }
  142. a {
  143. color: var(--chat-head-text-color);
  144. width: 100%;
  145. }
  146. }
  147. .chat-body {
  148. display: flex;
  149. flex-direction: column;
  150. justify-content: space-between;
  151. height: 100%;
  152. background-color: var(--chat-head-color);
  153. border-bottom-left-radius: var(--chatbox-border-radius);
  154. border-bottom-right-radius: var(--chatbox-border-radius);
  155. @media screen and (max-height: $mobile-landscape-height) {
  156. border-bottom-left-radius: 0;
  157. border-bottom-right-radius: 0;
  158. }
  159. @media screen and (max-width: $mobile-portrait-length) {
  160. border-bottom-left-radius: 0;
  161. border-bottom-right-radius: 0;
  162. }
  163. border-top: 0;
  164. p {
  165. color: var(--text-color);
  166. font-size: var(--message-font-size);
  167. margin: 0;
  168. padding: 5px;
  169. }
  170. }
  171. .new-msgs-indicator {
  172. position: relative;
  173. width: 100%;
  174. cursor: pointer;
  175. background-color: var(--chat-head-color);
  176. color: var(--light-background-color);
  177. padding: 0.5em;
  178. font-size: 0.9em;
  179. text-align: center;
  180. z-index: 20;
  181. white-space: nowrap;
  182. margin-bottom: 0.25em;
  183. }
  184. .chat-content {
  185. padding: 1em 0;
  186. height: 100%;
  187. font-size: var(--message-font-size);
  188. color: var(--text-color);
  189. overflow-y: auto;
  190. border: 0;
  191. background-color: var(--chat-content-background-color);
  192. line-height: 1.3em;
  193. video {
  194. width: 100%
  195. }
  196. progress {
  197. margin: 0.5em 0;
  198. width: 100%
  199. }
  200. }
  201. .chat-content-sendbutton {
  202. height: calc(100% - (var(--chat-textarea-height) + var(--send-button-height) + 2 * var(--send-button-margin)));
  203. }
  204. .dropdown { /* status dropdown styles */
  205. background-color: var(--light-background-color);
  206. dd {
  207. margin: 0;
  208. padding: 0;
  209. position: relative;
  210. }
  211. }
  212. .sendXMPPMessage {
  213. -moz-background-clip: padding;
  214. -webkit-background-clip: padding-box;
  215. border-bottom-radius: var(--chatbox-border-radius);
  216. background-clip: padding-box;
  217. background-color: white;
  218. border: 0;
  219. margin: 0;
  220. padding: 0;
  221. @media screen and (max-height: $mobile-landscape-height) {
  222. width: 100%;
  223. }
  224. @media screen and (max-width: $mobile-portrait-length) {
  225. width: 100%;
  226. }
  227. .suggestion-box__results {
  228. &:after {
  229. display: none;
  230. }
  231. }
  232. .spoiler-hint {
  233. width: 100%;
  234. }
  235. .chat-textarea {
  236. color: var(--chat-textarea-color);
  237. background-color: var(--chat-textarea-background-color);
  238. border-top-left-radius: 0;
  239. border-top-right-radius: 0;
  240. border-bottom-radius: var(--chatbox-border-radius);
  241. padding: 0.5em;
  242. width: 100%;
  243. border: none;
  244. min-height: var(--chat-textarea-height);
  245. margin-bottom: -4px; // Not clear why this is necessar :(
  246. resize: none;
  247. &:active, &:focus{
  248. outline-color: var(--chat-head-color);
  249. }
  250. &.spoiler {
  251. height: 42px;
  252. }
  253. &.correcting {
  254. background-color: var(--chat-correcting-color);
  255. }
  256. }
  257. .send-button {
  258. position: static;
  259. left: var(--send-button-margin);
  260. width: 100%;
  261. background-color: var(--chat-head-color);
  262. color: var(--inverse-link-color);
  263. font-size: 80%;
  264. height: var(--send-button-height);
  265. bottom: calc(-var(--send-button-height) - var(--send-button-margin));
  266. }
  267. .chat-toolbar {
  268. box-sizing: border-box;
  269. margin: 0;
  270. padding: 0.25em;
  271. display: block;
  272. border-top: 4px solid var(--chat-head-color);
  273. background-color: white;
  274. color: var(--chat-head-color);
  275. .fa, .fa:hover,
  276. .far, .far:hover,
  277. .fas, .fas:hover {
  278. color: var(--chat-head-color);
  279. font-size: var(--font-size-large);
  280. }
  281. .disabled {
  282. color: var(--text-color-lighten-15-percent) !important;
  283. }
  284. .unencrypted a,
  285. .unencrypted {
  286. color: var(--text-color);
  287. .toolbar-menu {
  288. a {
  289. color: var(--link-color);
  290. }
  291. }
  292. }
  293. .unverified a,
  294. .unverified {
  295. color: #cf5300;
  296. }
  297. .private a,
  298. .private {
  299. color: #4b7003;
  300. }
  301. li {
  302. cursor: pointer;
  303. display: inline-block;
  304. list-style: none;
  305. padding: 0 0.5em;
  306. &:hover {
  307. cursor: pointer;
  308. }
  309. .toolbar-menu {
  310. background-color: #fff;
  311. bottom: 1.7rem;
  312. box-shadow: -1px -1px 2px 0 rgba(0, 0, 0, 0.4);
  313. height: auto;
  314. margin-bottom: 0;
  315. min-width: 21rem;
  316. position: absolute;
  317. right: 0;
  318. top: auto;
  319. z-index: $zindex-dropdown;
  320. &.otr-menu {
  321. left: -6em;
  322. min-width: 15rem;
  323. &.show {
  324. display: flex;
  325. flex-direction: column;
  326. }
  327. }
  328. a {
  329. color: var(--link-color);
  330. }
  331. }
  332. &.toggle-otr {
  333. ul {
  334. z-index: 99;
  335. li {
  336. &:hover {
  337. background-color: var(--highlight-color);
  338. }
  339. display: block;
  340. padding: 7px;
  341. a {
  342. display: block;
  343. }
  344. }
  345. }
  346. }
  347. }
  348. }
  349. }
  350. .dragresize {
  351. background: transparent;
  352. border: 0;
  353. margin: 0;
  354. position: absolute;
  355. top: 0;
  356. z-index: 20;
  357. &-top {
  358. cursor: n-resize;
  359. height: 5px;
  360. width: 100%;
  361. }
  362. &-left,
  363. &-occupants-left {
  364. cursor: w-resize;
  365. width: 5px;
  366. height: 100%;
  367. left: 0;
  368. }
  369. &-topleft {
  370. cursor: nw-resize;
  371. width: 15px;
  372. height: 15px;
  373. top: 0;
  374. left: 0;
  375. }
  376. }
  377. }
  378. }
  379. /* ******************* Overlay and embedded styles *************************** */
  380. #conversejs.converse-embedded,
  381. #conversejs.converse-overlayed {
  382. .chat-head {
  383. border-top-left-radius: var(--chatbox-border-radius);
  384. border-top-right-radius: var(--chatbox-border-radius);
  385. @media screen and (max-height: $mobile-landscape-height) {
  386. border-top-left-radius: 0;
  387. border-top-right-radius: 0;
  388. }
  389. @media screen and (max-width: $mobile-portrait-length) {
  390. border-top-left-radius: 0;
  391. border-top-right-radius: 0;
  392. }
  393. .chatbox-title {
  394. @include make-col(8);
  395. }
  396. .chatbox-buttons {
  397. @include make-col(4);
  398. }
  399. }
  400. .chatbox {
  401. min-width: var(--overlayed-chat-width) !important;
  402. width: var(--overlayed-chat-width);
  403. .box-flyout {
  404. min-width: var(--overlayed-chat-width) !important;
  405. width: var(--overlayed-chat-width);
  406. .chat-body {
  407. height: calc(100% - var(--overlayed-chat-head-height));
  408. }
  409. }
  410. }
  411. }
  412. #conversejs.converse-overlayed {
  413. .flyout {
  414. bottom: var(--overlayed-chatbox-hover-height);
  415. }
  416. .box-flyout {
  417. height: var(--overlayed-chat-height);
  418. min-height: calc(var(--overlayed-chat-height) / 2);
  419. }
  420. .chat-head {
  421. height: var(--overlayed-chat-head-height);
  422. }
  423. .chat-textarea {
  424. max-height: var(--overlayed-max-chat-textarea-height);
  425. }
  426. .chatbox {
  427. .sendXMPPMessage {
  428. .chat-toolbar {
  429. li {
  430. .toolbar-menu {
  431. min-width: 235px;
  432. }
  433. }
  434. }
  435. }
  436. }
  437. }
  438. @include media-breakpoint-down(sm) {
  439. #conversejs.converse-overlayed {
  440. > .row {
  441. flex-direction: column;
  442. &.no-gutters {
  443. margin: -1em;
  444. }
  445. }
  446. }
  447. }
  448. #conversejs.converse-embedded,
  449. #conversejs.converse-fullscreen {
  450. .flyout {
  451. border-radius: 0;
  452. border-top: 0.8em solid var(--chat-head-color);
  453. border: var(--flyout-padding) solid var(--chat-head-color);
  454. bottom: 0;
  455. }
  456. .chat-head {
  457. height: var(--fullpage-chat-head-height);
  458. padding: 0;
  459. .user-custom-message {
  460. font-size: 70%;
  461. height: auto;
  462. line-height: var(--line-height);
  463. }
  464. .chatbox-title {
  465. @include make-col(10);
  466. }
  467. .chatbox-buttons {
  468. @include make-col(2);
  469. }
  470. }
  471. .chatbox {
  472. margin: 0;
  473. .box-flyout {
  474. box-shadow: none;
  475. overflow: hidden;
  476. }
  477. @include make-col-ready();
  478. @include media-breakpoint-up(md) {
  479. @include make-col(8);
  480. }
  481. @include media-breakpoint-up(lg) {
  482. @include make-col(9);
  483. }
  484. @include media-breakpoint-up(xl) {
  485. @include make-col(10);
  486. }
  487. }
  488. &.converse-singleton {
  489. .flyout {
  490. border: none !important;
  491. }
  492. .chat-head {
  493. height: var(--fullpage-chat-head-height);
  494. padding: 0.5em;
  495. }
  496. .chatbox {
  497. margin: 0;
  498. @include make-col-ready();
  499. @include media-breakpoint-up(md) {
  500. @include make-col(12);
  501. }
  502. @include media-breakpoint-up(lg) {
  503. @include make-col(12);
  504. }
  505. @include media-breakpoint-up(xl) {
  506. @include make-col(12);
  507. }
  508. }
  509. }
  510. }
  511. #conversejs.converse-embedded {
  512. .converse-chatboxes {
  513. z-index: 1031; // One more than bootstrap navbar
  514. position: inherit;
  515. flex-wrap: nowrap;
  516. bottom: auto;
  517. height: 100%;
  518. width: 100%;
  519. margin-left: -15px;
  520. }
  521. .chatbox {
  522. .box-flyout {
  523. bottom: 0;
  524. height: 100%;
  525. min-width: auto;
  526. width: 100%;
  527. }
  528. .chat-title {
  529. padding: 0.3em;
  530. font-size: 120%;
  531. }
  532. }
  533. .chat-textarea {
  534. max-height: var(--fullpage-max-chat-textarea-height);
  535. }
  536. }
  537. /* ******************* Fullpage styles *************************** */
  538. #conversejs.converse-fullscreen {
  539. .chatbox-btn {
  540. font-size: var(--fullpage-chatbox-button-size);
  541. margin: 0 0.3em;
  542. }
  543. .chat-head {
  544. font-size: var(--font-size-huge);
  545. }
  546. .chat-textarea {
  547. max-height: var(--fullpage-max-chat-textarea-height);
  548. }
  549. .chatbox {
  550. .box-flyout {
  551. background-color: var(--chat-head-color);
  552. box-shadow: none;
  553. height: var(--fullpage-chat-height);
  554. min-height: calc(var(--fullpage-chat-height) / 2);
  555. width: var(--fullpage-chat-width);
  556. overflow: hidden;
  557. }
  558. .chat-body {
  559. height: calc(100% - var(--fullpage-chat-head-height));
  560. background-color: var(--chat-head-color);
  561. border-top-left-radius: var(--chatbox-border-radius);
  562. border-top-right-radius: var(--chatbox-border-radius);
  563. }
  564. .chat-content {
  565. border-top-left-radius: var(--chatbox-border-radius);
  566. border-top-right-radius: var(--chatbox-border-radius);
  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. @include make-col(2);
  609. .fa-arrow-left {
  610. &:before {
  611. color: white;
  612. }
  613. }
  614. }
  615. .chatbox-title {
  616. @include make-col(7);
  617. }
  618. .chatbox-buttons {
  619. @include make-col(3);
  620. }
  621. }
  622. }
  623. }
  624. }