_chatbox.scss 18 KB

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