_chatbox.scss 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623
  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, input {
  293. &:active, &:focus{
  294. outline-color: var(--chat-head-color);
  295. }
  296. &.correcting {
  297. background-color: var(--chat-correcting-color);
  298. }
  299. }
  300. .chat-textarea {
  301. color: var(--chat-textarea-color);
  302. background-color: var(--chat-textarea-background-color);
  303. border-top-left-radius: 0;
  304. border-top-right-radius: 0;
  305. border-bottom-radius: var(--chatbox-border-radius);
  306. padding-left: 0.5em;
  307. padding-right: 4.5em;
  308. padding-top: 0.5em;
  309. padding-bottom:0.5em;
  310. width: 100%;
  311. border: none;
  312. min-height: var(--chat-textarea-height);
  313. margin-bottom: -2px; // Not clear why this is necessar :(
  314. resize: none;
  315. &.spoiler {
  316. height: 42px;
  317. }
  318. }
  319. }
  320. .dragresize {
  321. background: transparent;
  322. border: 0;
  323. margin: 0;
  324. position: absolute;
  325. top: 0;
  326. z-index: 20;
  327. &-top {
  328. cursor: n-resize;
  329. height: 5px;
  330. width: 100%;
  331. }
  332. &-left,
  333. &-occupants-left {
  334. cursor: w-resize;
  335. width: 5px;
  336. height: 100%;
  337. left: 0;
  338. }
  339. &-topleft {
  340. cursor: nw-resize;
  341. width: 15px;
  342. height: 15px;
  343. top: 0;
  344. left: 0;
  345. }
  346. }
  347. }
  348. }
  349. /* ******************* Overlay and embedded styles *************************** */
  350. #conversejs.converse-embedded,
  351. #conversejs.converse-overlayed {
  352. .controlbox-head {
  353. padding: 0.5em;
  354. }
  355. .chat-head {
  356. border-top-left-radius: 0;
  357. border-top-right-radius: 0;
  358. }
  359. .chatbox {
  360. min-width: var(--overlayed-chat-width) !important;
  361. width: var(--overlayed-chat-width);
  362. .box-flyout {
  363. min-width: var(--overlayed-chat-width) !important;
  364. width: var(--overlayed-chat-width);
  365. }
  366. }
  367. }
  368. #conversejs.converse-overlayed {
  369. .chat-head, .box-flyout {
  370. border-top-left-radius: var(--chatbox-border-radius);
  371. border-top-right-radius: var(--chatbox-border-radius);
  372. @media screen and (max-height: $mobile-landscape-height) {
  373. border-top-left-radius: 0;
  374. border-top-right-radius: 0;
  375. }
  376. @media screen and (max-width: $mobile-portrait-length) {
  377. border-top-left-radius: 0;
  378. border-top-right-radius: 0;
  379. }
  380. }
  381. .flyout {
  382. bottom: var(--overlayed-chatbox-hover-height);
  383. }
  384. .box-flyout {
  385. height: var(--overlayed-chat-height);
  386. min-height: calc(var(--overlayed-chat-height) / 2);
  387. }
  388. .chat-head {
  389. min-height: var(--overlayed-chat-head-height);
  390. }
  391. .minimized-chats-flyout .chat-head {
  392. cursor: default;
  393. }
  394. .chat-textarea {
  395. max-height: var(--overlayed-max-chat-textarea-height);
  396. }
  397. .chatbox {
  398. .chat-body {
  399. height: calc(100% - var(--overlayed-chat-head-height));
  400. }
  401. .chatbox-title {
  402. cursor: pointer;
  403. padding: 0.5rem 0.75rem 0 0.75rem;
  404. }
  405. .chatbox-title--no-desc {
  406. padding: 0.5rem 0.75rem;
  407. }
  408. converse-dropdown {
  409. .btn--standalone {
  410. padding: 0 0 0 0.5em;
  411. }
  412. }
  413. }
  414. }
  415. @include media-breakpoint-down(sm) {
  416. #conversejs.converse-overlayed {
  417. > .row {
  418. flex-direction: column;
  419. &.no-gutters {
  420. margin: -1em;
  421. }
  422. }
  423. }
  424. }
  425. #conversejs.converse-embedded,
  426. #conversejs.converse-fullscreen {
  427. .flyout {
  428. border-radius: 0;
  429. border:none;
  430. bottom: 0;
  431. }
  432. .chatbox {
  433. margin: 0;
  434. .box-flyout {
  435. box-shadow: none;
  436. overflow: hidden;
  437. }
  438. @include make-col-ready();
  439. @include media-breakpoint-up(md) {
  440. @include make-col(8);
  441. }
  442. @include media-breakpoint-up(lg) {
  443. @include make-col(9);
  444. }
  445. @include media-breakpoint-up(xl) {
  446. @include make-col(10);
  447. }
  448. }
  449. &.converse-singleton {
  450. .flyout {
  451. border: none !important;
  452. }
  453. .chat-head {
  454. padding: 0.5em;
  455. }
  456. .chatbox {
  457. margin: 0;
  458. @include make-col-ready();
  459. @include media-breakpoint-up(md) {
  460. @include make-col(12);
  461. }
  462. @include media-breakpoint-up(lg) {
  463. @include make-col(12);
  464. }
  465. @include media-breakpoint-up(xl) {
  466. @include make-col(12);
  467. }
  468. }
  469. }
  470. }
  471. #conversejs.converse-embedded {
  472. .chat-head {
  473. font-size: var(--font-size-huge);
  474. }
  475. .converse-chatboxes {
  476. z-index: 1031; // One more than bootstrap navbar
  477. position: inherit;
  478. flex-wrap: nowrap;
  479. bottom: auto;
  480. height: 100%;
  481. width: 100%;
  482. margin-left: -15px;
  483. }
  484. .chatbox {
  485. .box-flyout {
  486. bottom: 0;
  487. height: 100%;
  488. min-width: auto;
  489. width: 100%;
  490. }
  491. }
  492. .chat-textarea {
  493. max-height: var(--fullpage-max-chat-textarea-height);
  494. }
  495. }
  496. /* ******************* Fullpage styles *************************** */
  497. #conversejs.converse-fullscreen {
  498. .chatbox-btn {
  499. font-size: var(--fullpage-chatbox-button-size);
  500. margin: 0 0.3em;
  501. }
  502. .chat-head {
  503. font-size: var(--font-size-huge);
  504. }
  505. .chat-textarea {
  506. max-height: var(--fullpage-max-chat-textarea-height);
  507. }
  508. .chatbox {
  509. .box-flyout {
  510. box-shadow: none;
  511. height: var(--fullpage-chat-height);
  512. min-height: calc(var(--fullpage-chat-height) / 2);
  513. width: var(--fullpage-chat-width);
  514. overflow: hidden;
  515. }
  516. .chat-body {
  517. height: inherit;
  518. overflow: hidden;
  519. background-color: var(--chat-head-color);
  520. }
  521. .chat-title {
  522. font-size: var(--font-size-huge);
  523. line-height: var(--line-height-huge);
  524. }
  525. .sendXMPPMessage {
  526. ul {
  527. width: 100%;
  528. }
  529. }
  530. }
  531. }
  532. @include media-breakpoint-down(sm) {
  533. #conversejs:not(.converse-embedded) {
  534. > .row {
  535. flex-direction: row-reverse;
  536. }
  537. #converse-login-panel {
  538. .converse-form {
  539. padding: 3em 2em 3em;
  540. }
  541. }
  542. .chatbox {
  543. width: calc(100% - 50px);
  544. .row {
  545. .box-flyout {
  546. left: 50px;
  547. bottom: 0;
  548. height: 100vh;
  549. box-shadow: none;
  550. }
  551. }
  552. }
  553. }
  554. #conversejs.converse-mobile,
  555. #conversejs.converse-overlayed,
  556. #conversejs.converse-fullscreen {
  557. .chatbox {
  558. .box-flyout {
  559. .chatbox-navback {
  560. display: flex;
  561. padding-right: 1em;
  562. .fa-arrow-left {
  563. &:before {
  564. color: white;
  565. }
  566. }
  567. }
  568. }
  569. }
  570. }
  571. }